From d0324fb3ce17266f60ce2b01c363858715e73d11 Mon Sep 17 00:00:00 2001
From: baoge <751575283@qq.com>
Date: Thu, 25 Apr 2024 17:52:12 +0800
Subject: [PATCH] =?UTF-8?q?opt:=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83?=
=?UTF-8?q?=E4=B8=8D=E6=9F=A5=E8=AF=A2=E5=BA=93=E5=AD=98=E4=BF=A1=E6=81=AF?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
nlsso-server/pom.xml | 8 +--
.../impl/EasOutInBillDetailServiceImpl.java | 49 +++++++++----------
2 files changed, 23 insertions(+), 34 deletions(-)
diff --git a/nlsso-server/pom.xml b/nlsso-server/pom.xml
index d167382..1aaaa7a 100644
--- a/nlsso-server/pom.xml
+++ b/nlsso-server/pom.xml
@@ -71,6 +71,7 @@
0.2
+
org.fusesource.jansi
jansi
@@ -107,13 +108,6 @@
dynamic-datasource-spring-boot-starter
4.1.3
-
-
- org.fusesource.jansi
- jansi
- 1.17.1
-
-
cn.hutool
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 0b58c93..4f0e77c 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
@@ -56,22 +56,22 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl easOutInBillDetailList = result.getRecords();
- List inventoryInfoList = queryInventoryInfoList(easOutInBillDetailList);
- easOutInBillDetailList.forEach(bill -> {
- //查询库存信息
- List matchedInventory = inventoryInfoList.stream()
- .filter(inventory -> Objects.equals(inventory.getZzbm(), bill.getZzbm())
- && Objects.equals(inventory.getCkbm(), bill.getCkbm())
- && Objects.equals(inventory.getWlbm(), bill.getWlbm())
- && Objects.equals(inventory.getPc(), bill.getPc())
- && Objects.equals(inventory.getTrackno(), bill.getTrackno())
- && Objects.equals(inventory.getKwbm(), bill.getKwbm()))
- .collect(Collectors.toList());
- //将库存数量赋值给单据
- if (CollectionUtils.isNotEmpty(matchedInventory)) {
- bill.setKcsl(matchedInventory.get(0).getKcsl());
- }
- });
+ //List inventoryInfoList = queryInventoryInfoList(easOutInBillDetailList);
+// easOutInBillDetailList.forEach(bill -> {
+// //查询库存信息
+// List matchedInventory = inventoryInfoList.stream()
+// .filter(inventory -> Objects.equals(inventory.getZzbm(), bill.getZzbm())
+// && Objects.equals(inventory.getCkbm(), bill.getCkbm())
+// && Objects.equals(inventory.getWlbm(), bill.getWlbm())
+// && Objects.equals(inventory.getPc(), bill.getPc())
+// && Objects.equals(inventory.getTrackno(), bill.getTrackno())
+// && Objects.equals(inventory.getKwbm(), bill.getKwbm()))
+// .collect(Collectors.toList());
+// //将库存数量赋值给单据
+// if (CollectionUtils.isNotEmpty(matchedInventory)) {
+// bill.setKcsl(matchedInventory.get(0).getKcsl());
+// }
+// });
result.setRecords(easOutInBillDetailList);
return CommonPage.getPage(result);
}
@@ -149,11 +149,10 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl entityList) {
if (CollectionUtils.isNotEmpty(entityList)) {
- List entityLists= entityList.stream().filter(r->StringUtils.isNotEmpty(r.getKwbm())).collect(Collectors.toList());
- List ids =entityLists.stream().map(EasOutInBillDetailVO::getCode).collect(Collectors.toList());
- if(ids.size()==entityList.size()&&ids.size()>1)
- {
- entityList.forEach(r->{
+ List entityLists = entityList.stream().filter(r -> StringUtils.isNotEmpty(r.getKwbm())).collect(Collectors.toList());
+ List ids = entityLists.stream().map(EasOutInBillDetailVO::getCode).collect(Collectors.toList());
+ if (ids.size() == entityList.size() && ids.size() > 1) {
+ entityList.forEach(r -> {
UpdateWrapper updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("flid", r.getFlid());
updateWrapper.set("czsl", r.getSl());
@@ -165,16 +164,14 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl StringUtils.isNotEmpty(r.getKwbm()))
.map(EasOutInBillDetailVO::getSysl)
.reduce(BigDecimal.ZERO, BigDecimal::add)
.compareTo(BigDecimal.ZERO) == 0;
- if(isValid)
- {
+ if (isValid) {
throw new BadRequestException("请检查库位和数量信息");
}
BigDecimal amount = entityList.stream()
@@ -198,8 +195,6 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl