From be28bceea837e20072ba897f44bd93eccbbfde25 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Mon, 13 May 2024 13:51:40 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=84=9F=E7=9F=A5=E8=AF=AF=E6=8A=A5?= =?UTF-8?q?=EF=BC=8C=E4=BA=BA=E5=91=98=E5=85=A8=E9=83=A8=E8=B0=83=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DcWarningController.java | 9 +++++++ .../com/zc/business/domain/DcWarning.java | 25 +++++++++++++++++++ .../zc/business/mapper/DcWarningMapper.java | 3 ++- .../business/service/IDcWarningService.java | 2 ++ .../service/impl/DcWarningServiceImpl.java | 6 +++++ .../business/DcPublishingChannelsMapper.xml | 2 +- .../mapper/business/DcWarningMapper.xml | 14 ++++++++++- 7 files changed, 58 insertions(+), 3 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java b/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java index 1cb74c8c..74cc2479 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcWarningController.java @@ -174,4 +174,13 @@ public class DcWarningController extends BaseController } return toAjax(dcWarningService.insertDispatchSource(map)); } + //感知事件误报 + @PostMapping("/falseAlarm") + public AjaxResult falseAlarmResolution(@RequestBody DcWarning dcWarning){ + if (dcWarning==null||dcWarning.getRelieveType()==null||StringUtils.isBlank(dcWarning.getId())){ + return AjaxResult.error("参数错误"); + } + return toAjax(dcWarningService.falseAlarmResolution(dcWarning)); + } + } diff --git a/zc-business/src/main/java/com/zc/business/domain/DcWarning.java b/zc-business/src/main/java/com/zc/business/domain/DcWarning.java index 311ca679..ad73d6c4 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcWarning.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcWarning.java @@ -59,6 +59,14 @@ public class DcWarning extends BaseEntity @Excel(name = "事件子类", readConverterExp ="1-1-拥堵,1-2=缓行,2-1=普通行人,2-2=工作人员,3-1=摩托车,3-2=自行车,3-3=三轮车,4-1=非工程车,4-2=工程车,4-3=主路有车,4-4=匝道有车,4-5=车辆故障(弃用),4-6=交通事故(弃用),4-7=应急车道被占用,4-8=车离开应急车道,4-9=其他,4-10=未知车辆,5-1=倒车/逆行,5-2=压线,5-3=掉头,5-4=超速,5-5=低速,5-6=违规变道,5-7=未保持安全距离,6-1=烟火,6-2=火灾,6-3=障碍物,6-4=抛洒物,7-1=道路施工,8-1=雨,8-2=冰雹,8-3=风,8-4=雾,8-5=高温,8-6=积水,8-7=路面湿滑,8-8=路面结冰,8-9=道路能见度低,8-10=道路团雾,9-1=只碰撞不倾斜,9-2=只倾斜无碰撞,9-3=碰撞后倾斜,10-1=未知,10-2单车事故,10-3=多车事故,11-1=车辆抛锚,11-2=车辆炸胎(有备胎),11-2=车辆炸胎(无备胎),99-1=其它") private String warningSubclass; + /** 事件解除原因 */ + @Excel(name = "事件解除原因") + private String relieveReason; + /** 事件解除类型: 1-误报解除2-事件已结束3-无需处理事件4-其它 */ + @Excel(name = "信息来源", readConverterExp = "1=误报解除2,2=事件已结束3,3=无需处理事件,4=其它") + private Integer relieveType; + + /** 事件标题 */ @Excel(name = "事件标题") private String warningTitle; @@ -113,6 +121,23 @@ public class DcWarning extends BaseEntity private String endDate; //收费站 private String facilityName; + + public String getRelieveReason() { + return relieveReason; + } + + public void setRelieveReason(String relieveReason) { + this.relieveReason = relieveReason; + } + + public Integer getRelieveType() { + return relieveType; + } + + public void setRelieveType(Integer relieveType) { + this.relieveType = relieveType; + } + public String getStartStakeMark() { return startStakeMark; } diff --git a/zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java b/zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java index 2e6e4af2..7f07269b 100644 --- a/zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java +++ b/zc-business/src/main/java/com/zc/business/mapper/DcWarningMapper.java @@ -130,5 +130,6 @@ public interface DcWarningMapper public Integer deleteDispatchResource(@Param("dispatchId")Long dispatchId); DcDispatch selectDcDispatchById(@Param("id") Long id); - + //误报解除 + public Integer falseAlarmResolution(DcWarning dcWarning); } diff --git a/zc-business/src/main/java/com/zc/business/service/IDcWarningService.java b/zc-business/src/main/java/com/zc/business/service/IDcWarningService.java index 93af5845..2200db6f 100644 --- a/zc-business/src/main/java/com/zc/business/service/IDcWarningService.java +++ b/zc-business/src/main/java/com/zc/business/service/IDcWarningService.java @@ -92,4 +92,6 @@ public interface IDcWarningService public Integer insertDispatch(DcDispatch dcDispatch); //新增指挥调度资源记录 public Integer insertDispatchSource(HashMap map); + //误报解除 + public Integer falseAlarmResolution(DcWarning dcWarning); } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java index 6f08a2bb..186aa613 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcWarningServiceImpl.java @@ -760,5 +760,11 @@ public class DcWarningServiceImpl implements IDcWarningService dcEventProcessService.insertDcEventProcess(dcEventProcess); return 1; } + //误报解除 + @Override + public Integer falseAlarmResolution(DcWarning dcWarning) { + dcWarning.setUpdateTime(DateUtils.getNowDate()); + return dcWarningMapper.falseAlarmResolution(dcWarning); + } } diff --git a/zc-business/src/main/resources/mapper/business/DcPublishingChannelsMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishingChannelsMapper.xml index bf18ac45..25b43302 100644 --- a/zc-business/src/main/resources/mapper/business/DcPublishingChannelsMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcPublishingChannelsMapper.xml @@ -103,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select id from dc_publishing_channels where data_category=#{dataCategory} select facility.facility_name,event.event_state,manage.publish_time, manage.create_time, @@ -65,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" manage.event_id is not null and event.event_state = #{eventState} and event.event_type = #{eventType} - and manage.publish_status = #{publishStatus} + and manage.publish_status = #{publishStatus} and manage.create_time between #{startTime} and #{endTime} @@ -81,7 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" GROUP BY manage.event_id ORDER BY event.create_time desc - + - \ No newline at end of file + + From 1cf1113efbfb14073d6ae72f94498a5be0398f95 Mon Sep 17 00:00:00 2001 From: wangsixiang <2970484253@qq.com> Date: Wed, 15 May 2024 14:58:42 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=8F=91=E5=B8=83=E6=B8=A0=E9=81=93=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/business/DcPublishManageMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml index acc5ff98..9ec470fe 100644 --- a/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcPublishManageMapper.xml @@ -319,7 +319,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" SELECT publish_channels ,dc_event.event_type eventType, COUNT(*)AS number FROM dc_publish_manage LEFT JOIN dc_event on dc_publish_manage.event_id=dc_event.id - GROUP BY HOUR(publish_time), publish_channels + GROUP BY dc_event.event_type ) AS m ON h.eventType = m.eventType AND pc.publish_channels = m.publish_channels ORDER BY h.eventType, pc.publish_channels;