From fe22f85f87922cc08b3a4674ecf033d5a9754b6f Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Fri, 17 May 2024 19:30:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/constant/ModuleNameConstant.java | 2 +- .../DistributionStockArticleServiceImpl.java | 4 + .../impl/WarehouseUpdownTypeServiceImpl.java | 87 ++++++++++--------- 3 files changed, 51 insertions(+), 42 deletions(-) diff --git a/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java b/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java index 71fc125ac..c3cc1b12c 100644 --- a/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java +++ b/blade-biz-common/src/main/java/org/springblade/common/constant/ModuleNameConstant.java @@ -9,7 +9,7 @@ public interface ModuleNameConstant { /** * 如果不需要 "" */ - public static final String DEVAUTH ="-pref"; + public static final String DEVAUTH =""; /** * 工厂对接服务名称 diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java index 2f0fdd022..f0562df98 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockArticleServiceImpl.java @@ -1397,6 +1397,8 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl orderCodes, Long warehouseId) { + log.info(">>>>> T updateOrdersInfo start"); + QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.in("order_code", orderCodes) .eq("warehouse_id", warehouseId) @@ -1418,6 +1420,8 @@ public class DistributionStockArticleServiceImpl extends BaseServiceImpl>>>> T updateOrdersInfo end"); } diff --git a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java index 9aaf84304..b7a318088 100644 --- a/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java +++ b/blade-service/logpm-warehouse/src/main/java/com/logpm/warehouse/service/impl/WarehouseUpdownTypeServiceImpl.java @@ -1587,6 +1587,8 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl upShelfPackageList, Long warehouseId, String remark, boolean isOrNo) { + + log.info(">>>>> T downPackageAndDelTrayAndIsUpdate start"); int num = 0; Set orderSet = new TreeSet<>(); @@ -1612,6 +1614,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl trayGoodsEntityQueryWrapper = new QueryWrapper<>(); @@ -1623,52 +1626,53 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl t.getOrderPackageCode().equals(orderPackageCode)) - .findFirst() - .orElse(null); - if(parcelListEntity==null){ - log.info(">>>>>>>>>>>>>> 包条找不到 {} ",orderPackageCode); - continue; - } + }else{ + // 托盘存在上架 + DistributionParcelListEntity parcelListEntity =parcelListEntitys.stream() + .filter(t -> t.getOrderPackageCode().equals(orderPackageCode)) + .findFirst() + .orElse(null); + if(parcelListEntity==null){ + log.info(">>>>>>>>>>>>>> 包条找不到 {} ",orderPackageCode); + continue; + } - Long allocationId = updownGoodsEntity.getAllocationId(); - Integer quantity = parcelListEntity.getQuantity(); - String orderCode = parcelListEntity.getOrderCode(); - Long updownGoodsId = updownGoodsEntity.getId(); - Long updownTypeId = updownGoodsEntity.getUpdownTypeId(); - WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectById(updownTypeId); - QueryWrapper taryAllocationEntityQueryWrapper = new QueryWrapper<>(); - taryAllocationEntityQueryWrapper.eq("allocation_id", allocationId) - .eq("is_deleted", 0); - WarehouseTaryAllocationEntity taryAllocationEntity = warehouseTaryAllocationService.getOne(taryAllocationEntityQueryWrapper); -// BasicdataTrayEntity trayEntity = warehouseTaryAllocationService.getTrayByAllocationId(allocationId); - if (!Objects.isNull(taryAllocationEntity)) { - //有托盘,托盘下托 - warehouseTrayTypeService.downPackageByOrderPackageCode(orderPackageCode, remark, warehouseId); - } - Integer residue = warehouseUpdownGoodsService.deleteByUpdownGoodsId(updownGoodsId); - if (residue == 0) { - //删除上架方式 - removeById(updownTypeId); - //修改库位状态为空闲 - basicdataGoodsAllocationClient.updateAllocationStatus(allocationId, "1"); - //如果有托盘还要删除托盘与库位的绑定 + Long allocationId = updownGoodsEntity.getAllocationId(); + Integer quantity = parcelListEntity.getQuantity(); + String orderCode = parcelListEntity.getOrderCode(); + Long updownGoodsId = updownGoodsEntity.getId(); + Long updownTypeId = updownGoodsEntity.getUpdownTypeId(); + WarehouseUpdownTypeEntity updownTypeEntity = baseMapper.selectById(updownTypeId); + QueryWrapper taryAllocationEntityQueryWrapper = new QueryWrapper<>(); + taryAllocationEntityQueryWrapper.eq("allocation_id", allocationId) + .eq("is_deleted", 0); + WarehouseTaryAllocationEntity taryAllocationEntity = warehouseTaryAllocationService.getOne(taryAllocationEntityQueryWrapper); if (!Objects.isNull(taryAllocationEntity)) { - warehouseTaryAllocationService.deleteById(taryAllocationEntity); + //有托盘,托盘下托 + warehouseTrayTypeService.downPackageByOrderPackageCode(orderPackageCode, remark, warehouseId); } + Integer residue = warehouseUpdownGoodsService.deleteByUpdownGoodsId(updownGoodsId); + if (residue == 0) { + //删除上架方式 + removeById(updownTypeId); + //修改库位状态为空闲 + basicdataGoodsAllocationClient.updateAllocationStatus(allocationId, "1"); + //如果有托盘还要删除托盘与库位的绑定 + if (!Objects.isNull(taryAllocationEntity)) { + warehouseTaryAllocationService.deleteById(taryAllocationEntity); + } + } + warehouseUpdownGoodsLogService.saveAllocationAndPackage(updownTypeEntity, parcelListEntity, "2", 0, remark); + if (isOrNo) { + updatePackageGroundingStatus(orderPackageCode, "10", warehouseId); + } + updateUpdownTypeNum(updownTypeEntity); + + orderSet.add(orderCode); + num = num + quantity; + warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString()); } - warehouseUpdownGoodsLogService.saveAllocationAndPackage(updownTypeEntity, parcelListEntity, "2", 0, remark); - if (isOrNo) { - updatePackageGroundingStatus(orderPackageCode, "10", warehouseId); - } - updateUpdownTypeNum(updownTypeEntity); - orderSet.add(orderCode); - num = num + quantity; - warehouseGoodsAllocationClient.updateAllocationCache(allocationId.toString()); } // for (String orderCode : orderSet) { @@ -1680,6 +1684,7 @@ public class WarehouseUpdownTypeServiceImpl extends BaseServiceImpl>>>> T downPackageAndDelTrayAndIsUpdate end"); return Resp.scanSuccess("下架成功", "成功下架" + num + "件"); }