From e220381919fbfa3fe8cf392b74a0fc475de5a36c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Sat, 11 May 2024 18:30:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=8B=E4=BB=B6=20?= =?UTF-8?q?=E5=90=8C=E4=B8=80=E4=BA=8B=E4=BB=B6=E7=8A=B6=E6=80=81=E5=B7=B2?= =?UTF-8?q?=E8=A2=AB=E4=BF=AE=E6=94=B9=20=E8=BF=94=E5=9B=9E=E6=88=90?= =?UTF-8?q?=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/zc/business/domain/DcEvent.java | 5 ++++- .../zc/business/service/impl/DcEventServiceImpl.java | 12 +++++++++++- .../main/resources/mapper/business/DcEventMapper.xml | 3 +++ 3 files changed, 18 insertions(+), 2 deletions(-) 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 '车辆故障'