From a95a257a702360e7632b5daeb5b554163382720c Mon Sep 17 00:00:00 2001 From: 647556386 <647556386@qq.com> Date: 星期四, 17 四月 2025 17:00:59 +0800 Subject: [PATCH] 1 --- 代码管理/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