|
@@ -0,0 +1,181 @@
|
|
|
|
|
+<?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.ruoyi.project.process.mapper.TPlantBlindMapper">
|
|
|
|
|
+
|
|
|
|
|
+ <resultMap type="TPlantBlind" id="TPlantBlindResult">
|
|
|
|
|
+ <result property="id" column="id" />
|
|
|
|
|
+ <result property="region" column="region" />
|
|
|
|
|
+ <result property="unitNo" column="unit_no" />
|
|
|
|
|
+ <result property="pidNo" column="pid_no" />
|
|
|
|
|
+ <result property="medium" column="medium" />
|
|
|
|
|
+ <result property="blindNo" column="blind_no" />
|
|
|
|
|
+ <result property="location" column="location" />
|
|
|
|
|
+ <result property="isoType" column="iso_type" />
|
|
|
|
|
+ <result property="tagNo" column="tag_no" />
|
|
|
|
|
+ <result property="blindSize" column="blind_size" />
|
|
|
|
|
+ <result property="pressureRate" column="pressure_rate" />
|
|
|
|
|
+ <result property="pressurized" column="pressurized" />
|
|
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
|
|
+ <result property="createrCode" column="creater_code" />
|
|
|
|
|
+ <result property="createdate" column="createdate" />
|
|
|
|
|
+ <result property="updaterCode" column="updater_code" />
|
|
|
|
|
+ <result property="updatedate" column="updatedate" />
|
|
|
|
|
+ <result property="deptId" column="dept_id" />
|
|
|
|
|
+ <result property="remarks" column="remarks" />
|
|
|
|
|
+ <result property="approveStatus" column="approve_status" />
|
|
|
|
|
+ <result property="installStatus" column="install_status" />
|
|
|
|
|
+ <result property="removeStatus" column="remove_status" />
|
|
|
|
|
+ <result property="blindType" column="blind_type" />
|
|
|
|
|
+ <result property="startupStatus" column="startup_status" />
|
|
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
|
|
+ </resultMap>
|
|
|
|
|
+
|
|
|
|
|
+ <sql id="selectTPlantBlindVo">
|
|
|
|
|
+ select d.id, d.region, d.unit_no, d.pid_no, d.medium, d.blind_no, d.location, d.iso_type, d.tag_no, d.blind_size, d.pressure_rate, d.pressurized, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.approve_status, d.install_status, d.remove_status, d.blind_type, d.startup_status ,s.dept_name from t_plant_blind d
|
|
|
|
|
+ left join sys_dept s on s.dept_id = d.dept_id
|
|
|
|
|
+ </sql>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectTPlantBlindList" parameterType="TPlantBlind" resultMap="TPlantBlindResult">
|
|
|
|
|
+ <include refid="selectTPlantBlindVo"/>
|
|
|
|
|
+ <where>
|
|
|
|
|
+ <if test="region != null and region != ''"> and region = #{region}</if>
|
|
|
|
|
+ <if test="unitNo != null and unitNo != ''"> and unit_no = #{unitNo}</if>
|
|
|
|
|
+ <if test="pidNo != null and pidNo != ''"> and pid_no = #{pidNo}</if>
|
|
|
|
|
+ <if test="medium != null and medium != ''"> and medium = #{medium}</if>
|
|
|
|
|
+ <if test="blindNo != null and blindNo != ''"> and blind_no = #{blindNo}</if>
|
|
|
|
|
+ <if test="location != null and location != ''"> and location = #{location}</if>
|
|
|
|
|
+ <if test="isoType != null and isoType != ''"> and iso_type = #{isoType}</if>
|
|
|
|
|
+ <if test="tagNo != null and tagNo != ''"> and tag_no = #{tagNo}</if>
|
|
|
|
|
+ <if test="blindSize != null and blindSize != ''"> and blind_size = #{blindSize}</if>
|
|
|
|
|
+ <if test="pressureRate != null and pressureRate != ''"> and pressure_rate = #{pressureRate}</if>
|
|
|
|
|
+ <if test="pressurized != null and pressurized != ''"> and pressurized = #{pressurized}</if>
|
|
|
|
|
+ <if test="createrCode != null and createrCode != ''"> and creater_code = #{createrCode}</if>
|
|
|
|
|
+ <if test="createdate != null "> and createdate = #{createdate}</if>
|
|
|
|
|
+ <if test="updaterCode != null and updaterCode != ''"> and updater_code = #{updaterCode}</if>
|
|
|
|
|
+ <if test="updatedate != null "> and updatedate = #{updatedate}</if>
|
|
|
|
|
+ <if test="deptId != null "> and dept_id = #{deptId}</if>
|
|
|
|
|
+ <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
|
|
|
|
+ <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
|
|
|
|
|
+ <if test="installStatus != null and installStatus != ''"> and install_status = #{installStatus}</if>
|
|
|
|
|
+ <if test="removeStatus != null and removeStatus != ''"> and remove_status = #{removeStatus}</if>
|
|
|
|
|
+ <if test="blindType != null and blindType != ''"> and blind_type = #{blindType}</if>
|
|
|
|
|
+ <if test="startupStatus != null and startupStatus != ''"> and startup_status = #{startupStatus}</if>
|
|
|
|
|
+ <if test="unitNos != null">and unit_no in
|
|
|
|
|
+ <foreach item="unitNo" collection="unitNos" open="(" separator="," close=")">
|
|
|
|
|
+ #{unitNo}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </if>
|
|
|
|
|
+ and d.del_flag = 0
|
|
|
|
|
+ </where>
|
|
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
|
|
+ ${params.dataScope}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <select id="selectTPlantBlindById" parameterType="Long" resultMap="TPlantBlindResult">
|
|
|
|
|
+ <include refid="selectTPlantBlindVo"/>
|
|
|
|
|
+ where id = #{id}
|
|
|
|
|
+ </select>
|
|
|
|
|
+
|
|
|
|
|
+ <insert id="insertTPlantBlind" parameterType="TPlantBlind">
|
|
|
|
|
+ <selectKey keyProperty="id" resultType="long" order="BEFORE">
|
|
|
|
|
+ SELECT seq_t_plant_blind.NEXTVAL as id FROM DUAL
|
|
|
|
|
+ </selectKey>
|
|
|
|
|
+ insert into t_plant_blind
|
|
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="id != null">id,</if>
|
|
|
|
|
+ <if test="region != null">region,</if>
|
|
|
|
|
+ <if test="unitNo != null">unit_no,</if>
|
|
|
|
|
+ <if test="pidNo != null">pid_no,</if>
|
|
|
|
|
+ <if test="medium != null">medium,</if>
|
|
|
|
|
+ <if test="blindNo != null">blind_no,</if>
|
|
|
|
|
+ <if test="location != null">location,</if>
|
|
|
|
|
+ <if test="isoType != null">iso_type,</if>
|
|
|
|
|
+ <if test="tagNo != null">tag_no,</if>
|
|
|
|
|
+ <if test="blindSize != null">blind_size,</if>
|
|
|
|
|
+ <if test="pressureRate != null">pressure_rate,</if>
|
|
|
|
|
+ <if test="pressurized != null">pressurized,</if>
|
|
|
|
|
+ <if test="delFlag != null">del_flag,</if>
|
|
|
|
|
+ <if test="createrCode != null">creater_code,</if>
|
|
|
|
|
+ <if test="createdate != null">createdate,</if>
|
|
|
|
|
+ <if test="updaterCode != null">updater_code,</if>
|
|
|
|
|
+ <if test="updatedate != null">updatedate,</if>
|
|
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
|
|
+ <if test="remarks != null">remarks,</if>
|
|
|
|
|
+ <if test="approveStatus != null">approve_status,</if>
|
|
|
|
|
+ <if test="installStatus != null">install_status,</if>
|
|
|
|
|
+ <if test="removeStatus != null">remove_status,</if>
|
|
|
|
|
+ <if test="blindType != null">blind_type,</if>
|
|
|
|
|
+ <if test="startupStatus != null">startup_status,</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
|
|
+ <if test="region != null">#{region},</if>
|
|
|
|
|
+ <if test="unitNo != null">#{unitNo},</if>
|
|
|
|
|
+ <if test="pidNo != null">#{pidNo},</if>
|
|
|
|
|
+ <if test="medium != null">#{medium},</if>
|
|
|
|
|
+ <if test="blindNo != null">#{blindNo},</if>
|
|
|
|
|
+ <if test="location != null">#{location},</if>
|
|
|
|
|
+ <if test="isoType != null">#{isoType},</if>
|
|
|
|
|
+ <if test="tagNo != null">#{tagNo},</if>
|
|
|
|
|
+ <if test="blindSize != null">#{blindSize},</if>
|
|
|
|
|
+ <if test="pressureRate != null">#{pressureRate},</if>
|
|
|
|
|
+ <if test="pressurized != null">#{pressurized},</if>
|
|
|
|
|
+ <if test="delFlag != null">#{delFlag},</if>
|
|
|
|
|
+ <if test="createrCode != null">#{createrCode},</if>
|
|
|
|
|
+ <if test="createdate != null">#{createdate},</if>
|
|
|
|
|
+ <if test="updaterCode != null">#{updaterCode},</if>
|
|
|
|
|
+ <if test="updatedate != null">#{updatedate},</if>
|
|
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
|
|
+ <if test="remarks != null">#{remarks},</if>
|
|
|
|
|
+ <if test="approveStatus != null">#{approveStatus},</if>
|
|
|
|
|
+ <if test="installStatus != null">#{installStatus},</if>
|
|
|
|
|
+ <if test="removeStatus != null">#{removeStatus},</if>
|
|
|
|
|
+ <if test="blindType != null">#{blindType},</if>
|
|
|
|
|
+ <if test="startupStatus != null">#{startupStatus},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ </insert>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="updateTPlantBlind" parameterType="TPlantBlind">
|
|
|
|
|
+ update t_plant_blind
|
|
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
+ <if test="region != null">region = #{region},</if>
|
|
|
|
|
+ <if test="unitNo != null">unit_no = #{unitNo},</if>
|
|
|
|
|
+ <if test="pidNo != null">pid_no = #{pidNo},</if>
|
|
|
|
|
+ <if test="medium != null">medium = #{medium},</if>
|
|
|
|
|
+ <if test="blindNo != null">blind_no = #{blindNo},</if>
|
|
|
|
|
+ <if test="location != null">location = #{location},</if>
|
|
|
|
|
+ <if test="isoType != null">iso_type = #{isoType},</if>
|
|
|
|
|
+ <if test="tagNo != null">tag_no = #{tagNo},</if>
|
|
|
|
|
+ <if test="blindSize != null">blind_size = #{blindSize},</if>
|
|
|
|
|
+ <if test="pressureRate != null">pressure_rate = #{pressureRate},</if>
|
|
|
|
|
+ <if test="pressurized != null">pressurized = #{pressurized},</if>
|
|
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
|
|
+ <if test="createrCode != null">creater_code = #{createrCode},</if>
|
|
|
|
|
+ <if test="createdate != null">createdate = #{createdate},</if>
|
|
|
|
|
+ <if test="updaterCode != null">updater_code = #{updaterCode},</if>
|
|
|
|
|
+ <if test="updatedate != null">updatedate = #{updatedate},</if>
|
|
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
|
|
+ <if test="remarks != null">remarks = #{remarks},</if>
|
|
|
|
|
+ <if test="approveStatus != null">approve_status = #{approveStatus},</if>
|
|
|
|
|
+ <if test="installStatus != null">install_status = #{installStatus},</if>
|
|
|
|
|
+ <if test="removeStatus != null">remove_status = #{removeStatus},</if>
|
|
|
|
|
+ <if test="blindType != null">blind_type = #{blindType},</if>
|
|
|
|
|
+ <if test="startupStatus != null">startup_status = #{startupStatus},</if>
|
|
|
|
|
+ </trim>
|
|
|
|
|
+ where id = #{id}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="deleteTPlantBlindById" parameterType="Long">
|
|
|
|
|
+ update t_plant_blind set del_flag = 2 where id = #{id}
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+ <update id="deleteTPlantBlindByIds" parameterType="String">
|
|
|
|
|
+ update t_plant_blind set del_flag = 2 where id in
|
|
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
|
+ #{id}
|
|
|
|
|
+ </foreach>
|
|
|
|
|
+ </update>
|
|
|
|
|
+
|
|
|
|
|
+</mapper>
|