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;