Browse Source

Merge remote-tracking branch 'origin/develop' into develop

develop
zhao-meiyu 1 year ago
parent
commit
f0fbead573
  1. 2
      zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml
  2. 19
      zc-business/src/main/resources/mapper/business/DcEventMapper.xml

2
zc-business/src/main/resources/mapper/business/DcDeviceMapper.xml

@ -64,7 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t1.installation_Date,t1.production_date,t1.durable_years,t1.installation_site,t1.use_state,t1.device_state,t1.other_config,t1.remark,t1.create_time,t1.update_time,
t2.longitude,t2.latitude
from dc_device t1
left join dc_stake_mark t2 on t1.stake_mark = t2.id and t1.direction = t2.direction
left join dc_stake_mark t2 on t1.stake_mark = t2.stake_mark and t1.direction = t2.direction
<where>
<if test="id != null and id != ''">and t1.id = #{id}</if>
<if test="iotDeviceId != null and iotDeviceId != ''">and t1.iot_device_id = #{iotDeviceId}</if>

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

@ -29,6 +29,7 @@
<result property="roadId" column="road_id" />
<result property="lang" column="lang" />
<result property="eventTitle" column="event_title" />
<result property="occurrenceTime" column="occurrence_time" />
</resultMap>
<resultMap type="com.zc.business.domain.DcEvent" id="DcEventResultById">
<result property="id" column="id" />
@ -55,6 +56,7 @@
<result property="eventName" column="event_name" />
<result property="nodeNode" column="node_node" />
<result property="roadId" column="road_id" />
<result property="occurrenceTime" column="occurrence_time" />
<result property="eventTitle" column="event_title" />
<result property="commonPhrases" column="common_phrases" />
<result property="stringEventType" column="stringEventType" />
@ -225,6 +227,7 @@
create_time,
update_time,
event_source_tips,
occurrence_time,
in_tunnel,
road_id
FROM
@ -235,6 +238,7 @@
dc_event.user_id,
dc_event.start_time,
dc_event.end_time,
dc_event.occurrence_time,
dc_event.estimated_end_time,
dc_event.event_level,
dc_event.event_type AS event_type,
@ -335,6 +339,7 @@
dc_event.estimated_end_time,
dc_event.event_level,
dc_event.event_title,
dc_event.occurrence_time,
dc_event.event_type AS event_type,
CASE dc_event.event_type
WHEN '1' THEN '交通事故'
@ -426,17 +431,12 @@
dc_event.in_tunnel,
dc_event.lang as lang,
dc_event_type.event_name AS event_name,
dc_organization.organization_name as organization_name,
sys_dept.dept_name as organization_name,
dc_road.road_name as road_name
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 and dc_stake_mark.direction = dc_event.description
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
-- &#45;&#45; 关联机构表
LEFT JOIN dc_organization ON dc_stake_mark.stake_mark = dc_organization.stake_mark
LEFT JOIN sys_dept ON dc_event.dept_id = sys_dept.dept_id
LEFT JOIN dc_road ON dc_event.road_id = dc_road.id
where dc_event.id = #{id}
</select>
@ -469,6 +469,7 @@
<if test="roadId != null">road_id,</if>
<if test="lang != null">lang,</if>
<if test="eventTitle != null">event_title,</if>
<if test="occurrenceTime != null">occurrence_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
@ -495,6 +496,7 @@
<if test="roadId != null">#{roadId},</if>
<if test="lang != null">#{lang},</if>
<if test="eventTitle != null">#{eventTitle},</if>
<if test="occurrenceTime != null">#{occurrenceTime},</if>
</trim>
</insert>
@ -524,6 +526,7 @@
<if test="roadId != null">road_id = #{roadId},</if>
<if test="lang != null">road_id = #{lang},</if>
<if test="eventTitle != null">event_title = #{eventTitle},</if>
<if test="occurrenceTime != null">occurrence_time = #{occurrenceTime},</if>
</trim>
where id = #{id}
</update>

Loading…
Cancel
Save