Browse Source

收费站管制分析

develop
lau572 8 months ago
parent
commit
0d6e60f768
  1. 4
      zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

4
zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

@ -263,7 +263,7 @@
LEFT JOIN dc_event_traffic_control t2 on t1.id = t2.id LEFT JOIN dc_event_traffic_control t2 on t1.id = t2.id
LEFT JOIN dc_facility t3 on t3.id = t2.facility_id LEFT JOIN dc_facility t3 on t3.id = t2.facility_id
where where
t1.event_type = '3' and t1.event_subclass = '3-2' t1.event_type = '3' and t1.event_subclass = '3-2' and t1.event_state != '0'
and date_format(t1.start_time,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s') and date_format(t1.start_time,'%Y-%m-%d %H:%i:%s') <= date_format(#{endTime},'%Y-%m-%d %H:%i:%s')
and (date_format(t1.end_time,'%Y-%m-%d %H:%i:%s') > date_format(#{startTime},'%Y-%m-%d %H:%i:%s') or ISNULL(t1.end_time)) and (date_format(t1.end_time,'%Y-%m-%d %H:%i:%s') > date_format(#{startTime},'%Y-%m-%d %H:%i:%s') or ISNULL(t1.end_time))
and t2.classify in ('6','7','9') and t2.classify in ('6','7','9')
@ -288,7 +288,7 @@
sum(case when t2.control_type = '2' then 1 else 0 end) trafficRestriction sum(case when t2.control_type = '2' then 1 else 0 end) trafficRestriction
from dc_event t1 left join dc_event_traffic_control t2 on t1.id = t2.id from dc_event t1 left join dc_event_traffic_control t2 on t1.id = t2.id
where (DATE_FORMAT(t1.start_time,'%Y-%m') = DATE_FORMAT(now(),'%Y-%m') or DATE_FORMAT(t1.end_time,'%Y-%m') = DATE_FORMAT(now(),'%Y-%m') or ISNULL(t1.end_time)) where (DATE_FORMAT(t1.start_time,'%Y-%m') = DATE_FORMAT(now(),'%Y-%m') or DATE_FORMAT(t1.end_time,'%Y-%m') = DATE_FORMAT(now(),'%Y-%m') or ISNULL(t1.end_time))
and t1.event_type = '3' and t1.event_subclass = '3-2' and t1.event_type = '3' and t1.event_subclass = '3-2' and t1.event_state != '0'
GROUP BY t2.facility_id) t4 GROUP BY t2.facility_id) t4
on t3.id = t4.facilityId on t3.id = t4.facilityId
</select> </select>

Loading…
Cancel
Save