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
4df3927b
Commit
4df3927b
authored
Feb 26, 2025
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 绿波流量绿信比折线图;事件占比1%y优化;
parent
f39f08bc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+1
-1
GreenBeltServiceImpl.java
...anji/opt/service/signalopt/impl/GreenBeltServiceImpl.java
+3
-2
StrategyControlServiceImpl.java
...pt/synthesis/service/impl/StrategyControlServiceImpl.java
+1
-2
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
4df3927b
...
...
@@ -2021,7 +2021,7 @@ public class TrendServiceImpl implements TrendService {
private
int
getRate
(
int
count
,
int
size
)
{
float
temp
=
count
/
(
float
)
size
*
100
;
temp
=
temp
<
1
?
0
:
temp
;
temp
=
temp
<
=
1
?
1
:
temp
;
int
rate
=
Math
.
round
(
temp
);
return
rate
;
}
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/signalopt/impl/GreenBeltServiceImpl.java
View file @
4df3927b
...
...
@@ -198,8 +198,9 @@ public class GreenBeltServiceImpl implements GreenBeltInfoService {
// 如果路口没有绿波,获取当前绿波最大的一条数据
LambdaQueryWrapper
<
StrategyGreenOptHistEntity
>
queryWrapperMaxId
=
new
LambdaQueryWrapper
<>();
queryWrapperMaxId
.
eq
(
StrategyGreenOptHistEntity:
:
getGreenId
,
greenId
);
queryWrapperMaxId
.
ge
(
StrategyGreenOptHistEntity:
:
getControlMethod
,
1
);
queryWrapperMaxId
.
ge
(
StrategyGreenOptHistEntity:
:
getControlTime
,
startOfDay
.
minusDays
(
1
));
queryWrapperMaxId
.
eq
(
StrategyGreenOptHistEntity:
:
getControlMethod
,
1
);
// 查询最近三天内的优化记录
queryWrapperMaxId
.
ge
(
StrategyGreenOptHistEntity:
:
getControlTime
,
startOfDay
.
minusDays
(
3
));
queryWrapperMaxId
.
orderByDesc
(
StrategyGreenOptHistEntity:
:
getControlTime
);
queryWrapperMaxId
.
last
(
"limit 1"
);
entities
=
strategyGreenOptHistMapper
.
selectList
(
queryWrapperMaxId
);
...
...
signal-optimize-service/src/main/java/net/wanji/opt/synthesis/service/impl/StrategyControlServiceImpl.java
View file @
4df3927b
...
...
@@ -679,8 +679,7 @@ public class StrategyControlServiceImpl implements StrategyControlService {
Integer
currentAlgo
=
entity
.
getCurrentAlgo
();
Date
issueTime
=
entity
.
getIssueTime
();
Date
current
=
new
Date
();
Integer
duration
=
entity
.
getDuration
();
Integer
duration
=
Objects
.
nonNull
(
entity
.
getDuration
())
?
entity
.
getDuration
()
:
0
;
// 计算结束时间
if
(
Objects
.
nonNull
(
issueTime
))
{
if
(
Objects
.
equals
(
2
,
currentAlgo
)
&&
current
.
getTime
()
-
issueTime
.
getTime
()
-
duration
*
1000
>
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