From 08ac19d90cea05e39aacabecda69cef08dfa27bf Mon Sep 17 00:00:00 2001 From: baoge <751575283@qq.com> Date: Wed, 8 May 2024 09:52:24 +0800 Subject: [PATCH] =?UTF-8?q?opt:=20=E4=BF=AE=E6=94=B9=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=8D=95=E6=8D=AE=E5=A4=84=E7=90=86=E6=95=B0=E9=87=8F=EF=BC=8C?= =?UTF-8?q?=E5=8D=95=E6=8D=AE=E6=98=8E=E7=BB=86=E5=AE=9E=E6=97=B6=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=AE=A1=E6=A0=B8=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/EasOutInBillDetailServiceImpl.java | 4 ++-- .../service/impl/EasOutInBillServiceImpl.java | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 10 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 58ecd58..786f5c2 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 @@ -197,11 +197,11 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl 1) { entityList.forEach(r -> { UpdateWrapper updateWrapper = new UpdateWrapper<>(); + //updateWrapper.set("djzt", "审核"); updateWrapper.eq("flid", r.getFlid()); updateWrapper.set("czsl", r.getSl()); updateWrapper.set("sysl", 0); updateWrapper.set("kwbm", r.getKwbm()); - updateWrapper.set("djzt", "审核"); updateWrapper.set("update_id", SecurityUtils.getCurrentUserId()); updateWrapper.set("update_name", SecurityUtils.getCurrentNickName()); updateWrapper.set("update_time", DateUtil.format(DateUtil.beginOfDay(DateUtil.date()), "yyyy-MM-dd")); @@ -227,11 +227,11 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl updateWrapper = new UpdateWrapper<>(); + //updateWrapper.set("djzt", "审核"); updateWrapper.eq("flid", entityList.get(0).getFlid()); updateWrapper.set("czsl", czsl); updateWrapper.set("sysl", sysl); updateWrapper.set("kwbm", entityList.get(0).getKwbm()); - updateWrapper.set("djzt", "审核"); updateWrapper.set("update_id", SecurityUtils.getCurrentUserId()); updateWrapper.set("update_name", SecurityUtils.getCurrentNickName()); updateWrapper.set("update_time", DateUtil.format(DateUtil.beginOfDay(DateUtil.date()), "yyyy-MM-dd")); diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillServiceImpl.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillServiceImpl.java index 74bb5bb..c6af8e4 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillServiceImpl.java +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/service/impl/EasOutInBillServiceImpl.java @@ -395,7 +395,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl easBills = new ArrayList<>(); List srmBills = new ArrayList<>(); - //明细行自动审核 + //对单个明细行的自动审核 if (!isDetail) { List easBillDetailList = easOutInBillDetailMapper.queryDetailList(ids); if (CollectionUtils.isEmpty(easBillDetailList)) { @@ -423,14 +423,14 @@ public class EasOutInBillServiceImpl extends ServiceImpl easOutInBillList = easOutInBillMapper.queryBillList(ids); //所有明细表 List easOutInBillDetailList = easOutInBillDetailMapper.queryBillDetailList(ids); - // long count = easOutInBillDetailList.stream().filter(r -> r.getQty().compareTo(BigDecimal.ZERO) == 0).count(); - // if (count == easOutInBillDetailList.size()) { - // throw new BadRequestException("该单据无任何出入库操作,请检查"); - // } + long count = easOutInBillDetailList.stream().filter(r -> r.getQty().compareTo(BigDecimal.ZERO) == 0).count(); + if (count == easOutInBillDetailList.size()) { + throw new BadRequestException("该单据无任何出入库操作,请检查"); + } //报文组合 if (CollectionUtils.isNotEmpty(easOutInBillList)) { easOutInBillList.forEach(b -> { @@ -509,6 +509,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl bills) { for (EasOutInBillDto bill : bills) { try { @@ -519,7 +520,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl bills) { for (EasOutInBillDto bill : bills) { try { @@ -535,7 +537,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl