|
|
@ -366,7 +366,10 @@ public class AsyncDataServiceImpl implements IAsyncDataService { |
|
|
|
|
|
|
|
|
|
|
|
for (FactoryOrderEntity factoryOrderEntity : factoryOrderEntities) { |
|
|
|
for (FactoryOrderEntity factoryOrderEntity : factoryOrderEntities) { |
|
|
|
|
|
|
|
|
|
|
|
AdvanceEntity advanceEntity = new AdvanceEntity(); |
|
|
|
// 需要从老系统进行订单数据查询
|
|
|
|
|
|
|
|
AdvanceEntity advanceEntity = iAdvanceClient.getQueryDataOne(factoryOrderEntity.getSelfCode()); |
|
|
|
|
|
|
|
if(ObjectUtils.isNull(advanceEntity)){ |
|
|
|
|
|
|
|
advanceEntity = new AdvanceEntity(); |
|
|
|
advanceEntity.setOrderSelfNum(StringUtil.isBlank(factoryOrderEntity.getSelfCode()) ? "" : factoryOrderEntity.getSelfCode()); //订单自编号
|
|
|
|
advanceEntity.setOrderSelfNum(StringUtil.isBlank(factoryOrderEntity.getSelfCode()) ? "" : factoryOrderEntity.getSelfCode()); //订单自编号
|
|
|
|
advanceEntity.setSiteName(""); // 基地 TODO 需要映射
|
|
|
|
advanceEntity.setSiteName(""); // 基地 TODO 需要映射
|
|
|
|
advanceEntity.setArea(""); // 区域
|
|
|
|
advanceEntity.setArea(""); // 区域
|
|
|
@ -401,7 +404,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService { |
|
|
|
advanceEntity.setSenderName(""); //发货工厂名称 可以为空
|
|
|
|
advanceEntity.setSenderName(""); //发货工厂名称 可以为空
|
|
|
|
advanceEntity.setAdministratorsId(1078);// 导入人
|
|
|
|
advanceEntity.setAdministratorsId(1078);// 导入人
|
|
|
|
advanceEntity.setCreateTime(LocalDate.now()); //添加时间
|
|
|
|
advanceEntity.setCreateTime(LocalDate.now()); //添加时间
|
|
|
|
advanceEntity.setCarsNum(""); |
|
|
|
advanceEntity.setCarsNum(receivingOrderEntity.getCarNumber()); |
|
|
|
advanceEntity.setDeleteTime(0); // 删除时间
|
|
|
|
advanceEntity.setDeleteTime(0); // 删除时间
|
|
|
|
advanceEntity.setWaybillNo("");//运单号 可以为空
|
|
|
|
advanceEntity.setWaybillNo("");//运单号 可以为空
|
|
|
|
// Integer id = PanFactoryEnum.getId(panFactoryOrder.getPlantId());
|
|
|
|
// Integer id = PanFactoryEnum.getId(panFactoryOrder.getPlantId());
|
|
|
@ -415,8 +418,13 @@ public class AsyncDataServiceImpl implements IAsyncDataService { |
|
|
|
if (ObjectUtils.isNull(advanceId)) { |
|
|
|
if (ObjectUtils.isNull(advanceId)) { |
|
|
|
continue; |
|
|
|
continue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
advanceEntity.setId(advanceId); |
|
|
|
advanceEntity.setId(advanceId); |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
// 更新数据 对这个 advanceEntity 这个进行属性设置 调用对象的更新方法
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
factoryOrderEntity.setTurnStatus(1); |
|
|
|
factoryOrderEntity.setTurnStatus(1); |
|
|
|
|
|
|
|
|
|
|
|
// 处理订单下面的包件数据
|
|
|
|
// 处理订单下面的包件数据
|
|
|
@ -445,12 +453,16 @@ public class AsyncDataServiceImpl implements IAsyncDataService { |
|
|
|
AdvanceDetailEntity advanceDetailEntity = advanceDetailClient.getOneByUnitNo(factoryPackageEntity.getCode()); |
|
|
|
AdvanceDetailEntity advanceDetailEntity = advanceDetailClient.getOneByUnitNo(factoryPackageEntity.getCode()); |
|
|
|
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(advanceDetailEntity)) { |
|
|
|
if (ObjectUtil.isNotEmpty(advanceDetailEntity)) { |
|
|
|
|
|
|
|
|
|
|
|
// 一 er san 级包件信息
|
|
|
|
// 一 er san 级包件信息
|
|
|
|
|
|
|
|
advanceDetailEntity.setFirstPackName(factoryPackageEntity.getFirstClassName());//一级品类
|
|
|
|
|
|
|
|
advanceDetailEntity.setFirstPackCode(factoryPackageEntity.getFirstClassCode());//二级品类
|
|
|
|
|
|
|
|
advanceDetailEntity.setFirstPackCode(factoryPackageEntity.getFirstClassCode());//二级品类
|
|
|
|
|
|
|
|
advanceDetailEntity.setSecondPackName(factoryPackageEntity.getSecondClassName());//二级品类名称
|
|
|
|
|
|
|
|
advanceDetailEntity.setSecondPackCode(factoryPackageEntity.getSecondClassCode());//二级品类
|
|
|
|
|
|
|
|
advanceDetailEntity.setThirdPackName(factoryPackageEntity.getThirdClassName());//三级品类名称
|
|
|
|
|
|
|
|
advanceDetailEntity.setThirdPackCode(factoryPackageEntity.getThirdClassCode());//三级品类
|
|
|
|
// 更新物料
|
|
|
|
// 更新物料
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 当这个包条存在老系统的时候
|
|
|
|
// 当这个包条存在老系统的时候
|
|
|
|
advanceDetailEntity.setMctsTruckNo(factoryPackageEntity.getCarNumber()); |
|
|
|
advanceDetailEntity.setMctsTruckNo(factoryPackageEntity.getCarNumber()); |
|
|
|
//更新包件
|
|
|
|
//更新包件
|
|
|
@ -487,7 +499,7 @@ public class AsyncDataServiceImpl implements IAsyncDataService { |
|
|
|
advanceDetailEntity.setMtdsNum(0);//销售数量
|
|
|
|
advanceDetailEntity.setMtdsNum(0);//销售数量
|
|
|
|
advanceDetailEntity.setVolume("");//体积
|
|
|
|
advanceDetailEntity.setVolume("");//体积
|
|
|
|
advanceDetailEntity.setUnitNo(StringUtil.isBlank(factoryPackageEntity.getCode()) ? "" : factoryPackageEntity.getCode());//包条码
|
|
|
|
advanceDetailEntity.setUnitNo(StringUtil.isBlank(factoryPackageEntity.getCode()) ? "" : factoryPackageEntity.getCode());//包条码
|
|
|
|
advanceDetailEntity.setMctsTruck(factoryPackageEntity.getCarNumber());//车次号
|
|
|
|
advanceDetailEntity.setMctsTruck(advanceEntity.getMctsTruck());//车次号
|
|
|
|
advanceDetailEntity.setMctsTruckNo(advanceEntity.getMctsTruckNo());//车牌号
|
|
|
|
advanceDetailEntity.setMctsTruckNo(advanceEntity.getMctsTruckNo());//车牌号
|
|
|
|
advanceDetailEntity.setDate100(null);//基地发货日期
|
|
|
|
advanceDetailEntity.setDate100(null);//基地发货日期
|
|
|
|
advanceDetailEntity.setDate2("");//预约到厂时间
|
|
|
|
advanceDetailEntity.setDate2("");//预约到厂时间
|
|
|
|