BisInspFjaccpSafdlDao.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  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.BisInspFjaccpSafdlDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspFjaccpSafdl" id="bisInspFjaccpSafdlResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="f511" column="F_5_1_1"/>
  8. <result property="f512" column="F_5_1_2"/>
  9. <result property="f513" column="F_5_1_3"/>
  10. <result property="f514" column="F_5_1_4"/>
  11. <result property="f515" column="F_5_1_5"/>
  12. <result property="f516" column="F_5_1_6"/>
  13. <result property="f517" column="F_5_1_7"/>
  14. <result property="f521" column="F_5_2_1"/>
  15. <result property="f522" column="F_5_2_2"/>
  16. <result property="f523" column="F_5_2_3"/>
  17. <result property="f524" column="F_5_2_4"/>
  18. <result property="f525" column="F_5_2_5"/>
  19. <result property="f526" column="F_5_2_6"/>
  20. <result property="f527" column="F_5_2_7"/>
  21. <result property="f528" column="F_5_2_8"/>
  22. <result property="f529" column="F_5_2_9"/>
  23. <result property="f531" column="F_5_3_1"/>
  24. <result property="f532" column="F_5_3_2"/>
  25. <result property="f533" column="F_5_3_3"/>
  26. <result property="f534" column="F_5_3_4"/>
  27. <result property="f535" column="F_5_3_5"/>
  28. <result property="f536" column="F_5_3_6"/>
  29. <result property="f537" column="F_5_3_7"/>
  30. <result property="f538" column="F_5_3_8"/>
  31. <result property="f539" column="F_5_3_9"/>
  32. <result property="f5310" column="F_5_3_10"/>
  33. <result property="f5311" column="F_5_3_11"/>
  34. <result property="f541" column="F_5_4_1"/>
  35. <result property="f542" column="F_5_4_2"/>
  36. <result property="f543" column="F_5_4_3"/>
  37. <result property="note" column="NOTE"/>
  38. <result property="persId" column="PERS_ID"/>
  39. <result property="intm" column="INTM"/>
  40. <result property="uptm" column="UPTM"/>
  41. <result property="dataStat" column="DATA_STAT"/>
  42. <result property="state" column="STATE"/>
  43. </resultMap>
  44. <sql id="table_columns">
  45. ID,
  46. RGSTR_ID,
  47. F_5_1_1,
  48. F_5_1_2,
  49. F_5_1_3,
  50. F_5_1_4,
  51. F_5_1_5,
  52. F_5_1_6,
  53. F_5_1_7,
  54. F_5_2_1,
  55. F_5_2_2,
  56. F_5_2_3,
  57. F_5_2_4,
  58. F_5_2_5,
  59. F_5_2_6,
  60. F_5_2_7,
  61. F_5_2_8,
  62. F_5_2_9,
  63. F_5_3_1,
  64. F_5_3_2,
  65. F_5_3_3,
  66. F_5_3_4,
  67. F_5_3_5,
  68. F_5_3_6,
  69. F_5_3_7,
  70. F_5_3_8,
  71. F_5_3_9,
  72. F_5_3_10,
  73. F_5_3_11,
  74. F_5_4_1,
  75. F_5_4_2,
  76. F_5_4_3,
  77. NOTE,
  78. PERS_ID,
  79. INTM,
  80. UPTM,
  81. DATA_STAT,
  82. STATE
  83. </sql>
  84. <sql id="entity_properties">
  85. #{id},
  86. #{rgstrId},
  87. #{f511},
  88. #{f512},
  89. #{f513},
  90. #{f514},
  91. #{f515},
  92. #{f516},
  93. #{f517},
  94. #{f521},
  95. #{f522},
  96. #{f523},
  97. #{f524},
  98. #{f525},
  99. #{f526},
  100. #{f527},
  101. #{f528},
  102. #{f529},
  103. #{f531},
  104. #{f532},
  105. #{f533},
  106. #{f534},
  107. #{f535},
  108. #{f536},
  109. #{f537},
  110. #{f538},
  111. #{f539},
  112. #{f5310},
  113. #{f5311},
  114. #{f541},
  115. #{f542},
  116. #{f543},
  117. #{note},
  118. #{persId},
  119. #{intm},
  120. #{uptm},
  121. #{dataStat},
  122. #{state}
  123. </sql>
  124. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  125. <sql id="page_where">
  126. <trim prefix="where" prefixOverrides="and | or ">
  127. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  128. <if test="f511 != null and f511 != ''">and F_5_1_1 = #{f511}</if>
  129. <if test="f512 != null and f512 != ''">and F_5_1_2 = #{f512}</if>
  130. <if test="f513 != null and f513 != ''">and F_5_1_3 = #{f513}</if>
  131. <if test="f514 != null and f514 != ''">and F_5_1_4 = #{f514}</if>
  132. <if test="f515 != null and f515 != ''">and F_5_1_5 = #{f515}</if>
  133. <if test="f516 != null and f516 != ''">and F_5_1_6 = #{f516}</if>
  134. <if test="f517 != null and f517 != ''">and F_5_1_7 = #{f517}</if>
  135. <if test="f521 != null and f521 != ''">and F_5_2_1 = #{f521}</if>
  136. <if test="f522 != null and f522 != ''">and F_5_2_2 = #{f522}</if>
  137. <if test="f523 != null and f523 != ''">and F_5_2_3 = #{f523}</if>
  138. <if test="f524 != null and f524 != ''">and F_5_2_4 = #{f524}</if>
  139. <if test="f525 != null and f525 != ''">and F_5_2_5 = #{f525}</if>
  140. <if test="f526 != null and f526 != ''">and F_5_2_6 = #{f526}</if>
  141. <if test="f527 != null and f527 != ''">and F_5_2_7 = #{f527}</if>
  142. <if test="f528 != null and f528 != ''">and F_5_2_8 = #{f528}</if>
  143. <if test="f529 != null and f529 != ''">and F_5_2_9 = #{f529}</if>
  144. <if test="f531 != null and f531 != ''">and F_5_3_1 = #{f531}</if>
  145. <if test="f532 != null and f532 != ''">and F_5_3_2 = #{f532}</if>
  146. <if test="f533 != null and f533 != ''">and F_5_3_3 = #{f533}</if>
  147. <if test="f534 != null and f534 != ''">and F_5_3_4 = #{f534}</if>
  148. <if test="f535 != null and f535 != ''">and F_5_3_5 = #{f535}</if>
  149. <if test="f536 != null and f536 != ''">and F_5_3_6 = #{f536}</if>
  150. <if test="f537 != null and f537 != ''">and F_5_3_7 = #{f537}</if>
  151. <if test="f538 != null and f538 != ''">and F_5_3_8 = #{f538}</if>
  152. <if test="f539 != null and f539 != ''">and F_5_3_9 = #{f539}</if>
  153. <if test="f5310 != null and f5310 != ''">and F_5_3_10 = #{f5310}</if>
  154. <if test="f5311 != null and f5311 != ''">and F_5_3_11 = #{f5311}</if>
  155. <if test="f541 != null and f541 != ''">and F_5_4_1 = #{f541}</if>
  156. <if test="f542 != null and f542 != ''">and F_5_4_2 = #{f542}</if>
  157. <if test="f543 != null and f543 != ''">and F_5_4_3 = #{f543}</if>
  158. <if test="note != null and note != ''">and NOTE = #{note}</if>
  159. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  160. <if test="intm != null">and INTM = #{intm}</if>
  161. <if test="uptm != null">and UPTM = #{uptm}</if>
  162. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  163. <if test="state != null and state != ''">and STATE = #{state}</if>
  164. </trim>
  165. </sql>
  166. <select id="get" resultMap="bisInspFjaccpSafdlResultMap" parameterType="String" >
  167. select <include refid="table_columns" /> from BIS_INSP_FJACCP_SAFDL where RGSTR_ID = #{id}
  168. </select>
  169. <select id="getBy" resultMap="bisInspFjaccpSafdlResultMap">
  170. select <include refid="table_columns" /> from BIS_INSP_FJACCP_SAFDL <include refid="page_where" />
  171. </select>
  172. <select id="findAll" resultMap="bisInspFjaccpSafdlResultMap">
  173. select <include refid="table_columns" /> from BIS_INSP_FJACCP_SAFDL
  174. </select>
  175. <select id="findList" resultMap="bisInspFjaccpSafdlResultMap">
  176. select <include refid="table_columns" /> from BIS_INSP_FJACCP_SAFDL <include refid="page_where" />
  177. </select>
  178. <select id="selectCount" resultType="int" >
  179. select count(ID) from BIS_INSP_FJACCP_SAFDL <include refid="page_where" />
  180. </select>
  181. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjaccpSafdl">
  182. insert into BIS_INSP_FJACCP_SAFDL( <include refid="table_columns" /> )
  183. values ( <include refid="entity_properties" /> )
  184. </insert>
  185. <delete id="delete" parameterType="java.lang.String">
  186. update BIS_INSP_FJACCP_SAFDL set DATA_STAT='9' where ID = #{id}
  187. </delete>
  188. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjaccpSafdl">
  189. delete from BIS_INSP_FJACCP_SAFDL <include refid="page_where" />
  190. </delete>
  191. <update id="deleteInFlag" parameterType="java.lang.String">
  192. update BIS_INSP_FJACCP_SAFDL set flag_valid = 0 where ID = #{id}
  193. </update>
  194. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjaccpSafdl">
  195. update BIS_INSP_FJACCP_SAFDL
  196. <trim prefix="set" suffixOverrides=",">
  197. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  198. F_5_1_1 = #{f511},
  199. F_5_1_2 = #{f512},
  200. F_5_1_3 = #{f513},
  201. F_5_1_4 = #{f514},
  202. F_5_1_5 = #{f515},
  203. F_5_1_6 = #{f516},
  204. F_5_1_7 = #{f517},
  205. F_5_2_1 = #{f521},
  206. F_5_2_2 = #{f522},
  207. F_5_2_3 = #{f523},
  208. F_5_2_4 = #{f524},
  209. F_5_2_5 = #{f525},
  210. F_5_2_6 = #{f526},
  211. F_5_2_7 = #{f527},
  212. F_5_2_8 = #{f528},
  213. F_5_2_9 = #{f529},
  214. F_5_3_1 = #{f531},
  215. F_5_3_2 = #{f532},
  216. F_5_3_3 = #{f533},
  217. F_5_3_4 = #{f534},
  218. F_5_3_5 = #{f535},
  219. F_5_3_6 = #{f536},
  220. F_5_3_7 = #{f537},
  221. F_5_3_8 = #{f538},
  222. F_5_3_9 = #{f539},
  223. F_5_3_10 = #{f5310},
  224. F_5_3_11 = #{f5311},
  225. F_5_4_1 = #{f541},
  226. F_5_4_2 = #{f542},
  227. F_5_4_3 = #{f543},
  228. <if test="note != null and note != ''">NOTE = #{note},</if>
  229. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  230. <if test="intm != null">INTM = #{intm},</if>
  231. <if test="uptm != null">UPTM = #{uptm},</if>
  232. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  233. <if test="state != null and state != ''">STATE = #{state},</if>
  234. </trim>
  235. <where>ID = #{id}</where>
  236. </update>
  237. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjaccpSafdl">
  238. update BIS_INSP_FJACCP_SAFDL
  239. <trim prefix="set" suffixOverrides=",">
  240. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  241. F_5_1_1 = #{f511},
  242. F_5_1_2 = #{f512},
  243. F_5_1_3 = #{f513},
  244. F_5_1_4 = #{f514},
  245. F_5_1_5 = #{f515},
  246. F_5_1_6 = #{f516},
  247. F_5_1_7 = #{f517},
  248. F_5_2_1 = #{f521},
  249. F_5_2_2 = #{f522},
  250. F_5_2_3 = #{f523},
  251. F_5_2_4 = #{f524},
  252. F_5_2_5 = #{f525},
  253. F_5_2_6 = #{f526},
  254. F_5_2_7 = #{f527},
  255. F_5_2_8 = #{f528},
  256. F_5_2_9 = #{f529},
  257. F_5_3_1 = #{f531},
  258. F_5_3_2 = #{f532},
  259. F_5_3_3 = #{f533},
  260. F_5_3_4 = #{f534},
  261. F_5_3_5 = #{f535},
  262. F_5_3_6 = #{f536},
  263. F_5_3_7 = #{f537},
  264. F_5_3_8 = #{f538},
  265. F_5_3_9 = #{f539},
  266. F_5_3_10 = #{f5310},
  267. F_5_3_11 = #{f5311},
  268. F_5_4_1 = #{f541},
  269. F_5_4_2 = #{f542},
  270. F_5_4_3 = #{f543},
  271. <if test="note != null and note != ''">NOTE = #{note},</if>
  272. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  273. <if test="intm != null">INTM = #{intm},</if>
  274. <if test="uptm != null">UPTM = #{uptm},</if>
  275. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  276. <if test="state != null and state != ''">STATE = #{state},</if>
  277. </trim>
  278. <include refid="page_where" />
  279. </update>
  280. <!-- 其他自定义SQL -->
  281. </mapper>