| | |
| | | List<Dt_LocationInfo>? locationInfos = null; |
| | | //if (outboundOrderDetail.OrderDetailStatus == OrderDetailStatusEnum.New.ObjToInt()) |
| | | { |
| | | (List<Dt_StockInfo>, List<Dt_OutboundOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = _outboundService.OutboundOrderDetailService.AssignStockOutbound(outboundOrderDetails); |
| | | Dt_OutboundOrder dt_OutboundOrder = _outboundService.OutboundOrderService.Repository.QueryData(x => x.Id == outboundOrderDetails.First().OrderId).First(); |
| | | (List<Dt_StockInfo>, List<Dt_OutboundOrderDetail>, List<Dt_OutStockLockInfo>, List<Dt_LocationInfo>) result = new(); |
| | | if (dt_OutboundOrder.OutWareHouse.Contains("DW") || dt_OutboundOrder.OutWareHouse.Contains("YS")) |
| | | { |
| | | result = _outboundService.OutboundOrderDetailService.DWANDYSAssignStockOutbound(outboundOrderDetails); |
| | | } |
| | | else |
| | | { |
| | | result = _outboundService.OutboundOrderDetailService.AssignStockOutbound(outboundOrderDetails); |
| | | } |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | Dt_OutboundOrder outboundOrder = _outboundService.OutboundOrderService.Repository.QueryFirst(x => x.Id == outboundOrderDetails.FirstOrDefault().OrderId); |
| | |
| | | } |
| | | if (result.Item5 != null && result.Item5.Count > 0) |
| | | { |
| | | if (locationInfos.First().RoadwayNo.Contains("DW") || locationInfos.First().RoadwayNo.Contains("YS")) |
| | | { |
| | | locationInfos.AddRange(result.Item5.Distinct()); |
| | | } |
| | | else |
| | | { |
| | | locationInfos.AddRange(result.Item5); |
| | | } |
| | | } |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |
| | | tasks.AddRange(result.Item1); |
| | | } |
| | | |
| | | if(locationInfos.First().RoadwayNo.Contains("DW") || locationInfos.First().RoadwayNo.Contains("YS")) |
| | | { |
| | | break; |
| | | } |
| | | |
| | | } |
| | | |