From c8a99fe0a42106bd787f8543aa42099a2cff06e5 Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080@qq.com> Date: Tue, 19 Sep 2023 16:51:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=87=E8=B4=A7=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DistributionStockupServiceImpl.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java index 4ffb8ebca..95775b236 100644 --- a/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java +++ b/blade-service/logpm-distribution/src/main/java/com/logpm/distribution/service/impl/DistributionStockupServiceImpl.java @@ -226,11 +226,18 @@ public class DistributionStockupServiceImpl extends BaseServiceImpl pageList(IPage page, Map distributionStockup) { DistributionStockupEntity distributionStockupEntity = JSON.parseObject(JSON.toJSONString(distributionStockup), DistributionStockupEntity.class); - //获取当前登录人仓库 - List myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse(); - //取出id - List collect = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); - distributionStockupEntity.setWarehouseIdList(collect); + BasicdataWarehouseEntity myCurrentWarehouse = basicdataWarehouseClient.getMyCurrentWarehouse(); + if(ObjectUtils.isNotNull(myCurrentWarehouse)){ + //获取当前登录人仓库 + distributionStockupEntity.setWarehouseId(myCurrentWarehouse.getId()); + }else{ + //获取当前登录人仓库 + List myWatchWarehouse = basicdataWarehouseClient.getMyWatchWarehouse(); + //取出id + List collect = myWatchWarehouse.stream().map(BasicdataWarehouseEntity::getId).collect(Collectors.toList()); + distributionStockupEntity.setWarehouseIdList(collect); + } + distributionStockupEntity.setTenantId(AuthUtil.getTenantId()); if (distributionStockupEntity.getTypeService().equals("3")) { return baseMapper.pageOweList(page, distributionStockupEntity);