left join (select * from t_event_info where dt = DATE_FORMAT(NOW(),'%Y%m%d') and type in (701,702,703,707) and alarm_status in (0,1,2)) a on a.cross_id = c.id
<!-- left --> join (select * from t_event_info where dt = DATE_FORMAT(NOW(),'%Y%m%d') and type in (701,702,703,707) and alarm_status in (0,1,2)) a on a.cross_id = c.id
left join (select a.event_type, a.label from t_config_event_category a where a.category = 4) b on a.type = b.event_type
<!-- left --> join (select a.event_type, a.label from t_config_event_category a where a.category = 4) b on a.type = b.event_type
where c.is_signal=1
where c.is_signal=1
</select>
</select>
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
from t_event_info a
from t_event_info a
left join (select a.event_type, a.label from t_config_event_category a where a.category = 4) b on a.type = b.event_type
left join (select a.event_type, a.label from t_config_event_category a where a.category = 4) b on a.type = b.event_type
left join t_base_cross_info c on a.cross_id = c.id
left join t_base_cross_info c on a.cross_id = c.id
where a.type in (701,702,703,707) and DATE(a.start_time) = CURDATE()
where a.dt=DATE_FORMAT(NOW(),'%Y%m%d') and a.type in (701,702,703,707)
union
union
<!-- 查询干线事件 -->
<!-- 查询干线事件 -->
select a.type as event_type,a.green_id,a.cross_id,c.name as cross_name , a.start_time as issue_time, b.label as current_algo, c.wkt,a.alarm_status,a.opt_status
select a.type as event_type,a.green_id,a.cross_id,c.name as cross_name , a.start_time as issue_time, b.label as current_algo, c.wkt,a.alarm_status,a.opt_status
...
@@ -161,8 +161,8 @@
...
@@ -161,8 +161,8 @@
from t_event_info a
from t_event_info a
left join (select a.event_type, a.label from t_config_event_category a where a.category = 4) b on a.type = b.event_type
left join (select a.event_type, a.label from t_config_event_category a where a.category = 4) b on a.type = b.event_type
left join t_greenwave_info c on a.green_id = c.id
left join t_greenwave_info c on a.green_id = c.id
where a.type in (705,706) and DATE(a.start_time) = CURDATE()
where dt=DATE_FORMAT(NOW(),'%Y%m%d') and a.type in (705,706)
) b where b.alarm_status in (0,1,2)
) b where b.alarm_status in (0,1,2)
order by b.issue_time desc
order by b.issue_time desc
)
)
union
union
...
@@ -176,7 +176,7 @@
...
@@ -176,7 +176,7 @@
from t_event_info a
from t_event_info a
left join (select a.event_type, a.label from t_config_event_category a where a.category = 4) b on a.type = b.event_type
left join (select a.event_type, a.label from t_config_event_category a where a.category = 4) b on a.type = b.event_type
left join t_base_cross_info c on a.cross_id = c.id
left join t_base_cross_info c on a.cross_id = c.id
where a.type in (701,702,703,707) and DATE(a.start_time) = CURDATE()
where dt=DATE_FORMAT(NOW(),'%Y%m%d') and a.type in (701,702,703,707)
union
union
<!-- 查询干线事件缓行、拥堵事件 -->
<!-- 查询干线事件缓行、拥堵事件 -->
select a.type as event_type,a.green_id,a.cross_id,c.name as cross_name , DATE_FORMAT(a.start_time,'%H:%i') as issue_time, b.label as current_algo, c.wkt,a.alarm_status ,a.opt_status
select a.type as event_type,a.green_id,a.cross_id,c.name as cross_name , DATE_FORMAT(a.start_time,'%H:%i') as issue_time, b.label as current_algo, c.wkt,a.alarm_status ,a.opt_status
...
@@ -184,8 +184,8 @@
...
@@ -184,8 +184,8 @@
from t_event_info a
from t_event_info a
left join (select a.event_type, a.label from t_config_event_category a where a.category = 4 ) b on a.type = b.event_type
left join (select a.event_type, a.label from t_config_event_category a where a.category = 4 ) b on a.type = b.event_type
left join t_greenwave_info c on a.green_id = c.id
left join t_greenwave_info c on a.green_id = c.id
where a.type in (705,706) and DATE(a.start_time) = CURDATE()
where dt=DATE_FORMAT(NOW(),'%Y%m%d') and a.type in (705,706)