wangxinhui
2025-06-26 06f5f3e474bb8d9e255a899b62d16f671cfdb940
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Outbound.cs
@@ -112,6 +112,7 @@
                {
                    WarehouseId = stockInfos.FirstOrDefault().WarehouseId,
                    TakeStockStatus = TakeStockStatusEnum.盘点中.ObjToInt(),
                    OrderNo = _outboundService.OutboundOrderService.CreateCodeByRule(nameof(RuleCodeEnum.PDCodeRule)),
                    Details = new List<Dt_TakeStockOrderDetail>()
                };
                foreach (var item in stockInfos)
@@ -152,6 +153,10 @@
                stockInfos.ForEach(x =>
                {
                    x.StockStatus = StockStatusEmun.出库锁定.ObjToInt();
                });
                tasks.ForEach(x =>
                {
                    x.OrderNo = takeStockOrder.OrderNo;
                });
                LocationStatusEnum locationStatus = LocationStatusEnum.Lock;
                _unitOfWorkManage.BeginTran();
@@ -629,8 +634,8 @@
                        };
                        if (taskType != TaskTypeEnum.OutEmpty)
                        {
                            task.MaterielCode = stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                            task.Quantity = (float)stockInfo.Details.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.StockQuantity;
                            task.MaterielCode = stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).FirstOrDefault()?.MaterielCode;
                            task.Quantity = (float)stockInfo.Details?.Where(x => x.StockId == stockInfo.Id).Sum(x => x.StockQuantity);
                        }
                        if (stockInfo.StockLength>0)
                        {