2 Commits 792d1905c8 ... 6e1ef74953

Autor SHA1 Mensaje Fecha
  jochu_liu 6e1ef74953 Merge remote-tracking branch 'origin/master' hace 1 año
  jochu_liu 6d2599b67f 水厂 hace 1 año
Se han modificado 1 ficheros con 5 adiciones y 3 borrados
  1. 5 3
      TimedUpload/QuartzJobs/ChangleWaterFactoryDataJob.cs

+ 5 - 3
TimedUpload/QuartzJobs/ChangleWaterFactoryDataJob.cs

@@ -120,7 +120,7 @@ namespace TimedUpload.QuartzJobs
 
 
                         // 进水
-                        string insql = @"SELECT TOP 1 [id],[设备ID],[记录时间],[采集时间],[设备状态],[通讯状态],[净累计流量],[瞬时流量] FROM [dbo].[历史记录_000523_" + year + "] where 采集时间 >= '" + time + "'";
+                        string insql = @"SELECT TOP 1 [id],[设备ID],[记录时间],[采集时间],[设备状态],[通讯状态],[净累计流量],[瞬时流量] FROM [dbo].[历史记录_000513_" + year + "] where 采集时间 >= '" + time + "'";
                         DataTable inDt = dbHelper.Fill(insql);
                         if (inDt != null && inDt.Rows.Count > 0)
                         {
@@ -138,6 +138,7 @@ namespace TimedUpload.QuartzJobs
                         }
                         else
                         {
+                            break;
                             Dictionary<string, object> meterMap = new Dictionary<string, object>();
                             meterMap["InstantaneousFlow"] = null;
                             meterMap["NetCumulativeFlow"] = null;
@@ -169,6 +170,7 @@ namespace TimedUpload.QuartzJobs
                         }
                         else
                         {
+                            break;
                             Dictionary<string, object> meterMap = new Dictionary<string, object>();
                             meterMap["InstantaneousFlow"] = null;
                             meterMap["NetCumulativeFlow"] = null;
@@ -188,7 +190,7 @@ namespace TimedUpload.QuartzJobs
                                             ,[lvhouYulv],[qingshuichiFlow],[gongshuishuitaOutFlow]
                                             ,[outWaterZD],[outWaterPH],[outWaterYulv]
                                             ,[qingshuichiFluidLevel],[CollectTime],[CreateDt]
-                                              FROM[dbo].[WaterFactoryDaliyRecord] where CreateDt >= '" + searchTime.ToString("yyyy-MM-dd HH:mm") + "' ";
+                                              FROM[dbo].[WaterFactoryDaliyRecord] where CreateDt >= '" + searchTime.AddMinutes(-1).ToString("yyyy-MM-dd HH:mm") + "' ";
 
                         DataTable wqDt = waterFHelper.Fill(waterQuelitySql);
                         if (wqDt != null && wqDt.Rows.Count > 0)
@@ -285,7 +287,7 @@ namespace TimedUpload.QuartzJobs
 
                         string message = JsonConvert.SerializeObject(factoryMap);
 
-
+                        log.Info(message);
                         foreach (KeyValuePair<string, IModel> item in channels)
                         {
                             string key = item.Key;