From dcecb039035f4b2e82e31c39b74db9402444c536 Mon Sep 17 00:00:00 2001 From: wangxinhui <wangxinhui@hnkhzn.com> Date: 星期二, 08 四月 2025 21:35:39 +0800 Subject: [PATCH] 代码更新,优化等内容 --- 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs" index e4efd48..8b314b8 100644 --- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs" +++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_StockService/ProStockInfoService.cs" @@ -63,6 +63,7 @@ { proStockInfoDetail.StockPcsQty -= item.StockPcsQty; proStockInfoDetail.SETQty -= item.SETQty; + proStockInfoDetail.OutboundQuantity = 0; upProStockDetails.Add(proStockInfoDetail); } @@ -125,8 +126,8 @@ { Dt_ProStockInfo stockInfo = stockInfos[index]; float useableStockQuantity = stockInfo.proStockInfoDetails - .Where(x => x.SaleOrder == outOrderDetail.SaleOrder && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer - && (isCanLot ? isCanLot : x.LotNumber == outOrderDetail.PLot) + .Where(x => x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer + && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)) .Sum(x => x.StockPcsQty - x.OutboundQuantity); if (useableStockQuantity < needQuantity) @@ -138,9 +139,9 @@ { stockInfo.proStockInfoDetails.ForEach(x => { - if ((x.StockPcsQty > x.OutboundQuantity) && x.SaleOrder == outOrderDetail.SaleOrder + if ((x.StockPcsQty > x.OutboundQuantity) && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer - && (isCanLot ? isCanLot : x.LotNumber == outOrderDetail.PLot) + && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)) { if (x.StockPcsQty - x.OutboundQuantity >= needQuantity) @@ -166,8 +167,8 @@ { Dt_ProStockInfo stockInfo = stockInfos[i]; float useableStockQuantity = stockInfo.proStockInfoDetails - .Where(x => x.SaleOrder == outOrderDetail.SaleOrder && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer - && (isCanLot ? isCanLot : x.LotNumber == outOrderDetail.PLot) + .Where(x => x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer + && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)) .Sum(x => x.StockPcsQty - x.OutboundQuantity); if (useableStockQuantity < needQuantity) @@ -179,9 +180,8 @@ { stockInfo.proStockInfoDetails.ForEach(x => { - if (x.StockPcsQty > x.OutboundQuantity && x.SaleOrder == outOrderDetail.SaleOrder - && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer - && (isCanLot ? isCanLot : x.LotNumber == outOrderDetail.PLot) + if (x.StockPcsQty > x.OutboundQuantity && x.ProductCode == outOrderDetail.PCode && x.ProductVersion == outOrderDetail.PVer + && (isCanLot ? isCanLot : x.BagNo == outOrderDetail.PLot) && (isCanDate ? isCanDate : x.DateCode == outOrderDetail.DateCode)) { if (x.StockPcsQty - x.OutboundQuantity >= needQuantity) -- Gitblit v1.9.3