123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176 |
- <?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.pssr.mapper.TPssrSubcontentMapper">
-
- <resultMap type="TPssrSubcontent" id="TPssrSubcontentResult">
- <result property="id" column="id" />
- <result property="approveId" column="approve_id" />
- <result property="aboveallId" column="aboveall_id" />
- <result property="serialNumber" column="serial_number" />
- <result property="item" column="item" />
- <result property="content" column="content" />
- <result property="confirm" column="confirm" />
- <result property="confirmName" column="confirm_name" />
- <result property="confirmationDate" column="confirmation_date" />
- <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="unitDes" column="unit_des" />
- <result property="unit" column="unit" />
- <result property="region" column="region" />
- <result property="approveStatus" column="approve_status" />
- <result property="deptName" column="dept_name" />
- <result property="forShort" column="for_short" />
- <result property="deptUnit" column="dept_unit" />
- </resultMap>
- <sql id="selectTPssrSubcontentVo">
- select d.for_short,d.dept_unit,d.id, d.approve_id, d.aboveall_id, d.serial_number, d.item, d.content, d.confirm,u.NICK_NAME confirm_name, d.confirmation_date, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.unit_des, d.unit, d.region, d.approve_status ,s.dept_name from t_pssr_subcontent d
- left join sys_dept s on s.dept_id = d.dept_id
- left join sys_user u on d.CONFIRM = u.USER_ID
- </sql>
- <select id="selectTPssrSubcontentList" parameterType="TPssrSubcontent" resultMap="TPssrSubcontentResult">
- <include refid="selectTPssrSubcontentVo"/>
- <where>
- <if test="approveId != null "> and approve_id = #{approveId}</if>
- <if test="aboveallId != null "> and aboveall_id = #{aboveallId}</if>
- <if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
- <if test="item != null and item != ''"> and item = #{item}</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="confirm != null and confirm != ''"> and confirm = #{confirm}</if>
- <if test="confirmationDate != null "> and confirmation_date = #{confirmationDate}</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="unitDes != null and unitDes != ''"> and unit_des = #{unitDes}</if>
- <if test="unit != null and unit != ''"> and unit = #{unit}</if>
- <if test="region != null and region != ''"> and region = #{region}</if>
- <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
- <if test="forShort != null "> and for_short = #{forShort}</if>
- <if test="deptUnit != null "> and dept_unit = #{deptUnit}</if>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- order by serial_number
- </select>
- <select id="selectTPssrSubcontentListByForShort" parameterType="TPssrSubcontent" resultMap="TPssrSubcontentResult">
- <include refid="selectTPssrSubcontentVo"/>
- <where>
- <if test="aboveallId != null "> and aboveall_id = #{aboveallId}</if>
- <if test="forShort != null "> and for_short in
- <foreach item="forShort" collection="array" open="(" separator="," close=")">
- #{forShort}
- </foreach></if>
- and d.del_flag = 0
- </where>
- </select>
-
- <select id="selectTPssrSubcontentById" parameterType="Long" resultMap="TPssrSubcontentResult">
- <include refid="selectTPssrSubcontentVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertTPssrSubcontent" parameterType="TPssrSubcontent">
- <selectKey keyProperty="id" resultType="long" order="BEFORE">
- SELECT seq_t_pssr_subcontent.NEXTVAL as id FROM DUAL
- </selectKey>
- insert into t_pssr_subcontent
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="approveId != null">approve_id,</if>
- <if test="aboveallId != null">aboveall_id,</if>
- <if test="serialNumber != null">serial_number,</if>
- <if test="item != null">item,</if>
- <if test="content != null">content,</if>
- <if test="confirm != null">confirm,</if>
- <if test="confirmationDate != null">confirmation_date,</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="unitDes != null">unit_des,</if>
- <if test="unit != null">unit,</if>
- <if test="region != null">region,</if>
- <if test="approveStatus != null">approve_status,</if>
- <if test="forShort != null">for_short,</if>
- <if test="deptUnit != null">dept_unit,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="approveId != null">#{approveId},</if>
- <if test="aboveallId != null">#{aboveallId},</if>
- <if test="serialNumber != null">#{serialNumber},</if>
- <if test="item != null">#{item},</if>
- <if test="content != null">#{content},</if>
- <if test="confirm != null">#{confirm},</if>
- <if test="confirmationDate != null">#{confirmationDate},</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="unitDes != null">#{unitDes},</if>
- <if test="unit != null">#{unit},</if>
- <if test="region != null">#{region},</if>
- <if test="approveStatus != null">#{approveStatus},</if>
- <if test="forShort != null">#{forShort},</if>
- <if test="deptUnit != null">#{deptUnit},</if>
- </trim>
- </insert>
- <update id="updateTPssrSubcontent" parameterType="TPssrSubcontent">
- update t_pssr_subcontent
- <trim prefix="SET" suffixOverrides=",">
- <if test="approveId != null">approve_id = #{approveId},</if>
- <if test="aboveallId != null">aboveall_id = #{aboveallId},</if>
- <if test="serialNumber != null">serial_number = #{serialNumber},</if>
- <if test="item != null">item = #{item},</if>
- <if test="content != null">content = #{content},</if>
- <if test="confirm != null">confirm = #{confirm},</if>
- <if test="confirmationDate != null">confirmation_date = #{confirmationDate},</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="unitDes != null">unit_des = #{unitDes},</if>
- <if test="unit != null">unit = #{unit},</if>
- <if test="region != null">region = #{region},</if>
- <if test="approveStatus != null">approve_status = #{approveStatus},</if>
- <if test="forShort != null">for_short = #{forShort},</if>
- <if test="deptUnit != null">dept_unit = #{deptUnit},</if>
- </trim>
- where id = #{id}
- </update>
- <update id="deleteTPssrSubcontentById" parameterType="Long">
- update t_pssr_subcontent set del_flag = 2 where id = #{id}
- </update>
- <update id="deleteTPssrSubcontentByIds" parameterType="String">
- update t_pssr_subcontent set del_flag = 2 where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
-
- </mapper>
|