<?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.Mapper.SafetyFacilityProcessflowMapper" >
|
<resultMap id="BaseResultMap" type="com.gk.hotwork.Domain.SafetyFacilityProcessflow" >
|
<!-- -->
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="valid_flag" property="validFlag" jdbcType="TINYINT" />
|
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
<result column="create_by" property="createBy" jdbcType="VARCHAR" />
|
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
<result column="check_time" property="checkTime" jdbcType="TIMESTAMP" />
|
<result column="progress_name" property="progressName" jdbcType="VARCHAR" />
|
<result column="result" property="result" jdbcType="VARCHAR" />
|
<result column="resolution" property="resolution" jdbcType="VARCHAR" />
|
<result column="process_by" property="processBy" jdbcType="VARCHAR" />
|
<result column="take_time" property="takeTime" jdbcType="INTEGER" />
|
<result column="link_inspection_id" property="linkInspectionId" jdbcType="BIGINT" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
<!-- -->
|
id, valid_flag, create_time, create_by, update_time, check_time, progress_name, result,
|
resolution, process_by, take_time, link_inspection_id
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
|
<!-- -->
|
select
|
<include refid="Base_Column_List" />
|
from safety_facility_processflow
|
where id = #{id,jdbcType=BIGINT}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
|
<!-- -->
|
delete from safety_facility_processflow
|
where id = #{id,jdbcType=BIGINT}
|
</delete>
|
|
<delete id="modPending" parameterType="java.lang.Long" >
|
<!-- -->
|
delete from safety_facility_processflow
|
where link_inspection_id = #{linkInspectionId,jdbcType=BIGINT}
|
and progress_name like '待%'
|
</delete>
|
|
|
<delete id="deleteBylinkInspectionId" parameterType="java.lang.Long" >
|
<!-- -->
|
update safety_facility_processflow set valid_flag = 0
|
where link_inspection_id = #{linkInspectionId,jdbcType=BIGINT}
|
</delete>
|
|
|
|
<insert id="insert" parameterType="com.gk.hotwork.Domain.SafetyFacilityProcessflow" >
|
<!-- -->
|
insert into safety_facility_processflow (id, valid_flag, create_time,
|
create_by, update_time, check_time,
|
progress_name, result, resolution,
|
process_by, take_time, link_inspection_id
|
)
|
values (#{id,jdbcType=BIGINT}, #{validFlag,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP},
|
#{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{checkTime,jdbcType=TIMESTAMP},
|
#{progressName,jdbcType=VARCHAR}, #{result,jdbcType=VARCHAR}, #{resolution,jdbcType=VARCHAR},
|
#{processBy,jdbcType=VARCHAR}, #{takeTime,jdbcType=INTEGER}, #{linkInspectionId,jdbcType=BIGINT}
|
)
|
</insert>
|
<insert id="insertSelective" parameterType="com.gk.hotwork.Domain.SafetyFacilityProcessflow" >
|
<!-- -->
|
insert into safety_facility_processflow
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
id,
|
</if>
|
<if test="validFlag != null" >
|
valid_flag,
|
</if>
|
<if test="createTime != null" >
|
create_time,
|
</if>
|
<if test="createBy != null" >
|
create_by,
|
</if>
|
<if test="updateTime != null" >
|
update_time,
|
</if>
|
<if test="checkTime != null" >
|
check_time,
|
</if>
|
<if test="progressName != null" >
|
progress_name,
|
</if>
|
<if test="result != null" >
|
result,
|
</if>
|
<if test="resolution != null" >
|
resolution,
|
</if>
|
<if test="processBy != null" >
|
process_by,
|
</if>
|
<if test="takeTime != null" >
|
take_time,
|
</if>
|
<if test="linkInspectionId != null" >
|
link_inspection_id,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
#{id,jdbcType=BIGINT},
|
</if>
|
<if test="validFlag != null" >
|
#{validFlag,jdbcType=TINYINT},
|
</if>
|
<if test="createTime != null" >
|
#{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="createBy != null" >
|
#{createBy,jdbcType=VARCHAR},
|
</if>
|
<if test="updateTime != null" >
|
#{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="checkTime != null" >
|
#{checkTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="progressName != null" >
|
#{progressName,jdbcType=VARCHAR},
|
</if>
|
<if test="result != null" >
|
#{result,jdbcType=VARCHAR},
|
</if>
|
<if test="resolution != null" >
|
#{resolution,jdbcType=VARCHAR},
|
</if>
|
<if test="processBy != null" >
|
#{processBy,jdbcType=VARCHAR},
|
</if>
|
<if test="takeTime != null" >
|
#{takeTime,jdbcType=INTEGER},
|
</if>
|
<if test="linkInspectionId != null" >
|
#{linkInspectionId,jdbcType=BIGINT},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.gk.hotwork.Domain.SafetyFacilityProcessflow" >
|
<!-- -->
|
update safety_facility_processflow
|
<set >
|
<if test="validFlag != null" >
|
valid_flag = #{validFlag,jdbcType=TINYINT},
|
</if>
|
<if test="createTime != null" >
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="createBy != null" >
|
create_by = #{createBy,jdbcType=VARCHAR},
|
</if>
|
<if test="updateTime != null" >
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="checkTime != null" >
|
check_time = #{checkTime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="progressName != null" >
|
progress_name = #{progressName,jdbcType=VARCHAR},
|
</if>
|
<if test="result != null" >
|
result = #{result,jdbcType=VARCHAR},
|
</if>
|
<if test="resolution != null" >
|
resolution = #{resolution,jdbcType=VARCHAR},
|
</if>
|
<if test="processBy != null" >
|
process_by = #{processBy,jdbcType=VARCHAR},
|
</if>
|
<if test="takeTime != null" >
|
take_time = #{takeTime,jdbcType=INTEGER},
|
</if>
|
<if test="linkInspectionId != null" >
|
link_inspection_id = #{linkInspectionId,jdbcType=BIGINT},
|
</if>
|
</set>
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.gk.hotwork.Domain.SafetyFacilityProcessflow" >
|
<!-- -->
|
update safety_facility_processflow
|
set valid_flag = #{validFlag,jdbcType=TINYINT},
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
create_by = #{createBy,jdbcType=VARCHAR},
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
check_time = #{checkTime,jdbcType=TIMESTAMP},
|
progress_name = #{progressName,jdbcType=VARCHAR},
|
result = #{result,jdbcType=VARCHAR},
|
resolution = #{resolution,jdbcType=VARCHAR},
|
process_by = #{processBy,jdbcType=VARCHAR},
|
take_time = #{takeTime,jdbcType=INTEGER},
|
link_inspection_id = #{linkInspectionId,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
</update>
|
|
|
<select id="processflowPages" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List" />
|
from safety_facility_processflow
|
where valid_flag = 1
|
<if test="params.linkInspectionId != null">
|
and link_inspection_id = #{params.linkInspectionId,jdbcType=BIGINT}
|
</if>
|
ORDER BY
|
create_time ASC
|
</select>
|
</mapper>
|