From 85eae9882fb868c9d73a55051518d768a0a63b83 Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Sat, 30 Mar 2024 14:35:11 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=8F=90=E5=BA=93=E5=AD=98=E5=93=81?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DistrilbutionBillLadingServiceImpl.java | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java index 81ff36f4e..a62077aff 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistrilbutionBillLadingServiceImpl.java @@ -1731,34 +1731,37 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl inventory = baseMapper.getInventory(page, distrilbutionBillLadingEntity); inventory.getRecords().forEach(i -> { + List listed = disStockListDetailService.list(Wrappers.query().lambda() + .eq(DisStockListDetailEntity::getReservationId, i.getBillLadingId()) + .ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) + ); - if (i.getQuantity().equals(i.getDeliveryNum())) { + if (Func.isNotEmpty(listed)){ + int sum = listed.stream().filter(f -> InventoryStockUpStatusConstant.yibeihuo.getValue().equals(f.getStockStatus()) && Func.isNotEmpty(f.getStockPackageCode())).mapToInt(DisStockListDetailEntity::getNum).sum(); + log.info(i.getDescriptionGoods()+">>>>>>>>>>>>>>自提客户备货库存数量:",sum); + if (sum == i.getQuantity()){ + i.setEsauInventoryNum(sum); + }else { + i.setEsauInventoryNum(-1); + } + }else { + i.setEsauInventoryNum(-1); + } +// if (i.getQuantity().equals(i.getDeliveryNum())) { //已备货 // List list = distributionBillLadingScanService.list(Wrappers.query().lambda() // .eq(DistributionBillLadingScanEntity::getBillLadingId, distrilbutionBillLadingEntity.getId()) // .eq(DistributionBillLadingScanEntity::getMaterialType, '1') // ); - List listed = disStockListDetailService.list(Wrappers.query().lambda() - .eq(DisStockListDetailEntity::getReservationId, i.getBillLadingId()) - .ne(DisStockListDetailEntity::getStockPackageStatus, ReservationPackageStatusConstant.quxiao.getValue()) - ); - if (Func.isNotEmpty(listed)){ - int sum = listed.stream().filter(f -> InventoryStockUpStatusConstant.yibeihuo.getValue().equals(f.getStockStatus()) && Func.isNotEmpty(f.getStockPackageCode())).mapToInt(DisStockListDetailEntity::getNum).sum(); - log.info(i.getDescriptionGoods()+">>>>>>>>>>>>>>自提客户备货库存数量:",sum); - if (sum>0){ - i.setEsauInventoryNum(sum); - }else { - i.setEsauInventoryNum(-1); - } - }else { - i.setEsauInventoryNum(-1); - } +// i.setEsauInventoryNum(list.size()); - } else { + + +// } else { //没有备货完成 - i.setEsauInventoryNum(-1); - } +// i.setEsauInventoryNum(-1); +// } }); return inventory;