diff --git a/zc-business/src/main/java/com/zc/business/controller/DcDispatchController.java b/zc-business/src/main/java/com/zc/business/controller/DcDispatchController.java index 166c3cb8..6ef7bbd9 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcDispatchController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcDispatchController.java @@ -69,7 +69,7 @@ public class DcDispatchController extends BaseController /** * 获取调度信息记录详细信息 */ - @ApiOperation("获取调度信息记录详细信息") + @ApiOperation("获取调度信息记录详细信息( 暂时不用)") // @PreAuthorize("@ss.hasPermi('system:dispatch:query')") @GetMapping(value = "/{id}") diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEventController.java b/zc-business/src/main/java/com/zc/business/controller/DcEventController.java index 7bbd1f84..db486cba 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcEventController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcEventController.java @@ -95,6 +95,7 @@ public class DcEventController extends BaseController /** * 获取事件以及子类详细信息 */ + @ApiOperation("获取事件以及子类详细信息") //@PreAuthorize("@ss.hasPermi('system:event:query')") @GetMapping( "/eventSubclass/{eventType}/{id}") @@ -147,5 +148,4 @@ public class DcEventController extends BaseController return toAjax(dcEventService.deleteDcEventByIds(eventType,ids)); } - } diff --git a/zc-business/src/main/java/com/zc/business/domain/DcEvent.java b/zc-business/src/main/java/com/zc/business/domain/DcEvent.java index 5742209f..e0d47387 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcEvent.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcEvent.java @@ -42,9 +42,14 @@ public class DcEvent extends BaseEntity { /** * 所在桩号 */ - @ApiModelProperty("所在桩号") + @ApiModelProperty(" 所在桩号 and 条件搜索 开始桩号") private String stakeMark; + @ApiModelProperty("条件搜索 结束桩号") + @TableField(exist = false) + private String endStakeMark; + + /** * 方向: * 1-上 @@ -98,6 +103,9 @@ public class DcEvent extends BaseEntity { @ApiModelProperty("事件主类:1-交通事故 2-车辆故障 3-交通管制 4-交通拥堵 5-非法上路 6-路障清除 7-施工建设 8-服务区异常9-设施设备隐患 10-异常天气11-其他事件") private Long eventType; + @ApiModelProperty("事件主类") + @TableField(exist = false) + private String stringEventType; /** * 事件子类: * 1-1 追尾 @@ -155,6 +163,9 @@ public class DcEvent extends BaseEntity { @ApiModelProperty("事件来源 * 1-96659* 2-交警转接* 3-道路巡查* 4-视频巡查* 5-视频AI* 6-一键救援* 7-其他") private Long eventSource; + @TableField(exist = false) + @ApiModelProperty("事件来源") + private String stringEventSource; /** * 事件性质: * 1-首发事件 diff --git a/zc-business/src/main/java/com/zc/business/domain/DcEventTrafficControl.java b/zc-business/src/main/java/com/zc/business/domain/DcEventTrafficControl.java index 72c6417b..94f8d215 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcEventTrafficControl.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcEventTrafficControl.java @@ -67,8 +67,9 @@ public class DcEventTrafficControl extends BaseEntity @ApiModelProperty("匝道(立交)") @Excel(name = "匝道", readConverterExp = "立=交") private Long rampId; -@ApiModelProperty("高速公路 id") + @ApiModelProperty("高速公路 id") private Long roadId; + @ApiModelProperty("原因类型") private String causeType; diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java index 82c781eb..c78912c5 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java @@ -2,6 +2,7 @@ package com.zc.business.service.impl; import java.util.List; import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.uuid.IdUtils; import com.zc.business.domain.*; import com.zc.business.mapper.*; import com.zc.business.service.IDcEventService; @@ -69,6 +70,13 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper; @Override public List selectDcEventList(DcEvent dcEvent) { + if (dcEvent.getStakeMark()!=null){ + //处理URl地址栏获取参数+号消失 + String replace = dcEvent.getStakeMark().replace(" ", "+"); + dcEvent.setStakeMark(replace); + String replace1 = dcEvent.getEndStakeMark().replace(" ", "+"); + dcEvent.setEndStakeMark(replace1); + } return dcEventMapper.selectDcEventList(dcEvent); } @@ -82,6 +90,10 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper; @Override public int insertDcEvent(DcEvent dcEvent) { + + //设置事件Id UUID无下划线格式32 + String uuid = IdUtils.fastSimpleUUID(); + dcEvent.setId(uuid); dcEvent.setCreateTime(DateUtils.getNowDate()); int i7 = dcEventMapper.insertDcEvent(dcEvent); if (i7>0){ diff --git a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml index 7c1ad4d8..c46b09b0 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml @@ -24,7 +24,8 @@ - + + @@ -51,6 +52,8 @@ + + @@ -75,6 +78,8 @@ + + @@ -106,9 +111,110 @@ - + + + SELECT + id, + dept_id, + stake_mark, + direction, + user_id, + start_time, + end_time, + estimated_end_time, + event_level, + event_type, + 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, + event_state, + 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, + remark, + create_time, + update_time, + event_source_tips, + in_tunnel + FROM + dc_event select dc_event.id AS id, dc_event.stake_mark, dc_event.direction, @@ -118,6 +224,7 @@ 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, @@ -162,11 +269,10 @@ and dept_id = #{deptId} - and stake_mark = #{stakeMark} + and stake_mark BETWEEN #{stakeMark} and #{endStakeMark} and direction = #{direction} and user_id = #{userId} - and start_time = #{startTime} - and end_time = #{endTime} + and start_time BETWEEN #{startTime} and #{endTime} and estimated_end_time = #{estimatedEndTime} and event_level = #{eventLevel} and event_type = #{eventType} @@ -213,11 +319,88 @@ dc_event.estimated_end_time, dc_event.event_level, dc_event.event_type AS event_type, - dc_event.event_subclass, + CASE dc_event.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 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 '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, + + dc_event.event_cause, dc_event.description, dc_event.event_state, - dc_event.event_source, + CASE dc_event.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, dc_event.event_nature, dc_event.remark, dc_event.create_time,