From d3990f33329fbc309866e98f4a9e3906068b3b33 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Tue, 13 Aug 2024 18:53:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dsnm=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E9=97=AE=E9=A2=98=203?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../logpm/factory/jobhandler/FactoryXxlJob.java | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) 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());