From 5189c42ee1b15ba8c54fd258102b4c7262a2e6c7 Mon Sep 17 00:00:00 2001
From: 647556386 <647556386@qq.com>
Date: 星期一, 30 三月 2026 11:40:11 +0800
Subject: [PATCH] 1

---
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_OutboundService/OutboundService.cs |   30 ++++++++++++++++++++++++------
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_InboundService/InboundService.cs   |    2 +-
 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs     |   10 +++++-----
 3 files changed, 30 insertions(+), 12 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_InboundService/InboundService.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_InboundService/InboundService.cs"
index b564789..c08f145 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_InboundService/InboundService.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_InboundService/InboundService.cs"
@@ -152,7 +152,7 @@
 
                 if(inboundOrder.BusinessType != "11")
                 {
-                    var warehouseType = _inboundOrderDetailRepository.Db.Queryable<Dt_InboundOrderDetail>().Where(x => x.Barcode == palletDto.Barcode || x.OutBoxbarcodes == palletDto.Barcode).Select(x => x.WarehouseCode).First();
+                    var warehouseType = _inboundOrderDetailRepository.Db.Queryable<Dt_InboundOrderDetail>().Where(x => (x.Barcode == palletDto.Barcode || x.OutBoxbarcodes == palletDto.Barcode)&& x.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt()).Select(x => x.WarehouseCode).First();
 
                     if (string.IsNullOrEmpty(warehouseType))
                     {
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_OutboundService/OutboundService.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_OutboundService/OutboundService.cs"
index 559ce38..894adab 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_OutboundService/OutboundService.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_OutboundService/OutboundService.cs"
@@ -1376,9 +1376,18 @@
 
                         Func<Dt_OutStockLockInfo, bool> wareWhere = x => string.IsNullOrEmpty(outboundOrderDetails.First().WarehouseCode) ? true : x.WarehouseCode == outboundOrderDetails.First().WarehouseCode;
 
-                        List<Dt_OutStockLockInfo> stockLockInfos = _outboundLockInfoRepository.QueryData(x =>
-                                x.OrderNo == request.OrderNo &&
-                                x.MaterielCode == stockInfoDetail.MaterielCode).Where(supWhere).Where(wareWhere).ToList();
+                        var idStr = outboundOrderDetails.First().Id.ToString();
+
+                        var stockLockInfos = _outboundLockInfoRepository.QueryData(x =>
+                            (x.OrderDetailIds == idStr ||
+                             x.OrderDetailIds.StartsWith(idStr + ",") ||
+                             x.OrderDetailIds.EndsWith("," + idStr) ||
+                             x.OrderDetailIds.Contains("," + idStr + ",")) &&
+                            x.OrderNo == request.OrderNo &&
+                            x.MaterielCode == stockInfoDetail.MaterielCode)
+                            .Where(supWhere)
+                            .Where(wareWhere)
+                            .ToList();
                         if (stockLockInfos != null && stockLockInfos.Any())
                         {
                             _outboundLockInfoRepository.DeleteAndMoveIntoHty(stockLockInfos, WIDESEA_Core.Enums.OperateTypeEnum.鑷姩鍒犻櫎);
@@ -1804,9 +1813,18 @@
 
                         Func<Dt_OutStockLockInfo, bool> wareWhere = x => string.IsNullOrEmpty(outboundOrderDetails.First().WarehouseCode) ? true : x.WarehouseCode == outboundOrderDetails.First().WarehouseCode;
 
-                        List<Dt_OutStockLockInfo> stockLockInfos = _outboundLockInfoRepository.QueryData(x =>
-                                x.OrderNo == request.OrderNo &&
-                                x.MaterielCode == stockDetail.MaterielCode).Where(supWhere).Where(wareWhere).ToList();
+                        var idStr = outboundOrderDetails.First().Id.ToString();
+
+                        var stockLockInfos = _outboundLockInfoRepository.QueryData(x =>
+                            (x.OrderDetailIds == idStr ||
+                             x.OrderDetailIds.StartsWith(idStr + ",") ||
+                             x.OrderDetailIds.EndsWith("," + idStr) ||
+                             x.OrderDetailIds.Contains("," + idStr + ",")) &&
+                            x.OrderNo == request.OrderNo &&
+                            x.MaterielCode == stockDetail.MaterielCode)
+                            .Where(supWhere)
+                            .Where(wareWhere)
+                            .ToList();
                         if (stockLockInfos != null && stockLockInfos.Any())
                         {
                             _outboundLockInfoRepository.DeleteAndMoveIntoHty(stockLockInfos, WIDESEA_Core.Enums.OperateTypeEnum.鑷姩鍒犻櫎);
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 09e3cf5..572a087 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"
@@ -308,7 +308,7 @@
                 }
             }
             stockInfo.LocationCode = task.TargetAddress;
-            stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
+            stockInfo.StockStatus = StockStatusEmun.鍏ュ簱瀹屾垚.ObjToInt();
             stockInfo.Details.ForEach(x =>
             {
                 x.Status = StockStatusEmun.鍏ュ簱纭.ObjToInt();
@@ -391,7 +391,7 @@
                             allocatefeedmodel.Details = groupedData;
 
                             var response = responseModel(inboundOrder, 3, null, allocatefeedmodel);
-                            if (response != null && response.IsSuccess)
+                            if (response != null && response.IsSuccess && response.Data.Code =="200")
                             {
                                 var detailStatusList = _inboundOrderDetailService.Db.Queryable<Dt_InboundOrderDetail>()
                                 .Where(it => it.OrderId == inboundOrder.Id)
@@ -496,7 +496,7 @@
 
                             var response= responseModel(inboundOrder,2, feedmodel);
 
-                            if (response != null && response.IsSuccess)
+                            if (response != null && response.IsSuccess && response.Data.Code == "200")
                             {
                                 var detailStatusList = _inboundOrderDetailService.Db.Queryable<Dt_InboundOrderDetail>()
                                 .Where(it => it.OrderId == inboundOrder.Id)
@@ -2234,7 +2234,7 @@
         /// <summary>
         /// 鐩樼偣鍑哄簱瀹屾垚
         /// </summary>
-        public WebResponseContent OutInventoryTaskCompleted(Dt_Task task)
+        public async Task<WebResponseContent> OutInventoryTaskCompleted(Dt_Task task)
         {
             WebResponseContent content = new WebResponseContent();
             try
@@ -2285,7 +2285,7 @@
             catch (Exception ex)
             {
                 _unitOfWorkManage.RollbackTran();
-                content.Error(ex.Message);
+                return await Task.FromResult(WebResponseContent.Instance.Error(ex.Message));
             }
             return content;
         }

--
Gitblit v1.9.3