| | |
| | | if (stockInfo != null) |
| | | { |
| | | Dt_LocationInfo locationInfo = _basicService.LocationInfoService.Repository.QueryFirst(x => x.LocationCode == stockInfo.LocationCode); |
| | | if (locationInfo==null) |
| | | if (locationInfo == null) |
| | | { |
| | | throw new Exception("未找到出库库位"); |
| | | } |
| | |
| | | } |
| | | tasks.Add(task); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | 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); |
| | |
| | | (int)OrderTypeEnum.反拣出库单 => TaskTypeEnum.ReverseOut, |
| | | _ => new TaskTypeEnum() |
| | | }; |
| | | tasks = GetTasks(result.Item1,typeEnum); |
| | | tasks = GetTasks(result.Item1, typeEnum); |
| | | tasks.ForEach(x => |
| | | { |
| | | x.OrderNo = outboundOrder.OrderNo; |
| | |
| | | CreateDate = DateTime.Now, |
| | | Remark = details.Remark, |
| | | SupplierBatch = details.SupplierBatch, |
| | | OrinalLocation=details.OrinalLocation, |
| | | OrinalLocation = details.OrinalLocation, |
| | | }; |
| | | _newOutboundOrderDetailRepository.AddData(outboundOrderDetail); |
| | | foreach (var item in orderAddDTO1.Details) |
| | |
| | | } |
| | | _unitOfWorkManage.CommitTran(); |
| | | //将任务推送到WCS |
| | | |
| | | |
| | | if (tasks.FirstOrDefault().Roadway.Contains("SC01_BC")) |
| | | { |
| | | PushTasksToWCS(tasks); |
| | |
| | | foreach (int key in keys) |
| | | { |
| | | |
| | | (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) result = OutboundTaskDataHandle(keys); |
| | | (List<Dt_Task>, List<Dt_StockInfo>?, List<Dt_OutboundOrderDetail>?, List<Dt_OutStockLockInfo>?, List<Dt_LocationInfo>?) result = OutboundTaskDataHandle(keys); |
| | | if (result.Item2 != null && result.Item2.Count > 0) |
| | | { |
| | | stockInfos.AddRange(result.Item2); |
| | |
| | | } |
| | | if (result.Item4 != null && result.Item4.Count > 0) |
| | | { |
| | | outStockLockInfos.AddRange(result.Item4); |
| | | outStockLockInfos.AddRange(result.Item4); |
| | | } |
| | | if (result.Item5 != null && result.Item5.Count > 0) |
| | | { |
| | | locationInfos.AddRange(result.Item5); |
| | | 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; |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | { |
| | | return content.Error($"未找到{item.PalletCode}库存明细数据"); |
| | | } |
| | | if (item.System.Contains("SMOM")) |
| | | { |
| | | return content.Error($"SMOM系统库存数据不可手动盘点,托盘号{item.PalletCode}"); |
| | | } |
| | | Dt_LocationInfo? locationInfo = locationInfos.FirstOrDefault(x => x.LocationCode == item.LocationCode); |
| | | if (locationInfo != null && (locationInfo.EnableStatus == EnableStatusEnum.OnlyOut.ObjToInt() || locationInfo.EnableStatus == EnableStatusEnum.Normal.ObjToInt()) && locationInfo.LocationStatus == LocationStatusEnum.InStock.ObjToInt() && item.StockStatus == StockStatusEmun.入库完成.ObjToInt()) |
| | | { |