| | |
| | | throw Oops.Oh("本次有重复的UPI!重复号为:" + dit.Key + ",重复条数:" + dit.Value); |
| | | } |
| | | |
| | | //同一个UPI只能属于一个 批次号+订单号 |
| | | //会存在 一个批次号,多个订单号的情况 |
| | | //会存在 一个订单号,多个批次号的情况 |
| | | |
| | | //按照批次号+订单号删除 |
| | | List<string> packageList = new List<string>(); |
| | | input.ForEach(x => packageList.Add(x.PlanNo + "_" + x.OrderId));//upis是传过来的upi字段集合 |
| | |
| | | { |
| | | item.AreaCode = AreaCodeEnum.无区域; |
| | | item.UpiStatus = UpiStatusEnum.初始; |
| | | item.CreateUserName = item.UpdateUserName = "MES"; |
| | | } |
| | | List<Mes_Package_Gather> addGatherList = new List<Mes_Package_Gather>(); |
| | | var groups = input.GroupBy(x => x.PackageCode); |
| | |
| | | Mes_Package_Gather newGather = first.Adapt<Mes_Package_Gather>(); |
| | | newGather.AreaCode = AreaCodeEnum.无区域; |
| | | newGather.UpiStatus = UpiStatusEnum.初始; |
| | | newGather.CreateUserName = newGather.UpdateUserName = "MES"; |
| | | addGatherList.Add(newGather); |
| | | } |
| | | await _mes_Package_Gather_Rep.InsertRangeAsync(addGatherList); |