wangxinhui
2025-11-12 f54b7815d8451f362554e3d2d09b4991ce13d4ff
项目代码/WMS/WMSServices/WIDESEA_OutboundService/OutMESOrderService.cs
@@ -186,7 +186,7 @@
                    decimal orderDetailNeedQuantity = item.ReqQuantity - detailAssignQuantity;
                    decimal useStockLength = autoAssignStocks[0].StockLength - autoAssignStocks[0].StockOutLength;
                    decimal useStockLength = autoAssignStocks[0].StockLength;
                    if (orderDetailNeedQuantity > useStockLength)
                    {
@@ -195,7 +195,6 @@
                        outStockLockInfos.Add(outStockLockInfo);
                        item.AssignTotalUsage += useStockLength;
                        autoAssignStocks.Remove(autoAssignStocks[0]);
                    }
                    else
                    {
@@ -203,11 +202,7 @@
                        Dt_OutStockLockInfo outStockLockInfo = _outStockLockInfoService.GetOutStockLockInfo(item, autoAssignStocks[0], orderDetailNeedQuantity);
                        outStockLockInfos.Add(outStockLockInfo);
                        item.AssignTotalUsage = orderQuantity;
                        autoAssignStocks[0].StockOutLength += orderDetailNeedQuantity;
                        if (autoAssignStocks[0].StockOutLength == autoAssignStocks[0].StockLength)
                        {
                            autoAssignStocks.Remove(autoAssignStocks[0]);
                        }
                        autoAssignStocks.Remove(autoAssignStocks[0]);
                        assignStop = false;
                    }
                }