From b005bab1b90591630554b376bc3de0e3341bd16e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Wed, 24 Jan 2024 13:08:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=94=B5=E8=AF=9D=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E6=94=B9=E4=B8=BAstring=20=E4=BA=8B=E4=BB=B6=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E8=A1=A8=E5=A2=9E=E5=8A=A0=E9=AB=98=E9=80=9F=E5=85=AC=E8=B7=AF?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/zc/business/domain/DcEvent.java | 3 +++ .../java/com/zc/business/domain/DcEventAccident.java | 10 +++++----- .../com/zc/business/domain/DcEventTrafficControl.java | 2 ++ .../mapper/business/DcEventAccidentMapper.xml | 7 +------ .../main/resources/mapper/business/DcEventMapper.xml | 9 ++++++++- .../mapper/business/DcEventTrafficControlMapper.xml | 6 +----- 6 files changed, 20 insertions(+), 17 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 e0d47387..111e8c88 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 @@ -185,6 +185,9 @@ public class DcEvent extends BaseEntity { */ @ApiModelProperty("是否处在隧道 0 表示 false,1 表示 true") private Integer inTunnel; + @ApiModelProperty("高速公路") + private Long roadId; + @ApiModelProperty("事件详情参数") @TableField(exist = false) private DcEventMap dcEventMap; diff --git a/zc-business/src/main/java/com/zc/business/domain/DcEventAccident.java b/zc-business/src/main/java/com/zc/business/domain/DcEventAccident.java index bbcdca0a..65028728 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcEventAccident.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcEventAccident.java @@ -109,14 +109,14 @@ public class DcEventAccident extends BaseEntity { */ @ApiModelProperty("交警电话") - private Integer policeContact; + private String policeContact; /** * 清障电话 */ @ApiModelProperty("清障电话") - private Integer towingServiceContact; + private String towingServiceContact; /** * 前方是否拥堵 @@ -210,12 +210,12 @@ public class DcEventAccident extends BaseEntity { @ApiModelProperty("私密事件") private Integer isPrivate; - /** +/* *//** * 高速公路 - */ + *//* @ApiModelProperty("高速公路") - private Integer roadId; + private Integer roadId;*/ /** * 设施关联 */ 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 72cfacb9..7448e3b0 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,10 @@ public class DcEventTrafficControl extends BaseEntity @ApiModelProperty("匝道(立交)") @Excel(name = "匝道", readConverterExp = "立=交") private Long rampId; +/* @ApiModelProperty("高速公路 id") private Long roadId; +*/ @ApiModelProperty("原因类型") private String causeType; diff --git a/zc-business/src/main/resources/mapper/business/DcEventAccidentMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventAccidentMapper.xml index 93b55e30..c016d1eb 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventAccidentMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventAccidentMapper.xml @@ -31,11 +31,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - select id, reporter_name, reporter_phone_number, accident_type, location_type, traffic_jam, weather_condition, impact_level, is_reverse_cargo, is_maintenance, police_contact, towing_service_contact, congestion_ahead, at_intersection, on_curve, spillage_item, vehicle_owner_phone, lane_occupancy, small_car, trucks, buses, tankers, minor_injuries, serious_injuries, fatalities, is_private, facility_id, road_id from dc_event_accident + select id, reporter_name, reporter_phone_number, accident_type, location_type, traffic_jam, weather_condition, impact_level, is_reverse_cargo, is_maintenance, police_contact, towing_service_contact, congestion_ahead, at_intersection, on_curve, spillage_item, vehicle_owner_phone, lane_occupancy, small_car, trucks, buses, tankers, minor_injuries, serious_injuries, fatalities, is_private, facility_id from dc_event_accident @@ -106,7 +104,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" fatalities, is_private, facility_id, - road_id, #{id}, @@ -136,7 +133,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{fatalities}, #{isPrivate}, #{facilityId}, - #{roadId}, @@ -169,7 +165,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" fatalities = #{fatalities}, is_private = #{isPrivate}, facility_id = #{facilityId}, - road_id = #{roadId}, where id = #{id} diff --git a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml index c46b09b0..5b2a7e8c 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml @@ -26,6 +26,7 @@ + @@ -51,6 +52,7 @@ + @@ -212,7 +214,8 @@ create_time, update_time, event_source_tips, - in_tunnel + in_tunnel, + road_id FROM dc_event select dc_event.id AS id, @@ -236,6 +239,7 @@ dc_event.update_time, dc_event.event_source_tips, dc_event.in_tunnel, + dc_event.road_id, dc_event_type.event_name AS event_name, dc_process_config.node_node AS node_node, @@ -441,6 +445,7 @@ update_time, event_source_tips, in_tunnel, + road_id, #{id}, @@ -464,6 +469,7 @@ #{updateTime}, #{eventSourceTips}, #{inTunnel}, + #{roadId}, @@ -490,6 +496,7 @@ update_time = #{updateTime}, event_source_tips = #{eventSourceTips}, in_tunnel = #{inTunnel}, + road_id = #{roadId}, where id = #{id} diff --git a/zc-business/src/main/resources/mapper/business/DcEventTrafficControlMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventTrafficControlMapper.xml index 0913c4ad..d4751c11 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventTrafficControlMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventTrafficControlMapper.xml @@ -11,7 +11,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - @@ -28,7 +27,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, control_type, control_cause, exits_inlets, facility_id, ramp_id,road_id,cause_type,measure,classify,limited_type,vehicle_type from dc_event_traffic_control + select id, control_type, control_cause, exits_inlets, facility_id, ramp_id,cause_type,measure,classify,limited_type,vehicle_type from dc_event_traffic_control @@ -79,7 +78,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" exits_inlets, facility_id, ramp_id, - road_id, cause_type, measure, @@ -94,7 +92,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{exitsInlets}, #{facilityId}, #{rampId}, - #{roadId}, #{causeType}, #{measure}, @@ -112,7 +109,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" exits_inlets = #{exitsInlets}, facility_id = #{facilityId}, ramp_id = #{rampId}, - road_id = #{roadId}, cause_type = #{causeType}, measure = #{measure}, classify = #{classify}, From b0be47da593a9eb13b3a1691751c33109e580f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Wed, 24 Jan 2024 14:09:59 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=20=E8=8E=B7=E5=8F=96=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zc/business/service/impl/DcEventServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) 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 54493df3..2928a529 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.SecurityUtils; import com.ruoyi.common.utils.uuid.IdUtils; import com.zc.business.domain.*; import com.zc.business.mapper.*; @@ -94,6 +95,8 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper; //设置事件Id UUID无下划线格式32 String uuid = IdUtils.fastSimpleUUID(); dcEvent.setId(uuid); +//获取部门信息 +dcEvent.setDeptId(SecurityUtils.getDeptId()); dcEvent.setCreateTime(DateUtils.getNowDate()); int i7 = dcEventMapper.insertDcEvent(dcEvent); if (i7>0){