From 3a434de43204d751bd0f458e442c1a069dca7f6d Mon Sep 17 00:00:00 2001 From: walton <1239357677@qq.com> Date: Fri, 29 Nov 2024 09:14:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=99=E7=B1=BB=20=201?= =?UTF-8?q?=E6=97=A0=E8=8A=82=E5=88=B6=E7=94=B5=E7=AB=99=20=20=202?= =?UTF-8?q?=E6=B5=81=E9=87=8F=E8=AE=A1=E7=94=B5=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/operational/station/controller/ImsDeptController.java | 2 +- .../operational/station/service/impl/ImsDeptServiceImpl.java | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/ImsDeptController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/ImsDeptController.java index 8b3e0c2..273b58a 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/ImsDeptController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/ImsDeptController.java @@ -95,7 +95,7 @@ public class ImsDeptController { @ApiLog @ApiOperation(value = "获取水电站机构树") @GetMapping(value = "/getHydropowerTree") - public R> getHydropowerTree(@ApiParam(value="站点类型: 水电、光伏、风电...") Integer stationType,@RequestParam(required = false) Integer serveType) { + public R> getHydropowerTree(@ApiParam(value="站点类型: 无节制 流量计") Integer stationType,@RequestParam(required = false) Integer serveType) { if(ObjectUtil.isEmpty(serveType)){ return R.data(imsDeptService.getHydropowerTree(stationType,null)); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/ImsDeptServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/ImsDeptServiceImpl.java index 58c7086..76ea608 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/ImsDeptServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/ImsDeptServiceImpl.java @@ -15,6 +15,7 @@ import com.hnac.hzims.operational.station.vo.AreaTypeVo; import com.hnac.hzims.operational.station.vo.DeptTreeVo; import com.hnac.hzims.operational.station.vo.WaterDeptTreeVo; import lombok.AllArgsConstructor; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.CollectionUtil; @@ -199,7 +200,7 @@ public class ImsDeptServiceImpl extends ServiceImpl getHydropowerTree(Integer stationType, Integer serveType) { // 获取所有机构 - R> D = sysClient.getDeptByType("200000", null, null); + R> D = sysClient.getDeptByType(AuthUtil.getTenantId(), null, null); if (!D.isSuccess() || CollectionUtil.isEmpty(D.getData())) { return null; } @@ -210,10 +211,8 @@ public class ImsDeptServiceImpl extends ServiceImpl value = D.getData().stream().filter(o -> o.getDeptCategory().equals(4)).map(Dept::getId).collect(Collectors.toList()); - List type = ObjectUtil.isNotEmpty(stationType) ? Collections.singletonList(stationType) : null; - if (HomePageConstant.WATER_CONSERVANCY.equals(stationType)) { - type = HomePageConstant.waterList; - } + List type = ObjectUtil.isNotEmpty(stationType) ? Collections.singletonList(stationType) : HomePageConstant.SERVETYPE_LIST; + List stationEntityList = stationService.getStationType(serveType, type, value, true); if (CollectionUtil.isEmpty(stationEntityList)) { return null;