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