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);