高级算法模块代码调整

This commit is contained in:
2023-08-18 08:43:29 +08:00
parent ee5a97ac85
commit 86829c206c
3 changed files with 9 additions and 12 deletions

View File

@@ -99,7 +99,10 @@ public class EventRelevantAnalysisServiceImpl extends ServiceImpl<RmpEventAdvanc
LocalDateTime date = LocalDateTime.now();
HandleEvent handleEvent = new HandleEvent();
// 分析的事件进行处理
List<EntityGroupEvtData> baseList = handleEvent.getData(generalDeviceInfoClient, startTime, endTime);
List<EntityGroupEvtData> baseList = handleEvent.getData(startTime, endTime);
if(CollectionUtil.isEmpty(baseList)){
throw new BusinessException("当前时间段暂无可分析事件");
}
// 传入的处理事件根据物理隔绝进行分组
@@ -219,6 +222,8 @@ public class EventRelevantAnalysisServiceImpl extends ServiceImpl<RmpEventAdvanc
entityPqsRelevance.setTimeId(date);
relevantLogMapper.insert(entityPqsRelevance);
}else {
throw new BusinessException("当前无变压器策略,请先配置策略");
}
log.info("事件关联分析用时:" + timeInterval.interval() / 1000 + "");
@@ -492,7 +497,7 @@ public class EventRelevantAnalysisServiceImpl extends ServiceImpl<RmpEventAdvanc
return group_buf;
}
public List<EntityGroupEvtData> getData(GeneralDeviceInfoClient generalDeviceInfoClient, LocalDateTime startTime, LocalDateTime endTime) {
public List<EntityGroupEvtData> getData(LocalDateTime startTime, LocalDateTime endTime) {
List<EntityGroupEvtData> entityGroupEvtDataList = new ArrayList<>();
List<DictData> advanceType = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.EVENT_TYPE.getCode()).getData();