From a29bf360f42cc3c6942a0ef6604f0ac84ab54a7c Mon Sep 17 00:00:00 2001
From: liulijun <liulijun@hnkhzn.com>
Date: 星期四, 19 三月 2026 17:19:36 +0800
Subject: [PATCH] 修复老厂排程在没生成任务就不更新缺料状态的问题,按照要求修改库位平面图

---
 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs"
index 96cb2e0..685fdff 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutSGOrderDetailService.cs"
@@ -153,7 +153,24 @@
                     
                 }
 
+                // 鍒嗛厤瀹屾垚鍚庯紝妫�鏌ユ瘡涓鍗曟槑缁嗙殑鍒嗛厤鎯呭喌锛岃缃纭殑鐘舵��
+                foreach (var detail in details)
+                {
+                    decimal assignedQuantity = outStockLockInfos.Where(x => x.OrderDetailId == detail.Id).Sum(x => x.AssignQuantity);
+                    if (assignedQuantity > 0)
+                    {
+                        // 宸茬粡鍒嗛厤鍒板簱瀛橈紝鏍囪涓洪潪缂烘枡鐘舵�侊紙鏈紑濮嬶級
+                        detail.OutSGOrderDetailStatus = OutOrderStatusEnum.鏈紑濮�.ObjToInt();
+                    }
+                    else
+                    {
+                        // 鏈垎閰嶅埌搴撳瓨锛屾爣璁颁负缂烘枡
+                        detail.OutSGOrderDetailStatus = OutOrderStatusEnum.缂烘枡.ObjToInt();
+                    }
+                }
+
                 locationInfos.AddRange(_basicRepository.LocationInfoRepository.GetLocationInfos(outStocks.Where(x=>!x.LocationCode.IsNullOrEmpty() && !locationInfos.Select(x=>x.LocationCode).Contains(x.LocationCode)).Select(x => x.LocationCode).ToList()));
+
             }
 
             return (outStocks, outboundOrderDetails, outStockLockInfos, locationInfos, message);

--
Gitblit v1.9.3