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 aa171517..cb481f77 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 @@ -69,6 +69,9 @@ public class DcEvent { @ApiModelProperty("处理人员") private Long userId; + @ApiModelProperty("事件子类") + private String eventSubclas; + /** * 开始时间 */ @@ -133,7 +136,7 @@ public class DcEvent { * 3-3 立交封闭和限行 * 3-4 服务区封闭和限行 */ - @Excel(name = "事件类型") + @Excel(name = "事件类型字符串") @ApiModelProperty("事件子类 例:事件子类:* 1-1 追尾* 1-2 侧翻* 1-3 撞护栏* 1-4 自然* 1-5 其他事故* 2-1 车辆故障") private String eventSubclass; 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 970b0110..b9dfae8e 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 @@ -960,8 +960,18 @@ public class DcEventServiceImpl extends ServiceImpl impl @Override public int updateDcEventState(String id, int state) { + //多次修改请求 + DcEvent dcEvent1 = dcEventMapper.selectDcEventById(id); + //事件删除 后 返回成功 + if (dcEvent1 ==null){ + return 1; + } + //事件状态已被修改 返回成功 + if (dcEvent1.getEventState()==state){ + return 1; + } - int i = dcEventMapper.updateDcEventState(id, state); + int i = dcEventMapper.updateDcEventState(id, state); if (i > 0) { DcEvent dcEvent = dcEventMapper.selectDcEventMainById(id); diff --git a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml index 030387c9..fac9ab19 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml @@ -36,6 +36,7 @@ + @@ -166,6 +167,7 @@ longitude, dimension, event_title, + event_subclass as event_subclas, link_id, is_perceived, CASE event_type @@ -406,6 +408,7 @@ dc_event.event_title, dc_event.occurrence_time, dc_event.event_type AS event_type, + dc_event.event_subclass AS event_subclas, CASE dc_event.event_type WHEN '1' THEN '交通事故' WHEN '2' THEN '车辆故障'