Commit 17466304 by 杨林龙

1.50.0 开发1.50.0需求版本 优化警情数据返回结果

1 parent 596e77ab
......@@ -329,9 +329,11 @@ public class RiskAssessmentService {
// 计算真离线
calculateTrueOffline(vehicleId, snList, basicAlarmDTOSet);
Map<Integer, List<AlarmInformationVO>> alarmInformationVOMap = basicAlarmDTOSet.stream().sorted(Comparator.comparingInt(AlarmInformationVO::getAlarmLevel)).collect(Collectors.groupingBy(AlarmInformationVO::getAlarmLevel));
log.info("alarmInformationVOMap===" + JSONUtil.toJsonStr(alarmInformationVOMap));
Set<AlarmInformationVO> alarmInformationVOResultSet = Sets.newHashSet();
alarmInformationVOMap.entrySet().stream().sorted(Map.Entry.comparingByKey()).forEach(entry -> {
List<AlarmInformationVO> valueList = entry.getValue();
log.info("valueList===" + JSONUtil.toJsonStr(valueList));
alarmInformationVOResultSet.addAll(valueList.stream().sorted(Comparator.comparingInt(AlarmInformationVO::getAlarmRank)).collect(Collectors.toCollection(LinkedHashSet::new)));
});
return alarmInformationVOResultSet;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!