123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <?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.intact.mapper.TApproveMaintenanceMapper">
-
- <resultMap type="TApproveMaintenance" id="TApproveMaintenanceResult">
- <result property="id" column="id" />
- <result property="userId" column="user_id" />
- <result property="devId" column="dev_id" />
- <result property="devType" column="dev_type" />
- <result property="approveType" column="approve_type" />
- <result property="content" column="content" />
- <result property="fileUrls" column="file_urls" />
- <result property="status" column="status" />
- <result property="creattime" column="creattime" />
- <result property="enddate" column="enddate" />
- <result property="processId" column="process_id" />
- <result property="apNo" column="ap_no" />
- <result property="reportId" column="report_id" />
- <result property="monthId" column="month_id" />
- <result property="delFlag" column="del_flag" />
- <result property="deptId" column="dept_id" />
- <result property="deptName" column="dept_name" />
- </resultMap>
- <sql id="selectTApproveMaintenanceVo">
- select d.id, d.user_id, d.dev_id, d.dev_type, d.approve_type, d.content, d.file_urls, d.status, d.creattime, d.enddate, d.process_id, d.ap_no, d.report_id, d.month_id, d.del_flag, d.dept_id ,s.dept_name from t_approve_maintenance d
- left join sys_dept s on s.dept_id = d.dept_id
- </sql>
- <select id="selectTApproveMaintenanceList" parameterType="TApproveMaintenance" resultMap="TApproveMaintenanceResult">
- <include refid="selectTApproveMaintenanceVo"/>
- <where>
- <if test="userId != null "> and user_id = #{userId}</if>
- <if test="devId != null and devId != ''"> and dev_id = #{devId}</if>
- <if test="devType != null "> and dev_type = #{devType}</if>
- <if test="approveType != null "> and approve_type = #{approveType}</if>
- <if test="content != null and content != ''"> and content = #{content}</if>
- <if test="fileUrls != null and fileUrls != ''"> and file_urls = #{fileUrls}</if>
- <if test="status != null "> and status = #{status}</if>
- <if test="creattime != null "> and creattime = #{creattime}</if>
- <if test="enddate != null "> and enddate = #{enddate}</if>
- <if test="processId != null and processId != ''"> and process_id = #{processId}</if>
- <if test="apNo != null and apNo != ''"> and ap_no = #{apNo}</if>
- <if test="reportId != null and reportId != ''"> and report_id = #{reportId}</if>
- <if test="monthId != null and monthId != ''"> and month_id = #{monthId}</if>
- <if test="deptId != null "> and dept_id = #{deptId}</if>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- </select>
-
- <select id="selectTApproveMaintenanceById" parameterType="Long" resultMap="TApproveMaintenanceResult">
- <include refid="selectTApproveMaintenanceVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertTApproveMaintenance" parameterType="TApproveMaintenance">
- <selectKey keyProperty="id" resultType="long" order="BEFORE">
- SELECT seq_t_approve_maintenance.NEXTVAL as id FROM DUAL
- </selectKey>
- insert into t_approve_maintenance
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="userId != null">user_id,</if>
- <if test="devId != null">dev_id,</if>
- <if test="devType != null">dev_type,</if>
- <if test="approveType != null">approve_type,</if>
- <if test="content != null">content,</if>
- <if test="fileUrls != null">file_urls,</if>
- <if test="status != null">status,</if>
- <if test="creattime != null">creattime,</if>
- <if test="enddate != null">enddate,</if>
- <if test="processId != null">process_id,</if>
- <if test="apNo != null">ap_no,</if>
- <if test="reportId != null">report_id,</if>
- <if test="monthId != null">month_id,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="deptId != null">dept_id,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="userId != null">#{userId},</if>
- <if test="devId != null">#{devId},</if>
- <if test="devType != null">#{devType},</if>
- <if test="approveType != null">#{approveType},</if>
- <if test="content != null">#{content},</if>
- <if test="fileUrls != null">#{fileUrls},</if>
- <if test="status != null">#{status},</if>
- <if test="creattime != null">#{creattime},</if>
- <if test="enddate != null">#{enddate},</if>
- <if test="processId != null">#{processId},</if>
- <if test="apNo != null">#{apNo},</if>
- <if test="reportId != null">#{reportId},</if>
- <if test="monthId != null">#{monthId},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="deptId != null">#{deptId},</if>
- </trim>
- </insert>
- <update id="updateTApproveMaintenance" parameterType="TApproveMaintenance">
- update t_approve_maintenance
- <trim prefix="SET" suffixOverrides=",">
- <if test="userId != null">user_id = #{userId},</if>
- <if test="devId != null">dev_id = #{devId},</if>
- <if test="devType != null">dev_type = #{devType},</if>
- <if test="approveType != null">approve_type = #{approveType},</if>
- <if test="content != null">content = #{content},</if>
- <if test="fileUrls != null">file_urls = #{fileUrls},</if>
- <if test="status != null">status = #{status},</if>
- <if test="creattime != null">creattime = #{creattime},</if>
- <if test="enddate != null">enddate = #{enddate},</if>
- <if test="processId != null">process_id = #{processId},</if>
- <if test="apNo != null">ap_no = #{apNo},</if>
- <if test="reportId != null">report_id = #{reportId},</if>
- <if test="monthId != null">month_id = #{monthId},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="deptId != null">dept_id = #{deptId},</if>
- </trim>
- where id = #{id}
- </update>
- <update id="deleteTApproveMaintenanceById" parameterType="Long">
- update t_approve_maintenance set del_flag = 2 where id = #{id}
- </update>
- <update id="deleteTApproveMaintenanceByIds" parameterType="String">
- update t_approve_maintenance set del_flag = 2 where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
-
- </mapper>
|