(select cross_id from t_greenwave_cross where green_id = #{greenId} and sort = 1) cross_data
(select cross_id from t_greenwave_cross where green_id = #{greenId} and is_key_route = 1) cross_data
left join
(SELECT sum(flow) as flow,cross_id from t_cross_dir_data_hist where start_time BETWEEN #{startDate} AND #{endDate} AND TIME( start_time ) BETWEEN #{startTime} AND #{endTime} and dir_type = #{dir} GROUP BY cross_id) cross_flow on cross_data.cross_id = cross_flow.cross_id
</select>
...
...
@@ -83,4 +83,29 @@
and green_id = #{greenId}
and status >= 3 and road_direction = #{roadDirection} order by start_time