1
wankeda
2026-01-03 821397b01a004f8560c987ef83146614a9356ecb
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/NewPartialTaskService_Outbound.cs
@@ -20,7 +20,7 @@
                List<Dt_LocationInfo> locationInfos = new List<Dt_LocationInfo>();
                List<Dt_OutStockLockInfo> outStockLockInfos = new List<Dt_OutStockLockInfo>();
                List<Dt_NewOutboundOrderDetail> outboundOrderDetails = _outboundService.NewOutboundOrderDetailService.Repository.QueryData(x => keys.Contains(x.OrderId));
                List<Dt_NewOutboundOrderDetail> outboundOrderDetails = _outboundService.NewOutboundOrderDetailService.Repository.QueryData(x => keys.Contains(x.Id));
                if (outboundOrderDetails == null || outboundOrderDetails.Count == 0)
                {
                    throw new Exception("未找到出库单明细信息");
@@ -29,7 +29,7 @@
                {
                    throw new Exception("所选出库单明细存在出库中或已完成");
                }
                List<Dt_NewOutboundOrder> outboundOrders = _outboundService.NewOutboundOrderService.Repository.QueryData(x => keys.Contains(x.Id));
                List<Dt_NewOutboundOrder> outboundOrders = _outboundService.NewOutboundOrderService.Repository.QueryData(x => x.Id == outboundOrderDetails.FirstOrDefault().OrderId);
                List<Dt_StockInfo> stockInfos = _stockService.StockInfoService.Repository.QueryData(x => outboundOrderDetails.Select(s => s.LPNNo).Contains(x.PalletCode));
                if (outboundOrderDetails == null || outboundOrderDetails.Count == 0)
                {
@@ -46,10 +46,11 @@
                    stockInfoDetail.OutboundQuantity += item.OrderQuantity;
                    item.LockQuantity += item.OrderQuantity;
                    var outboundOrder = outboundOrders.FirstOrDefault(x => x.Id == item.OrderId);
                    Dt_OutStockLockInfo outStockLockInfo = _outboundService.OutboundStockLockInfoService.GetOutStockLockInfo(outboundOrder, item, stockInfo, item.OrderQuantity);
                    Dt_OutStockLockInfo outStockLockInfo = _outboundService.OutboundStockLockInfoService.GetOutStockLockInfo(outboundOrder, item, stockInfo, stockInfoDetail, item.OrderQuantity);
                    outStockLockInfo.Status = OutStockStatus.出库中.ObjToInt();
                    item.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt();
                    outboundOrder.OrderStatus = OutboundStatusEnum.出库中.ObjToInt();
                    stockInfo.StockStatus = StockStatusEmun.出库锁定.ObjToInt();
                    var task = Newtasks.FirstOrDefault(x => x.PalletCode == item.LPNNo);
                    task.OrderNo = outboundOrder.OrderNo;
                    tasks.Add(task);
@@ -71,7 +72,7 @@
                _unitOfWorkManage.CommitTran();
                //将任务推送到WCS
                return PushTasksToWCS(tasks);
                return PushTasksWCS(tasks);
            }
            catch (Exception ex)
            {