From 9996a59c60cd76a380684e53d41626c5ab459454 Mon Sep 17 00:00:00 2001 From: "pref_mail@163.com" Date: Thu, 11 Jul 2024 10:14:32 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8F=96=E6=B6=88=E9=A6=96=E9=A1=B5=E7=9A=84?= =?UTF-8?q?=E7=BC=93=E5=AD=98=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../report/mapper/WarehouseIndexMapper.xml | 3 +- .../impl/WarehouseIndexServiceImpl.java | 111 +++++++++--------- 2 files changed, 56 insertions(+), 58 deletions(-) diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml index a5c690343..b7bfceaff 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/mapper/WarehouseIndexMapper.xml @@ -125,11 +125,10 @@ IFNULL(sum(ldpl.weight),0) handleWeight, IFNULL(sum(ldpl.volume),0) handleVolume from logpm_distribution_parcel_list ldpl - left join logpm_distribution_stock_article ldsa on ldsa.id = ldpl.stock_article_id left join logpm_warehouse_waybill lww on ldpl.waybill_number = lww.waybill_no and lww.departure_warehouse_id = ldpl.warehouse_id where 1=1 - and ldsa.is_zero = 0 + and ldpl.order_package_code != null and ldpl.order_package_status = '20' and ldpl.warehouse_id in diff --git a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java index a129eb99c..ab1dee6b6 100644 --- a/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java +++ b/blade-service/logpm-report/src/main/java/com/logpm/report/service/impl/WarehouseIndexServiceImpl.java @@ -119,26 +119,26 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService { public IndexHandOrderDataVO handOrderData(IndexDTO indexDTO) { //增加缓存 BladeUser user = AuthUtil.getUser(); - String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "handOrderData"); - IndexHandOrderDataVO indexHandOrderDataVO = bladeRedis.get(key); - - if (Objects.isNull(indexHandOrderDataVO)) { - List warehouseIds = indexDTO.getWarehouseIds(); - indexHandOrderDataVO = new IndexHandOrderDataVO(); - if (warehouseIds.isEmpty()) { - return indexHandOrderDataVO; - } - //当前在库的数据 订制品 零担 - indexHandOrderDataVO = warehouseIndexMapper.handOrderData(indexDTO); - //当前在库的库存品 - Integer stockListNum = warehouseIndexMapper.findHandStockListNum(indexDTO); - indexHandOrderDataVO.setTotalNum(indexHandOrderDataVO.getTotalNum() + stockListNum); - - //已打托数量 - Integer trayNum = warehouseIndexMapper.findTrayNum(indexDTO); - indexHandOrderDataVO.setTrayNum(trayNum); - bladeRedis.setEx(key, indexHandOrderDataVO, 3600L); +// String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "handOrderData"); +// IndexHandOrderDataVO indexHandOrderDataVO = bladeRedis.get(key); +// +// if (Objects.isNull(indexHandOrderDataVO)) { + List warehouseIds = indexDTO.getWarehouseIds(); + IndexHandOrderDataVO indexHandOrderDataVO = new IndexHandOrderDataVO(); + if (warehouseIds.isEmpty()) { + return indexHandOrderDataVO; } + //当前在库的数据 订制品 零担 + indexHandOrderDataVO = warehouseIndexMapper.handOrderData(indexDTO); + //当前在库的库存品 + Integer stockListNum = warehouseIndexMapper.findHandStockListNum(indexDTO); + indexHandOrderDataVO.setTotalNum(indexHandOrderDataVO.getTotalNum() + stockListNum); + + //已打托数量 + Integer trayNum = warehouseIndexMapper.findTrayNum(indexDTO); + indexHandOrderDataVO.setTrayNum(trayNum); +// bladeRedis.setEx(key, indexHandOrderDataVO, 3600L); +// } return indexHandOrderDataVO; @@ -148,49 +148,49 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService { public IndexAllocationDataVO allocationData(IndexDTO indexDTO) { //增加缓存 - BladeUser user = AuthUtil.getUser(); - String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "allocationData"); - IndexAllocationDataVO indexAllocationDataVO = bladeRedis.get(key); - - if (Objects.isNull(indexAllocationDataVO)) { - List warehouseIds = indexDTO.getWarehouseIds(); - indexAllocationDataVO = new IndexAllocationDataVO(); - if (warehouseIds.isEmpty()) { - return indexAllocationDataVO; - } - //当前在库的数据 订制品 零担 - IndexHandOrderDataVO indexHandOrderDataVO = warehouseIndexMapper.handOrderData(indexDTO); - //当前在库的库存品 - Integer stockListNum = warehouseIndexMapper.findHandStockListNum(indexDTO); - Integer totalNum = indexHandOrderDataVO.getTotalNum() + stockListNum; - - //查询库位总数 - Integer totalAllocationNum = warehouseIndexMapper.findTotalAllocationNum(indexDTO); - //已使用库位数 - Integer useAllocationNum = warehouseIndexMapper.findUseAllocationNum(indexDTO); - //已上架件数 - Integer upshelfNum = warehouseIndexMapper.findUpshelfNum(indexDTO); - - indexAllocationDataVO.setTotalNum(totalAllocationNum); - indexAllocationDataVO.setUseNum(useAllocationNum); - indexAllocationDataVO.setNullNum(totalAllocationNum - useAllocationNum); - indexAllocationDataVO.setUpshelfNum(upshelfNum); - indexAllocationDataVO.setNoUpshelfNum(totalNum - upshelfNum); - bladeRedis.setEx(key, indexAllocationDataVO, 3600L); +// BladeUser user = AuthUtil.getUser(); +// String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "allocationData"); +// IndexAllocationDataVO indexAllocationDataVO = bladeRedis.get(key); +// +// if (Objects.isNull(indexAllocationDataVO)) { + List warehouseIds = indexDTO.getWarehouseIds(); + IndexAllocationDataVO indexAllocationDataVO = new IndexAllocationDataVO(); + if (warehouseIds.isEmpty()) { + return indexAllocationDataVO; } + //当前在库的数据 订制品 零担 + IndexHandOrderDataVO indexHandOrderDataVO = warehouseIndexMapper.handOrderData(indexDTO); + //当前在库的库存品 + Integer stockListNum = warehouseIndexMapper.findHandStockListNum(indexDTO); + Integer totalNum = indexHandOrderDataVO.getTotalNum() + stockListNum; + + //查询库位总数 + Integer totalAllocationNum = warehouseIndexMapper.findTotalAllocationNum(indexDTO); + //已使用库位数 + Integer useAllocationNum = warehouseIndexMapper.findUseAllocationNum(indexDTO); + //已上架件数 + Integer upshelfNum = warehouseIndexMapper.findUpshelfNum(indexDTO); + + indexAllocationDataVO.setTotalNum(totalAllocationNum); + indexAllocationDataVO.setUseNum(useAllocationNum); + indexAllocationDataVO.setNullNum(totalAllocationNum - useAllocationNum); + indexAllocationDataVO.setUpshelfNum(upshelfNum); + indexAllocationDataVO.setNoUpshelfNum(totalNum - upshelfNum); +// bladeRedis.setEx(key, indexAllocationDataVO, 3600L); +// } return indexAllocationDataVO; } @Override public IndexTrunklineHandOrderDataVO trunklineHandOrderData(IndexDTO indexDTO) { - BladeUser user = AuthUtil.getUser(); - String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "trunklineHandOrderData"); - IndexTrunklineHandOrderDataVO indexTrunklineHandOrderDataVO = bladeRedis.get(key); - - if (Objects.isNull(indexTrunklineHandOrderDataVO)) { +// BladeUser user = AuthUtil.getUser(); +// String key = CacheNames.tenantKey(user.getTenantId(), user.getUserId() + "", "trunklineHandOrderData"); +// IndexTrunklineHandOrderDataVO indexTrunklineHandOrderDataVO = bladeRedis.get(key); +// +// if (Objects.isNull(indexTrunklineHandOrderDataVO)) { List warehouseIds = indexDTO.getWarehouseIds(); - indexTrunklineHandOrderDataVO = new IndexTrunklineHandOrderDataVO(); + IndexTrunklineHandOrderDataVO indexTrunklineHandOrderDataVO = new IndexTrunklineHandOrderDataVO(); if (warehouseIds.isEmpty()) { return indexTrunklineHandOrderDataVO; } @@ -212,8 +212,7 @@ public class WarehouseIndexServiceImpl implements IWarehouseIndexService { indexTrunklineHandOrderDataVO.setHandleNum(packageHandleNum + zeroHandleNum); indexTrunklineHandOrderDataVO.setHandleWeight(packageHandleWeight.add(zeroHandleWeight)); indexTrunklineHandOrderDataVO.setHandleVolume(packageHandleVolume.add(zeroHandleVolume)); - } - +// } return indexTrunklineHandOrderDataVO; }