Commit cb149351 authored by fengyasheng's avatar fengyasheng

干线周拥堵情况-定时任务sql修改

parent 1d70fddd
......@@ -54,11 +54,11 @@
select * from t_config_peak_hours;
</select>
<select id="selectGreenWaveWeekDataByTime" resultType="net.wanji.opt.entity.report.GreenWaveWeekData">
SELECT green_id,road_direction,max(traffic_index) max_congest_index,avg(traffic_index) congest_index,sum(status>=3)*60*5 congest_duration,avg(speed) speed,sum(trval_time) travel_time
SELECT green_id,road_direction,max(traffic_index) max_congest_index,avg(traffic_index) congest_index,sum(status>=3 and status &lt;=4)*60*5 congest_duration,avg(speed) speed,sum(trval_time) travel_time
from t_greenwave_hist where start_time BETWEEN #{startDate} AND #{endDate} AND TIME( start_time ) BETWEEN #{startTime} AND #{endTime} GROUP BY green_id,road_direction
</select>
<select id="selectGreenWaveWeekData" resultType="net.wanji.opt.entity.report.GreenWaveWeekData">
SELECT green_id,road_direction,max(traffic_index) max_congest_index,avg(traffic_index) congest_index,sum(status>=3)*60*5 congest_duration,avg(speed) speed,sum(trval_time) travel_time
SELECT green_id,road_direction,max(traffic_index) max_congest_index,avg(traffic_index) congest_index,sum(status>=3 and status&lt;=4)*60*5 congest_duration,avg(speed) speed,sum(trval_time) travel_time
from t_greenwave_hist where start_time BETWEEN #{startDate} AND #{endDate} GROUP BY green_id,road_direction
</select>
......@@ -81,7 +81,7 @@
and TIME( start_time ) BETWEEN #{startTime} AND #{endTime}
</if>
and green_id = #{greenId}
and status >= 3 and road_direction = #{roadDirection} order by start_time
and status >= 3 and status &lt;= 4 and road_direction = #{roadDirection} order by start_time
</select>
<select id="getDataByWeek" resultType="net.wanji.opt.entity.report.GreenWaveWeekData">
SELECT
......
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