Commit 7314f33f authored by hanbing's avatar hanbing

[add] 新信号评价-方案评价-按开始事件排序

parent add1af33
......@@ -185,17 +185,22 @@ public class SchemeEvaluateServiceImpl implements SchemeEvaluateService {
}
// 特殊日期根据方案 ID 筛选重复方案
if (weekDay == 0) {
List<SchemeEvaluateCrossSchemeListVO> uniqueList = res.stream()
List<SchemeEvaluateCrossSchemeListVO> sortedUniqueList = res.stream()
.collect(Collectors.toMap(
SchemeEvaluateCrossSchemeListVO::getSchemeId,
vo -> vo,
(existing, replacement) -> existing))
.values()
.stream()
.sorted(Comparator.comparing(SchemeEvaluateCrossSchemeListVO::getStartTime))
.collect(Collectors.toList());
return uniqueList;
return sortedUniqueList;
}
return res;
// 按照 startTime 排序
List<SchemeEvaluateCrossSchemeListVO> sortedList = res.stream()
.sorted(Comparator.comparing(SchemeEvaluateCrossSchemeListVO::getStartTime))
.collect(Collectors.toList());
return sortedList;
}
@NotNull
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment