|
|
@ -514,7 +514,7 @@ namespace Ems.CollectService.Analysis
|
|
|
|
+ ":" + buffer[i_pointer + 2 + 1].ToString("x2")
|
|
|
|
+ ":" + buffer[i_pointer + 2 + 1].ToString("x2")
|
|
|
|
+ ":" + buffer[i_pointer + 2].ToString("x2");
|
|
|
|
+ ":" + buffer[i_pointer + 2].ToString("x2");
|
|
|
|
logInfoStr += $";终端时间:{strDateTime}";
|
|
|
|
logInfoStr += $";终端时间:{strDateTime}";
|
|
|
|
recordDnbInstant.collectTime = Convert.ToDateTime(strDateTime);
|
|
|
|
//recordDnbInstant.collectTime = Convert.ToDateTime(strDateTime);
|
|
|
|
i_pointer += 8;
|
|
|
|
i_pointer += 8;
|
|
|
|
nParamCount--;
|
|
|
|
nParamCount--;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -524,6 +524,7 @@ namespace Ems.CollectService.Analysis
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logger.Info($"仪表:{recordDnbInstant.monitorId};解析完成数据:{logInfoStr}");
|
|
|
|
logger.Info($"仪表:{recordDnbInstant.monitorId};解析完成数据:{logInfoStr}");
|
|
|
|
recordDnbInstant.collectType = collectType;
|
|
|
|
recordDnbInstant.collectType = collectType;
|
|
|
|
|
|
|
|
recordDnbInstant.collectTime = DateTime.Now;
|
|
|
|
recordDnbInstant.recordTime = DateTime.Now;
|
|
|
|
recordDnbInstant.recordTime = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
|
|
Save_DnbInstant(recordDnbInstant);
|
|
|
|
Save_DnbInstant(recordDnbInstant);
|
|
|
@ -558,13 +559,13 @@ namespace Ems.CollectService.Analysis
|
|
|
|
var info = SqlSugarHelper.Db.Insertable<RecordDnbInstant>(recordDnbInstant).ExecuteCommand();
|
|
|
|
var info = SqlSugarHelper.Db.Insertable<RecordDnbInstant>(recordDnbInstant).ExecuteCommand();
|
|
|
|
if (info > 0)
|
|
|
|
if (info > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logger.Info($"仪表:{recordDnbInstant.monitorId}数据保存成功");
|
|
|
|
logger.Info($"仪表:{recordDnbInstant.monitorId}数据保存成功,数据:{{jsonChange.ModeToJson(recordDnbInstant)");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logger.Info($"仪表:{recordDnbInstant.monitorId}存在FFFF值不保存该条数据");
|
|
|
|
logger.Info($"仪表:{recordDnbInstant.monitorId}存在FFFF值不保存该条数据,数据:{{jsonChange.ModeToJson(recordDnbInstant)");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -577,7 +578,7 @@ namespace Ems.CollectService.Analysis
|
|
|
|
var info = SqlSugarHelper.Db.Insertable<RecordDnbInstant>(recordDnbInstant).ExecuteCommand();
|
|
|
|
var info = SqlSugarHelper.Db.Insertable<RecordDnbInstant>(recordDnbInstant).ExecuteCommand();
|
|
|
|
if (info > 0)
|
|
|
|
if (info > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logger.Info($"仪表:{recordDnbInstant.monitorId}数据保存成功");
|
|
|
|
logger.Info($"仪表:{recordDnbInstant.monitorId}数据保存成功,数据:{jsonChange.ModeToJson(recordDnbInstant)}");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -602,7 +603,7 @@ namespace Ems.CollectService.Analysis
|
|
|
|
{
|
|
|
|
{
|
|
|
|
do
|
|
|
|
do
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
return result;
|
|
|
|
List<string> filterMonitorId = new List<string>(){ "E0076_0100", "E0076_0200", "E0076_0300", "E0076_0400" };
|
|
|
|
List<string> filterMonitorId = new List<string>(){ "E0076_0100", "E0076_0200", "E0076_0300", "E0076_0400" };
|
|
|
|
if (!filterMonitorId.Contains(dnbInstant.monitorId))
|
|
|
|
if (!filterMonitorId.Contains(dnbInstant.monitorId))
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -930,7 +931,7 @@ namespace Ems.CollectService.Analysis
|
|
|
|
+ ":" + buffer[i_pointer + 2 + 1].ToString("x2")
|
|
|
|
+ ":" + buffer[i_pointer + 2 + 1].ToString("x2")
|
|
|
|
+ ":" + buffer[i_pointer + 2].ToString("x2");
|
|
|
|
+ ":" + buffer[i_pointer + 2].ToString("x2");
|
|
|
|
logInfoStr += $";终端时间:{strDateTime}";
|
|
|
|
logInfoStr += $";终端时间:{strDateTime}";
|
|
|
|
recordWaterInstant.collectTime = Convert.ToDateTime(strDateTime);
|
|
|
|
//recordWaterInstant.collectTime = Convert.ToDateTime(strDateTime);
|
|
|
|
i_pointer += 8;
|
|
|
|
i_pointer += 8;
|
|
|
|
nParamCount--;
|
|
|
|
nParamCount--;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -940,6 +941,7 @@ namespace Ems.CollectService.Analysis
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logger.Info($"仪表:{recordWaterInstant.monitorId};解析完成数据:{logInfoStr}");
|
|
|
|
logger.Info($"仪表:{recordWaterInstant.monitorId};解析完成数据:{logInfoStr}");
|
|
|
|
recordWaterInstant.collectType = collectType;
|
|
|
|
recordWaterInstant.collectType = collectType;
|
|
|
|
|
|
|
|
recordWaterInstant.collectTime = DateTime.Now;
|
|
|
|
recordWaterInstant.recordTime = DateTime.Now;
|
|
|
|
recordWaterInstant.recordTime = DateTime.Now;
|
|
|
|
if (appConfig.virtualFlag)
|
|
|
|
if (appConfig.virtualFlag)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -950,12 +952,12 @@ namespace Ems.CollectService.Analysis
|
|
|
|
var info = SqlSugarHelper.Db.Insertable<RecordWaterInstant>(recordWaterInstant).ExecuteCommand();
|
|
|
|
var info = SqlSugarHelper.Db.Insertable<RecordWaterInstant>(recordWaterInstant).ExecuteCommand();
|
|
|
|
if (info > 0)
|
|
|
|
if (info > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logger.Info($"仪表:{recordWaterInstant.monitorId}数据保存成功");
|
|
|
|
logger.Info($"仪表:{recordWaterInstant.monitorId}数据保存成功,数据:{jsonChange.ModeToJson(recordWaterInstant)}");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logger.Info($"仪表:{recordWaterInstant.monitorId}存在FFFF值不保存该条数据");
|
|
|
|
logger.Info($"仪表:{recordWaterInstant.monitorId}存在FFFF值不保存该条数据,数据:{jsonChange.ModeToJson(recordWaterInstant)}");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
@ -964,7 +966,7 @@ namespace Ems.CollectService.Analysis
|
|
|
|
var info = SqlSugarHelper.Db.Insertable<RecordWaterInstant>(recordWaterInstant).ExecuteCommand();
|
|
|
|
var info = SqlSugarHelper.Db.Insertable<RecordWaterInstant>(recordWaterInstant).ExecuteCommand();
|
|
|
|
if (info > 0)
|
|
|
|
if (info > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
logger.Info($"仪表:{recordWaterInstant.monitorId}数据保存成功");
|
|
|
|
logger.Info($"仪表:{recordWaterInstant.monitorId}数据保存成功,数据:{jsonChange.ModeToJson(recordWaterInstant)}");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|