|
@ -37,7 +37,7 @@ |
|
|
warning.`other_config` FROM dc_warning AS warning |
|
|
warning.`other_config` FROM dc_warning AS warning |
|
|
left JOIN dc_stake_mark AS mark ON mark.stake_mark=warning.stake_mark and mark.direction=warning.direction |
|
|
left JOIN dc_stake_mark AS mark ON mark.stake_mark=warning.stake_mark and mark.direction=warning.direction |
|
|
<where> |
|
|
<where> |
|
|
warning.warning_source!=6 |
|
|
<if test="warningSource != null and warningSource != ''"> and warning.warning_source = #{warningSource}</if> |
|
|
<if test="warningState != null and warningState != ''"> and warning.warning_state = #{warningState}</if> |
|
|
<if test="warningState != null and warningState != ''"> and warning.warning_state = #{warningState}</if> |
|
|
<if test="warningType != null and warningType != ''"> and warning.warning_type = #{warningType}</if> |
|
|
<if test="warningType != null and warningType != ''"> and warning.warning_type = #{warningType}</if> |
|
|
<if test="warningSubclass != null and warningSubclass != ''"> and warning.warning_subclass = #{warningSubclass}</if> |
|
|
<if test="warningSubclass != null and warningSubclass != ''"> and warning.warning_subclass = #{warningSubclass}</if> |
|
@ -57,6 +57,34 @@ |
|
|
</where> |
|
|
</where> |
|
|
order by warning.warning_time desc |
|
|
order by warning.warning_time desc |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
<select id="selectWarningList" resultType="com.zc.business.domain.DcWarning"> |
|
|
|
|
|
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 and mark.direction=warning.direction |
|
|
|
|
|
<where> |
|
|
|
|
|
warning.warning_source!=6 |
|
|
|
|
|
<if test="warningState != null and warningState != ''"> and warning.warning_state = #{warningState}</if> |
|
|
|
|
|
<if test="warningSubclass != null and warningSubclass != ''"> and warning.warning_subclass = #{warningSubclass}</if> |
|
|
|
|
|
<if test="direction != null and direction != ''"> and warning.direction = #{direction}</if> |
|
|
|
|
|
<if test="stakeMark != null and stakeMark != ''"> and warning.stake_mark = #{stakeMark}</if> |
|
|
|
|
|
<if test="startTime != null and completeTime != null "> |
|
|
|
|
|
and warning.warning_time between #{startTime} and #{completeTime}</if> |
|
|
|
|
|
<if test="startStakeMark != null and startStakeMark != ''"> |
|
|
|
|
|
and CAST(SUBSTRING(SUBSTRING_INDEX(warning.stake_mark,'+',1),2)AS UNSIGNED)*1000 |
|
|
|
|
|
+CAST(SUBSTRING_INDEX(warning.stake_mark, '+', -1) AS UNSIGNED)>#{startStakeMark} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test=" endStakeMark != null and endStakeMark != '' "> |
|
|
|
|
|
and CAST(SUBSTRING(SUBSTRING_INDEX(warning.stake_mark,'+',1),2)AS UNSIGNED)*1000 |
|
|
|
|
|
+CAST(SUBSTRING_INDEX(warning.stake_mark, '+', -1) AS UNSIGNED)<#{endStakeMark} |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
|
|
|
order by warning.warning_time desc |
|
|
|
|
|
</select> |
|
|
<select id="selectSectionPerceivedEventsList" resultType="hashmap"> |
|
|
<select id="selectSectionPerceivedEventsList" resultType="hashmap"> |
|
|
SELECT s.section_name AS sectionName, COALESCE(w_count.number, 0) AS number2 |
|
|
SELECT s.section_name AS sectionName, COALESCE(w_count.number, 0) AS number2 |
|
|
FROM dc_road_section AS s |
|
|
FROM dc_road_section AS s |
|
@ -341,34 +369,7 @@ |
|
|
AND direction = #{direction} GROUP BY stake_mark ) AS wc ON m.stake_mark = wc.stake_mark |
|
|
AND direction = #{direction} GROUP BY stake_mark ) AS wc ON m.stake_mark = wc.stake_mark |
|
|
WHERE m.section_id = #{sectionId} |
|
|
WHERE m.section_id = #{sectionId} |
|
|
</select> |
|
|
</select> |
|
|
<select id="selectWarningList" resultType="com.zc.business.domain.DcWarning"> |
|
|
|
|
|
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 and mark.direction=warning.direction |
|
|
|
|
|
<where> |
|
|
|
|
|
<if test="warningState != null and warningState != ''"> and warning.warning_state = #{warningState}</if> |
|
|
|
|
|
<if test="warningSubclass != null and warningSubclass != ''"> and warning.warning_subclass = #{warningSubclass}</if> |
|
|
|
|
|
<if test="warningSource != null and warningSource != ''"> and warning.warning_source = #{warningSource}</if> |
|
|
|
|
|
<if test="direction != null and direction != ''"> and warning.direction = #{direction}</if> |
|
|
|
|
|
<if test="stakeMark != null and stakeMark != ''"> and warning.stake_mark = #{stakeMark}</if> |
|
|
|
|
|
<if test="startTime != null and completeTime != null "> |
|
|
|
|
|
and warning.warning_time between #{startTime} and #{completeTime}</if> |
|
|
|
|
|
<if test="startStakeMark != null and startStakeMark != ''"> |
|
|
|
|
|
and CAST(SUBSTRING(SUBSTRING_INDEX(warning.stake_mark,'+',1),2)AS UNSIGNED)*1000 |
|
|
|
|
|
+CAST(SUBSTRING_INDEX(warning.stake_mark, '+', -1) AS UNSIGNED)>#{startStakeMark} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test=" endStakeMark != null and endStakeMark != '' "> |
|
|
|
|
|
and CAST(SUBSTRING(SUBSTRING_INDEX(warning.stake_mark,'+',1),2)AS UNSIGNED)*1000 |
|
|
|
|
|
+CAST(SUBSTRING_INDEX(warning.stake_mark, '+', -1) AS UNSIGNED)<#{endStakeMark} |
|
|
|
|
|
</if> |
|
|
|
|
|
</where> |
|
|
|
|
|
order by warning.warning_time desc |
|
|
|
|
|
</select> |
|
|
|
|
|
<!-- <select id="selectWarningMarkDayOptimize" resultType="java.util.HashMap">--> |
|
|
<!-- <select id="selectWarningMarkDayOptimize" resultType="java.util.HashMap">--> |
|
|
<!-- SELECT DISTINCT m.stake_mark stakeMarkId,--> |
|
|
<!-- SELECT DISTINCT m.stake_mark stakeMarkId,--> |
|
|
<!-- (SELECT count( 0 ) FROM dc_warning w WHERE w.stake_mark = m.stake_mark--> |
|
|
<!-- (SELECT count( 0 ) FROM dc_warning w WHERE w.stake_mark = m.stake_mark--> |
|
|