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
8f1ed8b5
Commit
8f1ed8b5
authored
Dec 05, 2024
by
duanruiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[add] 干线运行监测
parent
295bd1cf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
GreenwaveHistPOExt.java
...java/net/wanji/databus/dao/entity/GreenwaveHistPOExt.java
+2
-0
GreenwaveHistMapper.xml
wj-databus/src/main/resources/mapper/GreenwaveHistMapper.xml
+2
-1
No files found.
wj-databus/src/main/java/net/wanji/databus/dao/entity/GreenwaveHistPOExt.java
View file @
8f1ed8b5
...
@@ -15,4 +15,6 @@ public class GreenwaveHistPOExt {
...
@@ -15,4 +15,6 @@ public class GreenwaveHistPOExt {
private
Integer
avgSpeed
;
private
Integer
avgSpeed
;
@ApiModelProperty
(
value
=
"拥堵指数"
)
@ApiModelProperty
(
value
=
"拥堵指数"
)
private
Double
congestionIndex
;
private
Double
congestionIndex
;
@ApiModelProperty
(
value
=
"行程时间"
)
private
Double
trvalTime
;
}
}
wj-databus/src/main/resources/mapper/GreenwaveHistMapper.xml
View file @
8f1ed8b5
...
@@ -41,7 +41,8 @@
...
@@ -41,7 +41,8 @@
<select
id=
"selectRunMonitor"
resultType=
"net.wanji.databus.dao.entity.GreenwaveHistPOExt"
>
<select
id=
"selectRunMonitor"
resultType=
"net.wanji.databus.dao.entity.GreenwaveHistPOExt"
>
SELECT DATE_FORMAT(gmt_modified, '%Y-%m-%d %H:00:00') AS hour,
SELECT DATE_FORMAT(gmt_modified, '%Y-%m-%d %H:00:00') AS hour,
ROUND(AVG(speed)) AS avg_speed,
ROUND(AVG(speed)) AS avg_speed,
ROUND(AVG(traffic_index), 2) AS congestion_index
ROUND(AVG(traffic_index), 2) AS congestion_index,
ROUND(AVG(trval_time), 2) AS trval_time
FROM t_greenwave_hist
FROM t_greenwave_hist
WHERE gmt_modified
>
= DATE_SUB(DATE_FORMAT(#{nowTime}, '%Y-%m-%d %H:00:00'), INTERVAL 10 HOUR)
WHERE gmt_modified
>
= DATE_SUB(DATE_FORMAT(#{nowTime}, '%Y-%m-%d %H:00:00'), INTERVAL 10 HOUR)
AND gmt_modified
<
DATE_FORMAT(DATE_ADD(#{nowTime}, INTERVAL 1 HOUR), '%Y-%m-%d %H:00:00')
AND gmt_modified
<
DATE_FORMAT(DATE_ADD(#{nowTime}, INTERVAL 1 HOUR), '%Y-%m-%d %H:00:00')
...
...
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