From 0e97de73f6719ccd57469cea07a9f567864cc57a Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周三, 04 9月 2024 10:13:54 +0800
Subject: [PATCH] 日志增加  WorkingProcedureCurrent

---
 iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs |   52 +++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 51 insertions(+), 1 deletions(-)

diff --git a/iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs b/iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs
index b7f4f72..3c9294f 100644
--- a/iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs
+++ b/iWara.SCADA.Code/iWare.Wms.Application/Service/Pda/PdaService.cs
@@ -667,7 +667,7 @@
             return "涓嬬嚎鎴愬姛";
         }
 
-       
+
 
 
         /// <summary>
@@ -693,6 +693,12 @@
             w.CarNo == input.CarNo
             && w.UnLineStage == PieceUnLineStage.宸蹭笅绾�
             && w.IsDeleted == false).ToListAsync();
+
+            if (db_WorkPieceOutboundList?.Count == 0)
+            {
+                throw Oops.Oh("娌℃湁鍙嚭搴撶殑鏁版嵁锛�");
+            }
+
 
             var queryOP80NewCodeList = db_WorkPieceOutboundList.Select(x => x.OP80NewCode).ToList();
 
@@ -867,6 +873,50 @@
         }
 
 
+
+        /// <summary>
+        /// 鍑哄簱缁熻
+        /// </summary>
+        /// <param name="input"></param>
+        /// <returns></returns>
+        [HttpPost("getOutBoundWorkPieceInfoCountList")]
+        [DisableOpLog]
+        public async Task<List<OutBoundWorkPieceInfoCountOutput>> GetOutBoundWorkPieceInfoCountList([FromBody] OutBoundWorkPieceInfoCountInput input)
+        {
+            /*
+         //娴嬭瘯
+         List<OutBoundWorkPieceInfoCountOutput> outBoundWorkPieceInfoCountOutputs = new List<OutBoundWorkPieceInfoCountOutput>();
+         outBoundWorkPieceInfoCountOutputs.Add(new OutBoundWorkPieceInfoCountOutput()
+         {
+             Count = 10,
+             WorkPieceOutboundUserName = "AAA"
+         });
+         outBoundWorkPieceInfoCountOutputs.Add(new OutBoundWorkPieceInfoCountOutput()
+         {
+             Count = 99,
+             WorkPieceOutboundUserName = "BBb"
+         });
+         return outBoundWorkPieceInfoCountOutputs;
+         //*/
+
+
+            //DateTimeOffset now = DateTimeOffset.Now; // 鑾峰彇褰撳墠鏃堕棿锛屽寘鎷椂鍖哄亸绉婚噺
+            DateTimeOffset now = input.Date; // 鑾峰彇褰撳墠鏃堕棿锛屽寘鎷椂鍖哄亸绉婚噺
+            DateTimeOffset startOfDay = new DateTimeOffset(now.Year, now.Month, now.Day, 0, 0, 0, now.Offset); // 褰撳ぉ寮�濮嬫椂闂�
+            DateTimeOffset endOfDay = new DateTimeOffset(now.Year, now.Month, now.Day, 23, 59, 59, now.Offset); // 褰撳ぉ缁撴潫鏃堕棿
+            List<WorkPieceOutbound> db_itemModelList = await _workPieceOutboundRep.Where(w => w.CreatedTime >= startOfDay
+            && w.CreatedTime <= endOfDay && w.IsDeleted == false).ToListAsync();
+            //姹囨�诲垎缁�
+            var groupList = db_itemModelList.GroupBy(g => g.WorkPieceOutboundUserName).Select(s => new OutBoundWorkPieceInfoCountOutput()
+            {
+                WorkPieceOutboundUserName = s.Key,
+                Count = s.ToList().Count
+            }).ToList();
+            return groupList;
+            //*/
+        }
+
+
         #endregion
 
     }

--
Gitblit v1.9.3