|
|
@ -22,18 +22,18 @@ |
|
|
|
warning.`remark`, warning.`create_time`,warning.`update_time`, |
|
|
|
warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`, |
|
|
|
warning.`other_config` FROM dc_warning AS warning |
|
|
|
LEFT JOIN dc_stake_mark AS mark ON mark.stake_mark=warning.stake_mark |
|
|
|
LEFT JOIN dc_stake_mark AS mark ON mark.stake_mark=warning.stake_mark and mark.direction=warning.direction |
|
|
|
where warning.`id`=#{id} |
|
|
|
</select> |
|
|
|
<select id="selectPerceivedEventsList" resultType="com.zc.business.domain.DcWarning"> |
|
|
|
SELECT warning.`id`,warning.`stake_mark`, warning.`direction`, |
|
|
|
SELECT warning.`id`,warning.`stake_mark`, warning.`direction`, |
|
|
|
mark.longitude,mark.latitude,warning.lane,duration, |
|
|
|
warning.`dept_id`,warning.`warning_state`,warning.`warning_time`, |
|
|
|
warning.`user_id`, warning.`warning_source`,warning.`warning_level`, |
|
|
|
warning.`remark`, warning.`create_time`,warning.`update_time`, |
|
|
|
warning.`warning_type`,warning.`warning_subclass`,warning.`warning_title`, |
|
|
|
warning.`other_config` FROM dc_warning AS warning |
|
|
|
LEFT JOIN dc_stake_mark AS mark ON mark.stake_mark=warning.stake_mark |
|
|
|
left JOIN dc_stake_mark AS mark ON mark.stake_mark=warning.stake_mark and mark.direction=warning.direction |
|
|
|
<where> |
|
|
|
<if test="warningType != null and warningType != ''"> and warning_type = #{warningType}</if> |
|
|
|
<if test="warningSubclass != null and warningSubclass != ''"> and warning_subclass = #{warningSubclass}</if> |
|
|
@ -44,7 +44,7 @@ |
|
|
|
(select COUNT(1) FROM `dc_warning` as w where |
|
|
|
DATE_FORMAT(w.create_time,'%Y-%m-%d')=DATE_FORMAT(#{createTime},'%Y-%m-%d') |
|
|
|
and mark.stake_mark=w.stake_mark)number from dc_warning as w |
|
|
|
left JOIN dc_stake_mark as mark ON mark.stake_mark=w.stake_mark |
|
|
|
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 |
|
|
@ -56,7 +56,7 @@ |
|
|
|
(select COUNT(1) FROM `dc_warning` as w where |
|
|
|
DATE_FORMAT(w.create_time,'%Y-%m-%d')=DATE_FORMAT(#{createTime},'%Y-%m-%d') |
|
|
|
and mark.stake_mark=w.stake_mark)number from dc_warning as w |
|
|
|
left JOIN dc_stake_mark as mark ON mark.stake_mark=w.stake_mark |
|
|
|
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 |
|
|
@ -238,7 +238,7 @@ |
|
|
|
select org.organization_name,warning.warning_type,warning.warning_subclass, |
|
|
|
warning_title,warning.warning_state, |
|
|
|
warning. warning_source,DATE_FORMAT(warning.create_time,'%Y-%m-%d %H:%m:%s') createTime from dc_warning as warning |
|
|
|
LEFT JOIN dc_stake_mark as mark on warning.stake_mark=mark.stake_mark |
|
|
|
LEFT JOIN dc_stake_mark as mark on warning.stake_mark=mark.stake_mark and mark.direction=warning.direction |
|
|
|
LEFT JOIN dc_organization as org on mark.stake_mark=org.stake_mark |
|
|
|
<where> |
|
|
|
<if test="warningState != null and warningState != ''"> and warning.warning_state = #{warningState}</if> |
|
|
@ -306,7 +306,7 @@ |
|
|
|
ELSE '第四季度' |
|
|
|
END AS QUARTER |
|
|
|
FROM dc_warning w |
|
|
|
LEFT JOIN dc_stake_mark m ON w.stake_mark = m.stake_mark |
|
|
|
LEFT JOIN dc_stake_mark m ON w.stake_mark = m.stake_mark and mark.direction=warning.direction |
|
|
|
WHERE m.stake_mark IS NOT null and w.direction=#{direction} |
|
|
|
and YEAR(w.create_time) =DATE_FORMAT(#{createTime},'%Y') |
|
|
|
GROUP BY QUARTER |
|
|
|