Browse Source

#黔东南问题修复

zhongwei
yang_shj 1 year ago
parent
commit
0526a53ccf
  1. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java
  2. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/census/service/impl/TargetServiceImpl.java
  3. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/config/service/impl/CentralMonitorServiceImpl.java
  4. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/data/service/impl/HzimsDataServiceImpl.java
  5. 63
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/ecology/controller/QdnHomeController.java
  6. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/HomeController.java
  7. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/HydropowerController.java
  8. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/SideHustleController.java
  9. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/AreaService.java
  10. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/HomeService.java
  11. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/HydropowerService.java
  12. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/ISideHustleService.java
  13. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AppHomeServiceImpl.java
  14. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaMonthReportServiceImpl.java
  15. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/AreaServiceImpl.java
  16. 20
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomePageServiceImpl.java
  17. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HomeServiceImpl.java
  18. 19
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/HydropowerServiceImpl.java
  19. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainWorkBenchServiceImpl.java
  20. 14
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/PhotovoltaicServiceImpl.java
  21. 21
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/SideHustleServiceImpl.java
  22. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/WaterServiceImpl.java
  23. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/controller/StationController.java
  24. 6
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java
  25. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/ImsDeptServiceImpl.java
  26. 17
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/service/impl/AbnormalAlarmServiceImpl.java

@ -241,7 +241,7 @@ public class AbnormalAlarmServiceImpl extends BaseServiceImpl<AbnormalAlarmMappe
}
R<Dept> dept = sysClient.getDept(deptId);
if(dept.isSuccess() && ObjectUtil.isNotEmpty(dept.getData())){
R<List<User>> parents = userClient.userByDeptId("200000",deptId);
R<List<User>> parents = userClient.userByDeptId("200000",dept.getData().getParentId());
if(parents.isSuccess() && CollectionUtil.isNotEmpty(parents.getData())){
users.addAll(parents.getData());
}

12
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<Dept, List<StationEntity>> areas = areaService.getAuthArea(null,null,Collections.singletonList(type),HomePageConstant.HYDROPOWER_SERVETYPE);
Map<Dept, List<StationEntity>> 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<IPage<OperMaintenanceTaskVO>> routineMaintenance(OperMaintenanceTaskDTO params, Query query, Integer type) {
// 获取区域机构
Map<Dept, List<StationEntity>> areas = areaService.getAuthArea(null,null,Collections.singletonList(type),HomePageConstant.HYDROPOWER_SERVETYPE);
Map<Dept, List<StationEntity>> 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<IPage<OperAccessTaskVO>> examineRepair(OperAccessTaskDTO params, Query query, Integer type) {
// 获取区域机构
Map<Dept, List<StationEntity>> areas = areaService.getAuthArea(null,null,Collections.singletonList(type),HomePageConstant.HYDROPOWER_SERVETYPE);
Map<Dept, List<StationEntity>> 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<StationEntity> stations = stationService.getStationList(result.getData(),deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE);
List<StationEntity> 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<DeviceGroupVo> deviceGroup(String areaName) {
// 获取区域机构
Map<Dept, List<StationEntity>> areas = areaService.getAuthArea(null,null,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE);
Map<Dept, List<StationEntity>> 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<DutyGroupVo> dutyGroup(String areaName, Long type) {
// 获取区域机构
Map<Dept, List<StationEntity>> areas = areaService.getAuthArea(null,null,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE);
Map<Dept, List<StationEntity>> areas = areaService.getAuthArea(null,null,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE,true);
if(MapUtils.isEmpty(areas)){
return null;
}

2
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<Long> deptIdList = R.getData().stream().map(Dept::getId).collect(Collectors.toList());
List<StationEntity> list = stationService.getStationType(null, Collections.singletonList(HomePageConstant.HYDROPOWER),deptIdList);
List<StationEntity> list = stationService.getStationType(null, Collections.singletonList(HomePageConstant.HYDROPOWER),deptIdList,true);
if(CollectionUtil.isEmpty(list)){
return null;
}

2
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<Integer> types = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WATER_CONSERVANCY, HomePageConstant.PUMPING, HomePageConstant.GATE);
Map<Dept, List<StationEntity>> map = areaService.getAuthArea(result.getData(), null, types, HomePageConstant.HYDROPOWER_SERVETYPE);
Map<Dept, List<StationEntity>> map = areaService.getAuthArea(result.getData(), null, types, HomePageConstant.HYDROPOWER_SERVETYPE,true);
if (MapUtils.isEmpty(map)) {
throw new ServiceException("暂无区域数据!");

63
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<List<StationCountVo>> count() {
return R.data(homeService.count(false));
}
@ApiLog
@ApiOperation("水电站集团/区域指标")
@GetMapping("/KPIs")
@ApiOperationSupport(order = 1)
public R<HydropowerScoreVo> KPIs(@ApiParam(value = "站点机构ID") Long deptId) {
return R.data(hydropowerService.KPIs(deptId,false));
}
@ApiLog
@ApiOperation("获取地图标记")
@GetMapping("/getMapMarker")
@ApiOperationSupport(order = 6)
public R<List<MapMarkerVo>> getMapMarker(@ApiParam(value = "区域机构ID") Long deptId, @RequestParam(value ="types") List<Integer> types) {
return R.data(regionService.getMapMarker(deptId,types,false));
}
}

2
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<List<StationCountVo>> count() {
return R.data(service.count());
return R.data(service.count(true));
}
@ApiLog

2
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<HydropowerScoreVo> KPIs(@ApiParam(value = "站点机构ID") Long deptId) {
return R.data(service.KPIs(deptId));
return R.data(service.KPIs(deptId,true));
}
@ApiLog

2
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<List<MapMarkerVo>> getMapMarker(@ApiParam(value = "区域机构ID") Long deptId,@RequestParam(value ="types") List<Integer> types) {
return R.data(regionService.getMapMarker(deptId,types));
return R.data(regionService.getMapMarker(deptId,types,true));
}
@ApiLog

4
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<Dept, List<StationEntity>> getAuthArea(List<Dept> list,Long deptId,List<Integer> typeList,Integer serveType);
Map<Dept, List<StationEntity>> getAuthArea(List<Dept> list,Long deptId,List<Integer> typeList,Integer serveType,boolean make);
// 获取用户权限区域
Map<Dept, List<StationEntity>> areaOrStaion(Long deptId, List<Integer> types);
Map<Dept, List<StationEntity>> areaOrStaion(Long deptId, List<Integer> types,boolean make);
}

2
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<StationCountVo> count();
List<StationCountVo> count(boolean make);
List<TargetVo> target(Integer type);

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/HydropowerService.java

@ -22,7 +22,7 @@ public interface HydropowerService {
List<HydropowerStationVo> webStationList(Long deptId);
HydropowerScoreVo KPIs(Long deptId);
HydropowerScoreVo KPIs(Long deptId,boolean make);
List<AreaScaleVo> proportion(Long deptId);

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/ISideHustleService.java

@ -26,7 +26,7 @@ public interface ISideHustleService {
List<OldAreaScaleVo> areaScale(Long deptId);
List<MapMarkerVo> getMapMarker(Long deptId,List<Integer> types);
List<MapMarkerVo> getMapMarker(Long deptId,List<Integer> types,boolean make);
List<PlanGenerationEntity> getStaionPlanPower(Map<Dept, List<StationEntity>> map);
}

4
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<StationEntity> list = stationService.getStationList(R.getData(),deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),null);
List<StationEntity> 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<AppStationAreaVo> appStationList(Long deptId) {
// 获取区域或者站点map结构
Map<Dept,List<StationEntity>> map = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER));
Map<Dept,List<StationEntity>> map = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),true);
if(MapUtils.isEmpty(map)){
return null;
}

2
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<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), null);
List<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), null,true);
if (CollectionUtil.isEmpty(stationList)) {
return;
}

10
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<Dept, List<StationEntity>>
*/
@Override
public Map<Dept, List<StationEntity>> getAuthArea(List<Dept> list,Long deptId, List<Integer> typeList, Integer serveType) {
public Map<Dept, List<StationEntity>> getAuthArea(List<Dept> list,Long deptId, List<Integer> typeList, Integer serveType,boolean make) {
// 未传入机构列表,使用用户权限机构过滤
if(CollectionUtil.isEmpty(list)){
R<List<Dept>> R = sysClient.getDeptByCurrentUser();
@ -54,7 +54,7 @@ public class AreaServiceImpl implements AreaService {
list = R.getData();
}
// 根据参数查询有效站点
List<StationEntity> stationList = stationService.getStationList(list,deptId,typeList,serveType);
List<StationEntity> 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<Dept, List<StationEntity>> areaOrStaion(Long deptId,List<Integer> types) {
public Map<Dept, List<StationEntity>> areaOrStaion(Long deptId,List<Integer> types,boolean make) {
//根据用户权限获取机构
R<List<Dept>> 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<StationEntity> stationList = stationService.getStationList(R.getData(),dept.getId(),types,HomePageConstant.HYDROPOWER_SERVETYPE);
List<StationEntity> 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);
}
}

20
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<Integer> 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<StationEntity> stationList = stationService.getStationType(serveType, storage, null);
List<StationEntity> stationList = stationService.getStationType(serveType, storage, null,true);
// 站点根据type类型分组
Map<Integer, List<StationEntity>> stationGrpMap = stationList.stream().collect(Collectors.groupingBy(StationEntity::getType));
// 遍历分组之后的站点信息
@ -240,7 +240,7 @@ public class HomePageServiceImpl implements IHomePageService {
@Override
public void loadPowerData(String param,List<Integer> types, Integer serveType, int year) {
// 站点查询
List<StationEntity> stationList = stationService.getStationType(serveType, types, null);
List<StationEntity> stationList = stationService.getStationType(serveType, types, null,true);
// 设备信息
List<EminfoAndEmParamVo> devices = maintenanceTaskService.getEmInfoList();
// 开始时间
@ -351,7 +351,7 @@ public class HomePageServiceImpl implements IHomePageService {
List<Integer> 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<StationEntity> stationEntityList = stationService.getStationList(R.getData(),deptId,storage,serveType);
List<StationEntity> stationEntityList = stationService.getStationList(R.getData(),deptId,storage,serveType,true);
List<OldStationCountVo> 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<StationEntity> stationList = stationService.getStationList(R.getData(),deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE);
List<StationEntity> 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<Integer> storage = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WIND_POWER, HomePageConstant.PHOTOVOLTAIC);
// 查询站点数据
List<StationEntity> stationEntityList = stationService.getStationList(R.getData(),deptId, storage,HomePageConstant.HYDROPOWER_SERVETYPE);
List<StationEntity> 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<Integer, List<Long>> getStorageMap(List<Dept> all,Integer serveType) {
Map<Integer, List<Long>> map = new HashMap<>();
// 储能
List<StationEntity> energy = this.stationService.getStationType(serveType,Collections.singletonList(HomePageConstant.ENERGY_STORAGE),null);
List<StationEntity> energy = this.stationService.getStationType(serveType,Collections.singletonList(HomePageConstant.ENERGY_STORAGE),null,true);
if(CollectionUtil.isNotEmpty(energy)){
List<Long> refDeptList = energy.stream().map(StationEntity::getRefDept).collect(Collectors.toList());
if(CollectionUtil.isNotEmpty(refDeptList)){
@ -827,7 +827,7 @@ public class HomePageServiceImpl implements IHomePageService {
}
}
// 水利
List<StationEntity> water = this.stationService.getStationType(serveType,HomePageConstant.waterList,null);
List<StationEntity> water = this.stationService.getStationType(serveType,HomePageConstant.waterList,null,true);
if(CollectionUtil.isNotEmpty(water)){
List<Long> 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<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), value);
List<StationEntity> 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<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), list);
List<StationEntity> 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<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), deptList);
List<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), deptList,true);
if (CollectionUtil.isEmpty(deptList)) {
return null;
}

8
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<StationCountVo> count() {
public List<StationCountVo> count(boolean make) {
// 查询全部站点
List<StationEntity> stations = stationService.list();
LambdaQueryWrapper<StationEntity> wrapper = Wrappers.<StationEntity>lambdaQuery();
if(make){
wrapper.ne(StationEntity::getStatus,2);
}
List<StationEntity> stations = stationService.list(wrapper);
List<StationCountVo> counts = new ArrayList<>();
HomePageConstant.SERVETYPE_LIST.forEach(serve ->counts.addAll(HomePageConstant.HOME_TYPES.stream().map(type -> {
StationCountVo count = new StationCountVo();

19
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<Integer> types, Integer serveType, int year) {
// 站点查询
List<StationEntity> stationList = stationService.getStationType(serveType, types, null);
List<StationEntity> stationList = stationService.getStationType(serveType, types, null,true);
// 设备信息
List<EminfoAndEmParamVo> devices = maintenanceTaskService.getEmInfoList();
// 开始时间
@ -942,7 +943,7 @@ public class HydropowerServiceImpl implements HydropowerService {
*/
@Override
public List<HydropowerStationVo> webStationList(Long deptId) {
List<StationEntity> stations = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE,Collections.singletonList(HomePageConstant.HYDROPOWER),null);
List<StationEntity> 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<StationEntity> stations = this.getStations(deptId);
List<StationEntity> stations = this.getStations(deptId,make);
if (CollectionUtil.isEmpty(stations)) {
return new HydropowerScoreVo();
}
@ -1076,7 +1077,7 @@ public class HydropowerServiceImpl implements HydropowerService {
@Override
public List<AreaScaleVo> proportion(Long deptId) {
// 获取区域或者站点map结构
Map<Dept,List<StationEntity>> areas = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER));
Map<Dept,List<StationEntity>> 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<StationEntity> getStations(Long deptId) {
private List<StationEntity> getStations(Long deptId,boolean make) {
List<UserDeptEntity> configs = userDeptService.list(new LambdaQueryWrapper<UserDeptEntity>(){{
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<Dept,List<StationEntity>> areas = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER));
Map<Dept,List<StationEntity>> 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<AppHydropowerStationVo> area(Long deptId) {
// 查询水电站站点
List<StationEntity> stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.HYDROPOWER), null);
List<StationEntity> stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.HYDROPOWER), null,true);
if (CollectionUtil.isEmpty(stations)) {
return new ArrayList<>();
}

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/service/impl/MainWorkBenchServiceImpl.java

@ -194,7 +194,7 @@ public class MainWorkBenchServiceImpl extends BaseServiceImpl<MainWorkBenchMappe
List<Integer> 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<StationEntity> stationEntityList = stationService.getStationList(list,null,storage,null);
List<StationEntity> stationEntityList = stationService.getStationList(list,null,storage,null,true);
if(CollectionUtil.isEmpty(stationEntityList)){
return null;
}

14
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<EminfoAndEmParamVo> getPhotovoltaicDevice() {
// 光伏站点
List<StationEntity> stations = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), null);
List<StationEntity> 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<StationEntity> stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE);
List<StationEntity> 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<GenerationVo> generation(Long deptId, String type) {
// 查询光伏站点
List<StationEntity> stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE);
List<StationEntity> 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<PhotovoltaicSubordinateVo> subordinate(Long deptId) {
// 获取区域或者站点map结构
Map<Dept, List<StationEntity>> map = areaService.areaOrStaion(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC));
Map<Dept, List<StationEntity>> 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<StationEntity> stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE);
List<StationEntity> 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<PhotovoltaicTargetVo> deviceTargets = (List<PhotovoltaicTargetVo>) redisTemplate.opsForValue().get(load_photovoltaic_target_key);
// 获取区域或者站点map结构
Map<Dept, List<StationEntity>> map = areaService.areaOrStaion(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC));
Map<Dept, List<StationEntity>> 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<PhotovoltaicLoadGenerateVo> app_load_generate(Long deptId, String type, String queryType) {
// 查询光伏站点
List<StationEntity> stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE);
List<StationEntity> stations = stationService.getHomeStationList(deptId, Collections.singletonList(HomePageConstant.PHOTOVOLTAIC), HomePageConstant.HYDROPOWER_SERVETYPE,true);
if (CollectionUtil.isEmpty(stations)) {
return new ArrayList<>();
}

21
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<Dept,List<StationEntity>> map = areaService.getAuthArea(R.getData(),null,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE);
Map<Dept,List<StationEntity>> 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<Dept,List<StationEntity>> map = areaService.getAuthArea(null,deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE);
Map<Dept,List<StationEntity>> 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<AreaPowerScaleVo> areaPowerScale(Long deptId) {
// 获取区域或者站点map结构
Map<Dept,List<StationEntity>> map = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER));
Map<Dept,List<StationEntity>> 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<OldAreaScaleVo> areaScale(Long deptId) {
// 获取区域或者站点map结构
Map<Dept,List<StationEntity>> map = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER));
Map<Dept,List<StationEntity>> 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<MapMarkerVo> getMapMarker(Long deptId,List<Integer> types) {
public List<MapMarkerVo> getMapMarker(Long deptId,List<Integer> types,boolean make) {
if(CollectionUtil.isEmpty(types)){
types = Collections.singletonList(HomePageConstant.HYDROPOWER);
}
// 获取集团/区域map结构数据
Map<Dept, List<StationEntity>> deptMap = areaService.areaOrStaion(deptId,types);
Map<Dept, List<StationEntity>> 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<String> runtList = deviceClassifyMap.get(HomePageConstant.RUN);
// 获取部门
Map<Dept, List<StationEntity>> deptMap = areaService.areaOrStaion(deptId,Collections.singletonList(HomePageConstant.HYDROPOWER));
Map<Dept, List<StationEntity>> 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<Long, Map<String, Float>> powerMap = (Map<Long, Map<String, Float>>) redisTemplate.opsForValue().get(RECENT_YEAR_POWER_DATA);
// 确定获取数据区域
Map<Dept,List<StationEntity>> map = areaService.getAuthArea(null,deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE);
Map<Dept,List<StationEntity>> 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<StationEntity> getStation(List<Integer> singletonList, List<Long> childDeptIdList) {
return stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE,singletonList,childDeptIdList);
return stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE,singletonList,childDeptIdList,true);
}
}

12
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<HzimsAnalyzeModelStationEntity> getModelStationList() {
// 水利站点(All)
List<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, null, null);
List<StationEntity> 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<StationEntity> stations = stationService.getHomeStationList(deptId, HomePageConstant.waterList, HomePageConstant.HYDROPOWER_SERVETYPE);
List<StationEntity> 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<WaterDetailsVo> waterDetails(Long deptId) {
// 获取区域map : key-区域机构 value-水利站点集合
// 获取区域或者站点map结构
Map<Dept,List<StationEntity>> map = areaService.areaOrStaion(deptId,HomePageConstant.waterList);
Map<Dept,List<StationEntity>> 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<WaterRankingVo> waterUseEleRanking(Long deptId) {
// 获取区域map : key-区域机构 value-水利站点集合
Map<Dept,List<StationEntity>> map = areaService.areaOrStaion(deptId,HomePageConstant.waterList);
Map<Dept,List<StationEntity>> 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<StationEntity> stationList = stationService.getStationList(R.getData(),deptId,HomePageConstant.waterList,HomePageConstant.HYDROPOWER_SERVETYPE);
List<StationEntity> 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<StationEntity> stationList = stationService.getStationList(R.getData(),deptId,HomePageConstant.waterList,HomePageConstant.HYDROPOWER_SERVETYPE);
List<StationEntity> stationList = stationService.getStationList(R.getData(),deptId,HomePageConstant.waterList,HomePageConstant.HYDROPOWER_SERVETYPE,true);
if(CollectionUtil.isEmpty(stationList)){
return null;
}

2
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<List<StationEntity>> getHomeStationList(@RequestParam(value = "deptId",required = false) Long deptId,@RequestParam(value = "types",required = false) List<Integer> 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

6
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/IStationService.java

@ -101,13 +101,13 @@ public interface IStationService extends BaseService<StationEntity> {
List<StationEntity> getStationByInCode(List<String> codes);
List<StationEntity> getStationType(Integer serveType,List<Integer> typeList,List<Long> departIdList);
List<StationEntity> getStationType(Integer serveType,List<Integer> typeList,List<Long> departIdList,boolean make);
List<StationEntity> getStationByServerTypeAndIsType(Integer serverType,Boolean isType);
List<StationEntity> getStationList(List<Dept> authList, Long deptId, List<Integer> types, Integer serveType);
List<StationEntity> getStationList(List<Dept> authList, Long deptId, List<Integer> types, Integer serveType,boolean make);
List<StationEntity> getHomeStationList(Long deptId, List<Integer> types, Integer serveType);
List<StationEntity> getHomeStationList(Long deptId, List<Integer> types, Integer serveType,boolean make);
List<Long> getRefDeptByCodes(List<String> list,String type);

4
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/ImsDeptServiceImpl.java

@ -208,7 +208,7 @@ public class ImsDeptServiceImpl extends ServiceImpl<ImsDeptMapper, ImsDeptEntity
if(HomePageConstant.WATER_CONSERVANCY.equals(stationType)){
type = HomePageConstant.waterList;
}
List<StationEntity> stationEntityList = stationService.getStationType(serveType, type ,value);
List<StationEntity> stationEntityList = stationService.getStationType(serveType, type ,value,true);
if(CollectionUtil.isEmpty(stationEntityList)){
return null;
}
@ -333,7 +333,7 @@ public class ImsDeptServiceImpl extends ServiceImpl<ImsDeptMapper, ImsDeptEntity
if(HomePageConstant.WATER_CONSERVANCY.equals(typeArea)){
type = HomePageConstant.waterList;
}
List<StationEntity> stationEntityList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, type ,value);
List<StationEntity> stationEntityList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, type ,value,true);
if(CollectionUtil.isEmpty(stationEntityList)){
return null;
}

17
hzims-service/operational/src/main/java/com/hnac/hzims/operational/station/service/impl/StationServiceImpl.java

@ -450,7 +450,7 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
}
@Override
public List<StationEntity> getStationType(Integer serveType, List<Integer> typeList, List<Long> departIdList) {
public List<StationEntity> getStationType(Integer serveType, List<Integer> typeList, List<Long> departIdList,boolean make) {
return this.list(new LambdaQueryWrapper<StationEntity>() {{
eq(StationEntity::getIsDeleted, 0);
if (ObjectUtil.isNotEmpty(serveType)) {
@ -462,6 +462,9 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
if (CollectionUtil.isNotEmpty(departIdList)) {
in(StationEntity::getRefDept, departIdList);
}
if (make) {
ne(StationEntity::getStatus, 2);
}
}});
}
@ -486,7 +489,7 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
* @return
*/
@Override
public List<StationEntity> getStationList(List<Dept> authList, Long deptId, List<Integer> types, Integer servrType) {
public List<StationEntity> getStationList(List<Dept> authList, Long deptId, List<Integer> types, Integer servrType,boolean make) {
Dept dept;
if (null == deptId) {
// 最小类型机构
@ -513,7 +516,7 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
refDepList = this.getStationDeptList(authList, dept.getId(), new ArrayList<>());
}
// 获取水利站点(过滤其他站点类型)
return this.getWaterList(refDepList, types, servrType);
return this.getWaterList(refDepList, types, servrType,make);
}
/**
@ -545,12 +548,12 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
* @param refDepList
* @return
*/
private List<StationEntity> getWaterList(List<Long> refDepList, List<Integer> types, Integer servrType) {
private List<StationEntity> getWaterList(List<Long> refDepList, List<Integer> 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<StationMapper, StationEn
* @return
*/
@Override
public List<StationEntity> getHomeStationList(Long deptId, List<Integer> types, Integer serveType) {
public List<StationEntity> getHomeStationList(Long deptId, List<Integer> types, Integer serveType,boolean make) {
R<List<Dept>> 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

Loading…
Cancel
Save