Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dist.1.3.0
zhaoqiaobo 5 months ago
parent
commit
5b6b508ebb
  1. 15
      blade-service/logpm-factory/src/main/java/com/logpm/factory/jobhandler/FactoryXxlJob.java

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

@ -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());

Loading…
Cancel
Save