From 67348f250a1b7970059698002949a5e0a5f3c52f Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 14 八月 2025 08:51:04 +0800
Subject: [PATCH] 上传最新代码

---
 项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs |   32 +++++++++++++++++++++++++++++++-
 1 files changed, 31 insertions(+), 1 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
index cbdf94b..6bbdb17 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Reloaction.cs"
@@ -126,7 +126,37 @@
                 return WebResponseContent.Instance.Error(ex.Message);
             }
         }
-
+        public WebResponseContent InboundTaskCompleted(Dt_Task task)
+        {
+            try
+            {
+                Dt_StockInfo stockInfo = _stockService.StockInfoService.Repository.QueryFirst(x => x.PalletCode == task.PalletCode);
+                if (stockInfo == null)
+                {
+                    return WebResponseContent.Instance.Error($"鏈壘鍒板搴斿簱瀛樹俊鎭�");
+                }
+                Dt_LocationInfo locationInfoEnd = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
+                if (locationInfoEnd == null)
+                {
+                    return WebResponseContent.Instance.Error($"鏈壘鍒板搴旂殑缁堢偣璐т綅淇℃伅");
+                }
+                task.TaskStatus = TaskStatusEnum.Finish.ObjToInt();
+                FeedBackWCSTaskCompleted(task.TaskNum);
+                _unitOfWorkManage.BeginTran();
+                stockInfo.LocationCode = locationInfoEnd.LocationCode;
+                stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
+                _stockService.StockInfoService.Repository.UpdateData(stockInfo);
+                _basicService.LocationInfoService.UpdateLocationStatus(locationInfoEnd, stockInfo.PalletType, LocationStatusEnum.InStock, stockInfo.WarehouseId);
+                BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId > 0 ? WIDESEA_Core.Enums.OperateTypeEnum.浜哄伐瀹屾垚 : WIDESEA_Core.Enums.OperateTypeEnum.鑷姩瀹屾垚);
+                _unitOfWorkManage.CommitTran();
+                return WebResponseContent.Instance.OK();
+            }
+            catch (Exception ex)
+            {
+                _unitOfWorkManage.RollbackTran();
+                return WebResponseContent.Instance.Error(ex.Message);
+            }
+        }
         public WebResponseContent RelocationTaskCompleted(Dt_Task task)
         {
             try

--
Gitblit v1.9.3