diff --git a/blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/FactoryXxlJob.java b/blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/FactoryXxlJob.java index 9b0997a66..368599d49 100644 --- a/blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/FactoryXxlJob.java +++ b/blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/FactoryXxlJob.java @@ -151,12 +151,7 @@ public class FactoryXxlJob { List staorderPackagesEntityList = (List) map.get(StaorderPackagesEntity.class.getName()); - Set existingPackageNumbers = new HashSet<>(); - if (staorderPackagesEntityList != null) { - for (StaorderPackagesEntity staorderPackagesEntity : staorderPackagesEntityList) { - existingPackageNumbers.add(staorderPackagesEntity.getPackagenum()); - } - } + List finalDataList = dataList; List filteredStaorderPackagesEntityList = staorderPackagesEntityList.stream() @@ -168,7 +163,7 @@ public class FactoryXxlJob { boolean exists = list.stream() .anyMatch(t -> t.getPackagenum().equals(staorderPackagesEntity.getPackagenum())); log.info("staorderPackagesEntity.getPackagenum() {}", staorderPackagesEntity.getPackagenum()); - log.info("exists", exists); + log.info("exists {}" , exists); if (!exists) { // 更新订单ID for (StationOrderEntity v : finalDataList) { @@ -177,9 +172,9 @@ public class FactoryXxlJob { } } } - log.info("existingPackageNumbers {}", existingPackageNumbers); - - return !exists && !existingPackageNumbers.contains(staorderPackagesEntity.getPackagenum()); + boolean isExist = !exists ; + log.info("isExist {}", isExist); + return isExist; }) .collect(Collectors.toList());