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
1443df53
Commit
1443df53
authored
May 13, 2025
by
duwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
停车次数精确到小数两位
parent
a07ba048
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+14
-3
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
1443df53
...
...
@@ -1563,7 +1563,9 @@ public class TrendServiceImpl implements TrendService {
// vo.setEfficiencyEvaluateLevel(0.0);
Double
stopTimes
=
po
.
getStopTimes
();
vo
.
setStopTimes
(
Math
.
round
(
stopTimes
*
100
)/
100.0
);
if
(
stopTimes
!=
null
)
{
vo
.
setStopTimes
(
Math
.
round
(
stopTimes
*
100
)
/
100.0
);
}
Double
vehheadTime
=
po
.
getVehheadTime
();
vo
.
setVehheadTime
(
Math
.
round
(
vehheadTime
*
100
)/
100.0
);
//饱和度 sturation
...
...
@@ -1692,7 +1694,9 @@ public class TrendServiceImpl implements TrendService {
Double
queueLength
=
po
.
getQueueLength
();
vo
.
setQueueLength
(
Math
.
round
(
queueLength
*
100
)/
100.0
);
Double
stopTimes
=
po
.
getStopTimes
();
vo
.
setStopTimes
(
Math
.
round
(
stopTimes
*
100
)/
100.0
);
if
(
stopTimes
!=
null
)
{
vo
.
setStopTimes
(
Math
.
round
(
stopTimes
*
100
)
/
100.0
);
}
if
(
po
.
getVehheadTime
()
!=
null
)
{
vo
.
setVehheadTime
(
Math
.
round
(
po
.
getVehheadTime
()*
100
)/
100.0
);
}
else
{
...
...
@@ -1847,7 +1851,9 @@ public class TrendServiceImpl implements TrendService {
Double
queueLength
=
po
.
getQueueLength
();
vo
.
setQueueLength
(
Math
.
round
(
queueLength
*
100
)/
100.0
);
Double
stopTimes
=
po
.
getStopTimes
();
//停车次数
vo
.
setStopTimes
(
Math
.
round
(
stopTimes
*
100
)/
100.0
);
if
(
stopTimes
!=
null
)
{
vo
.
setStopTimes
(
Math
.
round
(
stopTimes
*
100
)
/
100.0
);
}
//----------------------------------------------------------------------------------------------
// if (po.getId().contains(crossId.concat(Constants.SystemParam.SEPARATOR_MINUS))) {
...
...
@@ -3326,4 +3332,9 @@ public class TrendServiceImpl implements TrendService {
}
}
public
static
void
main
(
String
[]
args
)
{
double
v
=
Math
.
round
(
1
*
100
)
/
100.0
;
System
.
out
.
println
(
v
);
}
}
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