莫海杰 3 hónapja
szülő
commit
2f7879d069
1 módosított fájl, 6 hozzáadás és 6 törlés
  1. 6 6
      SCADA_DAQ/Customer/Service/Wcs_WebOperationService.cs

+ 6 - 6
SCADA_DAQ/Customer/Service/Wcs_WebOperationService.cs

@@ -223,16 +223,16 @@ namespace SCADA_DAQ.Customer.Service
         #region 获取今日出入
         public RpcResponse<object> GetTodayLowUpTimes()
         {
-            var intTimes = Env.DAL.ReadDataTable($" select COUNT(*) from App_BC_OperateLog where Remark_Str = '入库' and " +
-                $" CreateTime_Dt between datetime('now','start of day','+1 seconds') and  datetime('now','start of day','+1 days','-1 seconds') ");
-            var outTimes = Env.DAL.ReadDataTable($" select COUNT(*) from App_BC_OperateLog where Remark_Str = '出库' and " +
-                $" CreateTime_Dt between datetime('now','start of day','+1 seconds') and  datetime('now','start of day','+1 days','-1 seconds') ");
+            var intTimes = Env.DAL.ReadDataTable($" select COUNT(*) as Total from App_BC_OperateLog where Remark_Str = '入库' and " +
+                $" CreateTime_Dt between datetime('now','start of day','+1 seconds') and  datetime('now','start of day','+1 days','-1 seconds') ").DtToList<BaseTableVo>();
+            var outTimes = Env.DAL.ReadDataTable($" select COUNT(*) as Total from App_BC_OperateLog where Remark_Str = '出库' and " +
+                $" CreateTime_Dt between datetime('now','start of day','+1 seconds') and  datetime('now','start of day','+1 days','-1 seconds') ").DtToList<BaseTableVo>();
             return new RpcResponse<object>()
             {
                 Data = new Dictionary<string, int?>()
                 {
-                    ["今日入库次数"] = Convert.ToInt32(intTimes),
-                    ["今日出库次数"] = Convert.ToInt32(outTimes),
+                    ["今日入库次数"] = intTimes[0].Total,
+                    ["今日出库次数"] = outTimes[0].Total,
                 }
             };
         }