Commit 8f1ed8b5 authored by duanruiming's avatar duanruiming

[add] 干线运行监测

parent 295bd1cf
......@@ -15,4 +15,6 @@ public class GreenwaveHistPOExt {
private Integer avgSpeed;
@ApiModelProperty(value = "拥堵指数")
private Double congestionIndex;
@ApiModelProperty(value = "行程时间")
private Double trvalTime;
}
......@@ -41,7 +41,8 @@
<select id="selectRunMonitor" resultType="net.wanji.databus.dao.entity.GreenwaveHistPOExt">
SELECT DATE_FORMAT(gmt_modified, '%Y-%m-%d %H:00:00') AS hour,
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
WHERE gmt_modified &gt;= DATE_SUB(DATE_FORMAT(#{nowTime}, '%Y-%m-%d %H:00:00'), INTERVAL 10 HOUR)
AND gmt_modified &lt; DATE_FORMAT(DATE_ADD(#{nowTime}, INTERVAL 1 HOUR), '%Y-%m-%d %H:00:00')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment