From da42b65c41a6ce032a372ea7049e3c9b49f044e2 Mon Sep 17 00:00:00 2001 From: baoge <751575283@qq.com> Date: Sun, 28 Apr 2024 10:59:55 +0800 Subject: [PATCH] =?UTF-8?q?opt:=20=E4=BF=AE=E6=94=B9=E7=BA=BF=E4=B8=8A?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/EasOutInBillDetailServiceImpl.java | 70 +++++++++---------- .../org/nl/wms/schedule/EasBillSchedule.java | 2 +- .../src/main/resources/config/application.yml | 2 +- 3 files changed, 37 insertions(+), 37 deletions(-) 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 #初始化时建立物理连接的个数