|
|
@ -104,15 +104,15 @@ public class FactoryXxlJob { |
|
|
|
ls.forEach(orderLogEntity -> { |
|
|
|
ls.forEach(orderLogEntity -> { |
|
|
|
|
|
|
|
|
|
|
|
// 查询所有的数据库内容 只包含客户单号
|
|
|
|
// 查询所有的数据库内容 只包含客户单号
|
|
|
|
List<StationOrderEntity> allDataList = stationOrderService.lambdaQuery().select(StationOrderEntity::getTcWlb008).list(); |
|
|
|
List<StationOrderEntity> allDataList = stationOrderService.list(); |
|
|
|
XxlJobLogger.log("allDataList{}", allDataList.size()); |
|
|
|
XxlJobLogger.log("allDataList{}", allDataList.size()); |
|
|
|
|
|
|
|
|
|
|
|
List<String> newList = new ArrayList<>(); |
|
|
|
// List<String> newList = new ArrayList<>();
|
|
|
|
if (allDataList.size() != 0) { |
|
|
|
// if (allDataList.size() != 0) {
|
|
|
|
newList.addAll(allDataList.stream().map(StationOrderEntity::getTcWlb008).collect(Collectors.toList())); |
|
|
|
// newList.addAll(allDataList.stream().map(StationOrderEntity::getTcWlb008).collect(Collectors.toList()));
|
|
|
|
XxlJobLogger.log("newList{}", newList.size()); |
|
|
|
// XxlJobLogger.log("newList{}", newList.size());
|
|
|
|
|
|
|
|
//
|
|
|
|
} |
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
//XxlJobLogger.log("日志对象 {}", orderLogEntity);
|
|
|
|
//XxlJobLogger.log("日志对象 {}", orderLogEntity);
|
|
|
|
Map<String, List> map = orderService.dataRelative(orderLogEntity); |
|
|
|
Map<String, List> map = orderService.dataRelative(orderLogEntity); |
|
|
@ -125,7 +125,7 @@ public class FactoryXxlJob { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
dataList = checkDataExit(dataList, newList); |
|
|
|
dataList = checkDataExit(dataList, allDataList); |
|
|
|
if (dataList != null && dataList.size() != 0) { |
|
|
|
if (dataList != null && dataList.size() != 0) { |
|
|
|
//XxlJobLogger.log("保存对象StationOrderEntity {}", dataList);
|
|
|
|
//XxlJobLogger.log("保存对象StationOrderEntity {}", dataList);
|
|
|
|
stationOrderService.saveBatch(dataList); |
|
|
|
stationOrderService.saveBatch(dataList); |
|
|
@ -133,14 +133,15 @@ public class FactoryXxlJob { |
|
|
|
//XxlJobLogger.log("日志对象 {}", dataList.get(0).getId());
|
|
|
|
//XxlJobLogger.log("日志对象 {}", dataList.get(0).getId());
|
|
|
|
|
|
|
|
|
|
|
|
List<StaorderPackagesEntity> staorderPackagesEntityList = map.get(StaorderPackagesEntity.class.getName()); |
|
|
|
List<StaorderPackagesEntity> staorderPackagesEntityList = map.get(StaorderPackagesEntity.class.getName()); |
|
|
|
List<StaorderPackagesEntity> allDataStaorderPackagesEntity = staorderPackagesService.lambdaQuery().select(StaorderPackagesEntity::getTcPoa014).list(); |
|
|
|
List<StaorderPackagesEntity> allDataStaorderPackagesEntity = staorderPackagesService.lambdaQuery().select(StaorderPackagesEntity::getPackagenum).list(); |
|
|
|
List<String> allStaorderPackagesEntityUnionId = allDataStaorderPackagesEntity.stream().map(StaorderPackagesEntity::getTcPoa014).collect(Collectors.toList()); |
|
|
|
List<String> allStaorderPackagesEntityUnionId = allDataStaorderPackagesEntity.stream().map(StaorderPackagesEntity::getPackagenum).collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
allStaorderPackagesEntityUnionId.forEach(t -> { |
|
|
|
allStaorderPackagesEntityUnionId.forEach(t -> { |
|
|
|
for (int i = 0; i < staorderPackagesEntityList.size(); i++) { |
|
|
|
for (int i = 0; i < staorderPackagesEntityList.size(); i++) { |
|
|
|
if (staorderPackagesEntityList.get(i).getTcPoa014().equals(t)) { |
|
|
|
if (staorderPackagesEntityList.get(i).getPackagenum().equals(t)) { |
|
|
|
staorderPackagesEntityList.remove(i); |
|
|
|
staorderPackagesEntityList.remove(i); |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -367,11 +368,23 @@ public class FactoryXxlJob { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private List<StationOrderEntity> checkDataExit(List<StationOrderEntity> dataList, List<String> allDataList) { |
|
|
|
private List<StationOrderEntity> checkDataExit(List<StationOrderEntity> dataList, List<StationOrderEntity> allDataList) { |
|
|
|
allDataList.forEach(t -> { |
|
|
|
allDataList.forEach(o -> { |
|
|
|
|
|
|
|
String otcWla001 = o.getTcWla001();//数据库中对应的派车单号
|
|
|
|
|
|
|
|
String otcWla002 = o.getTcWla002();//数据库中对应的派车时间
|
|
|
|
|
|
|
|
String otcWlb008 = o.getTcWlb008();//数据库中对应的客户单号
|
|
|
|
|
|
|
|
String otcWlb007 = o.getTcWlb007();//数据库中对应的系统单号
|
|
|
|
|
|
|
|
Integer otcWlb009 = o.getTcWlb009();//数据库中对应的包件数量
|
|
|
|
for (int i = 0; i < dataList.size(); i++) { |
|
|
|
for (int i = 0; i < dataList.size(); i++) { |
|
|
|
if (dataList.get(i).getTcWlb008().equals(t)) { |
|
|
|
StationOrderEntity stationOrderEntity = dataList.get(i); |
|
|
|
|
|
|
|
String tcWla001 = stationOrderEntity.getTcWla001();//Log中的派车单号
|
|
|
|
|
|
|
|
String tcWla002 = stationOrderEntity.getTcWla002();//Log中对应的派车时间
|
|
|
|
|
|
|
|
String tcWlb008 = stationOrderEntity.getTcWlb008();//Log中对应的客户单号
|
|
|
|
|
|
|
|
String tcWlb007 = stationOrderEntity.getTcWlb007();//Log中对应的系统单号
|
|
|
|
|
|
|
|
Integer tcWlb009 = stationOrderEntity.getTcWlb009();//Log中对应的包件数量
|
|
|
|
|
|
|
|
if (otcWla001.equals(tcWla001)&&otcWla002.equals(tcWla002)&&otcWlb008.equals(tcWlb008)&&otcWlb007.equals(tcWlb007)&&otcWlb009.equals(tcWlb009)) { |
|
|
|
dataList.remove(i); |
|
|
|
dataList.remove(i); |
|
|
|
|
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|