|
|
|
@ -217,7 +217,7 @@ public class FactoryXxlJob {
|
|
|
|
|
advanceEntity.setSenderAddress(""); //发货地址 可以为空
|
|
|
|
|
advanceEntity.setSenderName(""); //发货工厂名称 可以为空
|
|
|
|
|
advanceEntity.setAdministratorsId(0);// 导入人
|
|
|
|
|
advanceEntity.setCreateTime((java.sql.Date) new Date()); //添加时间
|
|
|
|
|
advanceEntity.setCreateTime(LocalDate.now()); //添加时间
|
|
|
|
|
advanceEntity.setCarsNum(""); //派车单--snm 可以为空
|
|
|
|
|
advanceEntity.setDeleteTime(0); // 删除时间
|
|
|
|
|
advanceEntity.setWaybillNo("");//运单号 可以为空
|
|
|
|
@ -227,16 +227,19 @@ public class FactoryXxlJob {
|
|
|
|
|
advanceEntity.setFreeze(Byte.parseByte("1"));//冻结状态:1=正常,2=冻结
|
|
|
|
|
advanceEntity.setDeleteReason("");//删除原因
|
|
|
|
|
advanceEntity.setDeleteAdministratorsId(0);//删除用户
|
|
|
|
|
Boolean aBoolean = iAdvanceClient.addAdvanceClient(advanceEntity); |
|
|
|
|
if (aBoolean){ |
|
|
|
|
Integer integer = iAdvanceClient.addAdvanceClient(advanceEntity); |
|
|
|
|
if (integer > 0){ |
|
|
|
|
|
|
|
|
|
//订单id
|
|
|
|
|
longIntegerMap.put(k,advanceEntity.getId()); |
|
|
|
|
longIntegerMap.put(k,integer); |
|
|
|
|
// longIntegerMap.put(k,advanceEntity.getId());
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
//TODO 插入到老系统的的数据库
|
|
|
|
|
|
|
|
|
|
map.forEach((k,v) ->{ |
|
|
|
|
Integer aLong = longIntegerMap.get(k);//订单ID
|
|
|
|
|
|
|
|
|
|
StationOrderEntity stationOrderEntity = collect.get(k); // 订单
|
|
|
|
|
|
|
|
|
|
//添加订单明细
|
|
|
|
@ -275,7 +278,8 @@ public class FactoryXxlJob {
|
|
|
|
|
advanceDetailEntity.setDate2("");//预约到厂时间
|
|
|
|
|
advanceDetailEntity.setDate3("");//实际到厂时间
|
|
|
|
|
advanceDetailEntity.setDate4("");//开始装车时间
|
|
|
|
|
advanceDetailEntity.setDate5("");//车辆离厂时间
|
|
|
|
|
advanceDetailEntity.setDate5("");//完成装车时间
|
|
|
|
|
advanceDetailEntity.setDate6("");//车辆离厂时间
|
|
|
|
|
advanceDetailEntity.setCreateTime(LocalDate.now());//创建时间
|
|
|
|
|
advanceDetailEntity.setDeleteTime(0);//删除时间
|
|
|
|
|
advanceDetailEntity.setServiceNum(stationOrderEntity.getTcWlb007());//服务号
|
|
|
|
@ -284,8 +288,9 @@ public class FactoryXxlJob {
|
|
|
|
|
// advanceDetailEntity.setDueDate(0);//交期
|
|
|
|
|
advanceDetailEntity.setRemark("");//备注
|
|
|
|
|
advanceDetailEntity.setOldId(0);//
|
|
|
|
|
advanceDetailClient.addAdvanceDetail(advanceDetailEntity); |
|
|
|
|
// 添加包件信息
|
|
|
|
|
boolean b = advanceDetailClient.addAdvanceDetail(advanceDetailEntity); |
|
|
|
|
XxlJobLogger.log("addAdvanceDetail 添加状态 {}", b); |
|
|
|
|
// 添加包件信息
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DetailProductEntity detailProductEntity = new DetailProductEntity(); |
|
|
|
@ -299,11 +304,12 @@ public class FactoryXxlJob {
|
|
|
|
|
detailProductEntity.setCreateTime(LocalDate.now());//创建时间
|
|
|
|
|
detailProductEntity.setAdministratorsId(0);//创建人
|
|
|
|
|
detailProductEntity.setDeleteTime(0);//删除时间
|
|
|
|
|
detailProductClient.addDetailProduct(detailProductEntity); |
|
|
|
|
Boolean aBoolean11 = detailProductClient.addDetailProduct(detailProductEntity); |
|
|
|
|
XxlJobLogger.log("addDetailProduct 添加状态 {}", aBoolean11); |
|
|
|
|
|
|
|
|
|
ServiceNumEntity serviceNum = new ServiceNumEntity(); |
|
|
|
|
serviceNum.setServiceNum(stationOrderEntity.getTcWlb007()); //服务号
|
|
|
|
|
serviceNum.setTotal(stationOrderEntity.getTcWlb007()); //订单数量
|
|
|
|
|
serviceNum.setTotal(stationOrderEntity.getTcWlb009().toString()); //订单数量
|
|
|
|
|
serviceNum.setDetailTotal(stationOrderEntity.getTcWlb009().toString()); // 包数量
|
|
|
|
|
serviceNum.setStoreName(""); //商场名
|
|
|
|
|
serviceNum.setStoreNo(""); // 商场编号
|
|
|
|
@ -312,14 +318,24 @@ public class FactoryXxlJob {
|
|
|
|
|
serviceNum.setCustomerRoad(""); //顾客地址
|
|
|
|
|
serviceNum.setIsOpai(1); //是否干仓配
|
|
|
|
|
serviceNum.setCompleteSet("V"); //齐套标识:Y=齐套,N=未齐套,V=未知
|
|
|
|
|
serviceNum.setCreateTime(LocalDate.now()); |
|
|
|
|
// serviceNum.setCreateTime(LocalDate.now());
|
|
|
|
|
serviceNum.setDeleteTime(0); |
|
|
|
|
list.add(serviceNum); |
|
|
|
|
v.forEach(it ->{ |
|
|
|
|
it.setIdentification("1"); |
|
|
|
|
staorderPackagesService.updateById(it); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
//添加服务号和订单自编号表
|
|
|
|
|
|
|
|
|
|
serviceNumClient.addServiceNum(list); |
|
|
|
|
Boolean aBoolean123 = serviceNumClient.addServiceNum(list); |
|
|
|
|
XxlJobLogger.log("addServiceNum添加状态 {}", aBoolean123); |
|
|
|
|
//修改提交状态
|
|
|
|
|
stationOrderList.forEach(it ->{ |
|
|
|
|
it.setIdentification("1"); |
|
|
|
|
stationOrderService.updateById(it); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|