From e74f4218b8e75daf2e89a464e5b6690f8a5fc1c5 Mon Sep 17 00:00:00 2001 From: gongbaoxiong Date: Fri, 9 Aug 2024 17:40:15 +0800 Subject: [PATCH] =?UTF-8?q?add:=20=E5=8E=BB=E9=99=A4=E8=B7=9F=E8=B8=AA?= =?UTF-8?q?=E5=8F=B7=E7=AD=9B=E9=80=89=E5=BA=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/database/eas/dao/EasOutInBillDetail.java | 2 +- .../impl/EasOutInBillDetailServiceImpl.java | 14 ++++++++------ .../eas/service/impl/EasOutInBillServiceImpl.java | 4 ++-- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/EasOutInBillDetail.java b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/EasOutInBillDetail.java index eb264ad..2274040 100644 --- a/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/EasOutInBillDetail.java +++ b/nlsso-server/src/main/java/org/nl/wms/database/eas/dao/EasOutInBillDetail.java @@ -235,7 +235,7 @@ public class EasOutInBillDetail extends Model { /** - * 分录备注 + * 跟踪号编码 */ private String gzhbm; 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 7d37fd1..5297df2 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 @@ -66,6 +66,10 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl totalQty = easOutInBillDetailList.stream() .collect(Collectors.groupingBy(EasOutInBillDetail::getWlbm, Collectors.summingDouble(bill -> bill.getSl().doubleValue()))); easOutInBillDetailList.forEach(bill -> { + if(bill.getWlbm().equals("509937010017")) + { + Integer s =1; + } //设置物料总数 bill.setWlzs(totalQty.get(bill.getWlbm())); //查询库存信息 @@ -94,18 +98,16 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl minKcsl = matchedInventory.stream() - .filter(r -> r.getUnitno().equals(bill.getJldw())) + .filter(r -> r.getUnitno().equals(bill.getJldw())&&r.getKcsl().compareTo(BigDecimal.ZERO)>0) .min(Comparator.comparing(InventoryInfo::getKcsl)); minKcsl.ifPresent(m -> bill.setKcsl(m.getKcsl())); - //增加一个逻辑,当单据明细行物料编码相同时,对物料数量进行相加,赋值到物料总数字段wlzs进行显示 - }); result.setRecords(easOutInBillDetailList); return CommonPage.getPage(result); 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 f8b7d51..d3aa5d5 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 @@ -433,8 +433,8 @@ public class EasOutInBillServiceImpl extends ServiceImpl