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
signal
traffic-signal-platform
Commits
f40d31e4
Commit
f40d31e4
authored
Jan 05, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 绿波优化监测数据结束优化
parent
1f7be484
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
GreenBeltServiceImpl.java
...anji/opt/service/signalopt/impl/GreenBeltServiceImpl.java
+4
-4
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/signalopt/impl/GreenBeltServiceImpl.java
View file @
f40d31e4
...
@@ -138,11 +138,12 @@ public class GreenBeltServiceImpl implements GreenBeltInfoService {
...
@@ -138,11 +138,12 @@ public class GreenBeltServiceImpl implements GreenBeltInfoService {
detail
.
setStartTime
(
dirDataHistPO
.
getStartTime
());
detail
.
setStartTime
(
dirDataHistPO
.
getStartTime
());
detail
.
setGreenTimeRatio
(
greenTimeRatio
);
detail
.
setGreenTimeRatio
(
greenTimeRatio
);
for
(
GreenBeltKeyCrossFlowTimeVO
.
Detail
optResult
:
optResults
)
{
for
(
GreenBeltKeyCrossFlowTimeVO
.
Detail
optResult
:
optResults
)
{
Integer
curDir
=
GreenBeltDirEnum
.
getInDir
(
optResult
.
getDir
());
if
(
StringUtils
.
equalsIgnoreCase
(
"cancel"
,
optResult
.
getDir
())
&&
Objects
.
equals
(
curDir
,
dirType
)
if
(
StringUtils
.
equalsIgnoreCase
(
"cancel"
,
optResult
.
getDir
())
&&
dirDataHistPO
.
getStartTime
().
getTime
()
==
optResult
.
getStartTime
().
getTime
())
{
&&
dirDataHistPO
.
getStartTime
().
getTime
()
==
optResult
.
getStartTime
().
getTime
())
{
greenTimeRatio
=
0.0
;
greenTimeRatio
=
0.0
;
}
}
Integer
curDir
=
GreenBeltDirEnum
.
getInDir
(
optResult
.
getDir
());
if
(
StringUtils
.
equalsIgnoreCase
(
crossId
,
optResult
.
getCrossId
())
&&
Objects
.
equals
(
curDir
,
dirType
)
if
(
StringUtils
.
equalsIgnoreCase
(
crossId
,
optResult
.
getCrossId
())
&&
Objects
.
equals
(
curDir
,
dirType
)
&&
dirDataHistPO
.
getStartTime
().
getTime
()
==
optResult
.
getStartTime
().
getTime
())
{
&&
dirDataHistPO
.
getStartTime
().
getTime
()
==
optResult
.
getStartTime
().
getTime
())
{
detail
.
setGreenTimeRatio
(
optResult
.
getGreenTimeRatio
()
*
100
);
detail
.
setGreenTimeRatio
(
optResult
.
getGreenTimeRatio
()
*
100
);
...
@@ -262,7 +263,6 @@ public class GreenBeltServiceImpl implements GreenBeltInfoService {
...
@@ -262,7 +263,6 @@ public class GreenBeltServiceImpl implements GreenBeltInfoService {
LambdaQueryWrapper
<
StrategyGreenOptHistEntity
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
StrategyGreenOptHistEntity
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
StrategyGreenOptHistEntity:
:
getGreenId
,
greenId
);
queryWrapper
.
eq
(
StrategyGreenOptHistEntity:
:
getGreenId
,
greenId
);
queryWrapper
.
ge
(
StrategyGreenOptHistEntity:
:
getControlTime
,
startOfDay
);
queryWrapper
.
ge
(
StrategyGreenOptHistEntity:
:
getControlTime
,
startOfDay
);
queryWrapper
.
ge
(
StrategyGreenOptHistEntity:
:
getControlMethod
,
1
);
List
<
StrategyGreenOptHistEntity
>
entities
=
strategyGreenOptHistMapper
.
selectList
(
queryWrapper
);
List
<
StrategyGreenOptHistEntity
>
entities
=
strategyGreenOptHistMapper
.
selectList
(
queryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
greenwaveHistPOS
))
{
if
(!
CollectionUtils
.
isEmpty
(
greenwaveHistPOS
))
{
Map
<
String
,
List
<
GreenwaveHistPO
>>
greenDirMap
=
greenwaveHistPOS
.
stream
().
collect
(
Collectors
.
groupingBy
(
GreenwaveHistPO:
:
getRoadDirection
));
Map
<
String
,
List
<
GreenwaveHistPO
>>
greenDirMap
=
greenwaveHistPOS
.
stream
().
collect
(
Collectors
.
groupingBy
(
GreenwaveHistPO:
:
getRoadDirection
));
...
@@ -289,7 +289,7 @@ public class GreenBeltServiceImpl implements GreenBeltInfoService {
...
@@ -289,7 +289,7 @@ public class GreenBeltServiceImpl implements GreenBeltInfoService {
&&
minuteDate
.
getTime
()
==
startTimeminuteDate
.
getTime
())
{
&&
minuteDate
.
getTime
()
==
startTimeminuteDate
.
getTime
())
{
greenWidthTime
=
entity
.
getGreenWidthTime
();
greenWidthTime
=
entity
.
getGreenWidthTime
();
}
}
if
(
entity
.
getControlMethod
()
<
=
0
)
{
if
(
entity
.
getControlMethod
()
<
0
&&
minuteDate
.
getTime
()
==
startTimeminuteDate
.
getTime
()
)
{
greenWidthTime
=
0.0
;
greenWidthTime
=
0.0
;
}
}
}
}
...
...
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