预警信息处置功能开发

This commit is contained in:
huxin 2025-05-23 21:27:11 +08:00
parent abcf10006b
commit 2cbb85435b
1 changed files with 120 additions and 0 deletions

View File

@ -0,0 +1,120 @@
<?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.dkl.large.mapper.DklWarningInformationHandleMapper">
<resultMap type="DklWarningInformationHandle" id="DklWarningInformationHandleResult">
<result property="id" column="id" />
<result property="warningSigns" column="warning_signs" />
<result property="delegatePersonnel" column="delegate_personnel" />
<result property="delegationTime" column="delegation_time" />
<result property="delegationDept" column="delegation_dept" />
<result property="disposalMeasures" column="disposal_measures" />
<result property="disposalResults" column="disposal_results" />
<result property="disposalStatus" column="disposal_status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" />
<result property="warningId" column="warning_id" />
</resultMap>
<sql id="selectDklWarningInformationHandleVo">
select dwih.id, dwih.warning_signs, dwih.delegate_personnel, dwih.delegation_time, dwih.delegation_dept,
dwih.disposal_measures, dwih.disposal_results, dwih.disposal_status, dwih.create_by, dwih.create_time,dwih.warning_id,
dwih.update_by, dwih.update_time, dwih.del_flag,d.dept_name AS deptName,u.nick_name AS nickName from dkl_warning_information_handle AS dwih
left join sys_dept d on dwih.delegation_dept = d.dept_id
left join sys_user u on dwih.delegate_personnel = u.user_id
</sql>
<select id="selectDklWarningInformationHandleList" parameterType="DklWarningInformationHandle" resultMap="DklWarningInformationHandleResult">
<include refid="selectDklWarningInformationHandleVo"/>
<where>
<if test="warningSigns != null and warningSigns != ''"> and dwih.warning_signs = #{warningSigns}</if>
<if test="delegatePersonnel != null "> and dwih.delegate_personnel = #{delegatePersonnel}</if>
<if test="delegationTime != null "> and dwih.delegation_time = #{delegationTime}</if>
<if test="delegationDept != null "> and dwih.delegation_dept = #{delegationDept}</if>
<if test="disposalMeasures != null and disposalMeasures != ''"> and dwih.disposal_measures = #{disposalMeasures}</if>
<if test="disposalResults != null and disposalResults != ''"> and dwih.disposal_results = #{disposalResults}</if>
<if test="disposalStatus != null and disposalStatus != ''"> and dwih.disposal_status = #{disposalStatus}</if>
<if test="delFlag != null and delFlag != ''"> and dwih.del_flag = #{delFlag}</if>
</where>
${params.dataScope}
order by dwih.create_time desc
</select>
<select id="selectDklWarningInformationHandleById" parameterType="Long" resultMap="DklWarningInformationHandleResult">
<include refid="selectDklWarningInformationHandleVo"/>
where id = #{id}
</select>
<insert id="insertDklWarningInformationHandle" parameterType="DklWarningInformationHandle">
insert into dkl_warning_information_handle
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="warningSigns != null">warning_signs,</if>
<if test="delegatePersonnel != null">delegate_personnel,</if>
<if test="delegationTime != null">delegation_time,</if>
<if test="delegationDept != null">delegation_dept,</if>
<if test="disposalMeasures != null">disposal_measures,</if>
<if test="disposalResults != null">disposal_results,</if>
<if test="disposalStatus != null">disposal_status,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="delFlag != null">del_flag,</if>
<if test="warningId != null">warning_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="warningSigns != null">#{warningSigns},</if>
<if test="delegatePersonnel != null">#{delegatePersonnel},</if>
<if test="delegationTime != null">#{delegationTime},</if>
<if test="delegationDept != null">#{delegationDept},</if>
<if test="disposalMeasures != null">#{disposalMeasures},</if>
<if test="disposalResults != null">#{disposalResults},</if>
<if test="disposalStatus != null">#{disposalStatus},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="delFlag != null">#{delFlag},</if>
<if test="warningId != null">#{warningId},</if>
</trim>
<selectKey keyProperty="id" resultType="long" order="AFTER" >
SELECT CURRVAL('dkl_warning_information_handle_id_seq') <!-- 人大金仓序列函数 -->
</selectKey>
</insert>
<update id="updateDklWarningInformationHandle" parameterType="DklWarningInformationHandle">
update dkl_warning_information_handle
<trim prefix="SET" suffixOverrides=",">
<if test="warningSigns != null">warning_signs = #{warningSigns},</if>
<if test="delegatePersonnel != null">delegate_personnel = #{delegatePersonnel},</if>
<if test="delegationTime != null">delegation_time = #{delegationTime},</if>
<if test="delegationDept != null">delegation_dept = #{delegationDept},</if>
<if test="disposalMeasures != null">disposal_measures = #{disposalMeasures},</if>
<if test="disposalResults != null">disposal_results = #{disposalResults},</if>
<if test="disposalStatus != null">disposal_status = #{disposalStatus},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="warningId != null">warning_id = #{warningId},</if>
</trim>
where id = #{id}
</update>
<update id="deleteDklWarningInformationHandleById" parameterType="Long">
update dkl_warning_information_handle set del_flag = 2 where id = #{id}
</update>
<update id="deleteDklWarningInformationHandleByIds" parameterType="String">
update dkl_warning_information_handle set del_flag = 2 where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>