SELECT id, dc_event.dept_id as dept_id, sys_dept.dept_name, stake_mark, CASE direction WHEN '1' THEN '菏泽方向' WHEN '3' THEN '济南方向' END AS direction, dc_event.user_id as user_id, sys_user.nick_name as nickName, start_time, end_time, estimated_end_time, event_level, event_type, event_title, is_perceived, CASE event_type WHEN '1' THEN '交通事故' WHEN '2' THEN '车辆故障' WHEN '3' THEN '交通管制' WHEN '4' THEN '交通拥堵' WHEN '5' THEN '非法上路' WHEN '6' THEN '路障清除' WHEN '7' THEN '施工建设' WHEN '8' THEN '服务区异常' WHEN '9' THEN '设施设备隐患' WHEN '10' THEN '异常天气' WHEN '11' THEN '其他事件' 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 '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'其他事件' END AS event_subclass, event_cause, description, dc_event.event_state, CASE dc_event.event_state WHEN '0' THEN '待确认' WHEN '1' THEN '处理中' WHEN '2' THEN '已完成' WHEN '3' THEN '已撤销' END AS stringEventState, event_source, CASE event_source WHEN '1' THEN '96659' WHEN '2' THEN '交警转接' WHEN '3' THEN '道路巡查' WHEN '4' THEN '视频巡查' WHEN '5' THEN '视频AI' WHEN '6' THEN '一键救援' ELSE '其他' END AS stringEventSource, event_nature, dc_event.remark as remark, dc_event.create_time as create_time, dc_event.update_time as update_time, event_source_tips, occurrence_time, in_tunnel, road_id, lang 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 select dc_event.id AS id, dc_event.stake_mark, dc_event.direction, dc_event.is_perceived, dc_event.user_id, dc_event.start_time, dc_event.end_time, dc_event.occurrence_time, dc_event.estimated_end_time, dc_event.event_level, dc_event.event_type AS event_type, dc_event.event_subclass, dc_event.event_cause, dc_event.description, dc_event.event_state, dc_event.event_source, dc_event.event_nature, dc_event.remark, dc_event.create_time, dc_event.update_time, dc_event.event_source_tips, dc_event.in_tunnel, dc_event.road_id, dc_event.event_title, dc_event_type.event_name AS event_name, dc_process_config.node_node AS node_node, dc_process_config.process_node AS process_node, dc_process_config.common_phrases AS common_phrases, dc_dispatch.id AS dc_dispatch_id, dc_dispatch.organization_id, dc_dispatch.dispatch_name, dc_dispatch.dispatch_status, dc_dispatch.remark AS dc_dispatch_remark, dc_dispatch.end_time AS dc_dispatch_end_time, dc_dispatch.start_time AS dc_dispatch_start_time, dc_dispatch.event_id, dc_organization.id AS dc_organization_id, dc_organization.parent_id, dc_organization.organization_type, dc_organization.organization_name, dc_organization.organization_address, dc_organization.stake_mark AS dc_organization_stake_mark, dc_organization.rescue_unit, dc_organization.description AS dc_organization_description, dc_vehicles.vehicle_plate, dc_vehicles.vehicle_type, dc_vehicles.vehicle_status, dc_vehicles.remark AS dc_vehicles_remark, dc_employees.post_id, dc_employees.NAME, dc_employees.contact_number FROM dc_event insert into dc_event 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, road_id, lang, event_title, occurrence_time, is_perceived, #{id}, #{deptId}, #{stakeMark}, #{direction}, #{userId}, #{startTime}, #{endTime}, #{estimatedEndTime}, #{eventLevel}, #{eventType}, #{eventSubclass}, #{eventCause}, #{description}, #{eventState}, #{eventSource}, #{eventNature}, #{remark}, #{createTime}, #{updateTime}, #{eventSourceTips}, #{inTunnel}, #{roadId}, #{lang}, #{eventTitle}, #{occurrenceTime}, #{isPerceived}, insert into dc_event 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, road_id, lang, event_title, occurrence_time, is_perceived, #{dcEvent.id}, #{dcEvent.deptId}, #{dcEvent.stakeMark}, #{dcEvent.direction}, #{dcEvent.userId}, #{dcEvent.startTime}, #{dcEvent.endTime}, #{dcEvent.estimatedEndTime}, #{dcEvent.eventLevel}, #{dcEvent.eventType}, #{dcEvent.eventSubclass}, #{dcEvent.eventCause}, #{dcEvent.description}, #{dcEvent.eventState}, #{dcEvent.eventSource}, #{dcEvent.eventNature}, #{dcEvent.remark}, #{dcEvent.createTime}, #{dcEvent.updateTime}, #{dcEvent.eventSourceTips}, #{dcEvent.inTunnel}, #{dcEvent.roadId}, #{dcEvent.lang}, #{dcEvent.eventTitle}, #{dcEvent.occurrenceTime}, #{dcEvent.isPerceived}, update dc_event dept_id = #{deptId}, stake_mark = #{stakeMark}, direction = #{direction}, user_id = #{userId}, start_time = #{startTime}, end_time = #{endTime}, estimated_end_time = #{estimatedEndTime}, event_level = #{eventLevel}, event_type = #{eventType}, event_subclass = #{eventSubclass}, event_cause = #{eventCause}, description = #{description}, event_state = #{eventState}, event_source = #{eventSource}, event_nature = #{eventNature}, remark = #{remark}, create_time = #{createTime}, update_time = #{updateTime}, event_source_tips = #{eventSourceTips}, in_tunnel = #{inTunnel}, road_id = #{roadId}, road_id = #{lang}, event_title = #{eventTitle}, occurrence_time = #{occurrenceTime}, is_perceived = #{isPerceived}, where id = #{id} delete from dc_event where id = #{id} delete from dc_event where id in #{id} update dc_event event_state = #{state}, where id = #{id} update dc_event set end_time = now(),event_state = '2' where id = #{eventId}