|
|
@ -46,14 +46,11 @@ |
|
|
|
order by warning.warning_time desc |
|
|
|
</select> |
|
|
|
<select id="selectSectionPerceivedEventsList" resultType="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')='2024-02-26' |
|
|
|
group by sectionName |
|
|
|
HAVING number !=0 |
|
|
|
order by number desc |
|
|
|
</select> |
|
|
|