BisInspChmclsDepwkDao.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.com.goldenwater.dcproj.dao.BisInspChmclsDepwkDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspChmclsDepwk" id="bisInspChmclsDepwkResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="isMakPaln" column="IS_MAK_PALN"/>
  8. <result property="isBuldRun" column="IS_BULD_RUN"/>
  9. <result property="isMakPub" column="IS_MAK_PUB"/>
  10. <result property="isMakSys" column="IS_MAK_SYS"/>
  11. <result property="isCmpChk" column="IS_CMP_CHK"/>
  12. <result property="isChkSys" column="IS_CHK_SYS"/>
  13. <result property="isTrdChk" column="IS_TRD_CHK"/>
  14. <result property="isBuldPblm" column="IS_BULD_PBLM"/>
  15. <result property="isVtPun" column="IS_VT_PUN"/>
  16. <result property="isSendWork" column="IS_SEND_WORK"/>
  17. <result property="persId" column="PERS_ID"/>
  18. <result property="intm" column="INTM"/>
  19. <result property="uptm" column="UPTM"/>
  20. <result property="note" column="NOTE"/>
  21. <result property="dataStat" column="DATA_STAT"/>
  22. <result property="state" column="STATE"/>
  23. </resultMap>
  24. <sql id="table_columns">
  25. ID,
  26. RGSTR_ID,
  27. IS_MAK_PALN,
  28. IS_BULD_RUN,
  29. IS_MAK_PUB,
  30. IS_MAK_SYS,
  31. IS_CMP_CHK,
  32. IS_CHK_SYS,
  33. IS_TRD_CHK,
  34. IS_BULD_PBLM,
  35. IS_VT_PUN,
  36. IS_SEND_WORK,
  37. PERS_ID,
  38. INTM,
  39. UPTM,
  40. NOTE,
  41. DATA_STAT,
  42. STATE
  43. </sql>
  44. <sql id="entity_properties">
  45. #{id},
  46. #{rgstrId},
  47. #{isMakPaln},
  48. #{isBuldRun},
  49. #{isMakPub},
  50. #{isMakSys},
  51. #{isCmpChk},
  52. #{isChkSys},
  53. #{isTrdChk},
  54. #{isBuldPblm},
  55. #{isVtPun},
  56. #{isSendWork},
  57. #{persId},
  58. #{intm},
  59. #{uptm},
  60. #{note},
  61. #{dataStat},
  62. #{state}
  63. </sql>
  64. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  65. <sql id="page_where">
  66. <trim prefix="where" prefixOverrides="and | or ">
  67. <if test="rgstrId != null and rgstrId != ''">
  68. and RGSTR_ID = #{rgstrId}
  69. </if>
  70. <if test="isMakPaln != null and isMakPaln != ''">
  71. and IS_MAK_PALN = #{isMakPaln}
  72. </if>
  73. <if test="isBuldRun != null and isBuldRun != ''">
  74. and IS_BULD_RUN = #{isBuldRun}
  75. </if>
  76. <if test="isMakPub != null and isMakPub != ''">
  77. and IS_MAK_PUB = #{isMakPub}
  78. </if>
  79. <if test="isMakSys != null and isMakSys != ''">
  80. and IS_MAK_SYS = #{isMakSys}
  81. </if>
  82. <if test="isCmpChk != null and isCmpChk != ''">
  83. and IS_CMP_CHK = #{isCmpChk}
  84. </if>
  85. <if test="isChkSys != null and isChkSys != ''">
  86. and IS_CHK_SYS = #{isChkSys}
  87. </if>
  88. <if test="isTrdChk != null and isTrdChk != ''">
  89. and IS_TRD_CHK = #{isTrdChk}
  90. </if>
  91. <if test="isBuldPblm != null and isBuldPblm != ''">
  92. and IS_BULD_PBLM = #{isBuldPblm}
  93. </if>
  94. <if test="isVtPun != null and isVtPun != ''">
  95. and IS_VT_PUN = #{isVtPun}
  96. </if>
  97. <if test="isSendWork != null and isSendWork != ''">
  98. and IS_SEND_WORK = #{isSendWork}
  99. </if>
  100. <if test="persId != null and persId != ''">
  101. and PERS_ID = #{persId}
  102. </if>
  103. <if test="intm != null">
  104. and INTM = #{intm}
  105. </if>
  106. <if test="uptm != null">
  107. and UPTM = #{uptm}
  108. </if>
  109. <if test="note != null and note != ''">
  110. and NOTE = #{note}
  111. </if>
  112. <if test="dataStat != null and dataStat != ''">
  113. and DATA_STAT = #{dataStat}
  114. </if>
  115. <if test="state != null and state != ''">
  116. and STATE = #{state}
  117. </if>
  118. and DATA_STAT='0'
  119. </trim>
  120. </sql>
  121. <select id="get" resultMap="bisInspChmclsDepwkResultMap" parameterType="String">
  122. select
  123. <include refid="table_columns"/>
  124. from BIS_INSP_CHMCLS_DEPWK where RGSTR_ID = #{id}
  125. </select>
  126. <select id="getBy" resultMap="bisInspChmclsDepwkResultMap">
  127. select
  128. <include refid="table_columns"/>
  129. from BIS_INSP_CHMCLS_DEPWK
  130. <include refid="page_where"/>
  131. </select>
  132. <select id="findAll" resultMap="bisInspChmclsDepwkResultMap">
  133. select
  134. <include refid="table_columns"/>
  135. from BIS_INSP_CHMCLS_DEPWK
  136. </select>
  137. <select id="findList" resultMap="bisInspChmclsDepwkResultMap">
  138. select
  139. <include refid="table_columns"/>
  140. from BIS_INSP_CHMCLS_DEPWK
  141. <include refid="page_where"/>
  142. </select>
  143. <select id="selectCount" resultType="int">
  144. select count(ID) from BIS_INSP_CHMCLS_DEPWK
  145. <include refid="page_where"/>
  146. </select>
  147. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspChmclsDepwk">
  148. insert into BIS_INSP_CHMCLS_DEPWK(
  149. <include refid="table_columns"/>
  150. )
  151. values (
  152. <include refid="entity_properties"/>
  153. )
  154. </insert>
  155. <delete id="delete" parameterType="java.lang.String">
  156. update BIS_INSP_CHMCLS_DEPWK set DATA_STAT='9' where ID = #{id}
  157. </delete>
  158. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspChmclsDepwk">
  159. update BIS_INSP_CHMCLS_DEPWK set DATA_STAT='9'
  160. <include refid="page_where"/>
  161. </delete>
  162. <update id="deleteInFlag" parameterType="java.lang.String">
  163. update BIS_INSP_CHMCLS_DEPWK set DATA_STAT = '9' where ID = #{id}
  164. </update>
  165. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspChmclsDepwk">
  166. update BIS_INSP_CHMCLS_DEPWK
  167. <trim prefix="set" suffixOverrides=",">
  168. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  169. = #{rgstrId},
  170. </if>
  171. <if test="isMakPaln != null and isMakPaln != ''">IS_MAK_PALN
  172. = #{isMakPaln},
  173. </if>
  174. <if test="isBuldRun != null and isBuldRun != ''">IS_BULD_RUN
  175. = #{isBuldRun},
  176. </if>
  177. <if test="isMakPub != null and isMakPub != ''">IS_MAK_PUB
  178. = #{isMakPub},
  179. </if>
  180. <if test="isMakSys != null and isMakSys != ''">IS_MAK_SYS
  181. = #{isMakSys},
  182. </if>
  183. <if test="isCmpChk != null and isCmpChk != ''">IS_CMP_CHK
  184. = #{isCmpChk},
  185. </if>
  186. <if test="isChkSys != null and isChkSys != ''">IS_CHK_SYS
  187. = #{isChkSys},
  188. </if>
  189. <if test="isTrdChk != null and isTrdChk != ''">IS_TRD_CHK
  190. = #{isTrdChk},
  191. </if>
  192. <if test="isBuldPblm != null and isBuldPblm != ''">IS_BULD_PBLM
  193. = #{isBuldPblm},
  194. </if>
  195. <if test="isVtPun != null and isVtPun != ''">IS_VT_PUN
  196. = #{isVtPun},
  197. </if>
  198. <if test="isSendWork != null and isSendWork != ''">IS_SEND_WORK
  199. = #{isSendWork},
  200. </if>
  201. <if test="persId != null and persId != ''">PERS_ID
  202. = #{persId},
  203. </if>
  204. <if test="intm != null">INTM
  205. = #{intm},
  206. </if>
  207. <if test="uptm != null">UPTM
  208. = #{uptm},
  209. </if>
  210. <if test="note != null and note != ''">NOTE
  211. = #{note},
  212. </if>
  213. <if test="dataStat != null and dataStat != ''">DATA_STAT
  214. = #{dataStat},
  215. </if>
  216. <if test="state != null and state != ''">STATE
  217. = #{state},
  218. </if>
  219. </trim>
  220. <where>ID = #{id}</where>
  221. </update>
  222. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspChmclsDepwk">
  223. update BIS_INSP_CHMCLS_DEPWK
  224. <trim prefix="set" suffixOverrides=",">
  225. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  226. = #{rgstrId},
  227. </if>
  228. <if test="isMakPaln != null and isMakPaln != ''">IS_MAK_PALN
  229. = #{isMakPaln},
  230. </if>
  231. <if test="isBuldRun != null and isBuldRun != ''">IS_BULD_RUN
  232. = #{isBuldRun},
  233. </if>
  234. <if test="isMakPub != null and isMakPub != ''">IS_MAK_PUB
  235. = #{isMakPub},
  236. </if>
  237. <if test="isMakSys != null and isMakSys != ''">IS_MAK_SYS
  238. = #{isMakSys},
  239. </if>
  240. <if test="isCmpChk != null and isCmpChk != ''">IS_CMP_CHK
  241. = #{isCmpChk},
  242. </if>
  243. <if test="isChkSys != null and isChkSys != ''">IS_CHK_SYS
  244. = #{isChkSys},
  245. </if>
  246. <if test="isTrdChk != null and isTrdChk != ''">IS_TRD_CHK
  247. = #{isTrdChk},
  248. </if>
  249. <if test="isBuldPblm != null and isBuldPblm != ''">IS_BULD_PBLM
  250. = #{isBuldPblm},
  251. </if>
  252. <if test="isVtPun != null and isVtPun != ''">IS_VT_PUN
  253. = #{isVtPun},
  254. </if>
  255. <if test="isSendWork != null and isSendWork != ''">IS_SEND_WORK
  256. = #{isSendWork},
  257. </if>
  258. <if test="persId != null and persId != ''">PERS_ID
  259. = #{persId},
  260. </if>
  261. <if test="intm != null">INTM
  262. = #{intm},
  263. </if>
  264. <if test="uptm != null">UPTM
  265. = #{uptm},
  266. </if>
  267. <if test="note != null and note != ''">NOTE
  268. = #{note},
  269. </if>
  270. <if test="dataStat != null and dataStat != ''">DATA_STAT
  271. = #{dataStat},
  272. </if>
  273. <if test="state != null and state != ''">STATE
  274. = #{state},
  275. </if>
  276. </trim>
  277. <include refid="page_where"/>
  278. </update>
  279. <!-- 其他自定义SQL -->
  280. </mapper>