@ -4,84 +4,90 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace= "com.zc.business.mapper.DcEventMapper" >
<resultMap type= "com.zc.business.domain.DcEvent" id= "DcEventResult" >
<result property= "id" column= "id" />
<result property= "deptId" column= "dept_id" />
<result property= "stakeMark" column= "stake_mark" />
<result property= "direction" column= "direction" />
<result property= "userId" column= "user_id" />
<result property= "startTime" column= "start_time" />
<result property= "endTime" column= "end_time" />
<result property= "estimatedEndTime" column= "estimated_end_time" />
<result property= "eventLevel" column= "event_level" />
<result property= "eventType" column= "event_type" />
<result property= "eventSubclass" column= "event_subclass" />
<result property= "eventCause" column= "event_cause" />
<result property= "description" column= "description" />
<result property= "eventState" column= "event_state" />
<result property= "eventSource" column= "event_source" />
<result property= "eventNature" column= "event_nature" />
<result property= "remark" column= "remark" />
<result property= "createTime" column= "create_time" />
<result property= "updateTime" column= "update_time" />
<result property= "eventSourceTips" column= "event_source_tips" />
<result property= "stringEventType" column= "stringEventType" />
<result property= "stringEventSource" column= "stringEventSource" />
<result property= "stringEventState" column= "stringEventState" />
<result property= "nickName" column= "nickName" />
<result property= "roadId" column= "road_id" />
<result property= "lang" column= "lang" />
<result property= "eventTitle" column= "event_title" />
<result property= "occurrenceTime" column= "occurrence_time" />
<result property= "isPerceived" column= "is_perceived" />
<result property= "id" column= "id" />
<result property= "deptId" column= "dept_id" />
<result property= "stakeMark" column= "stake_mark" />
<result property= "direction" column= "direction" />
<result property= "userId" column= "user_id" />
<result property= "startTime" column= "start_time" />
<result property= "endTime" column= "end_time" />
<result property= "estimatedEndTime" column= "estimated_end_time" />
<result property= "eventLevel" column= "event_level" />
<result property= "eventType" column= "event_type" />
<result property= "eventSubclass" column= "event_subclass" />
<result property= "eventCause" column= "event_cause" />
<result property= "description" column= "description" />
<result property= "eventState" column= "event_state" />
<result property= "eventSource" column= "event_source" />
<result property= "eventNature" column= "event_nature" />
<result property= "remark" column= "remark" />
<result property= "createTime" column= "create_time" />
<result property= "updateTime" column= "update_time" />
<result property= "eventSourceTips" column= "event_source_tips" />
<result property= "stringEventType" column= "stringEventType" />
<result property= "stringEventSource" column= "stringEventSource" />
<result property= "stringEventState" column= "stringEventState" />
<result property= "nickName" column= "nickName" />
<result property= "roadId" column= "road_id" />
<result property= "lang" column= "lang" />
<result property= "eventTitle" column= "event_title" />
<result property= "occurrenceTime" column= "occurrence_time" />
<result property= "isPerceived" column= "is_perceived" />
<result property= "dimension" column= "dimension" />
<result property= "longitude" column= "longitude" />
<result property= "linkId" column= "link_id" />
</resultMap>
<resultMap type= "map" id= "countMap" >
<result property= "status" column= "status" />
<result property= "count" column= "count" />
<result property= "status" column= "status" />
<result property= "count" column= "count" />
</resultMap>
<resultMap type= "com.zc.business.domain.DcEvent" id= "DcEventResultById" >
<result property= "id" column= "id" />
<result property= "deptId" column= "dept_id" />
<result property= "stakeMark" column= "stake_mark" />
<result property= "direction" column= "direction" />
<result property= "userId" column= "user_id" />
<result property= "startTime" column= "start_time" />
<result property= "endTime" column= "end_time" />
<result property= "estimatedEndTime" column= "estimated_end_time" />
<result property= "eventLevel" column= "event_level" />
<result property= "eventType" column= "event_type" />
<result property= "eventSubclass" column= "event_subclass" />
<result property= "eventCause" column= "event_cause" />
<result property= "description" column= "description" />
<result property= "eventState" column= "event_state" />
<result property= "eventSource" column= "event_source" />
<result property= "eventNature" column= "event_nature" />
<result property= "remark" column= "remark" />
<result property= "createTime" column= "create_time" />
<result property= "updateTime" column= "update_time" />
<result property= "eventSourceTips" column= "event_source_tips" />
<result property= "inTunnel" column= "in_tunnel" />
<result property= "eventName" column= "event_name" />
<result property= "nodeNode" column= "node_node" />
<result property= "roadId" column= "road_id" />
<result property= "occurrenceTime" column= "occurrence_time" />
<result property= "eventTitle" column= "event_title" />
<result property= "commonPhrases" column= "common_phrases" />
<result property= "stringEventType" column= "stringEventType" />
<result property= "stringEventSource" column= "stringEventSource" />
<result property= "stringEventState" column= "stringEventState" />
<result property= "nickName" column= "nickName" />
<result property= "lang" column= "lang" />
<result property= "roadName" column= "road_name" />
<result property= "organizationName" column= "organization_name" />
<result property= "isPerceived" column= "is_perceived" />
<result property= "subclass" column= "subclass" />
<result property= "id" column= "id" />
<result property= "deptId" column= "dept_id" />
<result property= "stakeMark" column= "stake_mark" />
<result property= "direction" column= "direction" />
<result property= "userId" column= "user_id" />
<result property= "startTime" column= "start_time" />
<result property= "endTime" column= "end_time" />
<result property= "estimatedEndTime" column= "estimated_end_time" />
<result property= "eventLevel" column= "event_level" />
<result property= "eventType" column= "event_type" />
<result property= "eventSubclass" column= "event_subclass" />
<result property= "eventCause" column= "event_cause" />
<result property= "description" column= "description" />
<result property= "eventState" column= "event_state" />
<result property= "eventSource" column= "event_source" />
<result property= "eventNature" column= "event_nature" />
<result property= "remark" column= "remark" />
<result property= "createTime" column= "create_time" />
<result property= "updateTime" column= "update_time" />
<result property= "eventSourceTips" column= "event_source_tips" />
<result property= "inTunnel" column= "in_tunnel" />
<result property= "eventName" column= "event_name" />
<result property= "nodeNode" column= "node_node" />
<result property= "roadId" column= "road_id" />
<result property= "occurrenceTime" column= "occurrence_time" />
<result property= "eventTitle" column= "event_title" />
<result property= "commonPhrases" column= "common_phrases" />
<result property= "stringEventType" column= "stringEventType" />
<result property= "stringEventSource" column= "stringEventSource" />
<result property= "stringEventState" column= "stringEventState" />
<result property= "nickName" column= "nickName" />
<result property= "lang" column= "lang" />
<result property= "roadName" column= "road_name" />
<result property= "organizationName" column= "organization_name" />
<result property= "isPerceived" column= "is_perceived" />
<result property= "subclass" column= "subclass" />
<result property= "dimension" column= "dimension" />
<result property= "longitude" column= "longitude" />
<result property= "linkId" column= "link_id" />
</resultMap>
<!--
<!--
<resultMap type= "com.zc.business.domain.DcEvent" id= "DcEventResultListAll" >
<result property= "id" column= "id" />
<result property= "deptId" column= "dept_id" />
@ -136,14 +142,13 @@
<result property= "dcEventMap.contactNumber" column= "contact_number" />
</resultMap>
-->
-->
<!-- <sql id="selectDcEventVo">
<!-- <sql id="selectDcEventVo">
select id, dept_id, stake_mark, direction, user_id, start_time, end_time, estimated_end_time, event_level, event_type, event_subclass, event_cause, description, event_state, event_source, event_nature, remark, create_time, update_time, event_source_tips, in_tunnel from dc_event
</sql> -->
<sql id= "selectDcEventVo" >
SELECT
id,
SELECT id,
dc_event.dept_id as dept_id,
sys_dept.dept_name,
stake_mark,
@ -158,7 +163,10 @@
estimated_end_time,
event_level,
event_type,
longitude,
dimension,
event_title,
link_id,
is_perceived,
CASE event_type
WHEN '1' THEN '交通事故'
@ -175,58 +183,58 @@
ELSE '其他'
END AS stringEventType,
CASE event_subclass
WHEN '1-1'THEN '追尾'
WHEN '1-2'THEN '侧翻'
WHEN '1-3'THEN '撞护栏'
WHEN '1-4'THEN '自然'
WHEN '1-5'THEN '其他事故'
WHEN '2-1'THEN '车辆故障'
WHEN '3-1'THEN '主线封闭和限行'
WHEN '3-2'THEN '收费站封闭和限行'
WHEN '3-3'THEN '立交封闭和限行'
WHEN '3-4'THEN '服务区封闭和限行'
WHEN '4-1'THEN '道路拥堵'
WHEN '4-2'THEN '立交拥堵'
WHEN '4-3'THEN '收费站拥堵'
WHEN '4-4'THEN '服务区拥堵'
WHEN '5-1'THEN '行人'
WHEN '5-2'THEN '非机动车'
WHEN '5-3'THEN '摩托车'
WHEN '5-4'THEN '其他'
WHEN '6-1'THEN '烟雾'
WHEN '6-2'THEN '倒伏树木'
WHEN '6-3'THEN '撒落物'
WHEN '6-4'THEN '动物'
WHEN '6-5'THEN '其他'
WHEN '7-1'THEN '道路养护施工'
WHEN '7-2'THEN '收费站养护施工'
WHEN '7-3'THEN '服务区养护施工'
WHEN '7-4'THEN '枢纽立交匝道养护施工'
WHEN '7-5'THEN '地方道路养护施工'
WHEN '7-6'THEN '道路工程建设施工'
WHEN '7-7'THEN '收费站工程建设施工'
WHEN '7-8'THEN '服务区工程建设施工'
WHEN '1-1' THEN '追尾'
WHEN '1-2' THEN '侧翻'
WHEN '1-3' THEN '撞护栏'
WHEN '1-4' THEN '自然'
WHEN '1-5' THEN '其他事故'
WHEN '2-1' THEN '车辆故障'
WHEN '3-1' THEN '主线封闭和限行'
WHEN '3-2' THEN '收费站封闭和限行'
WHEN '3-3' THEN '立交封闭和限行'
WHEN '3-4' THEN '服务区封闭和限行'
WHEN '4-1' THEN '道路拥堵'
WHEN '4-2' THEN '立交拥堵'
WHEN '4-3' THEN '收费站拥堵'
WHEN '4-4' THEN '服务区拥堵'
WHEN '5-1' THEN '行人'
WHEN '5-2' THEN '非机动车'
WHEN '5-3' THEN '摩托车'
WHEN '5-4' THEN '其他'
WHEN '6-1' THEN '烟雾'
WHEN '6-2' THEN '倒伏树木'
WHEN '6-3' THEN '撒落物'
WHEN '6-4' THEN '动物'
WHEN '6-5' THEN '其他'
WHEN '7-1' THEN '道路养护施工'
WHEN '7-2' THEN '收费站养护施工'
WHEN '7-3' THEN '服务区养护施工'
WHEN '7-4' THEN '枢纽立交匝道养护施工'
WHEN '7-5' THEN '地方道路养护施工'
WHEN '7-6' THEN '道路工程建设施工'
WHEN '7-7' THEN '收费站工程建设施工'
WHEN '7-8' THEN '服务区工程建设施工'
WHEN '7-9' THEN '枢纽立交匝道工程建设施工'
WHEN '7-10' THEN'地方道路工程建设施工'
WHEN '8-1'THEN'封闭、暂停营业'
WHEN '8-2'THEN'重要设施停用'
WHEN '8-3'THEN'服务区其他异常'
WHEN '9-1'THEN'摄像机'
WHEN '9-2'THEN'护栏'
WHEN '9-3'THEN'隔离栅'
WHEN '9-4'THEN'情报板'
WHEN '9-5'THEN'防炫板'
WHEN '9-6'THEN'其他'
WHEN '10-1' THEN'雨'
WHEN '10-2' THEN'雪'
WHEN '10-3' THEN'雾'
WHEN '10-4' THEN'大风'
WHEN '10-5' THEN'低温寒潮'
WHEN '10-6' THEN'路面积雪'
WHEN '10-7' THEN'路面结冰'
WHEN '10-8' THEN'路面积水'
WHEN '10-9' THEN'其他'
WHEN '11-1' THEN'其他事件'
WHEN '7-10' THEN '地方道路工程建设施工'
WHEN '8-1' THEN '封闭、暂停营业'
WHEN '8-2' THEN '重要设施停用'
WHEN '8-3' THEN '服务区其他异常'
WHEN '9-1' THEN '摄像机'
WHEN '9-2' THEN '护栏'
WHEN '9-3' THEN '隔离栅'
WHEN '9-4' THEN '情报板'
WHEN '9-5' THEN '防炫板'
WHEN '9-6' THEN '其他'
WHEN '10-1' THEN '雨'
WHEN '10-2' THEN '雪'
WHEN '10-3' THEN '雾'
WHEN '10-4' THEN '大风'
WHEN '10-5' THEN '低温寒潮'
WHEN '10-6' THEN '路面积雪'
WHEN '10-7' THEN '路面结冰'
WHEN '10-8' THEN '路面积水'
WHEN '10-9' THEN '其他'
WHEN '11-1' THEN '其他事件'
END AS event_subclass,
event_cause,
description,
@ -256,14 +264,16 @@
in_tunnel,
road_id,
lang
FROM
dc_event
FROM dc_event
LEFT JOIN sys_user on dc_event.user_id = sys_user.user_id
LEFT JOIN sys_dept on dc_event.dept_id = sys_dept.dept_id
</sql>
<sql id= "selectDcEventVoListAll" > select dc_event.id AS id,
dc_event.stake_mark,
dc_event.link_id,
dc_event.dimension,
dc_event.longitude,
dc_event.direction,
dc_event.is_perceived,
dc_event.user_id,
@ -314,34 +324,37 @@
dc_vehicles.remark AS dc_vehicles_remark,
dc_employees.post_id,
dc_employees.NAME,
dc_employees.contact_number FROM dc_event </sql>
dc_employees.contact_number
FROM dc_event </sql>
<select id= "selectDcEventList" parameterType= "DcEvent" resultMap= "DcEventResult" >
<include refid= "selectDcEventVo" />
<where >
<if test= "deptId != null " > and dept_id = #{deptId}</if>
<if test= "stakeMark != null and stakeMark != ''" > and stake_mark BETWEEN #{stakeMark} and #{endStakeMark}</if>
<if test= "direction != null and direction != ''" > and direction = #{direction}</if>
<if test= "userId != null " > and user_id = #{userId}</if>
<if test= "startTime != null " > and start_time BETWEEN #{startTime} and #{endTime}</if>
<if test= "estimatedEndTime != null " > and estimated_end_time = #{estimatedEndTime}</if>
<if test= "eventLevel != null " > and event_level = #{eventLevel}</if>
<if test= "eventType != null " > and event_type = #{eventType}</if>
<if test= "eventSubclass != null and eventSubclass != ''" > and event_subclass = #{eventSubclass}</if>
<if test= "eventCause != null and eventCause != ''" > and event_cause = #{eventCause}</if>
<if test= "description != null and description != ''" > and description = #{description}</if>
<if test= "eventState != null " > and event_state = #{eventState}</if>
<if test= "eventSource != null " > and event_source = #{eventSource}</if>
<if test= "eventNature != null " > and event_nature = #{eventNature}</if>
<if test= "eventSourceTips != null and eventSourceTips != ''" > and event_source_tips = #{eventSourceTips}</if>
<if test= "inTunnel != null " > and in_tunnel = #{inTunnel}</if>
<if test= "isPerceived != null " > and is_perceived = #{isPerceived}</if>
<if test= "deptId != null " > and dept_id = #{deptId}</if>
<if test= "stakeMark != null and stakeMark != ''" > and stake_mark BETWEEN #{stakeMark} and #{endStakeMark}
</if>
<if test= "direction != null and direction != ''" > and direction = #{direction}</if>
<if test= "userId != null " > and user_id = #{userId}</if>
<if test= "startTime != null " > and start_time BETWEEN #{startTime} and #{endTime}</if>
<if test= "estimatedEndTime != null " > and estimated_end_time = #{estimatedEndTime}</if>
<if test= "eventLevel != null " > and event_level = #{eventLevel}</if>
<if test= "eventType != null " > and event_type = #{eventType}</if>
<if test= "eventSubclass != null and eventSubclass != ''" > and event_subclass = #{eventSubclass}</if>
<if test= "eventCause != null and eventCause != ''" > and event_cause = #{eventCause}</if>
<if test= "description != null and description != ''" > and description = #{description}</if>
<if test= "eventState != null " > and event_state = #{eventState}</if>
<if test= "eventSource != null " > and event_source = #{eventSource}</if>
<if test= "eventNature != null " > and event_nature = #{eventNature}</if>
<if test= "eventSourceTips != null and eventSourceTips != ''" > and event_source_tips = #{eventSourceTips}
</if>
<if test= "inTunnel != null " > and in_tunnel = #{inTunnel}</if>
<if test= "isPerceived != null " > and is_perceived = #{isPerceived}</if>
</where>
ORDER BY create_time desc
</select>
<!-- 关联调度信息记录表 查询详情 -->
<!--
<!-- 关联调度信息记录表 查询详情 -->
<!--
<select id= "selectDcEventById" parameterType= "String" resultMap= "DcEventResultListAll" >
<include refid= "selectDcEventVoListAll" />
LEFT JOIN dc_event_type ON dc_event.event_type = dc_event_type.event_type LEFT JOIN dc_process_config ON dc_event_type.event_type = dc_process_config.event_type
@ -357,18 +370,21 @@
LEFT JOIN dc_employees ON dc_dispatch_resource.resource_id = dc_employees.id
where dc_event.id = #{id}
</select>
-->
-->
<!-- 事件详情 包含事件类型 节点 -->
<!-- 事件详情 包含事件类型 节点 -->
<select id= "selectDcEventById" parameterType= "String" resultMap= "DcEventResultById" >
/*详情可以调用事件处理流程*/
SELECT dc_event.id AS id,
dc_event.stake_mark,
dc_event.link_id,
CASE dc_event.direction
WHEN '1' THEN '菏泽方向'
WHEN '3' THEN '济南方向'
END AS direction,
dc_event.user_id,
dc_event.dimension,
dc_event.longitude,
dc_event.is_perceived,
dc_event.user_id as user_id,
sys_user.nick_name as nickName,
@ -394,58 +410,58 @@
ELSE '其他'
END AS stringEventType,
CASE dc_event.event_subclass
WHEN '1-1'THEN '追尾'
WHEN '1-2'THEN '侧翻'
WHEN '1-3'THEN '撞护栏'
WHEN '1-4'THEN '自然'
WHEN '1-5'THEN '其他事故'
WHEN '2-1'THEN '车辆故障'
WHEN '3-1'THEN '主线封闭和限行'
WHEN '3-2'THEN '收费站封闭和限行'
WHEN '3-3'THEN '立交封闭和限行'
WHEN '3-4'THEN '服务区封闭和限行'
WHEN '4-1'THEN '道路拥堵'
WHEN '4-2'THEN '立交拥堵'
WHEN '4-3'THEN '收费站拥堵'
WHEN '4-4'THEN '服务区拥堵'
WHEN '5-1'THEN '行人'
WHEN '5-2'THEN '非机动车'
WHEN '5-3'THEN '摩托车'
WHEN '5-4'THEN '其他'
WHEN '6-1'THEN '烟雾'
WHEN '6-2'THEN '倒伏树木'
WHEN '6-3'THEN '撒落物'
WHEN '6-4'THEN '动物'
WHEN '6-5'THEN '其他'
WHEN '7-1'THEN '道路养护施工'
WHEN '7-2'THEN '收费站养护施工'
WHEN '7-3'THEN '服务区养护施工'
WHEN '7-4'THEN '枢纽立交匝道养护施工'
WHEN '7-5'THEN '地方道路养护施工'
WHEN '7-6'THEN '道路工程建设施工'
WHEN '7-7'THEN '收费站工程建设施工'
WHEN '7-8'THEN '服务区工程建设施工'
WHEN '1-1' THEN '追尾'
WHEN '1-2' THEN '侧翻'
WHEN '1-3' THEN '撞护栏'
WHEN '1-4' THEN '自然'
WHEN '1-5' THEN '其他事故'
WHEN '2-1' THEN '车辆故障'
WHEN '3-1' THEN '主线封闭和限行'
WHEN '3-2' THEN '收费站封闭和限行'
WHEN '3-3' THEN '立交封闭和限行'
WHEN '3-4' THEN '服务区封闭和限行'
WHEN '4-1' THEN '道路拥堵'
WHEN '4-2' THEN '立交拥堵'
WHEN '4-3' THEN '收费站拥堵'
WHEN '4-4' THEN '服务区拥堵'
WHEN '5-1' THEN '行人'
WHEN '5-2' THEN '非机动车'
WHEN '5-3' THEN '摩托车'
WHEN '5-4' THEN '其他'
WHEN '6-1' THEN '烟雾'
WHEN '6-2' THEN '倒伏树木'
WHEN '6-3' THEN '撒落物'
WHEN '6-4' THEN '动物'
WHEN '6-5' THEN '其他'
WHEN '7-1' THEN '道路养护施工'
WHEN '7-2' THEN '收费站养护施工'
WHEN '7-3' THEN '服务区养护施工'
WHEN '7-4' THEN '枢纽立交匝道养护施工'
WHEN '7-5' THEN '地方道路养护施工'
WHEN '7-6' THEN '道路工程建设施工'
WHEN '7-7' THEN '收费站工程建设施工'
WHEN '7-8' THEN '服务区工程建设施工'
WHEN '7-9' THEN '枢纽立交匝道工程建设施工'
WHEN '7-10' THEN'地方道路工程建设施工'
WHEN '8-1'THEN'封闭、暂停营业'
WHEN '8-2'THEN'重要设施停用'
WHEN '8-3'THEN'服务区其他异常'
WHEN '9-1'THEN'摄像机'
WHEN '9-2'THEN'护栏'
WHEN '9-3'THEN'隔离栅'
WHEN '9-4'THEN'情报板'
WHEN '9-5'THEN'防炫板'
WHEN '9-6'THEN'其他'
WHEN '10-1' THEN'雨'
WHEN '10-2' THEN'雪'
WHEN '10-3' THEN'雾'
WHEN '10-4' THEN'大风'
WHEN '10-5' THEN'低温寒潮'
WHEN '10-6' THEN'路面积雪'
WHEN '10-7' THEN'路面结冰'
WHEN '10-8' THEN'路面积水'
WHEN '10-9' THEN'其他'
WHEN '11-1' THEN'其他事件'
WHEN '7-10' THEN '地方道路工程建设施工'
WHEN '8-1' THEN '封闭、暂停营业'
WHEN '8-2' THEN '重要设施停用'
WHEN '8-3' THEN '服务区其他异常'
WHEN '9-1' THEN '摄像机'
WHEN '9-2' THEN '护栏'
WHEN '9-3' THEN '隔离栅'
WHEN '9-4' THEN '情报板'
WHEN '9-5' THEN '防炫板'
WHEN '9-6' THEN '其他'
WHEN '10-1' THEN '雨'
WHEN '10-2' THEN '雪'
WHEN '10-3' THEN '雾'
WHEN '10-4' THEN '大风'
WHEN '10-5' THEN '低温寒潮'
WHEN '10-6' THEN '路面积雪'
WHEN '10-7' THEN '路面结冰'
WHEN '10-8' THEN '路面积水'
WHEN '10-9' THEN '其他'
WHEN '11-1' THEN '其他事件'
END AS event_subclass,
dc_event.event_subclass AS subclass,
dc_event.event_cause,
@ -515,6 +531,9 @@
<if test= "eventTitle != null" > event_title,</if>
<if test= "occurrenceTime != null" > occurrence_time,</if>
<if test= "isPerceived != null" > is_perceived,</if>
<if test= "dimension != null" > dimension,</if>
<if test= "longitude != null" > longitude,</if>
<if test= "linkId != null" > link_id,</if>
</trim>
<trim prefix= "values (" suffix= ")" suffixOverrides= "," >
<if test= "id != null" > #{id},</if>
@ -543,10 +562,13 @@
<if test= "eventTitle != null" > #{eventTitle},</if>
<if test= "occurrenceTime != null" > #{occurrenceTime},</if>
<if test= "isPerceived != null" > #{isPerceived},</if>
<if test= "dimension != null" > #{dimension},</if>
<if test= "longitude != null" > #{longitude},</if>
<if test= "linkId != null" > #{linkId},</if>
</trim>
</insert>
<insert id= "batchInsertDcEvent" useGeneratedKeys= "true" keyProperty= "id" >
<foreach collection = "list" item= "dcEvent" index= "index" separator = ";" >
<foreach collection= "list" item= "dcEvent" index= "index" separator= ";" >
insert into dc_event
<trim prefix= "(" suffix= ")" suffixOverrides= "," >
<if test= "dcEvent.id != null" > id,</if>
@ -575,6 +597,8 @@
<if test= "dcEvent.eventTitle != null" > event_title,</if>
<if test= "dcEvent.occurrenceTime != null" > occurrence_time,</if>
<if test= "dcEvent.isPerceived != null" > is_perceived,</if>
<if test= "dcEvent.dimension != null" > dimension,</if>
<if test= "dcEvent.longitude != null" > longitude,</if>
</trim>
<trim prefix= "values (" suffix= ")" suffixOverrides= "," >
<if test= "dcEvent.id != null" > #{dcEvent.id},</if>
@ -603,6 +627,8 @@
<if test= "dcEvent.eventTitle != null" > #{dcEvent.eventTitle},</if>
<if test= "dcEvent.occurrenceTime != null" > #{dcEvent.occurrenceTime},</if>
<if test= "dcEvent.isPerceived != null" > #{dcEvent.isPerceived},</if>
<if test= "dcEvent.dimension != null" > #{dcEvent.dimension},</if>
<if test= "dcEvent.longitude != null" > #{dcEvent.longitude},</if>
</trim>
</foreach>
</insert>
@ -635,13 +661,52 @@
<if test= "eventTitle != null" > event_title = #{eventTitle},</if>
<if test= "occurrenceTime != null" > occurrence_time = #{occurrenceTime},</if>
<if test= "isPerceived != null" > is_perceived = #{isPerceived},</if>
<if test= "dimension != null" > dimension = #{dimension},</if>
<if test= "longitude != null" > longitude = #{longitude},</if>
<if test= "linkId != null" > link_id = #{linkId},</if>
</trim>
where id = #{id}
</update>
<update id= "updateDcEventLinkId" parameterType= "DcEvent" >
update dc_event
<trim prefix= "SET" suffixOverrides= "," >
<if test= "deptId != null" > dept_id = #{deptId},</if>
<if test= "stakeMark != null and stakeMark != ''" > stake_mark = #{stakeMark},</if>
<if test= "direction != null and direction != ''" > direction = #{direction},</if>
<if test= "userId != null" > user_id = #{userId},</if>
<if test= "startTime != null" > start_time = #{startTime},</if>
<if test= "endTime != null" > end_time = #{endTime},</if>
<if test= "estimatedEndTime != null" > estimated_end_time = #{estimatedEndTime},</if>
<if test= "eventLevel != null" > event_level = #{eventLevel},</if>
<if test= "eventType != null" > event_type = #{eventType},</if>
<if test= "eventSubclass != null" > event_subclass = #{eventSubclass},</if>
<if test= "eventCause != null" > event_cause = #{eventCause},</if>
<if test= "description != null" > description = #{description},</if>
<if test= "eventState != null" > event_state = #{eventState},</if>
<if test= "eventSource != null" > event_source = #{eventSource},</if>
<if test= "remark != null" > remark = #{remark},</if>
<if test= "createTime != null" > create_time = #{createTime},</if>
<if test= "updateTime != null" > update_time = #{updateTime},</if>
<if test= "eventSourceTips != null" > event_source_tips = #{eventSourceTips},</if>
<if test= "inTunnel != null" > in_tunnel = #{inTunnel},</if>
<if test= "roadId != null" > road_id = #{roadId},</if>
<if test= "lang != null" > road_id = #{lang},</if>
<if test= "eventTitle != null" > event_title = #{eventTitle},</if>
<if test= "occurrenceTime != null" > occurrence_time = #{occurrenceTime},</if>
<if test= "isPerceived != null" > is_perceived = #{isPerceived},</if>
<if test= "dimension != null" > dimension = #{dimension},</if>
<if test= "eventNature != null" > event_nature = #{eventNature},</if>
<if test= "linkId != null" > link_id = #{linkId},</if>
</trim>
where id = #{id}
</update>
<delete id= "deleteDcEventById" parameterType= "String" >
delete from dc_event where id = #{id}
delete
from dc_event
where id = #{id}
</delete>
<delete id= "deleteDcEventByIds" parameterType= "String" >
@ -651,22 +716,21 @@
</foreach>
</delete>
<!--
<!--
调度记录-事件列表 按时间展示交通事件。默认当天时间 。可查询条件 交通事件状态 ,时间范围
-->
-->
<select id= "selectDispatchEventList" resultMap= "DcEventResult" parameterType= "DcEvent" >
<select id= "selectDispatchEventList" resultMap= "DcEventResult" parameterType= "DcEvent" >
<include refid= "selectDcEventVo" />
<where >
<if test= "startTime == null and eventState == null" > DATE(dc_event.start_time) = CURDATE()</if>
<if test= "eventState != null " > and event_state = #{eventState}</if>
<if test= "startTime != null " > and start_time BETWEEN #{startTime} and #{endTime} </if>
<if test= "eventState != null " > and event_state = #{eventState}</if>
<if test= "startTime != null " > and start_time BETWEEN #{startTime} and #{endTime}</if>
</where>
</select>
</select>
<select id= "selectCount" resultMap= "countMap" resultType= "map" >
SELECT
s.status,
SELECT s.status,
COALESCE(t.count, 0) AS count
FROM (
SELECT 0 AS event_state, 'state0Count' AS status UNION ALL
@ -675,10 +739,11 @@
SELECT 3 AS event_state, 'state3Count' AS status
) s
LEFT JOIN (
SELECT event_state, COUNT(*) AS count
SELECT event_state, COUNT (*) AS count
FROM dc_event
GROUP BY event_state
) t ON s.event_state = t.event_state;
) t
ON s.event_state = t.event_state;
</select>
<select id= "getProcessNode" resultType= "java.util.Map" >