22
schangxiang@126.com
2024-12-17 2905c63ec884f531152a4e97a4d67034e8149d6d
LA24030_LuLiPackageLine_Wms/Admin.NET.Application/Service/ThirdInterFace/ThirdInterFaceService.cs
@@ -45,6 +45,10 @@
            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字段集合
@@ -68,6 +72,7 @@
        {
            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);
@@ -77,6 +82,7 @@
            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);