TEoegLockApplyMapper.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.project.eoeg.mapper.TEoegLockApplyMapper">
  6. <resultMap type="TEoegLockApply" id="TEoegLockApplyResult">
  7. <result property="id" column="id" />
  8. <result property="changeId" column="change_id" />
  9. <result property="apNo" column="ap_no" />
  10. <result property="processId" column="process_id" />
  11. <result property="remarks" column="remarks" />
  12. <result property="status" column="status" />
  13. <result property="delFlag" column="del_flag" />
  14. <result property="createrCode" column="creater_code" />
  15. <result property="createdate" column="createdate" />
  16. <result property="updaterCode" column="updater_code" />
  17. <result property="updatedate" column="updatedate" />
  18. <result property="deptId" column="dept_id" />
  19. <result property="deptName" column="dept_name" />
  20. </resultMap>
  21. <sql id="selectTEoegLockApplyVo">
  22. select d.id, d.change_id, d.ap_no, d.process_id, d.remarks, d.status, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id ,s.dept_name from t_eoeg_lock_apply d
  23. left join sys_dept s on s.dept_id = d.dept_id
  24. </sql>
  25. <select id="selectTEoegLockApplyList" parameterType="TEoegLockApply" resultMap="TEoegLockApplyResult">
  26. <include refid="selectTEoegLockApplyVo"/>
  27. <where>
  28. <if test="changeId != null "> and change_id = #{changeId}</if>
  29. <if test="apNo != null and apNo != ''"> and ap_no = #{apNo}</if>
  30. <if test="processId != null and processId != ''"> and process_id = #{processId}</if>
  31. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  32. <if test="status != null "> and status = #{status}</if>
  33. <if test="createrCode != null and createrCode != ''"> and creater_code = #{createrCode}</if>
  34. <if test="createdate != null "> and createdate = #{createdate}</if>
  35. <if test="updaterCode != null "> and updater_code = #{updaterCode}</if>
  36. <if test="updatedate != null "> and updatedate = #{updatedate}</if>
  37. <if test="deptId != null "> and dept_id = #{deptId}</if>
  38. and d.del_flag = 0
  39. </where>
  40. <!-- 数据范围过滤 -->
  41. ${params.dataScope}
  42. </select>
  43. <select id="selectTEoegLockApplyById" parameterType="Long" resultMap="TEoegLockApplyResult">
  44. <include refid="selectTEoegLockApplyVo"/>
  45. where id = #{id}
  46. </select>
  47. <insert id="insertTEoegLockApply" parameterType="TEoegLockApply">
  48. <selectKey keyProperty="id" resultType="long" order="BEFORE">
  49. SELECT seq_t_eoeg_lock_apply.NEXTVAL as id FROM DUAL
  50. </selectKey>
  51. insert into t_eoeg_lock_apply
  52. <trim prefix="(" suffix=")" suffixOverrides=",">
  53. <if test="id != null">id,</if>
  54. <if test="changeId != null">change_id,</if>
  55. <if test="apNo != null">ap_no,</if>
  56. <if test="processId != null">process_id,</if>
  57. <if test="remarks != null">remarks,</if>
  58. <if test="status != null">status,</if>
  59. <if test="delFlag != null">del_flag,</if>
  60. <if test="createrCode != null">creater_code,</if>
  61. <if test="createdate != null">createdate,</if>
  62. <if test="updaterCode != null">updater_code,</if>
  63. <if test="updatedate != null">updatedate,</if>
  64. <if test="deptId != null">dept_id,</if>
  65. </trim>
  66. <trim prefix="values (" suffix=")" suffixOverrides=",">
  67. <if test="id != null">#{id},</if>
  68. <if test="changeId != null">#{changeId},</if>
  69. <if test="apNo != null">#{apNo},</if>
  70. <if test="processId != null">#{processId},</if>
  71. <if test="remarks != null">#{remarks},</if>
  72. <if test="status != null">#{status},</if>
  73. <if test="delFlag != null">#{delFlag},</if>
  74. <if test="createrCode != null">#{createrCode},</if>
  75. <if test="createdate != null">#{createdate},</if>
  76. <if test="updaterCode != null">#{updaterCode},</if>
  77. <if test="updatedate != null">#{updatedate},</if>
  78. <if test="deptId != null">#{deptId},</if>
  79. </trim>
  80. </insert>
  81. <update id="updateTEoegLockApply" parameterType="TEoegLockApply">
  82. update t_eoeg_lock_apply
  83. <trim prefix="SET" suffixOverrides=",">
  84. <if test="changeId != null">change_id = #{changeId},</if>
  85. <if test="apNo != null">ap_no = #{apNo},</if>
  86. <if test="processId != null">process_id = #{processId},</if>
  87. <if test="remarks != null">remarks = #{remarks},</if>
  88. <if test="status != null">status = #{status},</if>
  89. <if test="delFlag != null">del_flag = #{delFlag},</if>
  90. <if test="createrCode != null">creater_code = #{createrCode},</if>
  91. <if test="createdate != null">createdate = #{createdate},</if>
  92. <if test="updaterCode != null">updater_code = #{updaterCode},</if>
  93. <if test="updatedate != null">updatedate = #{updatedate},</if>
  94. <if test="deptId != null">dept_id = #{deptId},</if>
  95. </trim>
  96. where id = #{id}
  97. </update>
  98. <update id="deleteTEoegLockApplyById" parameterType="Long">
  99. update t_eoeg_lock_apply set del_flag = 2 where id = #{id}
  100. </update>
  101. <update id="deleteTEoegLockApplyByIds" parameterType="String">
  102. update t_eoeg_lock_apply set del_flag = 2 where id in
  103. <foreach item="id" collection="array" open="(" separator="," close=")">
  104. #{id}
  105. </foreach>
  106. </update>
  107. </mapper>