|
@ -257,14 +257,13 @@ |
|
|
|
|
|
|
|
|
<select id="selectTollStationAnalysisByFacility" resultType="java.util.Map"> |
|
|
<select id="selectTollStationAnalysisByFacility" resultType="java.util.Map"> |
|
|
SELECT t1.id,t1.facility_name facilityName,IFNULL(t2.facilityClose,0) facilityClose, |
|
|
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 |
|
|
from dc_facility t1 |
|
|
LEFT JOIN |
|
|
LEFT JOIN |
|
|
(select |
|
|
(select |
|
|
t2.facility_id facilityId,t3.facility_name facilityName,classify, |
|
|
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.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 |
|
|
LEFT JOIN dc_facility t3 on t3.id = t2.facility_id |
|
|
LEFT JOIN dc_facility t3 on t3.id = t2.facility_id |
|
|