济菏高速数据中心代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
7.2 KiB

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zc.business.mapper.DcEventImportantMapper">
<resultMap type="DcEventImportant" id="DcEventImportantResult">
<result property="id" column="id" />
<result property="eventId" column="event_id" />
<result property="plateNumber" column="plate_number" />
<result property="diversionPoint" column="diversion_point" />
<result property="currentProgress" column="current_progress" />
<result property="takeSteps" column="take_steps" />
<result property="planStatus" column="plan_status" />
<result property="trafficPoliceStatus" column="traffic_police_status" />
<result property="medicalStatus" column="medical_status" />
<result property="fireStatus" column="fire_status" />
<result property="boardStatus" column="board_status" />
<result property="chemicalsStatus" column="chemicals_status" />
<result property="planLevel" column="plan_level" />
<result property="chemicalsName" column="chemicals_name" />
<result property="leakageLevel" column="leakage_level" />
</resultMap>
<sql id="selectDcEventImportantVo">
select id, event_id, plate_number, diversion_point, current_progress, take_steps, plan_status, traffic_police_status, medical_status, fire_status, board_status, chemicals_status, plan_level, chemicals_name, leakage_level from dc_event_important
</sql>
<select id="selectDcEventImportantList" parameterType="DcEventImportant" resultMap="DcEventImportantResult">
<include refid="selectDcEventImportantVo"/>
<where>
<if test="eventId != null and eventId != ''"> and event_id = #{eventId}</if>
<if test="plateNumber != null and plateNumber != ''"> and plate_number = #{plateNumber}</if>
<if test="diversionPoint != null and diversionPoint != ''"> and diversion_point = #{diversionPoint}</if>
<if test="currentProgress != null and currentProgress != ''"> and current_progress = #{currentProgress}</if>
<if test="takeSteps != null and takeSteps != ''"> and take_steps = #{takeSteps}</if>
<if test="planStatus != null "> and plan_status = #{planStatus}</if>
<if test="trafficPoliceStatus != null "> and traffic_police_status = #{trafficPoliceStatus}</if>
<if test="medicalStatus != null "> and medical_status = #{medicalStatus}</if>
<if test="fireStatus != null "> and fire_status = #{fireStatus}</if>
<if test="boardStatus != null "> and board_status = #{boardStatus}</if>
<if test="chemicalsStatus != null "> and chemicals_status = #{chemicalsStatus}</if>
<if test="planLevel != null and planLevel != ''"> and plan_level = #{planLevel}</if>
<if test="chemicalsName != null and chemicalsName != ''"> and chemicals_name like concat('%', #{chemicalsName}, '%')</if>
<if test="leakageLevel != null and leakageLevel != ''"> and leakage_level = #{leakageLevel}</if>
</where>
</select>
<select id="selectDcEventImportantByEventId" parameterType="String" resultMap="DcEventImportantResult">
<include refid="selectDcEventImportantVo"/>
where event_id = #{eventId}
</select>
<insert id="insertDcEventImportant" parameterType="DcEventImportant">
insert into dc_event_important
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="eventId != null">event_id,</if>
<if test="plateNumber != null">plate_number,</if>
<if test="diversionPoint != null">diversion_point,</if>
<if test="currentProgress != null">current_progress,</if>
<if test="takeSteps != null">take_steps,</if>
<if test="planStatus != null">plan_status,</if>
<if test="trafficPoliceStatus != null">traffic_police_status,</if>
<if test="medicalStatus != null">medical_status,</if>
<if test="fireStatus != null">fire_status,</if>
<if test="boardStatus != null">board_status,</if>
<if test="chemicalsStatus != null">chemicals_status,</if>
<if test="planLevel != null">plan_level,</if>
<if test="chemicalsName != null">chemicals_name,</if>
<if test="leakageLevel != null">leakage_level,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="eventId != null">#{eventId},</if>
<if test="plateNumber != null">#{plateNumber},</if>
<if test="diversionPoint != null">#{diversionPoint},</if>
<if test="currentProgress != null">#{currentProgress},</if>
<if test="takeSteps != null">#{takeSteps},</if>
<if test="planStatus != null">#{planStatus},</if>
<if test="trafficPoliceStatus != null">#{trafficPoliceStatus},</if>
<if test="medicalStatus != null">#{medicalStatus},</if>
<if test="fireStatus != null">#{fireStatus},</if>
<if test="boardStatus != null">#{boardStatus},</if>
<if test="chemicalsStatus != null">#{chemicalsStatus},</if>
<if test="planLevel != null">#{planLevel},</if>
<if test="chemicalsName != null">#{chemicalsName},</if>
<if test="leakageLevel != null">#{leakageLevel},</if>
</trim>
</insert>
<update id="updateDcEventImportant" parameterType="DcEventImportant">
update dc_event_important
<trim prefix="SET" suffixOverrides=",">
<if test="eventId != null">event_id = #{eventId},</if>
<if test="plateNumber != null">plate_number = #{plateNumber},</if>
<if test="diversionPoint != null">diversion_point = #{diversionPoint},</if>
<if test="currentProgress != null">current_progress = #{currentProgress},</if>
<if test="takeSteps != null">take_steps = #{takeSteps},</if>
<if test="planStatus != null">plan_status = #{planStatus},</if>
<if test="trafficPoliceStatus != null">traffic_police_status = #{trafficPoliceStatus},</if>
<if test="medicalStatus != null">medical_status = #{medicalStatus},</if>
<if test="fireStatus != null">fire_status = #{fireStatus},</if>
<if test="boardStatus != null">board_status = #{boardStatus},</if>
<if test="chemicalsStatus != null">chemicals_status = #{chemicalsStatus},</if>
<if test="planLevel != null">plan_level = #{planLevel},</if>
<if test="chemicalsName != null">chemicals_name = #{chemicalsName},</if>
<if test="leakageLevel != null">leakage_level = #{leakageLevel},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcEventImportantByEventId" parameterType="String">
delete from dc_event_important where id = #{id}
</delete>
<delete id="deleteDcEventImportantByEventIds" parameterType="String">
delete from dc_event_important where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>