TEoegDailyManagementMapper.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  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.plant.mapper.TEoegDailyManagementMapper">
  6. <resultMap type="TEoegDailyManagement" id="TEoegDailyManagementResult">
  7. <result property="id" column="id" />
  8. <result property="year" column="year" />
  9. <result property="startMonth" column="start_month" />
  10. <result property="endMonth" column="end_month" />
  11. <result property="rcCode" column="rc_code" />
  12. <result property="subject" column="subject" />
  13. <result property="workContent" column="work_content" />
  14. <result property="responsiblePerson" column="responsible_person" />
  15. <result property="frequency" column="frequency" />
  16. <result property="standard" column="standard" />
  17. <result property="finishStatus" column="finish_status" />
  18. <result property="q1Jan" column="q1_jan" />
  19. <result property="q1Feb" column="q1_feb" />
  20. <result property="q1Mar" column="q1_mar" />
  21. <result property="q2Apr" column="q2_apr" />
  22. <result property="q2May" column="q2_may" />
  23. <result property="q2Jun" column="q2_jun" />
  24. <result property="q3Jul" column="q3_jul" />
  25. <result property="q3Aug" column="q3_aug" />
  26. <result property="q3Sep" column="q3_sep" />
  27. <result property="q4Oct" column="q4_oct" />
  28. <result property="q4Nov" column="q4_nov" />
  29. <result property="q4Dec" column="q4_dec" />
  30. <result property="delFlag" column="del_flag" />
  31. <result property="createrCode" column="creater_code" />
  32. <result property="createdate" column="createdate" />
  33. <result property="updaterCode" column="updater_code" />
  34. <result property="updatedate" column="updatedate" />
  35. <result property="deptId" column="dept_id" />
  36. <result property="remarks" column="remarks" />
  37. <result property="deptName" column="dept_name" />
  38. </resultMap>
  39. <sql id="selectTEoegDailyManagementVo">
  40. select d.id, d.year, d.start_month, d.end_month, d.rc_code, d.subject, d.work_content, d.responsible_person, d.frequency, d.standard, d.finish_status, d.q1_jan, d.q1_feb, d.q1_mar, d.q2_apr, d.q2_may, d.q2_jun, d.q3_jul, d.q3_aug, d.q3_sep, d.q4_oct, d.q4_nov, d.q4_dec, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_eoeg_daily_management d
  41. left join sys_dept s on s.dept_id = d.dept_id
  42. </sql>
  43. <select id="selectTEoegDailyManagementList" parameterType="TEoegDailyManagement" resultMap="TEoegDailyManagementResult">
  44. <include refid="selectTEoegDailyManagementVo"/>
  45. <where>
  46. <if test="year != null and year != ''"> and year = #{year}</if>
  47. <if test="startMonth != null and startMonth != ''"> and start_month = #{startMonth}</if>
  48. <if test="endMonth != null and endMonth != ''"> and end_month = #{endMonth}</if>
  49. <if test="rcCode != null and rcCode != ''"> and rc_code = #{rcCode}</if>
  50. <if test="subject != null and subject != ''"> and subject = #{subject}</if>
  51. <if test="workContent != null and workContent != ''"> and work_content = #{workContent}</if>
  52. <if test="responsiblePerson != null and responsiblePerson != ''"> and responsible_person = #{responsiblePerson}</if>
  53. <if test="frequency != null and frequency != ''"> and frequency = #{frequency}</if>
  54. <if test="standard != null and standard != ''"> and standard = #{standard}</if>
  55. <if test="finishStatus != null and finishStatus != ''"> and finish_status = #{finishStatus}</if>
  56. <if test="q1Jan != null and q1Jan != ''"> and q1_jan = #{q1Jan}</if>
  57. <if test="q1Feb != null and q1Feb != ''"> and q1_feb = #{q1Feb}</if>
  58. <if test="q1Mar != null and q1Mar != ''"> and q1_mar = #{q1Mar}</if>
  59. <if test="q2Apr != null and q2Apr != ''"> and q2_apr = #{q2Apr}</if>
  60. <if test="q2May != null and q2May != ''"> and q2_may = #{q2May}</if>
  61. <if test="q2Jun != null and q2Jun != ''"> and q2_jun = #{q2Jun}</if>
  62. <if test="q3Jul != null and q3Jul != ''"> and q3_jul = #{q3Jul}</if>
  63. <if test="q3Aug != null and q3Aug != ''"> and q3_aug = #{q3Aug}</if>
  64. <if test="q3Sep != null and q3Sep != ''"> and q3_sep = #{q3Sep}</if>
  65. <if test="q4Oct != null and q4Oct != ''"> and q4_oct = #{q4Oct}</if>
  66. <if test="q4Nov != null and q4Nov != ''"> and q4_nov = #{q4Nov}</if>
  67. <if test="q4Dec != null and q4Dec != ''"> and q4_dec = #{q4Dec}</if>
  68. <if test="createrCode != null and createrCode != ''"> and creater_code = #{createrCode}</if>
  69. <if test="createdate != null "> and createdate = #{createdate}</if>
  70. <if test="updaterCode != null and updaterCode != ''"> and updater_code = #{updaterCode}</if>
  71. <if test="updatedate != null "> and updatedate = #{updatedate}</if>
  72. <if test="deptId != null "> and dept_id = #{deptId}</if>
  73. <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
  74. and d.del_flag = 0
  75. </where>
  76. <!-- 数据范围过滤 -->
  77. ${params.dataScope}
  78. </select>
  79. <select id="selectTEoegDailyManagementById" parameterType="Long" resultMap="TEoegDailyManagementResult">
  80. <include refid="selectTEoegDailyManagementVo"/>
  81. where id = #{id}
  82. </select>
  83. <insert id="insertTEoegDailyManagement" parameterType="TEoegDailyManagement">
  84. <selectKey keyProperty="id" resultType="long" order="BEFORE">
  85. SELECT seq_t_eoeg_daily_management.NEXTVAL as id FROM DUAL
  86. </selectKey>
  87. insert into t_eoeg_daily_management
  88. <trim prefix="(" suffix=")" suffixOverrides=",">
  89. <if test="id != null">id,</if>
  90. <if test="year != null">year,</if>
  91. <if test="startMonth != null">start_month,</if>
  92. <if test="endMonth != null">end_month,</if>
  93. <if test="rcCode != null">rc_code,</if>
  94. <if test="subject != null">subject,</if>
  95. <if test="workContent != null">work_content,</if>
  96. <if test="responsiblePerson != null">responsible_person,</if>
  97. <if test="frequency != null">frequency,</if>
  98. <if test="standard != null">standard,</if>
  99. <if test="finishStatus != null">finish_status,</if>
  100. <if test="q1Jan != null">q1_jan,</if>
  101. <if test="q1Feb != null">q1_feb,</if>
  102. <if test="q1Mar != null">q1_mar,</if>
  103. <if test="q2Apr != null">q2_apr,</if>
  104. <if test="q2May != null">q2_may,</if>
  105. <if test="q2Jun != null">q2_jun,</if>
  106. <if test="q3Jul != null">q3_jul,</if>
  107. <if test="q3Aug != null">q3_aug,</if>
  108. <if test="q3Sep != null">q3_sep,</if>
  109. <if test="q4Oct != null">q4_oct,</if>
  110. <if test="q4Nov != null">q4_nov,</if>
  111. <if test="q4Dec != null">q4_dec,</if>
  112. <if test="delFlag != null">del_flag,</if>
  113. <if test="createrCode != null">creater_code,</if>
  114. <if test="createdate != null">createdate,</if>
  115. <if test="updaterCode != null">updater_code,</if>
  116. <if test="updatedate != null">updatedate,</if>
  117. <if test="deptId != null">dept_id,</if>
  118. <if test="remarks != null">remarks,</if>
  119. </trim>
  120. <trim prefix="values (" suffix=")" suffixOverrides=",">
  121. <if test="id != null">#{id},</if>
  122. <if test="year != null">#{year},</if>
  123. <if test="startMonth != null">#{startMonth},</if>
  124. <if test="endMonth != null">#{endMonth},</if>
  125. <if test="rcCode != null">#{rcCode},</if>
  126. <if test="subject != null">#{subject},</if>
  127. <if test="workContent != null">#{workContent},</if>
  128. <if test="responsiblePerson != null">#{responsiblePerson},</if>
  129. <if test="frequency != null">#{frequency},</if>
  130. <if test="standard != null">#{standard},</if>
  131. <if test="finishStatus != null">#{finishStatus},</if>
  132. <if test="q1Jan != null">#{q1Jan},</if>
  133. <if test="q1Feb != null">#{q1Feb},</if>
  134. <if test="q1Mar != null">#{q1Mar},</if>
  135. <if test="q2Apr != null">#{q2Apr},</if>
  136. <if test="q2May != null">#{q2May},</if>
  137. <if test="q2Jun != null">#{q2Jun},</if>
  138. <if test="q3Jul != null">#{q3Jul},</if>
  139. <if test="q3Aug != null">#{q3Aug},</if>
  140. <if test="q3Sep != null">#{q3Sep},</if>
  141. <if test="q4Oct != null">#{q4Oct},</if>
  142. <if test="q4Nov != null">#{q4Nov},</if>
  143. <if test="q4Dec != null">#{q4Dec},</if>
  144. <if test="delFlag != null">#{delFlag},</if>
  145. <if test="createrCode != null">#{createrCode},</if>
  146. <if test="createdate != null">#{createdate},</if>
  147. <if test="updaterCode != null">#{updaterCode},</if>
  148. <if test="updatedate != null">#{updatedate},</if>
  149. <if test="deptId != null">#{deptId},</if>
  150. <if test="remarks != null">#{remarks},</if>
  151. </trim>
  152. </insert>
  153. <update id="updateTEoegDailyManagement" parameterType="TEoegDailyManagement">
  154. update t_eoeg_daily_management
  155. <trim prefix="SET" suffixOverrides=",">
  156. <if test="year != null">year = #{year},</if>
  157. <if test="startMonth != null">start_month = #{startMonth},</if>
  158. <if test="endMonth != null">end_month = #{endMonth},</if>
  159. <if test="rcCode != null">rc_code = #{rcCode},</if>
  160. <if test="subject != null">subject = #{subject},</if>
  161. <if test="workContent != null">work_content = #{workContent},</if>
  162. <if test="responsiblePerson != null">responsible_person = #{responsiblePerson},</if>
  163. <if test="frequency != null">frequency = #{frequency},</if>
  164. <if test="standard != null">standard = #{standard},</if>
  165. <if test="finishStatus != null">finish_status = #{finishStatus},</if>
  166. <if test="q1Jan != null">q1_jan = #{q1Jan},</if>
  167. <if test="q1Feb != null">q1_feb = #{q1Feb},</if>
  168. <if test="q1Mar != null">q1_mar = #{q1Mar},</if>
  169. <if test="q2Apr != null">q2_apr = #{q2Apr},</if>
  170. <if test="q2May != null">q2_may = #{q2May},</if>
  171. <if test="q2Jun != null">q2_jun = #{q2Jun},</if>
  172. <if test="q3Jul != null">q3_jul = #{q3Jul},</if>
  173. <if test="q3Aug != null">q3_aug = #{q3Aug},</if>
  174. <if test="q3Sep != null">q3_sep = #{q3Sep},</if>
  175. <if test="q4Oct != null">q4_oct = #{q4Oct},</if>
  176. <if test="q4Nov != null">q4_nov = #{q4Nov},</if>
  177. <if test="q4Dec != null">q4_dec = #{q4Dec},</if>
  178. <if test="delFlag != null">del_flag = #{delFlag},</if>
  179. <if test="createrCode != null">creater_code = #{createrCode},</if>
  180. <if test="createdate != null">createdate = #{createdate},</if>
  181. <if test="updaterCode != null">updater_code = #{updaterCode},</if>
  182. <if test="updatedate != null">updatedate = #{updatedate},</if>
  183. <if test="deptId != null">dept_id = #{deptId},</if>
  184. <if test="remarks != null">remarks = #{remarks},</if>
  185. </trim>
  186. where id = #{id}
  187. </update>
  188. <update id="deleteTEoegDailyManagementById" parameterType="Long">
  189. update t_eoeg_daily_management set del_flag = 2 where id = #{id}
  190. </update>
  191. <update id="deleteTEoegDailyManagementByIds" parameterType="String">
  192. update t_eoeg_daily_management set del_flag = 2 where id in
  193. <foreach item="id" collection="array" open="(" separator="," close=")">
  194. #{id}
  195. </foreach>
  196. </update>
  197. </mapper>