GoafCheckRecordMapper.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  3. "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  4. <mapper namespace="com.zhyc.xps.goaf.mapper.GoafCheckRecordMapper">
  5. <resultMap id="GoafCheckRecordMapper" type="com.zhyc.xps.goaf.entity.GoafCheckRecord">
  6. <id column="check_record_id" property="checkRecordId" jdbcType="BIGINT"/>
  7. <result column="oc_id" property="ocId" jdbcType="BIGINT"/>
  8. <result column="goaf_id" property="goafId" jdbcType="BIGINT"/>
  9. <result column="job_id" property="jobId" jdbcType="BIGINT"/>
  10. <result column="check_def_id" property="checkDefId" jdbcType="BIGINT"/>
  11. <result column="checklist_id" property="checklistId" jdbcType="BIGINT"/>
  12. <result column="task_title" property="taskTitle" jdbcType="VARCHAR"/>
  13. <result column="task_desc" property="taskDesc" jdbcType="VARCHAR"/>
  14. <result column="expected_start_date" property="expectedStartDate" jdbcType="DATE"/>
  15. <result column="expected_end_date" property="expectedEndDate" jdbcType="DATE"/>
  16. <result column="check_time" property="checkTime" jdbcType="TIMESTAMP"/>
  17. <result column="handle_account_id" property="handleAccountId" jdbcType="BIGINT"/>
  18. <result column="handle_account_name" property="handleAccountName" jdbcType="VARCHAR"/>
  19. <result column="handle_position_id" property="handlePositionId" jdbcType="BIGINT"/>
  20. <result column="handle_position_name" property="handlePositionName" jdbcType="VARCHAR"/>
  21. <result column="handle_group_id" property="handleGroupId" jdbcType="BIGINT"/>
  22. <result column="handle_group_name" property="handleGroupName" jdbcType="VARCHAR"/>
  23. <result column="status" property="status" jdbcType="BIGINT"/>
  24. <result column="check_item_pass" property="checkItemPass" jdbcType="VARCHAR"/>
  25. <result column="check_item_nopass" property="checkItemNopass" jdbcType="VARCHAR"/>
  26. </resultMap>
  27. <resultMap id="GoafCheckRecordDtoMapper" type="com.zhyc.xps.goaf.dto.GoafCheckRecordDto">
  28. <id column="check_record_id" property="checkRecordId" jdbcType="BIGINT"/>
  29. <result column="oc_id" property="ocId" jdbcType="BIGINT"/>
  30. <result column="goaf_id" property="goafId" jdbcType="BIGINT"/>
  31. <result column="job_id" property="jobId" jdbcType="BIGINT"/>
  32. <result column="check_def_id" property="checkDefId" jdbcType="BIGINT"/>
  33. <result column="checklist_id" property="checklistId" jdbcType="BIGINT"/>
  34. <result column="task_title" property="taskTitle" jdbcType="VARCHAR"/>
  35. <result column="task_desc" property="taskDesc" jdbcType="VARCHAR"/>
  36. <result column="expected_start_date" property="expectedStartDate" jdbcType="DATE"/>
  37. <result column="expected_end_date" property="expectedEndDate" jdbcType="DATE"/>
  38. <result column="check_time" property="checkTime" jdbcType="TIMESTAMP"/>
  39. <result column="handle_account_id" property="handleAccountId" jdbcType="BIGINT"/>
  40. <result column="handle_account_name" property="handleAccountName" jdbcType="VARCHAR"/>
  41. <result column="handle_position_id" property="handlePositionId" jdbcType="BIGINT"/>
  42. <result column="handle_position_name" property="handlePositionName" jdbcType="VARCHAR"/>
  43. <result column="handle_group_id" property="handleGroupId" jdbcType="BIGINT"/>
  44. <result column="handle_group_name" property="handleGroupName" jdbcType="VARCHAR"/>
  45. <result column="status" property="status" jdbcType="BIGINT"/>
  46. <result column="check_item_pass" property="checkItemPass" jdbcType="VARCHAR"/>
  47. <result column="check_item_nopass" property="checkItemNopass" jdbcType="VARCHAR"/>
  48. <result column="goaf_orebelt" property="goafOrebelt" jdbcType="BIGINT"/>
  49. <result column="goaf_orebody" property="goafOrebody" jdbcType="BIGINT"/>
  50. <result column="goaf_oreheight" property="goafOreheight" jdbcType="BIGINT"/>
  51. <result column="goaf_name" property="goafName" jdbcType="VARCHAR"/>
  52. </resultMap>
  53. <select id="getByList" parameterType="java.util.Map" resultMap="GoafCheckRecordDtoMapper">
  54. SELECT A.*,
  55. B.goaf_orebelt,
  56. B.goaf_orebody,
  57. B.goaf_oreheight,
  58. B.goaf_name
  59. FROM goaf_check_record AS A
  60. LEFT JOIN goaf_baseinfo AS B ON A.goaf_id = B.goaf_id
  61. WHERE A.oc_id = #{ocId ,jdbcType=BIGINT}
  62. <if test="goafId !=null">
  63. AND A.goaf_id = #{goafId ,jdbcType=BIGINT}
  64. </if>
  65. <if test="jobId !=null">
  66. AND A.job_id = #{jobId ,jdbcType=BIGINT}
  67. </if>
  68. <if test="handleGroupId !=null">
  69. AND A.handle_group_id = #{handleGroupId ,jdbcType=BIGINT}
  70. </if>
  71. <if test="handleAccountId !=null">
  72. AND A.handle_account_id = #{handleAccountId ,jdbcType=BIGINT}
  73. </if>
  74. <if test="status !=null">
  75. AND A.status = #{status ,jdbcType=BIGINT}
  76. </if>
  77. <if test="checkResult !=null">
  78. AND A.check_result = #{checkResult ,jdbcType=BIGINT}
  79. </if>
  80. <if test="checkStartDate != null and checkEndDate != null">
  81. <![CDATA[
  82. AND A.check_time >= #{checkStartDate, jdbcType=TIMESTAMP}
  83. AND A.check_time <= #{checkEndDate, jdbcType=TIMESTAMP}
  84. ]]>
  85. </if>
  86. </select>
  87. <!--分页查询-->
  88. <select id="getByPage" parameterType="java.util.Map" resultMap="GoafCheckRecordDtoMapper">
  89. SELECT A.*,
  90. B.goaf_orebelt,
  91. B.goaf_orebody,
  92. B.goaf_oreheight,
  93. B.goaf_name
  94. FROM goaf_check_record AS A
  95. LEFT JOIN goaf_baseinfo AS B ON A.goaf_id = B.goaf_id
  96. WHERE A.oc_id = #{ocId ,jdbcType=BIGINT}
  97. <if test="goafId !=null">
  98. AND A.goaf_id = #{goafId ,jdbcType=BIGINT}
  99. </if>
  100. <if test="jobId !=null">
  101. AND A.job_id = #{jobId ,jdbcType=BIGINT}
  102. </if>
  103. <if test="handleGroupId !=null">
  104. AND A.handle_group_id = #{handleGroupId ,jdbcType=BIGINT}
  105. </if>
  106. <if test="handleAccountId !=null">
  107. AND A.handle_account_id = #{handleAccountId ,jdbcType=BIGINT}
  108. </if>
  109. <if test="status !=null">
  110. AND A.status = #{status ,jdbcType=BIGINT}
  111. </if>
  112. <if test="checkResult !=null">
  113. AND A.check_result = #{checkResult ,jdbcType=BIGINT}
  114. </if>
  115. <if test="checkStartDate != null and checkEndDate != null">
  116. <![CDATA[
  117. AND A.check_time >= #{checkStartDate, jdbcType=TIMESTAMP}
  118. AND A.check_time <= #{checkEndDate, jdbcType=TIMESTAMP}
  119. ]]>
  120. </if>
  121. </select>
  122. <select id="getBycheckRecordId" resultMap="GoafCheckRecordMapper">
  123. SELECT *
  124. FROM goaf_check_record
  125. WHERE check_record_id = #{checkRecordId, jdbcType=BIGINT}
  126. </select>
  127. <insert id="create" parameterType="com.zhyc.xps.goaf.entity.GoafCheckRecord">
  128. insert into goaf_check_record
  129. <trim prefix="(" suffix=")" suffixOverrides=",">
  130. <if test="checkRecordId != null">
  131. check_record_id,
  132. </if>
  133. <if test="ocId != null">
  134. oc_id,
  135. </if>
  136. <if test="goafId != null">
  137. goaf_id,
  138. </if>
  139. <if test="jobId != null">
  140. job_id,
  141. </if>
  142. <if test="checkDefId != null">
  143. check_def_id,
  144. </if>
  145. <if test="checklistId != null">
  146. checklist_id,
  147. </if>
  148. <if test="taskTitle != null and taskTitle != ''">
  149. task_title,
  150. </if>
  151. <if test="taskDesc != null and taskDesc != ''">
  152. task_desc,
  153. </if>
  154. <if test="expectedStartDate != null">
  155. expected_start_date,
  156. </if>
  157. <if test="expectedEndDate != null">
  158. expected_end_date,
  159. </if>
  160. <if test="checkTime != null">
  161. check_time,
  162. </if>
  163. <if test="handleAccountId != null">
  164. handle_account_id,
  165. </if>
  166. <if test="handleAccountName != null and handleAccountName != ''">
  167. handle_account_name,
  168. </if>
  169. <if test="handlePositionId != null">
  170. handle_position_id,
  171. </if>
  172. <if test="handlePositionName != null and handlePositionName != ''">
  173. handle_position_name,
  174. </if>
  175. <if test="handleGroupId != null">
  176. handle_group_id,
  177. </if>
  178. <if test="handleGroupName != null and handleGroupName != ''">
  179. handle_group_name,
  180. </if>
  181. <if test="status != null">
  182. status,
  183. </if>
  184. <if test="checkResult != null">
  185. check_result,
  186. </if>
  187. <if test="checkItemPass != null and checkItemPass != ''">
  188. check_item_pass,
  189. </if>
  190. <if test="checkItemNopass != null and checkItemNopass != ''">
  191. check_item_nopass,
  192. </if>
  193. </trim>
  194. <trim prefix="values (" suffix=")" suffixOverrides=",">
  195. <if test="checkRecordId != null">
  196. #{checkRecordId, jdbcType=BIGINT},
  197. </if>
  198. <if test="ocId != null">
  199. #{ocId, jdbcType=BIGINT},
  200. </if>
  201. <if test="goafId != null">
  202. #{goafId, jdbcType=BIGINT},
  203. </if>
  204. <if test="jobId != null">
  205. #{jobId, jdbcType=BIGINT},
  206. </if>
  207. <if test="checkDefId != null">
  208. #{checkDefId, jdbcType=BIGINT},
  209. </if>
  210. <if test="checklistId != null">
  211. #{checklistId, jdbcType=BIGINT},
  212. </if>
  213. <if test="taskTitle != null and taskTitle != ''">
  214. #{taskTitle, jdbcType=VARCHAR},
  215. </if>
  216. <if test="taskDesc != null and taskDesc != ''">
  217. #{taskDesc, jdbcType=VARCHAR},
  218. </if>
  219. <if test="expectedStartDate != null">
  220. #{expectedStartDate, jdbcType=DATE},
  221. </if>
  222. <if test="expectedEndDate != null">
  223. #{expectedEndDate, jdbcType=DATE},
  224. </if>
  225. <if test="checkTime != null">
  226. #{checkTime, jdbcType=DATE},
  227. </if>
  228. <if test="handleAccountId != null">
  229. #{handleAccountId, jdbcType=BIGINT},
  230. </if>
  231. <if test="handleAccountName != null and handleAccountName != ''">
  232. #{handleAccountName, jdbcType=VARCHAR},
  233. </if>
  234. <if test="handlePositionId != null">
  235. #{handlePositionId, jdbcType=BIGINT},
  236. </if>
  237. <if test="handlePositionName != null and handlePositionName != ''">
  238. #{handlePositionName, jdbcType=VARCHAR},
  239. </if>
  240. <if test="handleGroupId != null">
  241. #{handleGroupId, jdbcType=BIGINT},
  242. </if>
  243. <if test="handleGroupName != null and handleGroupName != ''">
  244. #{handleGroupName, jdbcType=VARCHAR},
  245. </if>
  246. <if test="status != null">
  247. #{status, jdbcType=BIGINT},
  248. </if>
  249. <if test="checkResult != null">
  250. #{checkResult, jdbcType=BIGINT},
  251. </if>
  252. <if test="checkItemPass != null and checkItemPass != ''">
  253. #{checkItemPass, jdbcType=VARCHAR},
  254. </if>
  255. <if test="checkItemNopass != null and checkItemNopass != ''">
  256. #{checkItemNopass, jdbcType=VARCHAR},
  257. </if>
  258. </trim>
  259. </insert>
  260. <!-- &lt;!&ndash;Update更新&ndash;&gt;-->
  261. <!-- <update id="updatebyjobid" parameterType="com.zhyc.xps.goaf.entity.GoafCheckRecord">-->
  262. <!-- UPDATE goaf_check_record-->
  263. <!-- <trim suffixOverrides=",">-->
  264. <!-- <set>-->
  265. <!-- <if test="status != null">-->
  266. <!-- status = #{status ,jdbcType=BIGINT},-->
  267. <!-- </if>-->
  268. <!-- </set>-->
  269. <!-- </trim>-->
  270. <!-- WHERE job_id = #{jobId ,jdbcType=BIGINT}-->
  271. <!-- </update>-->
  272. <!-- <delete id="delete" >-->
  273. <!-- DELETE FROM goaf_check_record-->
  274. <!-- WHERE checkRecord_id = #{checkRecordId, jdbcType=BIGINT}-->
  275. <!-- </delete>-->
  276. </mapper>