电压暂降:解决事件分析无数据
This commit is contained in:
@@ -1488,6 +1488,8 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
*/
|
||||
@Override
|
||||
public Page<WaveTypeVO> getMonitorEventAnalyseQuery(EventBaseParam eventBaseParam) {
|
||||
List<DictData> eventReasonList = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_REASON.getName()).getData();
|
||||
List<DictData> eventTypeList = dicDataFeignClient.getDicDataByTypeName(DicDataTypeEnum.EVENT_TYPE.getName()).getData();
|
||||
|
||||
//数据暂降查询
|
||||
Page<RmpEventDetailPO> pageInfo = eventDetailService.page(new Page<>(eventBaseParam.getPageNum(), eventBaseParam.getPageSize()), new LambdaQueryWrapper<RmpEventDetailPO>()
|
||||
@@ -1498,7 +1500,7 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
);
|
||||
//获取关于监测点发电站相关信息
|
||||
List<AreaLineInfoVO> areaLineList = lineFeignClient.getBaseLineAreaInfo(Arrays.asList(eventBaseParam.getLineId())).getData();
|
||||
if(CollectionUtil.isNotEmpty(areaLineList)){
|
||||
if(CollectionUtil.isEmpty(areaLineList)){
|
||||
throw new BusinessException(EventResponseEnum.NOT_FOUND);
|
||||
}
|
||||
List<WaveTypeVO> waveTypeVOS = new ArrayList<>();
|
||||
@@ -1529,6 +1531,30 @@ public class EventAnalysisServiceImpl implements EventAnalysisService {
|
||||
waveTypeVO.setLng(lineInfoVO.getLng());
|
||||
waveTypeVO.setManufacturer(lineInfoVO.getManufacturer());
|
||||
waveTypeVO.setVoltageScale(lineInfoVO.getVoltageScale());
|
||||
//查询字典表替换事件原因与事件类型的字符串
|
||||
if (waveTypeVO.getAdvanceReason() != null) {
|
||||
for (DictData dictData : eventReasonList) {
|
||||
//将字典数据id与VO中属性eventReason对应的字符串进行比较
|
||||
if (waveTypeVO.getAdvanceReason().equals(dictData.getId())) {
|
||||
waveTypeVO.setAdvanceReason(dictData.getName());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//抛出异常,当前暂态原因为空
|
||||
throw new BusinessException(EventResponseEnum.EVENT_REASON_NOT_FOUND);
|
||||
}
|
||||
|
||||
if (waveTypeVO.getAdvanceType() != null) {
|
||||
for (DictData dictData : eventTypeList) {
|
||||
//将字典数据id与VO中属性eventType对应的字符串进行比较
|
||||
if (waveTypeVO.getAdvanceType().equals(dictData.getId())) {
|
||||
waveTypeVO.setAdvanceType(dictData.getName());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//抛出异常,当前暂态类型为空
|
||||
throw new BusinessException(EventResponseEnum.EVENT_TYPE_NOT_FOUND);
|
||||
}
|
||||
waveTypeVOS.add(waveTypeVO);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user