From e354d1ce59e66f0029380a8fcca9f2839ff179d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Thu, 25 Jan 2024 10:31:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E6=A0=87=E9=A2=98=EF=BC=8C=E6=9C=80=E5=A4=A7=E6=8B=A5=E5=A0=B5?= =?UTF-8?q?=E9=87=8C=E7=A8=8B=20=E4=BF=AE=E6=94=B9=E6=8B=A5=E5=A0=B5?= =?UTF-8?q?=E9=87=8C=E7=A8=8B=E7=B1=BB=E5=9E=8Bfloat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/zc/business/domain/DcEvent.java | 6 ++++++ .../business/domain/DcEventTrafficCongestion.java | 10 +++++++++- .../business/service/impl/DcEventServiceImpl.java | 5 +++++ .../resources/mapper/business/DcEventMapper.xml | 15 +++++++++++++-- .../business/DcEventTrafficCongestionMapper.xml | 7 ++++++- .../mapper/business/DcProcessConfigMapper.xml | 3 +++ 6 files changed, 42 insertions(+), 4 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 0847569b..292ed873 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 @@ -1,6 +1,7 @@ package com.zc.business.domain; import java.util.Date; +import java.util.List; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; @@ -204,6 +205,11 @@ public class DcEvent extends BaseEntity { @ApiModelProperty("机构") @TableField(exist = false) private String organizationName; + @ApiModelProperty("事件流程") + @TableField(exist = false) + private List processConfigList; +@ApiModelProperty("事件标题") + private String eventTitle; /** * diff --git a/zc-business/src/main/java/com/zc/business/domain/DcEventTrafficCongestion.java b/zc-business/src/main/java/com/zc/business/domain/DcEventTrafficCongestion.java index f36a1f74..f667ebe2 100644 --- a/zc-business/src/main/java/com/zc/business/domain/DcEventTrafficCongestion.java +++ b/zc-business/src/main/java/com/zc/business/domain/DcEventTrafficCongestion.java @@ -32,7 +32,12 @@ public class DcEventTrafficCongestion extends BaseEntity /** 拥堵里程(公里) */ @ApiModelProperty("拥堵里程(公里)") - private Long congestionMileage; + private Float congestionMileage; + + /** 最大拥堵里程(公里) */ + @ApiModelProperty("最大拥堵里程(公里)") + private Float maxCongestionMileage; + /** 拥堵原因: 1-车流量大 @@ -70,11 +75,14 @@ public class DcEventTrafficCongestion extends BaseEntity @ApiModelProperty("地点(收费站):1-入口 2-出口 3-入口内广场 4--出口内广场5-外广场6-入口车道7-出口车道8-入口匝道9-出口匝道 ") private Long location; + @ApiModelProperty("事件信息实体") //事件信息表 @TableField(exist = false) private DcEvent dcEvent; + + @ApiModelProperty("路网设施实体") //事件信息表 @TableField(exist = false) 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 2928a529..2ccd91e5 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 @@ -46,6 +46,8 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper; @Autowired private DcEventTrafficControlMapper dcEventTrafficControlMapper; + @Autowired + private DcProcessConfigMapper dcProcessConfigMapper; @@ -59,6 +61,9 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper; public DcEvent selectDcEventById( String id) { DcEvent dcEvent = dcEventMapper.selectDcEventById(id); + + List processConfigList = dcProcessConfigMapper.selectDcProcessConfigByEventType(Math.toIntExact(dcEvent.getEventType())); + dcEvent.setProcessConfigList(processConfigList); return dcEvent; } diff --git a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml index 7180adbe..425ef99a 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml @@ -28,6 +28,7 @@ + @@ -54,6 +55,7 @@ + @@ -64,6 +66,7 @@ + + –> @@ -118,6 +121,7 @@ +--> @@ -33,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" dc_event_traffic_congestion.id as id, dc_event_traffic_congestion.location as location, dc_event_traffic_congestion.ramp_id as ramp_id, + dc_event_traffic_congestion.max_congestion_mileage as max_congestion_mileage, dc_facility.other_config as other_config, dc_facility.remark as remark, @@ -69,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" facility_id, ramp_id, location, + max_congestion_mileage, #{id}, @@ -77,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{facilityId}, #{rampId}, #{location}, + #{maxCongestionMileage}, @@ -88,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" facility_id = #{facilityId}, ramp_id = #{rampId}, location = #{location}, + max_congestion_mileage = #{maxCongestionMileage}, where id = #{id} diff --git a/zc-business/src/main/resources/mapper/business/DcProcessConfigMapper.xml b/zc-business/src/main/resources/mapper/business/DcProcessConfigMapper.xml index 9b949a05..85d34f15 100644 --- a/zc-business/src/main/resources/mapper/business/DcProcessConfigMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcProcessConfigMapper.xml @@ -83,4 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" delete from dc_process_config where event_type = #{eventType} + + + \ No newline at end of file From 5e202d96b0893bac4f0b7540f585ba72ebcf6f70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=85=B4=E7=90=B3?= <1911390090@qq.com> Date: Thu, 25 Jan 2024 10:42:48 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/business/DcEventMapper.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml index 425ef99a..f7eb0541 100644 --- a/zc-business/src/main/resources/mapper/business/DcEventMapper.xml +++ b/zc-business/src/main/resources/mapper/business/DcEventMapper.xml @@ -433,10 +433,10 @@ FROM dc_event LEFT JOIN dc_event_type ON dc_event_type.event_type = dc_event.event_type LEFT JOIN dc_stake_mark on dc_stake_mark.stake_mark = dc_event.stake_mark - LEFT JOIN dc_road_section on dc_stake_marks.section_id = dc_road_section.id + LEFT JOIN dc_road_section on dc_stake_mark.section_id = dc_road_section.id LEFT JOIN dc_road on dc_road_section.road_id = dc_road.id -- -- 关联机构表 - LEFT JOIN dc_organization ON dc_stake_marks.stake_mark = dc_organization.stake_mark + LEFT JOIN dc_organization ON dc_stake_mark.stake_mark = dc_organization.stake_mark where dc_event.id = #{id}