<?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.gk.hotwork.specialWork.repository.WorkProcessWarningInfoRepository">
|
|
<resultMap id="WorkProcessWarningInfo" type="com.gk.hotwork.specialWork.entity.WorkProcessWarningInfo">
|
<result column="id" property="id" />
|
<result column="work_apply_id" property="workApplyId" />
|
<result column="work_permit_no" property="workPermitNo" />
|
<result column="work_type" property="workType" />
|
<result column="work_level" property="workLevel" />
|
<result column="warning_content" property="warningContent" />
|
<result column="warning_info" property="warningInfo" />
|
<result column="warning_type" property="warningType" />
|
<result column="operation_time" property="operationTime" />
|
<result column="operator_uid" property="operatorUid" />
|
<result column="operator_uname" property="operatorUname" />
|
<result column="operation_time" property="operationTime" />
|
<result column="original_id" property="originalId" />
|
<result column="status" property="status" />
|
<result column="source" property="source" />
|
</resultMap>
|
|
|
|
<insert id="insertWorkProcessWarningInfo"
|
parameterType="com.gk.hotwork.specialWork.entity.WorkProcessWarningInfo">
|
insert
|
into
|
work_process_warning
|
<trim prefix="(" suffix=") values" suffixOverrides=",">
|
<if test="id != null">
|
id,
|
</if>
|
<if test="workApplyId != null">
|
work_apply_id,
|
</if>
|
<if test="workPermitNo != null">
|
work_permit_no,
|
</if>
|
<if test="workType != null">
|
work_type,
|
</if>
|
<if test="workLevel != null">
|
work_level,
|
</if>
|
<if test="operationTime != null">
|
operation_time,
|
</if>
|
<if test="operatorUid != null">
|
operator_uid,
|
</if>
|
<if test="operatorUname != null">
|
operator_uname,
|
</if>
|
<if test="source != null">
|
source,
|
</if>
|
<if test="status != null">
|
status,
|
</if>
|
<if test="originalId != null">
|
original_id,
|
</if>
|
<if test="warningInfo != null">
|
warning_info,
|
</if>
|
<if test="warningType != null">
|
warning_type,
|
</if>
|
<if test="warningContent != null">
|
warning_content,
|
</if>
|
</trim>
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<if test="id != null">
|
#{id},
|
</if>
|
<if test="workApplyId != null">
|
#{workApplyId},
|
</if>
|
<if test="workPermitNo != null">
|
#{workPermitNo},
|
</if>
|
<if test="workType != null">
|
#{workType},
|
</if>
|
<if test="workLevel != null">
|
#{workLevel},
|
</if>
|
<if test="operationTime != null">
|
#{operationTime},
|
</if>
|
<if test="operatorUid != null">
|
#{operatorUid},
|
</if>
|
<if test="operatorUname != null">
|
#{operatorUname},
|
</if>
|
<if test="source != null">
|
#{source},
|
</if>
|
<if test="status != null">
|
#{status},
|
</if>
|
<if test="originalId != null">
|
#{originalId},
|
</if>
|
<if test="warningInfo != null">
|
#{warningInfo},
|
</if>
|
<if test="warningType != null">
|
#{warningType},
|
</if>
|
<if test="warningContent != null">
|
#{warningContent},
|
</if>
|
</trim>
|
|
|
|
</insert>
|
|
<select id="listWorkProcessWarningInfoByPage"
|
resultMap="WorkProcessWarningInfo">
|
|
select
|
warningInfo.id,
|
warningInfo.work_apply_id,
|
warningInfo.work_permit_no,
|
warningInfo.work_type,
|
warningInfo.work_level,
|
warningInfo.operator_uname,
|
warningInfo.operator_uid,
|
warningInfo.operation_time,
|
warningInfo.status,
|
warningInfo.warning_info,
|
warningInfo.warning_content,
|
warningInfo.warning_type,
|
warningInfo.original_id,
|
warningInfo.source
|
from work_process_warning as warningInfo
|
<where>
|
<if test="query.workType != null">
|
and warningInfo.work_type = #{query.workType}
|
</if>
|
<if test="query.workPermitNo != null and query.workPermitNo != ''">
|
and warningInfo.work_permit_no like concat("%",#{query.workPermitNo},"%")
|
</if>
|
<if test="query.warningType != null">
|
and warningInfo.warning_type = #{query.warningType}
|
</if>
|
</where>
|
order by warningInfo.operation_time desc
|
</select>
|
</mapper>
|