Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
traffic-signal-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jinan
traffic-signal-platform
Commits
32f82706
Commit
32f82706
authored
Apr 25, 2025
by
fengyasheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
干线周报4.1排序修改为按拥堵次数
parent
50a30adc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
AnalysisGreenCongestionPeriodServiceImpl.java
...alysis/impl/AnalysisGreenCongestionPeriodServiceImpl.java
+11
-3
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/servicev2/judgeanalysis/impl/AnalysisGreenCongestionPeriodServiceImpl.java
View file @
32f82706
...
...
@@ -263,12 +263,20 @@ public class AnalysisGreenCongestionPeriodServiceImpl implements AnalysisGreenCo
//按拥堵指数降序排序
// List<AnalysisGreenCongestionPeriodVO> periodVOS = voList.stream().sorted(Comparator.comparing(AnalysisGreenCongestionPeriodVO::getCongestIndex).reversed())
// .collect(Collectors.toList());
// List<GreenReportProblemOverallDataVO> overallDataVOS = greenList.stream().sorted(Comparator.comparing(x -> {
// double congestIndexAll = 0;
// for (GreenWaveDirProblemDataVO dataVO : x.getList()) {
// congestIndexAll += dataVO.getCongestIndex();
// }
// return - congestIndexAll/x.getList().size();
// })).collect(Collectors.toList());
//按拥堵次数降序排序
List
<
GreenReportProblemOverallDataVO
>
overallDataVOS
=
greenList
.
stream
().
sorted
(
Comparator
.
comparing
(
x
->
{
double
congest
Index
All
=
0
;
double
congest
Count
All
=
0
;
for
(
GreenWaveDirProblemDataVO
dataVO
:
x
.
getList
())
{
congest
IndexAll
+=
dataVO
.
getCongestIndex
();
congest
CountAll
+=
dataVO
.
getCongestCount
();
}
return
-
congest
IndexAll
/
x
.
getList
().
size
()
;
return
-
congest
CountAll
;
})).
collect
(
Collectors
.
toList
());
List
<
Integer
>
greenIds
=
new
ArrayList
<>();
for
(
GreenReportProblemOverallDataVO
periodVO
:
overallDataVOS
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment