Parcourir la source

水厂添加无数据验证

jochu_liu il y a 1 an
Parent
commit
9f76ef5ceb
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      TimedUpload/QuartzJobs/WaterFactoryDataUploadJob.cs

+ 4 - 0
TimedUpload/QuartzJobs/WaterFactoryDataUploadJob.cs

@@ -149,6 +149,10 @@ namespace TimedUpload.QuartzJobs
                             }
                             string meterDataSql = "select " + queryCol + " from " + tableName + " where 更新时间 = '" + id + "'";
                             DataTable data = dbHelper.Fill(meterDataSql);
+                            if (data == null || data.Rows.Count == 0)
+                            {
+                                continue;
+                            }
                             foreach (string col in queryColArr)
                             {
                                 meterMap[col] = data.Rows[0][col];