zhangliwen 1 vuosi sitten
vanhempi
commit
e67769ef8d

+ 1 - 0
SCADA_DAQ.Plugin.Tailg/Service/WebApiService.cs

@@ -205,6 +205,7 @@ namespace SCADA_DAQ.Plugin.Tailg.Service
             var sql = $"SELECT YEAR(EndTime_Dt) AS 年份, MONTH(EndTime_Dt) AS 月份, " +
                 $"WorkShopId_Str AS 车间号, ProductionLineId_Str AS 产线号, COUNT(*) AS 产量 " +
                 $"FROM APP_TaiLing_ProductionRecord " +
+                $"WHERE EndTime_Dt IS NOT NULL " +
                 $"GROUP BY YEAR(EndTime_Dt), MONTH(EndTime_Dt), WorkShopId_Str, ProductionLineId_Str";
             var dt = Env.SgIDAL.ReadDataTable(sql);
 

+ 1 - 1
SCADA_DAQ/Customer/Service/CustomerService.cs

@@ -422,7 +422,7 @@ namespace SCADA_DAQ.Customer.Service
                 $"(SELECT COUNT(*) FROM APP_TaiLing_ProductionRecord " +
                 $"WHERE DATEDIFF(dd, EndTime_Dt, GETDATE())=0 AND WorkShopId_Str=@W AND ProductionLineId_Str=@P) AS 日产量 " +
                 $"FROM APP_TaiLing_ProductionRecord " +
-                $"WHERE WorkShopId_Str=@W AND ProductionLineId_Str=@P " +
+                $"WHERE WorkShopId_Str=@W AND ProductionLineId_Str=@P AND EndTime_Dt IS NOT NULL " +
                 $"GROUP BY WorkShopId_Str, ProductionLineId_Str;";
             var dt = DAL.ReadDataTable(sql);