1.台账:台账审核和变压器台账
2.配网:稳态指标和暂态指标部分接口 3.指标分类,修改变电站名称异常bug
This commit is contained in:
@@ -9,9 +9,11 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.pms.api.MonitorClient;
|
||||
import com.njcn.device.pms.api.PmsGeneralDeviceInfoClient;
|
||||
import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO;
|
||||
import com.njcn.device.pms.pojo.dto.PmsMonitorDTO;
|
||||
import com.njcn.device.pms.pojo.dto.PmsMonitorInfoDTO;
|
||||
import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsMonitorInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsMonitorParam;
|
||||
import com.njcn.harmonic.mapper.majornetwork.RMpBenchmarkLevelMMapper;
|
||||
import com.njcn.harmonic.pojo.param.RMpBenchmarkLevelParam;
|
||||
import com.njcn.harmonic.pojo.po.RMpBenchmarkLevelM;
|
||||
@@ -93,9 +95,11 @@ implements RMpBenchmarkLevelMService {
|
||||
//查询对应的监测点完整信息 并转为key:监测点id value:监测点实体的map集合
|
||||
// LambdaQueryWrapper<Monitor> monitorWrapper = new LambdaQueryWrapper<>();
|
||||
// monitorWrapper.in(Monitor::getId, lastMonitorIdList);
|
||||
PmsMonitorInfoParam pmsMonitorInfoParam = new PmsMonitorInfoParam();
|
||||
PmsMonitorParam pmsMonitorInfoParam = new PmsMonitorParam();
|
||||
pmsMonitorInfoParam.setMonitorIds(lastMonitorIdList);
|
||||
Map<String, PmsMonitorInfoDTO> monitorMap = monitorClient.getMonitorInfo(pmsMonitorInfoParam).getData().stream().collect(Collectors.toMap(PmsMonitorInfoDTO::getMonitorId, monitor -> monitor));
|
||||
//监测点标签集合
|
||||
pmsMonitorInfoParam.setMonitorTags(rMpBenchmarkLevelParam.getMonitorTags());
|
||||
Map<String, PmsMonitorDTO> monitorMap = monitorClient.getMonitorInfoListByCond(pmsMonitorInfoParam).getData().stream().collect(Collectors.toMap(PmsMonitorDTO::getId, monitor -> monitor));
|
||||
//查询【基准水平-月】数据
|
||||
/*组装条件:where measurement_point_id in (monitorIdList) and data_date >= startTime
|
||||
and data_date <= endTime and voltage_level
|
||||
@@ -118,10 +122,11 @@ implements RMpBenchmarkLevelMService {
|
||||
rMpBenchmarkLevelVO.setBenchmarkIndicator(benchmarkIndicator); //基准水平评价指标id
|
||||
rMpBenchmarkLevelVO.setBenchmarkIndicatorName(benchmarkIndicatorMap.get(benchmarkIndicator)); //基准水平评价指标
|
||||
//监测点信息
|
||||
rMpBenchmarkLevelVO.setMeasurementPointName(monitorMap.get(item.getMeasurementPointId()).getMonitorName()); //监测点名称
|
||||
rMpBenchmarkLevelVO.setMonitorTag(monitorMap.get(item.getMeasurementPointId()).getMonitorTag());
|
||||
rMpBenchmarkLevelVO.setMeasurementPointName(monitorMap.get(item.getMeasurementPointId()).getName()); //监测点名称
|
||||
//电压等级
|
||||
rMpBenchmarkLevelVO.setVoltageLevel(monitorMap.get(item.getMeasurementPointId()).getMonitorVoltageLevel());
|
||||
rMpBenchmarkLevelVO.setVoltageLevelName(voltageLevelMap.get(monitorMap.get(item.getMeasurementPointId()).getMonitorVoltageLevel()));
|
||||
rMpBenchmarkLevelVO.setVoltageLevel(monitorMap.get(item.getMeasurementPointId()).getVoltageLevel());
|
||||
rMpBenchmarkLevelVO.setVoltageLevelName(voltageLevelMap.get(monitorMap.get(item.getMeasurementPointId()).getVoltageLevel()));
|
||||
return rMpBenchmarkLevelVO;
|
||||
}).collect(Collectors.toList());
|
||||
return resultList;
|
||||
|
||||
@@ -9,9 +9,11 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.pms.api.MonitorClient;
|
||||
import com.njcn.device.pms.api.PmsGeneralDeviceInfoClient;
|
||||
import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO;
|
||||
import com.njcn.device.pms.pojo.dto.PmsMonitorDTO;
|
||||
import com.njcn.device.pms.pojo.dto.PmsMonitorInfoDTO;
|
||||
import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsMonitorInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsMonitorParam;
|
||||
import com.njcn.harmonic.mapper.majornetwork.RMpBenchmarkLevelQMapper;
|
||||
import com.njcn.harmonic.pojo.param.RMpBenchmarkLevelParam;
|
||||
import com.njcn.harmonic.pojo.po.RMpBenchmarkLevelQ;
|
||||
@@ -93,9 +95,11 @@ implements RMpBenchmarkLevelQService {
|
||||
//查询对应的监测点完整信息 并转为key:监测点id value:监测点实体的map集合
|
||||
// LambdaQueryWrapper<Monitor> monitorWrapper = new LambdaQueryWrapper<>();
|
||||
// monitorWrapper.in(Monitor::getId, lastMonitorIdList);
|
||||
PmsMonitorInfoParam pmsMonitorInfoParam = new PmsMonitorInfoParam();
|
||||
PmsMonitorParam pmsMonitorInfoParam = new PmsMonitorParam();
|
||||
pmsMonitorInfoParam.setMonitorIds(lastMonitorIdList);
|
||||
Map<String, PmsMonitorInfoDTO> monitorMap = monitorClient.getMonitorInfo(pmsMonitorInfoParam).getData().stream().collect(Collectors.toMap(PmsMonitorInfoDTO::getMonitorId, monitor -> monitor));
|
||||
//监测点标签集合
|
||||
pmsMonitorInfoParam.setMonitorTags(rMpBenchmarkLevelParam.getMonitorTags());
|
||||
Map<String, PmsMonitorDTO> monitorMap = monitorClient.getMonitorInfoListByCond(pmsMonitorInfoParam).getData().stream().collect(Collectors.toMap(PmsMonitorDTO::getId, monitor -> monitor));
|
||||
//查询【基准水平-月】数据
|
||||
/*组装条件:where measurement_point_id in (monitorIdList) and data_date >= startTime
|
||||
and data_date <= endTime and voltage_level
|
||||
@@ -118,10 +122,11 @@ implements RMpBenchmarkLevelQService {
|
||||
rMpBenchmarkLevelVO.setBenchmarkIndicator(benchmarkIndicator); //基准水平评价指标id
|
||||
rMpBenchmarkLevelVO.setBenchmarkIndicatorName(benchmarkIndicatorMap.get(benchmarkIndicator)); //基准水平评价指标
|
||||
//监测点信息
|
||||
rMpBenchmarkLevelVO.setMeasurementPointName(monitorMap.get(item.getMeasurementPointId()).getMonitorName()); //监测点名称
|
||||
rMpBenchmarkLevelVO.setMonitorTag(monitorMap.get(item.getMeasurementPointId()).getMonitorTag());
|
||||
rMpBenchmarkLevelVO.setMeasurementPointName(monitorMap.get(item.getMeasurementPointId()).getName()); //监测点名称
|
||||
//电压等级
|
||||
rMpBenchmarkLevelVO.setVoltageLevel(monitorMap.get(item.getMeasurementPointId()).getMonitorVoltageLevel());
|
||||
rMpBenchmarkLevelVO.setVoltageLevelName(voltageLevelMap.get(monitorMap.get(item.getMeasurementPointId()).getMonitorVoltageLevel()));
|
||||
rMpBenchmarkLevelVO.setVoltageLevel(monitorMap.get(item.getMeasurementPointId()).getVoltageLevel());
|
||||
rMpBenchmarkLevelVO.setVoltageLevelName(voltageLevelMap.get(monitorMap.get(item.getMeasurementPointId()).getVoltageLevel()));
|
||||
return rMpBenchmarkLevelVO;
|
||||
}).collect(Collectors.toList());
|
||||
return resultList;
|
||||
|
||||
@@ -9,9 +9,11 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.device.pms.api.MonitorClient;
|
||||
import com.njcn.device.pms.api.PmsGeneralDeviceInfoClient;
|
||||
import com.njcn.device.pms.pojo.dto.PmsGeneralDeviceDTO;
|
||||
import com.njcn.device.pms.pojo.dto.PmsMonitorDTO;
|
||||
import com.njcn.device.pms.pojo.dto.PmsMonitorInfoDTO;
|
||||
import com.njcn.device.pms.pojo.param.PmsDeviceInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsMonitorInfoParam;
|
||||
import com.njcn.device.pms.pojo.param.PmsMonitorParam;
|
||||
import com.njcn.harmonic.mapper.majornetwork.RMpBenchmarkLevelYMapper;
|
||||
import com.njcn.harmonic.pojo.param.RMpBenchmarkLevelParam;
|
||||
import com.njcn.harmonic.pojo.po.RMpBenchmarkLevelY;
|
||||
@@ -93,9 +95,11 @@ implements RMpBenchmarkLevelYService {
|
||||
//查询对应的监测点完整信息 并转为key:监测点id value:监测点实体的map集合
|
||||
// LambdaQueryWrapper<Monitor> monitorWrapper = new LambdaQueryWrapper<>();
|
||||
// monitorWrapper.in(Monitor::getId, lastMonitorIdList); e
|
||||
PmsMonitorInfoParam pmsMonitorInfoParam = new PmsMonitorInfoParam();
|
||||
PmsMonitorParam pmsMonitorInfoParam = new PmsMonitorParam();
|
||||
pmsMonitorInfoParam.setMonitorIds(lastMonitorIdList);
|
||||
Map<String, PmsMonitorInfoDTO> monitorMap = monitorClient.getMonitorInfo(pmsMonitorInfoParam).getData().stream().collect(Collectors.toMap(PmsMonitorInfoDTO::getMonitorId, monitor -> monitor));
|
||||
//监测点标签集合
|
||||
pmsMonitorInfoParam.setMonitorTags(rMpBenchmarkLevelParam.getMonitorTags());
|
||||
Map<String, PmsMonitorDTO> monitorMap = monitorClient.getMonitorInfoListByCond(pmsMonitorInfoParam).getData().stream().collect(Collectors.toMap(PmsMonitorDTO::getId, monitor -> monitor));
|
||||
//查询【基准水平-月】数据
|
||||
/*组装条件:where measurement_point_id in (monitorIdList) and data_date >= startTime
|
||||
and data_date <= endTime and voltage_level
|
||||
@@ -118,10 +122,11 @@ implements RMpBenchmarkLevelYService {
|
||||
rMpBenchmarkLevelVO.setBenchmarkIndicator(benchmarkIndicator); //基准水平评价指标id
|
||||
rMpBenchmarkLevelVO.setBenchmarkIndicatorName(benchmarkIndicatorMap.get(benchmarkIndicator)); //基准水平评价指标
|
||||
//监测点信息
|
||||
rMpBenchmarkLevelVO.setMeasurementPointName(monitorMap.get(item.getMeasurementPointId()).getMonitorName()); //监测点名称
|
||||
rMpBenchmarkLevelVO.setMonitorTag(monitorMap.get(item.getMeasurementPointId()).getMonitorTag());
|
||||
rMpBenchmarkLevelVO.setMeasurementPointName(monitorMap.get(item.getMeasurementPointId()).getName()); //监测点名称
|
||||
//电压等级
|
||||
rMpBenchmarkLevelVO.setVoltageLevel(monitorMap.get(item.getMeasurementPointId()).getMonitorVoltageLevel());
|
||||
rMpBenchmarkLevelVO.setVoltageLevelName(voltageLevelMap.get(monitorMap.get(item.getMeasurementPointId()).getMonitorVoltageLevel()));
|
||||
rMpBenchmarkLevelVO.setVoltageLevel(monitorMap.get(item.getMeasurementPointId()).getVoltageLevel());
|
||||
rMpBenchmarkLevelVO.setVoltageLevelName(voltageLevelMap.get(monitorMap.get(item.getMeasurementPointId()).getVoltageLevel()));
|
||||
return rMpBenchmarkLevelVO;
|
||||
}).collect(Collectors.toList());
|
||||
return resultList;
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -51,7 +52,7 @@ public class RStatSubstationMServiceImpl extends ServiceImpl<RStatSubstationMMap
|
||||
RSubstationIconVO rSubstationIconVO = new RSubstationIconVO();
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
//根据部门获取变电站信息
|
||||
baseParam.setIds(this.powerrIdList(param.getId()));
|
||||
baseParam.setIds(this.powerIdList(param.getId()));
|
||||
String string = param.getType().toString();
|
||||
switch (string) {
|
||||
//查询变电站稳态指标超标分布(按超标天数)-年数据
|
||||
@@ -77,48 +78,55 @@ public class RStatSubstationMServiceImpl extends ServiceImpl<RStatSubstationMMap
|
||||
//生成变电站id集合
|
||||
List<RSubstationIcon2VO> rSubstationIconVO = new ArrayList<>();
|
||||
StatSubstationBizBaseParam baseParam = BeanUtil.copyProperties(param, StatSubstationBizBaseParam.class);
|
||||
//根据id进行筛选
|
||||
baseParam.setIds(this.powerrIdList(param.getId()));
|
||||
String string = param.getType().toString();
|
||||
switch (string) {
|
||||
//查询变电站稳态指标平均超标天数-年数据
|
||||
case BizParamConstant.STAT_BIZ_YEAR:
|
||||
rSubstationIconVO = rStatSubstationYMapper.getStatSubstationIcon2Y(baseParam);
|
||||
break;
|
||||
//查询变电站稳态指标平均超标天数-季数据
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
rSubstationIconVO = rStatSubstationQMapper.getStatSubstationIcon2Q(baseParam);
|
||||
break;
|
||||
//查询变电站稳态指标平均超标天数-月数据
|
||||
case BizParamConstant.STAT_BIZ_MONTH:
|
||||
rSubstationIconVO = rStatSubstationMMapper.getStatSubstationIcon2M(baseParam);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
//获取变电站名称属性替换
|
||||
if (CollUtil.isNotEmpty(rSubstationIconVO)) {
|
||||
List<String> ids = rSubstationIconVO.stream().map(RSubstationIcon2VO::getSubstationId).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(ids)) {
|
||||
PmsStatationStatInfoParam pmsParam = new PmsStatationStatInfoParam();
|
||||
pmsParam.setPowerIds(ids);
|
||||
List<PmsStatationStatInfoDTO> data1 = statationStatClient.getStatationStatInfo(pmsParam).getData();
|
||||
if (CollUtil.isNotEmpty(data1)) {
|
||||
for (PmsStatationStatInfoDTO dto : data1) {
|
||||
for (RSubstationIcon2VO vo : rSubstationIconVO) {
|
||||
if (dto.getPowerId().equals(vo.getSubstationId())) {
|
||||
vo.setSubstationName(dto.getPowerName());
|
||||
}
|
||||
//获取变电站id
|
||||
List<String> powerIds = this.powerIdList(param.getId());
|
||||
PmsStatationStatInfoParam pmsParam = new PmsStatationStatInfoParam();
|
||||
pmsParam.setPowerIds(powerIds);
|
||||
//变电站名称,获取台账的变电站名称
|
||||
List<PmsStatationStatInfoDTO> stationInfoDTOS = statationStatClient.getStatationStatInfo(pmsParam).getData();
|
||||
//获取变电站信息
|
||||
if(CollUtil.isNotEmpty(stationInfoDTOS)){
|
||||
List<String> ids = stationInfoDTOS.stream().map(PmsStatationStatInfoDTO::getPowerId).distinct().collect(Collectors.toList());
|
||||
baseParam.setIds(ids);
|
||||
String string = param.getType().toString();
|
||||
switch (string) {
|
||||
//查询变电站稳态指标平均超标天数-年数据
|
||||
case BizParamConstant.STAT_BIZ_YEAR:
|
||||
rSubstationIconVO = rStatSubstationYMapper.getStatSubstationIcon2Y(baseParam);
|
||||
break;
|
||||
//查询变电站稳态指标平均超标天数-季数据
|
||||
case BizParamConstant.STAT_BIZ_QUARTER:
|
||||
rSubstationIconVO = rStatSubstationQMapper.getStatSubstationIcon2Q(baseParam);
|
||||
break;
|
||||
//查询变电站稳态指标平均超标天数-月数据
|
||||
case BizParamConstant.STAT_BIZ_MONTH:
|
||||
rSubstationIconVO = rStatSubstationMMapper.getStatSubstationIcon2M(baseParam);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//获取变电站名称属性替换
|
||||
if (CollUtil.isNotEmpty(rSubstationIconVO)) {
|
||||
Map<String, String> stationInfoMap = stationInfoDTOS.stream().collect(
|
||||
Collectors.toMap(PmsStatationStatInfoDTO::getPowerId, PmsStatationStatInfoDTO::getPowerName, (Key1, Key2) -> Key2));
|
||||
for (RSubstationIcon2VO dto : rSubstationIconVO) {
|
||||
if(stationInfoMap.containsKey(dto.getSubstationId())){
|
||||
dto.setSubstationName(stationInfoMap.get(dto.getSubstationId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return rSubstationIconVO;
|
||||
}
|
||||
|
||||
private List<String> powerrIdList(String id) {
|
||||
/***
|
||||
* 获取台账部门下的变电站
|
||||
* @author wr
|
||||
* @date 2023-02-24 13:48
|
||||
* @param id
|
||||
* @return List<String>
|
||||
*/
|
||||
private List<String> powerIdList(String id) {
|
||||
//获取部门下面监测点信息
|
||||
PmsDeviceInfoParam pms = new PmsDeviceInfoParam();
|
||||
pms.setDeptIndex(id);
|
||||
|
||||
Reference in New Issue
Block a user