Browse Source

事件统计增加施工类型

develop
lau572 3 months ago
parent
commit
cf42d17b1f
  1. 7
      zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

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

@ -412,7 +412,7 @@
<select id="selectTrafficControlAnalysis" resultType="java.util.Map"> <select id="selectTrafficControlAnalysis" resultType="java.util.Map">
select t1.controlCause,t1.controlCauseName,IFNULL(t2.facilityClose,0) facilityClose, select t1.controlCause,t1.controlCauseName,IFNULL(t2.facilityClose,0) facilityClose,
IFNULL(t2.facilityRestriction,0) facilityRestriction,IFNULL(t2.facilityInterval,0) facilityInterval IFNULL(t2.facilityRestriction,0) facilityRestriction
from from
(select '1' controlCause,'车流量大' controlCauseName (select '1' controlCause,'车流量大' controlCauseName
union all select '2' controlCause,'交通事故' controlCauseName union all select '2' controlCause,'交通事故' controlCauseName
@ -424,9 +424,8 @@
left join left join
(select (select
t2.control_cause, t2.control_cause,
SUM(case when t2.classify = '6' then 1 else 0 end) facilityClose, SUM(case when t2.control_type = '1' then 1 else 0 end) facilityClose,
SUM(case when t2.classify = '7' then 1 else 0 end) facilityRestriction, SUM(case when t2.control_type = '2' then 1 else 0 end) facilityRestriction
SUM(case when t2.classify = '9' then 1 else 0 end) facilityInterval
from dc_event t1 from dc_event t1
LEFT JOIN dc_event_traffic_control t2 on t1.id = t2.id LEFT JOIN dc_event_traffic_control t2 on t1.id = t2.id
where where

Loading…
Cancel
Save