wangxinhui
2026-03-23 531c6e89dc07bb6997e6249a6cd9f53a9bd474a5
项目代码/WMS/WMSServices/WIDESEA_TaskInfoService/TaskService_Outbound.cs
@@ -223,7 +223,7 @@
                            }
                            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)
@@ -804,8 +804,12 @@
                {
                    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);