莫海杰 3 月之前
父節點
當前提交
2f7879d069
共有 1 個文件被更改,包括 6 次插入6 次删除
  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,
                 }
             };
         }