| | |
| | | { |
| | | x.OrderNo = outboundOrder.OrderNo; |
| | | }); |
| | | result.Item2.ForEach(x => |
| | | if (dt_OutboundOrder.OutWareHouse.Contains("DW") || dt_OutboundOrder.OutWareHouse.Contains("YS")) |
| | | { |
| | | x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | }); |
| | | result.Item2.ForEach(x => |
| | | { |
| | | if (x.LockQuantity == x.OrderQuantity) |
| | | { |
| | | x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | } |
| | | }); |
| | | } |
| | | else |
| | | { |
| | | result.Item2.ForEach(x => |
| | | { |
| | | x.OrderDetailStatus = OrderDetailStatusEnum.Outbound.ObjToInt(); |
| | | }); |
| | | } |
| | | |
| | | result.Item3.ForEach(x => |
| | | { |
| | | |
| | |
| | | } |
| | | if (warehouse.WarehouseCode.Contains("CP")) |
| | | { |
| | | |
| | | |
| | | Dt_Production production1 = new Dt_Production(); |
| | | OutboundOrderAddDTO orderAddDTO1 = new OutboundOrderAddDTO(); |
| | | orderAddDTO1.OrderNo = orderAddDTO.No; |
| | |
| | | inboundOrder.CreateDate = DateTime.Now; |
| | | inboundOrder.CreateType = CreateType.UpperSystemPush.ObjToInt(); |
| | | _unitOfWorkManage.BeginTran(); |
| | | |
| | | Dt_NewOutboundOrder dt_NewOutboundOrder = BaseDal.Db.Queryable<Dt_NewOutboundOrder>().Where(x => x.OrderNo == inboundOrder.OrderNo).Includes(x => x.Details).First(); |
| | | if(dt_NewOutboundOrder != null) |
| | | { |
| | | if (dt_NewOutboundOrder.OrderStatus > 0) |
| | | { |
| | | return WebResponseContent.Instance.Error($"该出库单在进行中,无法更新该出库单"); |
| | | } |
| | | Db.DeleteNav(dt_NewOutboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | } |
| | | bool a = BaseDal.Db.InsertNav(inboundOrder).Include(x => x.Details).ExecuteCommand(); |
| | | |
| | | foreach (var item in orderAddDTO1.Details) |
| | |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 生成出库任务 |
| | | /// 生成‘任务 |
| | | /// </summary> |
| | | /// <param name="orderDetailId"></param> |
| | | /// <param name="stockSelectViews"></param> |
| | |
| | | } |
| | | if (result.Item5 != null && result.Item5.Count > 0) |
| | | { |
| | | if (locationInfos.First().RoadwayNo.Contains("DW") || locationInfos.First().RoadwayNo.Contains("YS")) |
| | | if(result.Item5.Any(x => x.RoadwayNo.Contains("DW")) || result.Item5.Any(x => x.RoadwayNo.Contains("YS"))) |
| | | { |
| | | locationInfos.AddRange(result.Item5.Distinct()); |
| | | locationInfos.AddRange(result.Item5.DistinctBy(x => x.LocationCode)); |
| | | |
| | | } |
| | | else |
| | | { |
| | | locationInfos.AddRange(result.Item5); |
| | | |
| | | } |
| | | |
| | | } |
| | | if (result.Item1 != null && result.Item1.Count > 0) |
| | | { |