diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java index 112dc6a..b1be623 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java @@ -241,7 +241,7 @@ public class AbnormalAlarmServiceImpl extends BaseServiceImpl dept = sysClient.getDept(deptId); if(dept.isSuccess() && ObjectUtil.isNotEmpty(dept.getData())){ - R> parents = userClient.userByDeptId("200000",deptId); + R> parents = userClient.userByDeptId("200000",dept.getData().getParentId()); if(parents.isSuccess() && CollectionUtil.isNotEmpty(parents.getData())){ users.addAll(parents.getData()); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java index 12f67a2..eb0a5aa 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java @@ -515,7 +515,7 @@ public class TargetServiceImpl implements TargetService { } // 获取区域机构 - Map> areas = areaService.getAuthArea(null,null,Collections.singletonList(type),HomePageConstant.HYDROPOWER_SERVETYPE); + Map> areas = areaService.getAuthArea(null,null,Collections.singletonList(type),HomePageConstant.HYDROPOWER_SERVETYPE,true); if(MapUtils.isEmpty(areas)){ return new ArrayList<>(); } @@ -699,7 +699,7 @@ public class TargetServiceImpl implements TargetService { @Override public R> routineMaintenance(OperMaintenanceTaskDTO params, Query query, Integer type) { // 获取区域机构 - Map> areas = areaService.getAuthArea(null,null,Collections.singletonList(type),HomePageConstant.HYDROPOWER_SERVETYPE); + Map> areas = areaService.getAuthArea(null,null,Collections.singletonList(type),HomePageConstant.HYDROPOWER_SERVETYPE,true); if(MapUtils.isEmpty(areas)){ return null; } @@ -718,7 +718,7 @@ public class TargetServiceImpl implements TargetService { @Override public R> examineRepair(OperAccessTaskDTO params, Query query, Integer type) { // 获取区域机构 - Map> areas = areaService.getAuthArea(null,null,Collections.singletonList(type),HomePageConstant.HYDROPOWER_SERVETYPE); + Map> areas = areaService.getAuthArea(null,null,Collections.singletonList(type),HomePageConstant.HYDROPOWER_SERVETYPE,true); if(MapUtils.isEmpty(areas)){ return null; } @@ -746,7 +746,7 @@ public class TargetServiceImpl implements TargetService { return new ArrayList<>(); } // 站点 - List stations = stationService.getStationList(result.getData(),deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE); + List stations = stationService.getStationList(result.getData(),deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE,true); if(CollectionUtils.isEmpty(stations)){ return new ArrayList<>(); } @@ -976,7 +976,7 @@ public class TargetServiceImpl implements TargetService { @Override public List deviceGroup(String areaName) { // 获取区域机构 - Map> areas = areaService.getAuthArea(null,null,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE); + Map> areas = areaService.getAuthArea(null,null,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE,true); if(MapUtils.isEmpty(areas)){ return null; } @@ -1032,7 +1032,7 @@ public class TargetServiceImpl implements TargetService { @Override public List dutyGroup(String areaName, Long type) { // 获取区域机构 - Map> areas = areaService.getAuthArea(null,null,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE); + Map> areas = areaService.getAuthArea(null,null,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE,true); if(MapUtils.isEmpty(areas)){ return null; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java index 2124c9c..e1265db 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java @@ -43,7 +43,7 @@ public class CentralMonitorServiceImpl implements CentralMonitorService { return null; } List deptIdList = R.getData().stream().map(Dept::getId).collect(Collectors.toList()); - List list = stationService.getStationType(null, Collections.singletonList(HomePageConstant.HYDROPOWER),deptIdList); + List list = stationService.getStationType(null, Collections.singletonList(HomePageConstant.HYDROPOWER),deptIdList,true); if(CollectionUtil.isEmpty(list)){ return null; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/data/service/impl/HzimsDataServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/data/service/impl/HzimsDataServiceImpl.java index 33c85c2..986e74c 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/data/service/impl/HzimsDataServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/data/service/impl/HzimsDataServiceImpl.java @@ -61,7 +61,7 @@ public class HzimsDataServiceImpl implements HzimsDataService { throw new ServiceException("暂无区域数据!"); } List types = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WATER_CONSERVANCY, HomePageConstant.PUMPING, HomePageConstant.GATE); - Map> map = areaService.getAuthArea(result.getData(), null, types, HomePageConstant.HYDROPOWER_SERVETYPE); + Map> map = areaService.getAuthArea(result.getData(), null, types, HomePageConstant.HYDROPOWER_SERVETYPE,true); if (MapUtils.isEmpty(map)) { throw new ServiceException("暂无区域数据!"); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/controller/QdnHomeController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/controller/QdnHomeController.java new file mode 100644 index 0000000..4bcc04d --- /dev/null +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/controller/QdnHomeController.java @@ -0,0 +1,63 @@ +package com.hnac.hzims.operational.ecology.controller; + + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.operational.main.service.HomeService; +import com.hnac.hzims.operational.main.service.HydropowerService; +import com.hnac.hzims.operational.main.service.ISideHustleService; +import com.hnac.hzims.operational.main.vo.HydropowerScoreVo; +import com.hnac.hzims.operational.main.vo.MapMarkerVo; +import com.hnac.hzims.operational.main.vo.StationCountVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.AllArgsConstructor; +import org.springblade.core.boot.ctrl.BladeController; +import org.springblade.core.log.annotation.ApiLog; +import org.springblade.core.tool.api.R; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @author ysj + */ +@Api(tags = {"黔东南首页"}) +@RestController +@AllArgsConstructor +@RequestMapping("/QDN") +public class QdnHomeController extends BladeController { + + private final HomeService homeService; + + private final ISideHustleService regionService; + + private final HydropowerService hydropowerService; + + @ApiLog + @ApiOperation("首页站点数量") + @GetMapping("/count") + @ApiOperationSupport(order = 1) + public R> count() { + return R.data(homeService.count(false)); + } + + @ApiLog + @ApiOperation("水电站集团/区域指标") + @GetMapping("/KPIs") + @ApiOperationSupport(order = 1) + public R KPIs(@ApiParam(value = "站点机构ID") Long deptId) { + return R.data(hydropowerService.KPIs(deptId,false)); + } + + @ApiLog + @ApiOperation("获取地图标记") + @GetMapping("/getMapMarker") + @ApiOperationSupport(order = 6) + public R> getMapMarker(@ApiParam(value = "区域机构ID") Long deptId, @RequestParam(value ="types") List types) { + return R.data(regionService.getMapMarker(deptId,types,false)); + } +} \ No newline at end of file diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/HomeController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/HomeController.java index d09afd5..ec8b91f 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/HomeController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/HomeController.java @@ -33,7 +33,7 @@ public class HomeController extends BladeController { @GetMapping("/count") @ApiOperationSupport(order = 1) public R> count() { - return R.data(service.count()); + return R.data(service.count(true)); } @ApiLog diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/HydropowerController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/HydropowerController.java index 47cf316..cb3b093 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/HydropowerController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/HydropowerController.java @@ -33,7 +33,7 @@ public class HydropowerController extends BladeController { @GetMapping("/KPIs") @ApiOperationSupport(order = 1) public R KPIs(@ApiParam(value = "站点机构ID") Long deptId) { - return R.data(service.KPIs(deptId)); + return R.data(service.KPIs(deptId,true)); } @ApiLog diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/SideHustleController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/SideHustleController.java index 4a31ce5..881b78c 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/SideHustleController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/SideHustleController.java @@ -80,7 +80,7 @@ public class SideHustleController extends BladeController { @OperationAnnotation(moduleName = "演示大屏",title = "演示大屏", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE,action = "获取地图标记") public R> getMapMarker(@ApiParam(value = "区域机构ID") Long deptId,@RequestParam(value ="types") List types) { - return R.data(regionService.getMapMarker(deptId,types)); + return R.data(regionService.getMapMarker(deptId,types,true)); } @ApiLog diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/AreaService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/AreaService.java index f199289..8071152 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/AreaService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/AreaService.java @@ -12,8 +12,8 @@ import java.util.Map; public interface AreaService { // 获取权限区域 - Map> getAuthArea(List list,Long deptId,List typeList,Integer serveType); + Map> getAuthArea(List list,Long deptId,List typeList,Integer serveType,boolean make); // 获取用户权限区域 - Map> areaOrStaion(Long deptId, List types); + Map> areaOrStaion(Long deptId, List types,boolean make); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/HomeService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/HomeService.java index bf42f29..f40a6a5 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/HomeService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/HomeService.java @@ -13,7 +13,7 @@ public interface HomeService { void loadHomeTarget(String param); - List count(); + List count(boolean make); List target(Integer type); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/HydropowerService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/HydropowerService.java index f1f4dc6..d65c1f7 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/HydropowerService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/HydropowerService.java @@ -22,7 +22,7 @@ public interface HydropowerService { List webStationList(Long deptId); - HydropowerScoreVo KPIs(Long deptId); + HydropowerScoreVo KPIs(Long deptId,boolean make); List proportion(Long deptId); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/ISideHustleService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/ISideHustleService.java index 084660e..5c6000c 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/ISideHustleService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/ISideHustleService.java @@ -26,7 +26,7 @@ public interface ISideHustleService { List areaScale(Long deptId); - List getMapMarker(Long deptId,List types); + List getMapMarker(Long deptId,List types,boolean make); List getStaionPlanPower(Map> map); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java index 5b4094b..e750044 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java @@ -119,7 +119,7 @@ public class AppHomeServiceImpl implements IAppHomeService { return null; } // 站点列表 - List list = stationService.getStationList(R.getData(),deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),null); + List list = stationService.getStationList(R.getData(),deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),null,true); if(CollectionUtil.isEmpty(list)){ return null; } @@ -351,7 +351,7 @@ public class AppHomeServiceImpl implements IAppHomeService { @Override public List appStationList(Long deptId) { // 获取区域或者站点map结构 - Map> map = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER)); + Map> map = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),true); if(MapUtils.isEmpty(map)){ return null; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java index 4ac6cbe..9a516d4 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java @@ -440,7 +440,7 @@ public class AreaMonthReportServiceImpl implements IAreaMonthReportService { return; } // 查询所有服务类型——"运维服务"、站点类型——"水电站" - List stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), null); + List stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), null,true); if (CollectionUtil.isEmpty(stationList)) { return; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaServiceImpl.java index 7f41981..7b8f5f0 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaServiceImpl.java @@ -44,7 +44,7 @@ public class AreaServiceImpl implements AreaService { * @return Map> */ @Override - public Map> getAuthArea(List list,Long deptId, List typeList, Integer serveType) { + public Map> getAuthArea(List list,Long deptId, List typeList, Integer serveType,boolean make) { // 未传入机构列表,使用用户权限机构过滤 if(CollectionUtil.isEmpty(list)){ R> R = sysClient.getDeptByCurrentUser(); @@ -54,7 +54,7 @@ public class AreaServiceImpl implements AreaService { list = R.getData(); } // 根据参数查询有效站点 - List stationList = stationService.getStationList(list,deptId,typeList,serveType); + List stationList = stationService.getStationList(list,deptId,typeList,serveType,make); if(CollectionUtil.isEmpty(stationList)){ return null; } @@ -98,7 +98,7 @@ public class AreaServiceImpl implements AreaService { * @return */ @Override - public Map> areaOrStaion(Long deptId,List types) { + public Map> areaOrStaion(Long deptId,List types,boolean make) { //根据用户权限获取机构 R> R = sysClient.getDeptByCurrentUser(); if (!R.isSuccess() || CollectionUtil.isEmpty(R.getData())) { @@ -124,7 +124,7 @@ public class AreaServiceImpl implements AreaService { Dept dept = list.get(0); // 机构为站点 key-站点机构 value-站点 if(HomePageConstant.AREA.equals(dept.getDeptCategory())){ - List stationList = stationService.getStationList(R.getData(),dept.getId(),types,HomePageConstant.HYDROPOWER_SERVETYPE); + List stationList = stationService.getStationList(R.getData(),dept.getId(),types,HomePageConstant.HYDROPOWER_SERVETYPE,make); if(CollectionUtil.isEmpty(stationList)){ return null; } @@ -141,6 +141,6 @@ public class AreaServiceImpl implements AreaService { return map; } } - return this.getAuthArea(R.getData(),deptId,types,HomePageConstant.HYDROPOWER_SERVETYPE); + return this.getAuthArea(R.getData(),deptId,types,HomePageConstant.HYDROPOWER_SERVETYPE,make); } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomePageServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomePageServiceImpl.java index 7fde84e..c63a786 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomePageServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomePageServiceImpl.java @@ -136,7 +136,7 @@ public class HomePageServiceImpl implements IHomePageService { List storage = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WIND_POWER, HomePageConstant.WATER_CONSERVANCY,HomePageConstant.PUMPING,HomePageConstant.GATE, HomePageConstant.ENERGY_STORAGE, HomePageConstant.DISTRIBUTION_NETWORK, HomePageConstant.PHOTOVOLTAIC, HomePageConstant.WATER_AFFAIRS, HomePageConstant.CHARGE); // 站点查询 - List stationList = stationService.getStationType(serveType, storage, null); + List stationList = stationService.getStationType(serveType, storage, null,true); // 站点根据type类型分组 Map> stationGrpMap = stationList.stream().collect(Collectors.groupingBy(StationEntity::getType)); // 遍历分组之后的站点信息 @@ -240,7 +240,7 @@ public class HomePageServiceImpl implements IHomePageService { @Override public void loadPowerData(String param,List types, Integer serveType, int year) { // 站点查询 - List stationList = stationService.getStationType(serveType, types, null); + List stationList = stationService.getStationType(serveType, types, null,true); // 设备信息 List devices = maintenanceTaskService.getEmInfoList(); // 开始时间 @@ -351,7 +351,7 @@ public class HomePageServiceImpl implements IHomePageService { List storage = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WIND_POWER, HomePageConstant.WATER_CONSERVANCY, HomePageConstant.PUMPING, HomePageConstant.GATE, HomePageConstant.ENERGY_STORAGE, HomePageConstant.DISTRIBUTION_NETWORK, HomePageConstant.PHOTOVOLTAIC, HomePageConstant.WATER_AFFAIRS, HomePageConstant.CHARGE); // 查询站点 - List stationEntityList = stationService.getStationList(R.getData(),deptId,storage,serveType); + List stationEntityList = stationService.getStationList(R.getData(),deptId,storage,serveType,true); List list = new ArrayList<>(); storage.forEach(item->{ if(HomePageConstant.PUMPING.equals(item) || HomePageConstant.GATE.equals(item)){ @@ -516,7 +516,7 @@ public class HomePageServiceImpl implements IHomePageService { return null; } // 查询站点 - List stationList = stationService.getStationList(R.getData(),deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE); + List stationList = stationService.getStationList(R.getData(),deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE,true); if(CollectionUtil.isEmpty(stationList)){ return null; } @@ -624,7 +624,7 @@ public class HomePageServiceImpl implements IHomePageService { } List storage = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WIND_POWER, HomePageConstant.PHOTOVOLTAIC); // 查询站点数据 - List stationEntityList = stationService.getStationList(R.getData(),deptId, storage,HomePageConstant.HYDROPOWER_SERVETYPE); + List stationEntityList = stationService.getStationList(R.getData(),deptId, storage,HomePageConstant.HYDROPOWER_SERVETYPE,true); if(CollectionUtil.isEmpty(stationEntityList)){ return null; } @@ -819,7 +819,7 @@ public class HomePageServiceImpl implements IHomePageService { private Map> getStorageMap(List all,Integer serveType) { Map> map = new HashMap<>(); // 储能 - List energy = this.stationService.getStationType(serveType,Collections.singletonList(HomePageConstant.ENERGY_STORAGE),null); + List energy = this.stationService.getStationType(serveType,Collections.singletonList(HomePageConstant.ENERGY_STORAGE),null,true); if(CollectionUtil.isNotEmpty(energy)){ List refDeptList = energy.stream().map(StationEntity::getRefDept).collect(Collectors.toList()); if(CollectionUtil.isNotEmpty(refDeptList)){ @@ -827,7 +827,7 @@ public class HomePageServiceImpl implements IHomePageService { } } // 水利 - List water = this.stationService.getStationType(serveType,HomePageConstant.waterList,null); + List water = this.stationService.getStationType(serveType,HomePageConstant.waterList,null,true); if(CollectionUtil.isNotEmpty(water)){ List refDeptList = water.stream().map(StationEntity::getRefDept).collect(Collectors.toList()); if(CollectionUtil.isNotEmpty(refDeptList)){ @@ -1526,7 +1526,7 @@ public class HomePageServiceImpl implements IHomePageService { OldHydropowerScoreVo hydropowerScoreVo = new OldHydropowerScoreVo(); hydropowerScoreVo.setDepartId(key); // 站点查询 - List stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), value); + List stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), value,true); if (CollectionUtil.isEmpty(stationList)) { return; } @@ -2074,7 +2074,7 @@ public class HomePageServiceImpl implements IHomePageService { getChildDept(departList, dept.getId(), list); } }); - List stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), list); + List stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), list,true); if (CollectionUtil.isEmpty(stationList)) { return null; } @@ -2160,7 +2160,7 @@ public class HomePageServiceImpl implements IHomePageService { if (CollectionUtil.isEmpty(deptList)) { return null; } - List stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), deptList); + List stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), deptList,true); if (CollectionUtil.isEmpty(deptList)) { return null; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java index 38fa882..6dbc71e 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java @@ -131,9 +131,13 @@ public class HomeServiceImpl implements HomeService { * @return */ @Override - public List count() { + public List count(boolean make) { // 查询全部站点 - List stations = stationService.list(); + LambdaQueryWrapper wrapper = Wrappers.lambdaQuery(); + if(make){ + wrapper.ne(StationEntity::getStatus,2); + } + List stations = stationService.list(wrapper); List counts = new ArrayList<>(); HomePageConstant.SERVETYPE_LIST.forEach(serve ->counts.addAll(HomePageConstant.HOME_TYPES.stream().map(type -> { StationCountVo count = new StationCountVo(); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java index 6f1508b..64689f0 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java @@ -40,6 +40,7 @@ import com.hnac.hzinfo.datasearch.soe.domian.SoeData; import com.hnac.hzinfo.inspect.task.feign.IInspectTaskReportClient; import com.hnac.hzinfo.inspect.task.vo.DutyInspectTaskVO; import com.hnac.hzinfo.sdk.core.response.Result; +import com.sun.org.apache.xpath.internal.operations.NotEquals; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.MapUtils; @@ -257,7 +258,7 @@ public class HydropowerServiceImpl implements HydropowerService { @Override public void loadPowerData(String param, List types, Integer serveType, int year) { // 站点查询 - List stationList = stationService.getStationType(serveType, types, null); + List stationList = stationService.getStationType(serveType, types, null,true); // 设备信息 List devices = maintenanceTaskService.getEmInfoList(); // 开始时间 @@ -942,7 +943,7 @@ public class HydropowerServiceImpl implements HydropowerService { */ @Override public List webStationList(Long deptId) { - List stations = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE,Collections.singletonList(HomePageConstant.HYDROPOWER),null); + List stations = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE,Collections.singletonList(HomePageConstant.HYDROPOWER),null,true); if(CollectionUtil.isEmpty(stations)){ return null; } @@ -1002,9 +1003,9 @@ public class HydropowerServiceImpl implements HydropowerService { * @return */ @Override - public HydropowerScoreVo KPIs(Long deptId) { + public HydropowerScoreVo KPIs(Long deptId,boolean make) { // 查询水电站站点 - List stations = this.getStations(deptId); + List stations = this.getStations(deptId,make); if (CollectionUtil.isEmpty(stations)) { return new HydropowerScoreVo(); } @@ -1076,7 +1077,7 @@ public class HydropowerServiceImpl implements HydropowerService { @Override public List proportion(Long deptId) { // 获取区域或者站点map结构 - Map> areas = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER)); + Map> areas = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),true); if(MapUtils.isEmpty(areas)){ return null; } @@ -1169,7 +1170,7 @@ public class HydropowerServiceImpl implements HydropowerService { * @param deptId * @return */ - private List getStations(Long deptId) { + private List getStations(Long deptId,boolean make) { List configs = userDeptService.list(new LambdaQueryWrapper(){{ eq(UserDeptEntity::getUserId, AuthUtil.getUserId()); }}); @@ -1179,7 +1180,7 @@ public class HydropowerServiceImpl implements HydropowerService { eq(StationEntity::getServeType,HomePageConstant.HYDROPOWER_SERVETYPE); }}); } - return stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.HYDROPOWER), HomePageConstant.HYDROPOWER_SERVETYPE); + return stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.HYDROPOWER), HomePageConstant.HYDROPOWER_SERVETYPE,make); } /** @@ -1265,7 +1266,7 @@ public class HydropowerServiceImpl implements HydropowerService { if(CollectionUtil.isNotEmpty(gourps)){ return gourps; } - Map> areas = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER)); + Map> areas = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),true); if(MapUtils.isEmpty(areas)) { return new ArrayList<>(); } @@ -1532,7 +1533,7 @@ public class HydropowerServiceImpl implements HydropowerService { @Override public List area(Long deptId) { // 查询水电站站点 - List stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.HYDROPOWER), null); + List stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.HYDROPOWER), null,true); if (CollectionUtil.isEmpty(stations)) { return new ArrayList<>(); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainWorkBenchServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainWorkBenchServiceImpl.java index 527f060..1bbc9bc 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainWorkBenchServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainWorkBenchServiceImpl.java @@ -194,7 +194,7 @@ public class MainWorkBenchServiceImpl extends BaseServiceImpl storage = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WIND_POWER, HomePageConstant.WATER_CONSERVANCY,HomePageConstant.PUMPING,HomePageConstant.GATE, HomePageConstant.ENERGY_STORAGE, HomePageConstant.DISTRIBUTION_NETWORK, HomePageConstant.PHOTOVOLTAIC, HomePageConstant.WATER_AFFAIRS, HomePageConstant.CHARGE); // 查询站点 - List stationEntityList = stationService.getStationList(list,null,storage,null); + List stationEntityList = stationService.getStationList(list,null,storage,null,true); if(CollectionUtil.isEmpty(stationEntityList)){ return null; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java index 8e0ac4d..65d58b8 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java @@ -660,7 +660,7 @@ public class PhotovoltaicServiceImpl implements PhotovoltaicService { */ private List getPhotovoltaicDevice() { // 光伏站点 - List stations = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), null); + List stations = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), null,true); if (CollectionUtil.isEmpty(stations)) { return null; } @@ -683,7 +683,7 @@ public class PhotovoltaicServiceImpl implements PhotovoltaicService { @Override public PhotovoltaicKPIsVo KPIs(Long deptId) { // 查询光伏站点 - List stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE); + List stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE,true); if (CollectionUtil.isEmpty(stations)) { return new PhotovoltaicKPIsVo(); } @@ -786,7 +786,7 @@ public class PhotovoltaicServiceImpl implements PhotovoltaicService { @Override public List generation(Long deptId, String type) { // 查询光伏站点 - List stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE); + List stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE,true); if (CollectionUtil.isEmpty(stations)) { return new ArrayList<>(); } @@ -896,7 +896,7 @@ public class PhotovoltaicServiceImpl implements PhotovoltaicService { @Override public List subordinate(Long deptId) { // 获取区域或者站点map结构 - Map> map = areaService.areaOrStaion(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC)); + Map> map = areaService.areaOrStaion(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC),true); if (MapUtils.isEmpty(map)) { return new ArrayList<>(); } @@ -1043,7 +1043,7 @@ public class PhotovoltaicServiceImpl implements PhotovoltaicService { @Override public PhotovoltaicSubordinateAppVo app_subordinate(Long deptId) { // 查询光伏站点 - List stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE); + List stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE,true); if (CollectionUtil.isEmpty(stations)) { return new PhotovoltaicSubordinateAppVo(); } @@ -1053,7 +1053,7 @@ public class PhotovoltaicServiceImpl implements PhotovoltaicService { // 指标数据 List deviceTargets = (List) redisTemplate.opsForValue().get(load_photovoltaic_target_key); // 获取区域或者站点map结构 - Map> map = areaService.areaOrStaion(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC)); + Map> map = areaService.areaOrStaion(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC),true); // 集团/省子公司名称 this.subordinateDept(subordinate,deptId); // 区域数据 @@ -1300,7 +1300,7 @@ public class PhotovoltaicServiceImpl implements PhotovoltaicService { @Override public List app_load_generate(Long deptId, String type, String queryType) { // 查询光伏站点 - List stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE); + List stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE,true); if (CollectionUtil.isEmpty(stations)) { return new ArrayList<>(); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/SideHustleServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/SideHustleServiceImpl.java index d4adeea..3c0ae9a 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/SideHustleServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/SideHustleServiceImpl.java @@ -165,7 +165,7 @@ public class SideHustleServiceImpl implements ISideHustleService { if (!R.isSuccess() || CollectionUtil.isEmpty(R.getData())) { return; } - Map> map = areaService.getAuthArea(R.getData(),null,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE); + Map> map = areaService.getAuthArea(R.getData(),null,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE,true); if (MapUtils.isEmpty(map)) { return; } @@ -829,7 +829,7 @@ public class SideHustleServiceImpl implements ISideHustleService { return null; } // 确定获取数据区域 - Map> map = areaService.getAuthArea(null,deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE); + Map> map = areaService.getAuthArea(null,deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE,true); if (MapUtils.isEmpty(map)) { return null; } @@ -845,7 +845,7 @@ public class SideHustleServiceImpl implements ISideHustleService { @Override public List areaPowerScale(Long deptId) { // 获取区域或者站点map结构 - Map> map = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER)); + Map> map = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),true); if(MapUtils.isEmpty(map)){ return null; } @@ -879,7 +879,7 @@ public class SideHustleServiceImpl implements ISideHustleService { @Override public List areaScale(Long deptId) { // 获取区域或者站点map结构 - Map> map = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER)); + Map> map = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),true); if(MapUtils.isEmpty(map)){ return null; } @@ -943,12 +943,12 @@ public class SideHustleServiceImpl implements ISideHustleService { * @return */ @Override - public List getMapMarker(Long deptId,List types) { + public List getMapMarker(Long deptId,List types,boolean make) { if(CollectionUtil.isEmpty(types)){ types = Collections.singletonList(HomePageConstant.HYDROPOWER); } // 获取集团/区域map结构数据 - Map> deptMap = areaService.areaOrStaion(deptId,types); + Map> deptMap = areaService.areaOrStaion(deptId,types,make); if (MapUtils.isEmpty(deptMap)) { return null; } @@ -962,6 +962,9 @@ public class SideHustleServiceImpl implements ISideHustleService { if(ObjectUtil.isEmpty(station)){ return; } + if(make && 2 == station.getStatus()){ + return; + } vo.setDataOrigin(station.getDataOrigin()); vo.setLttd(station.getLttd()); vo.setLgtd(station.getLgtd()); @@ -1200,7 +1203,7 @@ public class SideHustleServiceImpl implements ISideHustleService { List runtList = deviceClassifyMap.get(HomePageConstant.RUN); // 获取部门 - Map> deptMap = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER)); + Map> deptMap = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),true); if (MapUtils.isEmpty(deptMap)) { return null; } @@ -1428,7 +1431,7 @@ public class SideHustleServiceImpl implements ISideHustleService { // 实际发电量 Map> powerMap = (Map>) redisTemplate.opsForValue().get(RECENT_YEAR_POWER_DATA); // 确定获取数据区域 - Map> map = areaService.getAuthArea(null,deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE); + Map> map = areaService.getAuthArea(null,deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE,true); if (MapUtils.isEmpty(map)) { return null; } @@ -1664,6 +1667,6 @@ public class SideHustleServiceImpl implements ISideHustleService { * @return */ private List getStation(List singletonList, List childDeptIdList) { - return stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE,singletonList,childDeptIdList); + return stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE,singletonList,childDeptIdList,true); } } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WaterServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WaterServiceImpl.java index 1b661da..72ee28a 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WaterServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WaterServiceImpl.java @@ -327,7 +327,7 @@ public class WaterServiceImpl implements IWaterService { */ private List getModelStationList() { // 水利站点(All) - List stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, null, null); + List stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, null, null,true); if(CollectionUtil.isEmpty(stationList)){ return null; } @@ -827,7 +827,7 @@ public class WaterServiceImpl implements IWaterService { @Override public WaterConservancyVo waterConservancy(Long deptId) { // 查询水利站点 - List stations = stationService.getHomeStationList(deptId, HomePageConstant.waterList, HomePageConstant.HYDROPOWER_SERVETYPE); + List stations = stationService.getHomeStationList(deptId, HomePageConstant.waterList, HomePageConstant.HYDROPOWER_SERVETYPE,true); if (CollectionUtil.isEmpty(stations)) { return new WaterConservancyVo(); } @@ -888,7 +888,7 @@ public class WaterServiceImpl implements IWaterService { public List waterDetails(Long deptId) { // 获取区域map : key-区域机构 value-水利站点集合 // 获取区域或者站点map结构 - Map> map = areaService.areaOrStaion(deptId,HomePageConstant.waterList); + Map> map = areaService.areaOrStaion(deptId,HomePageConstant.waterList,true); if(MapUtils.isEmpty(map)){ return null; } @@ -933,7 +933,7 @@ public class WaterServiceImpl implements IWaterService { @Override public List waterUseEleRanking(Long deptId) { // 获取区域map : key-区域机构 value-水利站点集合 - Map> map = areaService.areaOrStaion(deptId,HomePageConstant.waterList); + Map> map = areaService.areaOrStaion(deptId,HomePageConstant.waterList,true); if(MapUtils.isEmpty(map)){ return null; } @@ -1002,7 +1002,7 @@ public class WaterServiceImpl implements IWaterService { return null; } // 获取水利站点 - List stationList = stationService.getStationList(R.getData(),deptId,HomePageConstant.waterList,HomePageConstant.HYDROPOWER_SERVETYPE); + List stationList = stationService.getStationList(R.getData(),deptId,HomePageConstant.waterList,HomePageConstant.HYDROPOWER_SERVETYPE,true); if(CollectionUtil.isEmpty(stationList)){ return null; } @@ -1062,7 +1062,7 @@ public class WaterServiceImpl implements IWaterService { return null; } // 获取水利站点 - List stationList = stationService.getStationList(R.getData(),deptId,HomePageConstant.waterList,HomePageConstant.HYDROPOWER_SERVETYPE); + List stationList = stationService.getStationList(R.getData(),deptId,HomePageConstant.waterList,HomePageConstant.HYDROPOWER_SERVETYPE,true); if(CollectionUtil.isEmpty(stationList)){ return null; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java index 17aa337..b1c12a5 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java @@ -205,7 +205,7 @@ public class StationController extends BladeController { @ApiOperationSupport(order = 91) @ApiOperation(value = "获取首页站点列表", notes = "") public R> getHomeStationList(@RequestParam(value = "deptId",required = false) Long deptId,@RequestParam(value = "types",required = false) List types,@RequestParam(value = "serveType",required = false) Integer serveType){ - return R.data(stationService.getHomeStationList(deptId,types,serveType)); + return R.data(stationService.getHomeStationList(deptId,types,serveType,true)); } @ApiLog diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java index d4dc67e..18e3f4b 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java @@ -101,13 +101,13 @@ public interface IStationService extends BaseService { List getStationByInCode(List codes); - List getStationType(Integer serveType,List typeList,List departIdList); + List getStationType(Integer serveType,List typeList,List departIdList,boolean make); List getStationByServerTypeAndIsType(Integer serverType,Boolean isType); - List getStationList(List authList, Long deptId, List types, Integer serveType); + List getStationList(List authList, Long deptId, List types, Integer serveType,boolean make); - List getHomeStationList(Long deptId, List types, Integer serveType); + List getHomeStationList(Long deptId, List types, Integer serveType,boolean make); List getRefDeptByCodes(List list,String type); 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 37581ed..b3d5b64 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 @@ -208,7 +208,7 @@ public class ImsDeptServiceImpl extends ServiceImpl stationEntityList = stationService.getStationType(serveType, type ,value); + List stationEntityList = stationService.getStationType(serveType, type ,value,true); if(CollectionUtil.isEmpty(stationEntityList)){ return null; } @@ -333,7 +333,7 @@ public class ImsDeptServiceImpl extends ServiceImpl stationEntityList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, type ,value); + List stationEntityList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, type ,value,true); if(CollectionUtil.isEmpty(stationEntityList)){ return null; } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java index 1a06dad..78b0091 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java @@ -450,7 +450,7 @@ public class StationServiceImpl extends BaseServiceImpl getStationType(Integer serveType, List typeList, List departIdList) { + public List getStationType(Integer serveType, List typeList, List departIdList,boolean make) { return this.list(new LambdaQueryWrapper() {{ eq(StationEntity::getIsDeleted, 0); if (ObjectUtil.isNotEmpty(serveType)) { @@ -462,6 +462,9 @@ public class StationServiceImpl extends BaseServiceImpl getStationList(List authList, Long deptId, List types, Integer servrType) { + public List getStationList(List authList, Long deptId, List types, Integer servrType,boolean make) { Dept dept; if (null == deptId) { // 最小类型机构 @@ -513,7 +516,7 @@ public class StationServiceImpl extends BaseServiceImpl()); } // 获取水利站点(过滤其他站点类型) - return this.getWaterList(refDepList, types, servrType); + return this.getWaterList(refDepList, types, servrType,make); } /** @@ -545,12 +548,12 @@ public class StationServiceImpl extends BaseServiceImpl getWaterList(List refDepList, List types, Integer servrType) { + private List getWaterList(List refDepList, List types, Integer servrType,boolean make) { if (CollectionUtil.isEmpty(refDepList)) { return null; } // 查询水利站点,过滤其他类型站点 - return this.getStationType(servrType, types, refDepList); + return this.getStationType(servrType, types, refDepList,make); } @@ -563,12 +566,12 @@ public class StationServiceImpl extends BaseServiceImpl getHomeStationList(Long deptId, List types, Integer serveType) { + public List getHomeStationList(Long deptId, List types, Integer serveType,boolean make) { R> result = sysClient.getDeptByCurrentUser(); if (!result.isSuccess() || CollectionUtil.isEmpty(result.getData())) { return null; } - return this.getStationList(result.getData(), deptId, types, serveType); + return this.getStationList(result.getData(), deptId, types, serveType,make); } @Override