diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java index 5cb573c..cc8a9a5 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillDetailServiceImpl.java @@ -53,35 +53,35 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl easOutInBillDetailList = result.getRecords(); - List inventoryInfoList = queryInventoryInfoList(easOutInBillDetailList); - easOutInBillDetailList.forEach(bill -> { - //查询库存信息 - List matchedInventory = inventoryInfoList.stream() - .filter(inventory -> { - boolean isMatched = true; - if (bill.getZzbm() != null && !bill.getZzbm().isEmpty()) { - isMatched &= Objects.equals(inventory.getZzbm(), bill.getZzbm()); - } - if (bill.getCkbm() != null && !bill.getCkbm().isEmpty()) { - isMatched &= Objects.equals(inventory.getCkbm(), bill.getCkbm()); - } - if (bill.getWlbm() != null && !bill.getWlbm().isEmpty()) { - isMatched &= Objects.equals(inventory.getWlbm(), bill.getWlbm()); - } - // 批次 - if (bill.getPc() != null && !bill.getPc().isEmpty()) { - isMatched &= Objects.equals(inventory.getPc(), bill.getPc()); - } - // 跟踪号 - if (bill.getTrackno() != null && !bill.getTrackno().isEmpty()) { - isMatched &= Objects.equals(inventory.getTrackno(), bill.getTrackno()); - } - if (bill.getKwbm() != null && !bill.getKwbm().isEmpty()) { - isMatched &= Objects.equals(inventory.getKwbm(), bill.getKwbm()); - } - return isMatched; - }) - .collect(Collectors.toList()); +// List inventoryInfoList = queryInventoryInfoList(easOutInBillDetailList); +// easOutInBillDetailList.forEach(bill -> { +// //查询库存信息 +// List matchedInventory = inventoryInfoList.stream() +// .filter(inventory -> { +// boolean isMatched = true; +// if (bill.getZzbm() != null && !bill.getZzbm().isEmpty()) { +// isMatched &= Objects.equals(inventory.getZzbm(), bill.getZzbm()); +// } +// if (bill.getCkbm() != null && !bill.getCkbm().isEmpty()) { +// isMatched &= Objects.equals(inventory.getCkbm(), bill.getCkbm()); +// } +// if (bill.getWlbm() != null && !bill.getWlbm().isEmpty()) { +// isMatched &= Objects.equals(inventory.getWlbm(), bill.getWlbm()); +// } +// // 批次 +// if (bill.getPc() != null && !bill.getPc().isEmpty()) { +// isMatched &= Objects.equals(inventory.getPc(), bill.getPc()); +// } +// // 跟踪号 +// if (bill.getTrackno() != null && !bill.getTrackno().isEmpty()) { +// isMatched &= Objects.equals(inventory.getTrackno(), bill.getTrackno()); +// } +// if (bill.getKwbm() != null && !bill.getKwbm().isEmpty()) { +// isMatched &= Objects.equals(inventory.getKwbm(), bill.getKwbm()); +// } +// return isMatched; +// }) +// .collect(Collectors.toList()); // List matchedInventory = inventoryInfoList.stream() // .filter(inventory -> Objects.equals(inventory.getZzbm(), bill.getZzbm()) // && Objects.equals(inventory.getCkbm(), bill.getCkbm()) @@ -91,12 +91,12 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl minKcsl = matchedInventory.stream() - .min(Comparator.comparing(InventoryInfo::getKcsl)); - minKcsl.ifPresent(m -> { - bill.setKcsl(m.getKcsl()); - }); - }); +// Optional minKcsl = matchedInventory.stream() +// .min(Comparator.comparing(InventoryInfo::getKcsl)); +// minKcsl.ifPresent(m -> { +// bill.setKcsl(m.getKcsl()); +// }); +// }); result.setRecords(easOutInBillDetailList); return CommonPage.getPage(result); } diff --git a/nlsso-server/src/main/java/org/nl/wms/schedule/EasBillSchedule.java b/nlsso-server/src/main/java/org/nl/wms/schedule/EasBillSchedule.java index 56497e8..a5eca32 100644 --- a/nlsso-server/src/main/java/org/nl/wms/schedule/EasBillSchedule.java +++ b/nlsso-server/src/main/java/org/nl/wms/schedule/EasBillSchedule.java @@ -53,7 +53,7 @@ public class EasBillSchedule { * eas单据数据同步 */ @Async("taskExecutor") - @Scheduled(cron = "0/30 * * * * *") + //@Scheduled(cron = "0/30 * * * * *") public void getEasOutInBills() { // 获取eas视图查询未提交的单据 List easOutInBillDetails = easOutInBillDetailMapper.selectPageWithInventory(); diff --git a/nlsso-server/src/main/resources/config/application.yml b/nlsso-server/src/main/resources/config/application.yml index 1559df3..1f8acce 100644 --- a/nlsso-server/src/main/resources/config/application.yml +++ b/nlsso-server/src/main/resources/config/application.yml @@ -4,7 +4,7 @@ server: relaxed-path-chars: [ '|','{','}','[',']' ] #字符问题: https://blog.csdn.net/weixin_41996632/article/details/90715118 spring: profiles: - active: prod + active: dev datasource: druid: initial-size: 5 #初始化时建立物理连接的个数