Browse Source

新增事件标题,最大拥堵里程 修改拥堵里程类型float

develop
王兴琳 1 year ago
parent
commit
e354d1ce59
  1. 6
      zc-business/src/main/java/com/zc/business/domain/DcEvent.java
  2. 10
      zc-business/src/main/java/com/zc/business/domain/DcEventTrafficCongestion.java
  3. 5
      zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
  4. 15
      zc-business/src/main/resources/mapper/business/DcEventMapper.xml
  5. 7
      zc-business/src/main/resources/mapper/business/DcEventTrafficCongestionMapper.xml
  6. 3
      zc-business/src/main/resources/mapper/business/DcProcessConfigMapper.xml

6
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<DcProcessConfig> processConfigList;
@ApiModelProperty("事件标题")
private String eventTitle;
/**
*

10
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)

5
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<DcProcessConfig> processConfigList = dcProcessConfigMapper.selectDcProcessConfigByEventType(Math.toIntExact(dcEvent.getEventType()));
dcEvent.setProcessConfigList(processConfigList);
return dcEvent;
}

15
zc-business/src/main/resources/mapper/business/DcEventMapper.xml

@ -28,6 +28,7 @@
<result property="stringEventSource" column="stringEventSource" />
<result property="roadId" column="road_id" />
<result property="lang" column="lang" />
<result property="eventTitle" column="event_title" />
</resultMap>
<resultMap type="com.zc.business.domain.DcEvent" id="DcEventResultById">
<result property="id" column="id" />
@ -54,6 +55,7 @@
<result property="eventName" column="event_name" />
<result property="nodeNode" column="node_node" />
<result property="roadId" column="road_id" />
<result property="eventTitle" column="event_title" />
<result property="commonPhrases" column="common_phrases" />
<result property="stringEventType" column="stringEventType" />
<result property="stringEventSource" column="stringEventSource" />
@ -64,6 +66,7 @@
</resultMap>
<!--
<resultMap type="com.zc.business.domain.DcEvent" id="DcEventResultListAll">
<result property="id" column="id" />
<result property="deptId" column="dept_id" />
@ -88,9 +91,9 @@
<result property="inTunnel" column="in_tunnel" />
<result property="stringEventType" column="stringEventType" />
<result property="stringEventSource" column="stringEventSource" />
<!-- <result property="dcProcessConfig.processNode" column="process_node" />
&lt;!&ndash; <result property="dcProcessConfig.processNode" column="process_node" />
<result property="dcProcessConfig.commonPhrases" column="common_phrases" />
<result property="dcProcessConfig.nodeNode" column="node_node" /> -->
<result property="dcProcessConfig.nodeNode" column="node_node" /> &ndash;&gt;
<result property="dcEventMap.processNode" column="process_node"/>
<result property="dcEventMap.commonPhrases" column="common_phrases"/>
<result property="dcEventMap.nodeNode" column="node_node"/>
@ -118,6 +121,7 @@
<result property="dcEventMap.contactNumber" column="contact_number"/>
</resultMap>
-->
<!-- <sql id="selectDcEventVo">
select id, dept_id, stake_mark, direction, user_id, start_time, end_time, estimated_end_time, event_level, event_type, event_subclass, event_cause, description, event_state, event_source, event_nature, remark, create_time, update_time, event_source_tips, in_tunnel from dc_event
@ -134,6 +138,7 @@
estimated_end_time,
event_level,
event_type,
event_title,
CASE event_type
WHEN '1' THEN '交通事故'
WHEN '2' THEN '车辆故障'
@ -246,6 +251,7 @@
dc_event.event_source_tips,
dc_event.in_tunnel,
dc_event.road_id,
dc_event.event_title,
dc_event_type.event_name AS event_name,
dc_process_config.node_node AS node_node,
@ -322,7 +328,9 @@
/*详情可以调用事件处理流程*/
SELECT dc_event.id AS id,
dc_event.stake_mark,
dc_event.event_title,
dc_event.direction,
dc_event.event_title,
dc_event.user_id,
dc_event.start_time,
dc_event.end_time,
@ -461,6 +469,7 @@
<if test="inTunnel != null">in_tunnel,</if>
<if test="roadId != null">road_id,</if>
<if test="lang != null">lang,</if>
<if test="eventTitle != null">event_title,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -486,6 +495,7 @@
<if test="inTunnel != null">#{inTunnel},</if>
<if test="roadId != null">#{roadId},</if>
<if test="lang != null">#{lang},</if>
<if test="eventTitle != null">#{eventTitle},</if>
</trim>
</insert>
@ -514,6 +524,7 @@
<if test="inTunnel != null">in_tunnel = #{inTunnel},</if>
<if test="roadId != null">road_id = #{roadId},</if>
<if test="lang != null">road_id = #{lang},</if>
<if test="eventTitle != null">event_title = #{eventTitle},</if>
</trim>
where id = #{id}
</update>

7
zc-business/src/main/resources/mapper/business/DcEventTrafficCongestionMapper.xml

@ -11,6 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="facilityId" column="facility_id" />
<result property="rampId" column="ramp_id" />
<result property="location" column="location" />
<result property="maxCongestionMileage" column="max_congestion_mileage" />
<result property="dcFacility.facilityName" column="facility_name" />
<result property="dcFacility.facilityType" column="facility_type" />
@ -22,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDcEventTrafficCongestionVo">
select id, congestion_mileage, congestion_cause, facility_id, ramp_id, location from dc_event_traffic_congestion
select id, congestion_mileage, congestion_cause, facility_id, ramp_id, location,max_congestion_mileage from dc_event_traffic_congestion
</sql>
<!-- -->
<sql id="selectDcEventTrafficCongestionVoById">
@ -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"
<if test="facilityId != null">facility_id,</if>
<if test="rampId != null">ramp_id,</if>
<if test="location != null">location,</if>
<if test="maxCongestionMileage != null">max_congestion_mileage,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -77,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="facilityId != null">#{facilityId},</if>
<if test="rampId != null">#{rampId},</if>
<if test="location != null">#{location},</if>
<if test="maxCongestionMileage != null">#{maxCongestionMileage},</if>
</trim>
</insert>
@ -88,6 +92,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="facilityId != null">facility_id = #{facilityId},</if>
<if test="rampId != null">ramp_id = #{rampId},</if>
<if test="location != null">location = #{location},</if>
<if test="maxCongestionMileage != null">max_congestion_mileage = #{maxCongestionMileage},</if>
</trim>
where id = #{id}
</update>

3
zc-business/src/main/resources/mapper/business/DcProcessConfigMapper.xml

@ -83,4 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete id="deleteDcProcessConfigByEventType" parameterType="Integer">
delete from dc_process_config where event_type = #{eventType}
</delete>
</mapper>
Loading…
Cancel
Save