|
|
|
@ -8,6 +8,8 @@ import com.hnac.hzims.common.service.UserAuthDataService;
|
|
|
|
|
import com.hnac.hzims.fdp.feign.IQuestionClient; |
|
|
|
|
import com.hnac.hzims.hzimsweather.response.air.Station; |
|
|
|
|
import com.hnac.hzims.operational.OperationalConstants; |
|
|
|
|
import com.hnac.hzims.operational.main.entity.UserDeptEntity; |
|
|
|
|
import com.hnac.hzims.operational.main.service.UserDeptService; |
|
|
|
|
import com.hnac.hzims.operational.main.vo.StationCountVo; |
|
|
|
|
import com.hnac.hzims.operational.station.StationConstants; |
|
|
|
|
import com.hnac.hzims.operational.main.constant.HomePageConstant; |
|
|
|
@ -70,6 +72,7 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
|
|
|
|
|
private final ProjectClient projectClient; |
|
|
|
|
private final BladeLogger logger; |
|
|
|
|
private final IQuestionClient questionClient; |
|
|
|
|
private final UserDeptService userDeptService; |
|
|
|
|
private final IStationAttributeService stationAttributeService; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@ -513,7 +516,7 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
|
|
|
|
|
// 传入机构为区域、省子公司、集团
|
|
|
|
|
} else { |
|
|
|
|
// 递归权限机构获取站点级机构
|
|
|
|
|
refDepList = this.getStationDeptList(authList, dept.getId(), new ArrayList<>()); |
|
|
|
|
refDepList = this.getStationDeptList(authList, types,dept.getId(), new ArrayList<>()); |
|
|
|
|
} |
|
|
|
|
// 获取水利站点(过滤其他站点类型)
|
|
|
|
|
return this.getWaterList(refDepList, types, servrType,make); |
|
|
|
@ -527,7 +530,20 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
|
|
|
|
|
* @param list |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
private List<Long> getStationDeptList(List<Dept> departList, Long deptId, List<Long> list) { |
|
|
|
|
private List<Long> getStationDeptList(List<Dept> departList, List<Integer> types,Long deptId, List<Long> list) { |
|
|
|
|
List<UserDeptEntity> configs = userDeptService.list(new LambdaQueryWrapper<UserDeptEntity>(){{ |
|
|
|
|
eq(UserDeptEntity::getUserId, AuthUtil.getUserId()); |
|
|
|
|
}}); |
|
|
|
|
if(CollectionUtil.isNotEmpty(configs)){ |
|
|
|
|
List<StationEntity> stations =this.list(new LambdaQueryWrapper<StationEntity>(){{ |
|
|
|
|
in(StationEntity::getType,types); |
|
|
|
|
eq(StationEntity::getServeType,HomePageConstant.HYDROPOWER_SERVETYPE); |
|
|
|
|
}}); |
|
|
|
|
if(CollectionUtil.isEmpty(stations)){ |
|
|
|
|
return new ArrayList<>(); |
|
|
|
|
} |
|
|
|
|
return stations.stream().map(StationEntity::getRefDept).collect(Collectors.toList()); |
|
|
|
|
} |
|
|
|
|
if (null == deptId || CollectionUtil.isEmpty(departList)) { |
|
|
|
|
return null; |
|
|
|
|
} |
|
|
|
@ -536,7 +552,7 @@ public class StationServiceImpl extends BaseServiceImpl<StationMapper, StationEn
|
|
|
|
|
if (dept.getDeptCategory().equals(4)) { |
|
|
|
|
list.add(dept.getId()); |
|
|
|
|
} |
|
|
|
|
getStationDeptList(departList, dept.getId(), list); |
|
|
|
|
getStationDeptList(departList,types, dept.getId(), list); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return list; |
|
|
|
|