|
|
@ -57,15 +57,13 @@ |
|
|
|
HAVING number !=0 |
|
|
|
order by number desc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectSectionPerceivedNumber" resultType="java.util.HashMap"> |
|
|
|
select s.section_name sectionName, |
|
|
|
(select COUNT(1) FROM `dc_warning` as w where |
|
|
|
DATE_FORMAT(w.warning_time,'%Y-%m-%d')=DATE_FORMAT(#{warningTime},'%Y-%m-%d') |
|
|
|
and mark.stake_mark=w.stake_mark)number from dc_warning as w |
|
|
|
select s.section_name sectionName, COUNT(1) number from dc_warning as w |
|
|
|
left JOIN dc_stake_mark as mark ON mark.stake_mark=w.stake_mark and mark.direction=w.direction |
|
|
|
LEFT JOIN dc_road_section as s ON mark.section_id=s.id |
|
|
|
where mark.stake_mark is not null |
|
|
|
group by w.stake_mark |
|
|
|
where mark.stake_mark is not null and DATE_FORMAT(w.warning_time,'%Y-%m-%d')=DATE_FORMAT(#{warningTime},'%Y-%m-%d') |
|
|
|
group by sectionName |
|
|
|
HAVING number !=0 |
|
|
|
</select> |
|
|
|
<select id="selectDailyCumulative" resultType="java.util.HashMap"> |
|
|
|