From ded9c653b4bd5f45cb23124068687135c29e6915 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期一, 12 一月 2026 15:06:11 +0800
Subject: [PATCH] 多个功能优化,逻辑修改等

---
 项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs"
index 3368a57..3bae542 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs"
@@ -6,6 +6,7 @@
 using System.Threading.Tasks;
 using WIDESEA_Common.LocationEnum;
 using WIDESEA_Common.MaterielEnum;
+using WIDESEA_Common.OrderEnum;
 using WIDESEA_Common.WareHouseEnum;
 using WIDESEA_Core;
 using WIDESEA_Core.BaseServices;
@@ -209,7 +210,7 @@
                 List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.GetUseableStocks(item.MaterialCode, item.WarehouseId).Where(x => !outStocks.Select(x => x.PalletCode).Contains(x.PalletCode)).ToList();
                 if (!stockInfos.Any())
                 {
-                    throw new Exception($"鏈壘鍒板彲鍒嗛厤搴撳瓨");
+                    continue;
                 }
                 //鍒嗛厤瀹為檯搴撳瓨
                 List<Dt_StockInfo> autoAssignStocks = _stockService.StockInfoService.GetOutboundStocks(stockInfos, needQuantity).OrderBy(x => x.StockLength).ToList();
@@ -246,7 +247,8 @@
                         assignStop = false;
                     }
                 }
-
+                //淇敼鐘舵��
+                item.OutMESOrderStatus = OutOrderStatusEnum.鍑哄簱涓�.ObjToInt();
                 locationInfos.AddRange(_basicRepository.LocationInfoRepository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList()));
             }
 
@@ -276,7 +278,7 @@
                 List<Dt_ProStockInfo> stockInfos = _stockService.ProStockInfoService.GetUseableStocks(item.MaterialCode, WarehouseEnum.LLDCP.ObjToInt()).Where(x => !outStocks.Select(x => x.PalletCode).Contains(x.PalletCode)).ToList();
                 if (!stockInfos.Any())
                 {
-                    throw new Exception($"鏈壘鍒板彲鍒嗛厤搴撳瓨");
+                    continue;
                 }
                 //鍒嗛厤瀹為檯搴撳瓨
                 List<Dt_ProStockInfo> autoAssignStocks = _stockService.ProStockInfoService.GetOutboundStocks(stockInfos, needQuantity);
@@ -313,7 +315,7 @@
                         assignStop = false;
                     }
                 }
-
+                item.OutMESOrderStatus = OutOrderStatusEnum.鍑哄簱涓�.ObjToInt();
                 locationInfos.AddRange(_basicRepository.LocationInfoRepository.GetLocationInfos(outStocks.Select(x => x.LocationCode).ToList()));
             }
 

--
Gitblit v1.9.3