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