Browse Source

收费站管制统计

develop
lau572 5 months ago
parent
commit
8d6d0ecf3a
  1. 7
      zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

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

@ -257,14 +257,13 @@
<select id="selectTollStationAnalysisByFacility" resultType="java.util.Map">
SELECT t1.id,t1.facility_name facilityName,IFNULL(t2.facilityClose,0) facilityClose,
IFNULL(t2.facilityInterval,0) facilityInterval,IFNULL(t2.facilityRestriction,0) facilityRestriction
IFNULL(t2.facilityRestriction,0) facilityRestriction
from dc_facility t1
LEFT JOIN
(select
t2.facility_id facilityId,t3.facility_name facilityName,classify,
SUM(case when t2.classify = '6' then 1 else 0 end) facilityClose,
SUM(case when t2.classify = '7' then 1 else 0 end) facilityRestriction,
SUM(case when t2.classify = '9' then 1 else 0 end) facilityInterval
SUM(case when t2.control_type = '1' then 1 else 0 end) facilityClose,
SUM(case when t2.control_type = '2' then 1 else 0 end) facilityRestriction
from dc_event t1
LEFT JOIN dc_event_traffic_control t2 on t1.id = t2.id
LEFT JOIN dc_facility t3 on t3.id = t2.facility_id

Loading…
Cancel
Save