Commit 29135069 authored by zhoushiguang's avatar zhoushiguang

研判分析-区域/路口排查缓行事件,定时计算的路口缓行事件只用于干线路口排名趋势使用

parent 9acb81ab
......@@ -274,7 +274,7 @@
a.category,
a.type,
count(1) as event_number , sum( TIMESTAMPDIFF(SECOND, a.start_time , a.end_time) ) as duration ,
DATE_FORMAT(DATE_SUB(now(),INTERVAL 1 DAY),'%Y%m%d') as dt , now(),
dt , now(),
SUBSTRING_INDEX(
GROUP_CONCAT(
CONCAT(
......@@ -316,7 +316,6 @@
count(*)>=2
) a
left join t_base_cross_info b on a.cross_id = b.id
where a.dt = DATE_FORMAT(DATE_SUB(now(),INTERVAL 1 DAY),'%Y%m%d')
group by a.cross_id, b.area_id,a.category,a.type
ON DUPLICATE KEY UPDATE
......
......@@ -17,6 +17,7 @@
<if test="areaId != null and areaId != ''">
and tapcd.area_id = #{areaId}
</if>
and tapcd.event_type != 708
GROUP BY tapcd.event_type
union
SELECT sum(event_number) as event_number,
......@@ -53,6 +54,7 @@
<if test="areaId != null and areaId != ''">
and t1.area_id = #{areaId}
</if>
and t1.event_type != 708
GROUP BY dt, t1.event_type
UNION
SELECT
......
......@@ -321,6 +321,7 @@
<if test="crossId!=null and crossId!=''">
and tapcd.cross_id = #{crossId}
</if>
and tapcd.event_type != 708
GROUP BY tapcd.event_type
</select>
......@@ -341,6 +342,7 @@
<if test="crossId != null and crossId != ''">
and t1.cross_id = #{crossId}
</if>
and t1.event_type != 708
GROUP BY dt, t1.event_type
ORDER BY dt
</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