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
9f91d74a
Commit
9f91d74a
authored
Apr 10, 2025
by
duwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
转向接口优化
parent
5af88d05
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
TrendController.java
...c/main/java/net/wanji/opt/controller/TrendController.java
+4
-1
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+3
-4
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/controller/TrendController.java
View file @
9f91d74a
...
...
@@ -318,10 +318,13 @@ public class TrendController {
String
[]
turnArr
=
turns
.
split
(
","
);
for
(
int
i
=
0
;
i
<
turnArr
.
length
;
i
++){
String
[]
s
=
turnArr
[
i
].
split
(
"-"
);
String
t
=
TurnConvertEnum
.
getCodeByKey
(
Integer
.
parseInt
(
s
[
1
]));
if
(
i
<
turnArr
.
length
-
1
)
{
inDir
.
append
(
s
[
0
]).
append
(
","
);
String
t
=
TurnConvertEnum
.
getCodeByKey
(
Integer
.
parseInt
(
s
[
0
]));
turnType
.
append
(
t
).
append
(
","
);
}
else
{
inDir
.
append
(
s
[
0
]);
turnType
.
append
(
t
);
}
}
lanePeriodTurnVO
.
setInDir
(
inDir
.
toString
());
...
...
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
9f91d74a
...
...
@@ -1717,7 +1717,6 @@ public class TrendServiceImpl implements TrendService {
if
(
po
.
getSturation
()
!=
null
)
{
//保留小数点后两位
vo
.
setSaturation
(
Math
.
round
(
po
.
getSturation
()
*
100
)
/
100.0
);
vo
.
setSaturation
(
po
.
getSturation
());
}
//拥堵指数
vo
.
setCongestionIndex
(
0.0
);
...
...
@@ -1763,19 +1762,19 @@ public class TrendServiceImpl implements TrendService {
vo
.
setTrafficAccidentNum
(
0
);
//不停车通过率
if
(
po
.
getNoStopRate
()
!=
null
)
{
vo
.
setNoStopPassRate
(
po
.
getNoStopRate
()
);
vo
.
setNoStopPassRate
(
Math
.
round
(
po
.
getNoStopRate
()
*
100
)
/
100.0
);
}
else
{
vo
.
setNoStopPassRate
(
0
);
}
//一次停车通过率
if
(
po
.
getOneStopRate
()
!=
null
)
{
vo
.
setOneStopPassRate
(
po
.
getOneStopRate
()
);
vo
.
setOneStopPassRate
(
Math
.
round
(
po
.
getOneStopRate
()
*
100
)
/
100.0
);
}
else
{
vo
.
setOneStopPassRate
(
0
);
}
//二次停车通过率
if
(
po
.
getTwoStopRate
()
!=
null
)
{
vo
.
setTwoStopPassRate
(
po
.
getTwoStopRate
()
);
vo
.
setTwoStopPassRate
(
Math
.
round
(
po
.
getTwoStopRate
()
*
100
)
/
100.0
);
}
else
{
vo
.
setTwoStopPassRate
(
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