| | |
| | | } |
| | | if (outStockLockInfosMES != null && outStockLockInfosMES.Count() > 0) |
| | | { |
| | | Dt_AGVStationInfo aGVStationInfo = _basicRepository.AGVStationInfoRepository.QueryFirst(x=>x.AGVStationCode==task.TargetAddress); |
| | | Dt_AGVStationInfo aGVStationInfo = _basicRepository.AGVStationInfoRepository.QueryFirst(x=>x.AGVStationCode==task.TargetAddress || x.MESPointCode == task.TargetAddress); |
| | | MESDeliveryModel mESDeliveryModel = MESDeliveryUp(outStockLockInfosMES, aGVStationInfo.MESPointCode); |
| | | MESResponse response = _invokeMESService.MESDelivery(mESDeliveryModel).DeserializeObject<MESResponse>() ?? throw new Exception("鏈幏鍙栧埌杩斿洖淇℃伅"); |
| | | if (!response.Result) |
| | |
| | | { |
| | | tasks.ForEach(x => |
| | | { |
| | | string orderNos = string.Join(",", outStockLockInfos.Where(t => t.PalletCode == x.PalletCode).Select(x => x.OrderNo).Distinct()); |
| | | List<Dt_OutStockLockInfo> outStockNos = outStockLockInfos.Where(t => t.PalletCode == x.PalletCode).ToList(); |
| | | List<int> outDetailIds = outStockNos.Select(t => t.OrderDetailId).ToList(); |
| | | int numberNo = outboundOrderDetails.Where(t => outDetailIds.Contains(t.Id)).OrderBy(x => x.Number).FirstOrDefault().Number; |
| | | string orderNos = string.Join(",", outStockNos.Select(t => t.OrderNo).Distinct()); |
| | | x.OrderNo = orderNos; |
| | | x.Grade = numberNo; |
| | | }); |
| | | } |
| | | BaseDal.AddData(tasks); |