From 870124ee86829dd305f6c4dc82511593b16e7a81 Mon Sep 17 00:00:00 2001 From: gongbx Date: Fri, 10 May 2024 18:22:38 +0800 Subject: [PATCH] =?UTF-8?q?opt:=E4=BF=AE=E6=94=B9=E6=AD=A3=E5=BC=8F?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E7=9B=B8=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/EasOutInBillDetailServiceImpl.java | 49 ++++++++++--------- .../org/nl/wms/schedule/EasBillSchedule.java | 4 +- 2 files changed, 27 insertions(+), 26 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 68612fe..5fbba2b 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 @@ -70,30 +70,31 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl 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.getTjkwbm() != null && !bill.getTjkwbm().isEmpty()) { - isMatched &= Objects.equals(inventory.getTjkwbm(), bill.getTjkwbm()); - } - //物料编码 - 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.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.getTjkwbm() != null && !bill.getTjkwbm().isEmpty()) { + isMatched = Objects.equals(inventory.getTjkwbm(), bill.getTjkwbm()); + } + + //物料编码 + 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()); + } return isMatched; }) .collect(Collectors.toList()); 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 a10d5ee..c3158c5 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 @@ -136,7 +136,7 @@ public class EasBillSchedule { * 定时清空单据 */ @Async("taskExecutor") - // @Scheduled(cron = "0/86400 * * * * *") + //@Scheduled(cron = "0/86400 * * * * *") public void autoDeleteTask() { LocalDate threeMonthsAgo = LocalDate.now().minusMonths(3); String days = threeMonthsAgo.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); @@ -158,7 +158,7 @@ public class EasBillSchedule { * 首页信息推送 */ @Async("taskExecutor") - @Scheduled(cron = "0/4 * * * * *") + //@Scheduled(cron = "0/4 * * * * *") public void sendHomeInfoTask() { //StopWatch stopWatch = new StopWatch(); //stopWatch.start();