From e4921e003cc293fea714bdaf74dc6a6b6b750295 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期六, 25 四月 2026 16:20:51 +0800
Subject: [PATCH] Merge branch 'xiaoyang' into dev

---
 Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Outbound.cs |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Outbound.cs b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Outbound.cs
index ead9c74..8c1d4b2 100644
--- a/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Outbound.cs
+++ b/Code/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/WCS/TaskService_Outbound.cs
@@ -85,9 +85,24 @@
                 WebResponseContent content = new WebResponseContent();
                 return await _unitOfWorkManage.BeginTranAsync(async () =>
                 {
+                    if (task.TaskType == (int)TaskOutboundTypeEnum.OutEmpty)
+                    {
+                        location.LocationStatus = LocationStatusEnum.Free.GetHashCode();
+
+                        var updateResult = await _locationInfoService.UpdateLocationInfoAsync(location);
+                        var deleteResult = _stockInfoService.DeleteData(stockInfo).Status;
+                        if (!updateResult && !deleteResult)
+                            return content.Error("浠诲姟瀹屾垚澶辫触");
+
+                        var completeResult1 = await CompleteTaskAsync(task, "鍑哄簱瀹屾垚");
+                        return content.OK();
+
+                    }
+
                     stockInfo.LocationId = 0;
                     stockInfo.LocationCode = string.Empty;
                     stockInfo.OutboundDate = DateTime.Now;
+                    stockInfo.StockStatus = (int)StockStatusEmun.鍑哄簱瀹屾垚;
 
                     location.LocationStatus = LocationStatusEnum.Free.GetHashCode();
 

--
Gitblit v1.9.3