From bcae7f0ca579c61794878121b1485f01a50a419b Mon Sep 17 00:00:00 2001 From: PigBaoBei <2739175034@qq.com> Date: Fri, 30 Aug 2024 15:50:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/app/DistributionAppDetailVO.java | 1 + .../DistributionDeliveryListServiceImpl.java | 29 ++++++++++--------- .../DistrilbutionBillLadingServiceImpl.java | 2 +- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDetailVO.java b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDetailVO.java index 7816d368c..8d10644c3 100644 --- a/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDetailVO.java +++ b/blade-service-api/logpm-distribution-api/src/main/java/com/logpm/distribution/vo/app/DistributionAppDetailVO.java @@ -62,6 +62,7 @@ public class DistributionAppDetailVO implements Serializable { private List distributionAppStockArticleVOS; private List distributionAppZeroStockArticleVOS; + private List distributionAppStockListVOS ; diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java index 1a0f6b1e8..23bfd31cc 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionDeliveryListServiceImpl.java @@ -7991,12 +7991,10 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl distributionAppStockListVOS = handleAppDeliveryInventory(distributionAppDeliveryListDTO,myCurrentWarehouse); - + List distributionAppStockListVOS = handleAppDeliveryInventory(distributionAppDeliveryListDTO, myCurrentWarehouse); + detailVO.setDistributionAppStockListVOS(distributionAppStockListVOS); break; } - - return R.data(detailVO); } @@ -8016,18 +8014,21 @@ public class DistributionDeliveryListServiceImpl extends BaseServiceImpl inventoryIds = entityList.stream().map(DistributionStockListEntity::getId).collect(Collectors.toList()); + Integer planNum = 0; + Integer scanNum = 0; + for (Long inventoryId : inventoryPackageMap.keySet()) { + if (inventoryIds.contains(inventoryId)){ + List entityList1 = inventoryPackageMap.get(inventoryId); + planNum += entityList1.stream().mapToInt(DisStockListDetailEntity::getNum).sum(); + scanNum += entityList1.stream().filter(f->InventoryLoadingStatusConstant.yizhuangche.getValue().equals(f.getStockLockingStatus())).mapToInt(DisStockListDetailEntity::getNum).sum(); + } + } + distributionAppStockListVO.setPlanNum(planNum); + distributionAppStockListVO.setScanNum(scanNum); + distributionAppStockListVOS.add(distributionAppStockListVO); } - map.forEach((k,v)->{ - DistributionAppStockListVO distributionAppStockListVO = new DistributionAppStockListVO(); - - }); - - } - return distributionAppStockListVOS; } 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 f8ea3e3c3..d03bbb26b 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 @@ -3752,7 +3752,7 @@ public class DistrilbutionBillLadingServiceImpl extends BaseServiceImpl ids = list.stream().map(DistrilbutionBillPackageEntity::getParceListId).collect(Collectors.toList()); //查询包件 List distributionParcelListEntities = distributionParcelListService.listByIds(ids); - List packageIds = distributionParcelListEntities.stream().filter(f -> !OrderPackageLoadingStatusConstant.yizhuangche.getValue().equals(f.getOrderPackageLoadingStatus()) || !OrderPackageStatusConstant.yiqianshou.getValue().equals(f.getOrderPackageStatus())).map(DistributionParcelListEntity::getId).collect(Collectors.toList()); + List packageIds = distributionParcelListEntities.stream().filter(f -> !OrderPackageStatusConstant.yiqianshou.getValue().equals(f.getOrderPackageStatus())).map(DistributionParcelListEntity::getId).collect(Collectors.toList()); if (Func.isNotEmpty(packageIds)) { distributionParcelListService.update(new UpdateWrapper().lambda() .set(DistributionParcelListEntity::getOrderPackageReservationStatus, OrderPackageReservationStatusConstant.daiyuyue.getValue())