| | |
| | | } |
| | | if (outboundOrderDetails.FirstOrDefault()?.LPNNo == null) |
| | | { |
| | | outboundOrderDetails.Clear(); |
| | | try |
| | | { |
| | | List<StockSelectViewDTO> stockSelectViews = new List<StockSelectViewDTO>(); |
| | |
| | | } |
| | | if (result.Item5 != null && result.Item5.Count > 0) |
| | | { |
| | | locationInfos.AddRange(result.Item5); |
| | | locationInfos.AddRange(result.Item5.DistinctBy(x => x.LocationCode)); |
| | | } |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | tasks.AddRange(result.Item1); |
| | | } |
| | | if (locationInfos.First().RoadwayNo.Contains("DW") || locationInfos.First().RoadwayNo.Contains("YS")) |
| | | { |
| | | break; |
| | | } |
| | | |
| | | break; |
| | | } |
| | | |
| | | WebResponseContent content = NEWGenerateOutboundTaskDataUpdate(tasks, stockInfos, outboundOrderDetails, outStockLockInfos, locationInfos); |
| | |
| | | List<Dt_LocationInfo>? locationInfos = null; |
| | | //if (outboundOrderDetail.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt()) |
| | | { |
| | | Dt_OutboundOrder dt_OutboundOrder = _outboundService.OutboundOrderService.Repository.QueryData(x => x.Id == outboundOrderDetails.First().OrderId).First(); |
| | | Dt_NewOutboundOrder dt_OutboundOrder = _outboundService.NewOutboundOrderService.Repository.QueryData(x => x.Id == outboundOrderDetails.First().OrderId).First(); |
| | | (List<Dt_StockInfo>, List<Dt_NewOutboundOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = new(); |
| | | |
| | | result = _outboundService.NewOutboundOrderDetailService.CPAssignStockOutbound(outboundOrderDetails); |
| | | |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | Dt_OutboundOrder outboundOrder = _outboundService.OutboundOrderService.Repository.QueryFirst(x => x.Id == outboundOrderDetails.FirstOrDefault().OrderId); |
| | | Dt_NewOutboundOrder outboundOrder = _outboundService.NewOutboundOrderService.Repository.QueryFirst(x => x.Id == outboundOrderDetails.FirstOrDefault().OrderId); |
| | | TaskTypeEnum typeEnum = outboundOrder.OrderType switch |
| | | { |
| | | (int)OrderTypeEnum.生产出库单 => TaskTypeEnum.Outbound, |
| | |
| | | { |
| | | x.OrderNo = outboundOrder.OrderNo; |
| | | }); |
| | | if (dt_OutboundOrder.OutWareHouse.Contains("DW") || dt_OutboundOrder.OutWareHouse.Contains("YS")) |
| | | result.Item2.ForEach(x => |
| | | { |
| | | result.Item2.ForEach(x => |
| | | { |
| | | if (x.LockQuantity == x.OrderQuantity) |
| | | { |
| | | x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | } |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | result.Item2.ForEach(x => |
| | | { |
| | | x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | }); |
| | | } |
| | | |
| | | x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | }); |
| | | result.Item3.ForEach(x => |
| | | { |
| | | |