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
ea29bad8
Commit
ea29bad8
authored
May 21, 2025
by
duwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化交通指标查询
parent
b9b4bb6d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
11 deletions
+21
-11
TrendServiceImpl.java
...ain/java/net/wanji/opt/service/impl/TrendServiceImpl.java
+17
-7
CrossDataHistMapper.xml
wj-databus/src/main/resources/mapper/CrossDataHistMapper.xml
+1
-1
CrossDirDataHistMapper.xml
...abus/src/main/resources/mapper/CrossDirDataHistMapper.xml
+1
-1
CrossLaneDataHistMapper.xml
...bus/src/main/resources/mapper/CrossLaneDataHistMapper.xml
+1
-1
CrossTurnDataHistMapper.xml
...bus/src/main/resources/mapper/CrossTurnDataHistMapper.xml
+1
-1
No files found.
signal-optimize-service/src/main/java/net/wanji/opt/service/impl/TrendServiceImpl.java
View file @
ea29bad8
...
...
@@ -1415,7 +1415,8 @@ public class TrendServiceImpl implements TrendService {
vo
.
setSpeed
((
double
)
Math
.
round
(
speed
*
100
)/
100.0
);
//Math.round(0.01d * 100) / 100.0
Double
queueLength
=
po
.
getQueueLength
();
if
(
queueLength
!=
null
){
vo
.
setQueueLength
(
Integer
.
parseInt
(
String
.
valueOf
(
queueLength
)));
int
queueLengthInt
=
(
int
)
Math
.
round
(
queueLength
);
vo
.
setQueueLength
(
queueLengthInt
);
}
Integer
delayTime
=
po
.
getDelayTime
();
...
...
@@ -1558,7 +1559,8 @@ public class TrendServiceImpl implements TrendService {
Double
queueLength
=
po
.
getQueueLength
();
if
(
queueLength
!=
null
)
{
vo
.
setQueueLength
(
Integer
.
parseInt
(
String
.
valueOf
(
queueLength
)));
int
queueLengthInt
=
(
int
)
Math
.
round
(
queueLength
);
vo
.
setQueueLength
(
queueLengthInt
);
}
Integer
delayTime
=
po
.
getDelayTime
();
...
...
@@ -1637,7 +1639,9 @@ public class TrendServiceImpl implements TrendService {
// vo.setCrossNoClearRate(0);
//平均排队长度
if
(
po
.
getQueueLength
()
!=
null
)
{
vo
.
setAvgQueueLength
(
Integer
.
parseInt
(
String
.
valueOf
(
po
.
getQueueLength
())));
// vo.setAvgQueueLength(Integer.parseInt(String.valueOf(po.getQueueLength())));
int
queueLengthInt
=
(
int
)
Math
.
round
(
queueLength
);
vo
.
setAvgQueueLength
(
queueLengthInt
);
}
else
{
// vo.setAvgQueueLength(0.0);
}
...
...
@@ -1699,7 +1703,8 @@ public class TrendServiceImpl implements TrendService {
// vo.setVehheadDist(0d);//车头间距
Double
queueLength
=
po
.
getQueueLength
();
if
(
queueLength
!=
null
)
{
vo
.
setQueueLength
(
Integer
.
parseInt
(
String
.
valueOf
(
queueLength
)));
int
queueLengthInt
=
(
int
)
Math
.
round
(
queueLength
);
vo
.
setQueueLength
(
queueLengthInt
);
}
Double
stopTimes
=
po
.
getStopTimes
();
if
(
stopTimes
!=
null
)
{
...
...
@@ -1858,7 +1863,8 @@ public class TrendServiceImpl implements TrendService {
// vo.setVehheadTime(Math.round(vehheadTime *100)/100.0);//车头时距
Double
queueLength
=
po
.
getQueueLength
();
if
(
queueLength
!=
null
)
{
vo
.
setQueueLength
(
Integer
.
parseInt
(
queueLength
.
toString
()));
int
queueLengthInt
=
(
int
)
Math
.
round
(
queueLength
);
vo
.
setQueueLength
(
queueLengthInt
);
}
Double
stopTimes
=
po
.
getStopTimes
();
//停车次数
if
(
stopTimes
!=
null
)
{
...
...
@@ -1957,7 +1963,9 @@ public class TrendServiceImpl implements TrendService {
// vo.setCrossNoClearRate(0);
//平均排队长度
if
(
po
.
getQueueLength
()
!=
null
)
{
vo
.
setAvgQueueLength
(
Integer
.
parseInt
(
String
.
valueOf
(
po
.
getQueueLength
())));
// vo.setAvgQueueLength(Integer.parseInt(String.valueOf(po.getQueueLength())));
int
queueLengthInt
=
(
int
)
Math
.
round
(
queueLength
);
vo
.
setAvgQueueLength
(
queueLengthInt
);
}
else
{
// vo.setAvgQueueLength(0.0);
}
...
...
@@ -2013,7 +2021,9 @@ public class TrendServiceImpl implements TrendService {
vo
.
setVehheadTime
(
Math
.
round
(
vehheadTime
*
100
)/
100.0
);
//车头时距
Double
queueLength
=
po
.
getQueueLength
();
if
(
queueLength
!=
null
)
{
vo
.
setQueueLength
(
Integer
.
parseInt
(
String
.
valueOf
(
queueLength
)));
//queueLength的值是105.0,需要转换为105
int
queueLengthInt
=
(
int
)
Math
.
round
(
queueLength
);
vo
.
setQueueLength
(
queueLengthInt
);
}
Double
stopTimes
=
po
.
getStopTimes
();
if
(
stopTimes
!=
null
)
{
...
...
wj-databus/src/main/resources/mapper/CrossDataHistMapper.xml
View file @
ea29bad8
...
...
@@ -148,7 +148,7 @@
AND t2.cross_id = #{crossId}
</if>
and t2.start_time
<![CDATA[ >= ]]>
#{startStamp}
and t2.start_time
<![CDATA[ <
=
]]>
#{endStamp}
and t2.start_time
<![CDATA[ < ]]>
#{endStamp}
GROUP BY
t2.cross_id,
startTime
...
...
wj-databus/src/main/resources/mapper/CrossDirDataHistMapper.xml
View file @
ea29bad8
This diff is collapsed.
Click to expand it.
wj-databus/src/main/resources/mapper/CrossLaneDataHistMapper.xml
View file @
ea29bad8
...
...
@@ -178,7 +178,7 @@
</foreach>
</if>
and t1.start_time
<![CDATA[ >= ]]>
#{startStamp}
and t1.start_time
<![CDATA[ <
=
]]>
#{endStamp}
and t1.start_time
<![CDATA[ < ]]>
#{endStamp}
GROUP BY
t2.id,
t2.dir,
...
...
wj-databus/src/main/resources/mapper/CrossTurnDataHistMapper.xml
View file @
ea29bad8
...
...
@@ -133,7 +133,7 @@
)
</if>
and t2.start_time
<![CDATA[ >= ]]>
#{startStamp}
and t2.start_time
<![CDATA[ <
=
]]>
#{endStamp}
and t2.start_time
<![CDATA[ < ]]>
#{endStamp}
GROUP BY
t1.cross_id,
t2.in_dir,
...
...
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