Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
王兴琳 8 months ago
parent
commit
67a0bb3f42
  1. 8
      zc-business/src/main/resources/mapper/business/DcTrafficIncidentsMapper.xml

8
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
@ -272,7 +271,6 @@
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') &lt;= 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 t2.classify in ('6','7','9')
GROUP BY t2.facility_id) t2 on t1.id = t2.facilityId
<where>
t1.facility_type = '1'

Loading…
Cancel
Save