From 5f53f4af369a1c7a8a09eb1f45c20a8581d107a9 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 19 三月 2026 22:20:07 +0800
Subject: [PATCH] Merge branch 'master' of http://115.159.85.185:8098/r/ZhiHuiQiCe/LongDeLiLiKu

---
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs |   19 ++++++++++++++-----
 1 files changed, 14 insertions(+), 5 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
index 0b22aa0..c5ad0d1 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs"
@@ -1,4 +1,4 @@
-锘�
+
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -709,7 +709,7 @@
                 }
                 content.Message = result.Item6;
                 //澶勭悊鍑哄簱鏁版嵁
-                return GenerateOutboundTaskDataUpdate(tasks, stockInfos, outSGOrderDetails, outStockLockInfos, locationInfos);
+                return GenerateOutboundTaskDataUpdate(tasks, stockInfos, outSGOrderDetails, outStockLockInfos, locationInfos, result.Item6);
             }
             catch (Exception ex)
             {
@@ -746,6 +746,14 @@
 
             //鍒嗛厤搴撳瓨
             (List<Dt_StockInfo>, List<Dt_OutSGOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>,string) result = _outboundService.OutSGOrderDetailService.AssignStockOutbound(outSGOrderDetails);
+            
+            //淇濆瓨缂烘枡鐘舵�侊紝鏃犺鏄惁鐢熸垚浜嗕换鍔�
+            var shortageDetails = result.Item2.Where(x => x.OutSGOrderDetailStatus == OutOrderStatusEnum.缂烘枡.ObjToInt()).ToList();
+            if (shortageDetails.Any())
+            {
+                _outboundRepository.OutSGOrderDetailRepository.UpdateData(shortageDetails);
+            }
+            
             if (result.Item1 != null && result.Item1.Count > 0)
             {
                 //鑾峰彇浠诲姟
@@ -776,7 +784,8 @@
             }
             else
             {
-                throw new Exception("鏃犲簱瀛�");
+                //娌℃湁搴撳瓨锛屼絾宸茬粡鍦ˋssignStockOutbound鏂规硶涓爣璁颁簡缂烘枡鐘舵�侊紝骞朵笖宸茬粡淇濆瓨
+                orderDetails = result.Item2;
             }
 
             return (tasks, stockInfos, orderDetails, outStockLockInfos, locationInfos, result.Item5);
@@ -785,7 +794,7 @@
         /// 澶勭悊鍑哄簱鏁版嵁
         /// </summary>
         /// <returns></returns>
-        public WebResponseContent GenerateOutboundTaskDataUpdate(List<Dt_Task> tasks, List<Dt_StockInfo>? stockInfos = null, List<Dt_OutSGOrderDetail>? outboundOrderDetails = null, List<Dt_OutStockLockInfo>? outStockLockInfos = null, List<Dt_LocationInfo>? locationInfos = null)
+        public WebResponseContent GenerateOutboundTaskDataUpdate(List<Dt_Task> tasks, List<Dt_StockInfo>? stockInfos = null, List<Dt_OutSGOrderDetail>? outboundOrderDetails = null, List<Dt_OutStockLockInfo>? outStockLockInfos = null, List<Dt_LocationInfo>? locationInfos = null, string message = "")
         {
             try
             {
@@ -825,7 +834,7 @@
                 }
                 _unitOfWorkManage.CommitTran();
                 PushTasksToWCS(tasks);
-                return WebResponseContent.Instance.OK();
+                return WebResponseContent.Instance.OK(message);
             }
             catch (Exception ex)
             {

--
Gitblit v1.9.3