From 246622a6e9c2563bd21d627c21c6012017f0f04e Mon Sep 17 00:00:00 2001
From: pan <antony1029@163.com>
Date: 星期四, 20 十一月 2025 15:54:03 +0800
Subject: [PATCH] 提交

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
index f8217d5..c2f09f0 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs"
@@ -293,11 +293,11 @@
                                }).ToList();
                             feedmodel.details = groupedData;
 
-                            var result= await _invokeMESService.FeedbackInbound(feedmodel);
+                            var result = await _invokeMESService.FeedbackInbound(feedmodel);
                             if (result != null && result.code == 200)
                             {
                                 _inboundOrderService.Db.Updateable<Dt_InboundOrder>().SetColumns(it => new Dt_InboundOrder { ReturnToMESStatus = 1 })
-                                .Where(it => it.Id== inboundOrder.Id).ExecuteCommand();
+                                .Where(it => it.Id == inboundOrder.Id).ExecuteCommand();
                                 _inboundOrderDetailService.Db.Updateable<Dt_InboundOrderDetail>().SetColumns(it => new Dt_InboundOrderDetail { ReturnToMESStatus = 1 })
                                 .Where(it => it.OrderId == inboundOrder.Id).ExecuteCommand();
                             }
@@ -329,7 +329,7 @@
             var outloks = _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>().Where(x => x.TaskNum == task.TaskNum).ToList();
 
             var stockids = outloks.Select(x => x.StockId).ToList();
-            
+
             _stockService.StockInfoService.Db.Updateable<Dt_StockInfo>()
                                   .SetColumns(it => new Dt_StockInfo
                                   {
@@ -343,9 +343,9 @@
                                   {
                                       Status = StockStatusEmun.鍑哄簱閿佸畾.ObjToInt()
                                   })
-                                  .Where(it => stockids.Contains( it.StockId))
+                                  .Where(it => stockids.Contains(it.StockId))
                                   .ExecuteCommand();
- 
+
 
 
             return WebResponseContent.Instance.OK();
@@ -419,6 +419,17 @@
                 return WebResponseContent.Instance.Error($"鏈壘鍒拌鎵樼洏搴撳瓨鏄庣粏淇℃伅");
             }
 
+            // 鑾峰彇鎵�鏈夊洖搴撲腑鐨勫嚭搴撻攣瀹氳褰�
+            var returnLocks = _outStockLockInfoService.Db.Queryable<Dt_OutStockLockInfo>()
+                .Where(it => it.OrderNo == task.OrderNo && it.PalletCode == task.PalletCode && it.Status == (int)OutLockStockStatusEnum.鍥炲簱涓�)
+                .ToList();
+            // 鏇存柊鍑哄簱閿佸畾璁板綍鐘舵�佷负鍥炲簱瀹屾垚
+            foreach (var lockInfo in returnLocks)
+            {
+                lockInfo.Status = (int)OutLockStockStatusEnum.宸插洖搴�;
+            }
+            _outStockLockInfoService.Db.Updateable(returnLocks).ExecuteCommand();
+
             //鏌ヨ揣浣�
             Dt_LocationInfo locationInfo = _locationInfoService.Repository.QueryFirst(x => x.LocationCode == task.TargetAddress);
             if (locationInfo == null)

--
Gitblit v1.9.3