Browse Source

非机预警收费站重复问题

develop
wangsixiang 7 months ago
parent
commit
d4d17dce27
  1. 6
      zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml

6
zc-business/src/main/resources/mapper/business/DcPerceivedEventsWarningMapper.xml

@ -503,7 +503,7 @@
on t1.n = t2.hours on t1.n = t2.hours
</select> </select>
<select id="selectNonAutomaticWarningFacilityDay" resultType="java.util.HashMap"> <select id="selectNonAutomaticWarningFacilityDay" resultType="java.util.HashMap">
select facility_name as facilityName, COALESCE(w_count.number, 0) AS number select distinct facility_name as facilityName, COALESCE(w_count.number, 0) AS number
from dc_facility AS s from dc_facility AS s
LEFT JOIN (SELECT w.stake_mark, COUNT(1) AS number FROM dc_warning AS w LEFT JOIN (SELECT w.stake_mark, COUNT(1) AS number FROM dc_warning AS w
WHERE DATE_FORMAT(w.warning_time,'%Y-%m-%d') = DATE_FORMAT(#{warningTime},'%Y-%m-%d') WHERE DATE_FORMAT(w.warning_time,'%Y-%m-%d') = DATE_FORMAT(#{warningTime},'%Y-%m-%d')
@ -512,7 +512,7 @@
where s.facility_type=1 where s.facility_type=1
</select> </select>
<select id="selectNonAutomaticWarningFacilityMonth" resultType="java.util.HashMap"> <select id="selectNonAutomaticWarningFacilityMonth" resultType="java.util.HashMap">
select facility_name as facilityName, COALESCE(w_count.number, 0) AS number select distinct facility_name as facilityName, COALESCE(w_count.number, 0) AS number
from dc_facility AS s from dc_facility AS s
LEFT JOIN (SELECT w.stake_mark, COUNT(1) AS number FROM dc_warning AS w LEFT JOIN (SELECT w.stake_mark, COUNT(1) AS number FROM dc_warning AS w
WHERE DATE_FORMAT(w.warning_time,'%Y-%m') = DATE_FORMAT(#{warningTime},'%Y-%m') WHERE DATE_FORMAT(w.warning_time,'%Y-%m') = DATE_FORMAT(#{warningTime},'%Y-%m')
@ -521,7 +521,7 @@
where s.facility_type=1 where s.facility_type=1
</select> </select>
<select id="selectNonAutomaticWarningFacilityYear" resultType="java.util.HashMap"> <select id="selectNonAutomaticWarningFacilityYear" resultType="java.util.HashMap">
select facility_name as facilityName, COALESCE(w_count.number, 0) AS number select distinct facility_name as facilityName, COALESCE(w_count.number, 0) AS number
from dc_facility AS s from dc_facility AS s
LEFT JOIN (SELECT w.stake_mark, COUNT(1) AS number FROM dc_warning AS w LEFT JOIN (SELECT w.stake_mark, COUNT(1) AS number FROM dc_warning AS w
WHERE DATE_FORMAT(w.warning_time,'%Y') = DATE_FORMAT(#{warningTime},'%Y') WHERE DATE_FORMAT(w.warning_time,'%Y') = DATE_FORMAT(#{warningTime},'%Y')

Loading…
Cancel
Save