Browse Source

1.fix 重复数据 1

newStockUp
pref_mail@163.com 2 years ago
parent
commit
4d0fa07940
  1. 5
      blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/FactoryXxlJob.java

5
blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/FactoryXxlJob.java

@ -128,6 +128,8 @@ public class FactoryXxlJob {
List<StaorderPackagesEntity> staorderPackagesEntityList = map.get(StaorderPackagesEntity.class.getName());
List<StaorderPackagesEntity> allDataStaorderPackagesEntity = staorderPackagesService.lambdaQuery().select(StaorderPackagesEntity::getTcPoa014).list();
List<String> allStaorderPackagesEntityUnionId = allDataStaorderPackagesEntity.stream().map(StaorderPackagesEntity::getTcPoa014).collect(Collectors.toList());
for (int i = 0; i < staorderPackagesEntityList.size(); i++) {
// 找到相同的ID 跳过
if (allStaorderPackagesEntityUnionId.contains(staorderPackagesEntityList.get(i).getTcPoa014())) {
@ -360,9 +362,12 @@ public class FactoryXxlJob {
}
private List<StationOrderEntity> checkDataExit(List<StationOrderEntity> dataList, List<String> allDataList) {
XxlJobLogger.log("allDataList {}", allDataList.toArray());
for (int i = 0; i < dataList.size(); i++) {
XxlJobLogger.log("dataList.get(i).getTcWlb008() {}", dataList.get(i).getTcWlb008());
if (allDataList.contains(dataList.get(i).getTcWlb008())) {
// 如果存在 需要移除
XxlJobLogger.log("移除对象 {}", dataList.get(i).getTcWlb008());
dataList.remove(i);
}
}

Loading…
Cancel
Save