|
|
@ -151,12 +151,7 @@ public class FactoryXxlJob { |
|
|
|
|
|
|
|
|
|
|
|
List<StaorderPackagesEntity> staorderPackagesEntityList = (List<StaorderPackagesEntity>) map.get(StaorderPackagesEntity.class.getName()); |
|
|
|
List<StaorderPackagesEntity> staorderPackagesEntityList = (List<StaorderPackagesEntity>) map.get(StaorderPackagesEntity.class.getName()); |
|
|
|
|
|
|
|
|
|
|
|
Set<String> existingPackageNumbers = new HashSet<>(); |
|
|
|
|
|
|
|
if (staorderPackagesEntityList != null) { |
|
|
|
|
|
|
|
for (StaorderPackagesEntity staorderPackagesEntity : staorderPackagesEntityList) { |
|
|
|
|
|
|
|
existingPackageNumbers.add(staorderPackagesEntity.getPackagenum()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<StationOrderEntity> finalDataList = dataList; |
|
|
|
List<StationOrderEntity> finalDataList = dataList; |
|
|
|
List<StaorderPackagesEntity> filteredStaorderPackagesEntityList = staorderPackagesEntityList.stream() |
|
|
|
List<StaorderPackagesEntity> filteredStaorderPackagesEntityList = staorderPackagesEntityList.stream() |
|
|
@ -168,7 +163,7 @@ public class FactoryXxlJob { |
|
|
|
boolean exists = list.stream() |
|
|
|
boolean exists = list.stream() |
|
|
|
.anyMatch(t -> t.getPackagenum().equals(staorderPackagesEntity.getPackagenum())); |
|
|
|
.anyMatch(t -> t.getPackagenum().equals(staorderPackagesEntity.getPackagenum())); |
|
|
|
log.info("staorderPackagesEntity.getPackagenum() {}", staorderPackagesEntity.getPackagenum()); |
|
|
|
log.info("staorderPackagesEntity.getPackagenum() {}", staorderPackagesEntity.getPackagenum()); |
|
|
|
log.info("exists", exists); |
|
|
|
log.info("exists {}" , exists); |
|
|
|
if (!exists) { |
|
|
|
if (!exists) { |
|
|
|
// 更新订单ID
|
|
|
|
// 更新订单ID
|
|
|
|
for (StationOrderEntity v : finalDataList) { |
|
|
|
for (StationOrderEntity v : finalDataList) { |
|
|
@ -177,9 +172,9 @@ public class FactoryXxlJob { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
log.info("existingPackageNumbers {}", existingPackageNumbers); |
|
|
|
boolean isExist = !exists ; |
|
|
|
|
|
|
|
log.info("isExist {}", isExist); |
|
|
|
return !exists && !existingPackageNumbers.contains(staorderPackagesEntity.getPackagenum()); |
|
|
|
return isExist; |
|
|
|
}) |
|
|
|
}) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|