1e77d5585b0bacff75fa18a018c109f97afd35a2.svn-base 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  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.BisInspFjpjmgdpTrgtDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspFjpjmgdpTrgt" id="bisInspFjpjmgdpTrgtResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="f111" column="F_1_1_1"/>
  8. <result property="f112" column="F_1_1_2"/>
  9. <result property="f113" column="F_1_1_3"/>
  10. <result property="f114" column="F_1_1_4"/>
  11. <result property="f115" column="F_1_1_5"/>
  12. <result property="f116" column="F_1_1_6"/>
  13. <result property="f121" column="F_1_2_1"/>
  14. <result property="f122" column="F_1_2_2"/>
  15. <result property="f123" column="F_1_2_3"/>
  16. <result property="f124" column="F_1_2_4"/>
  17. <result property="f125" column="F_1_2_5"/>
  18. <result property="f131" column="F_1_3_1"/>
  19. <result property="f132" column="F_1_3_2"/>
  20. <result property="f141" column="F_1_4_1"/>
  21. <result property="f142" column="F_1_4_2"/>
  22. <result property="f143" column="F_1_4_3"/>
  23. <result property="f144" column="F_1_4_4"/>
  24. <result property="f145" column="F_1_4_5"/>
  25. <result property="f146" column="F_1_4_6"/>
  26. <result property="f151" column="F_1_5_1"/>
  27. <result property="f152" column="F_1_5_2"/>
  28. <result property="f161" column="F_1_6_1"/>
  29. <result property="note" column="NOTE"/>
  30. <result property="persId" column="PERS_ID"/>
  31. <result property="intm" column="INTM"/>
  32. <result property="uptm" column="UPTM"/>
  33. <result property="dataStat" column="DATA_STAT"/>
  34. <result property="state" column="STATE"/>
  35. </resultMap>
  36. <sql id="table_columns">
  37. ID,
  38. RGSTR_ID,
  39. F_1_1_1,
  40. F_1_1_2,
  41. F_1_1_3,
  42. F_1_1_4,
  43. F_1_1_5,
  44. F_1_1_6,
  45. F_1_2_1,
  46. F_1_2_2,
  47. F_1_2_3,
  48. F_1_2_4,
  49. F_1_2_5,
  50. F_1_3_1,
  51. F_1_3_2,
  52. F_1_4_1,
  53. F_1_4_2,
  54. F_1_4_3,
  55. F_1_4_4,
  56. F_1_4_5,
  57. F_1_4_6,
  58. F_1_5_1,
  59. F_1_5_2,
  60. F_1_6_1,
  61. NOTE,
  62. PERS_ID,
  63. INTM,
  64. UPTM,
  65. DATA_STAT,
  66. STATE
  67. </sql>
  68. <sql id="entity_properties">
  69. #{id},
  70. #{rgstrId},
  71. #{f111},
  72. #{f112},
  73. #{f113},
  74. #{f114},
  75. #{f115},
  76. #{f116},
  77. #{f121},
  78. #{f122},
  79. #{f123},
  80. #{f124},
  81. #{f125},
  82. #{f131},
  83. #{f132},
  84. #{f141},
  85. #{f142},
  86. #{f143},
  87. #{f144},
  88. #{f145},
  89. #{f146},
  90. #{f151},
  91. #{f152},
  92. #{f161},
  93. #{note},
  94. #{persId},
  95. #{intm},
  96. #{uptm},
  97. #{dataStat},
  98. #{state}
  99. </sql>
  100. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  101. <sql id="page_where">
  102. <trim prefix="where" prefixOverrides="and | or ">
  103. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  104. <if test="f111 != null and f111 != ''">and F_1_1_1 = #{f111}</if>
  105. <if test="f112 != null and f112 != ''">and F_1_1_2 = #{f112}</if>
  106. <if test="f113 != null and f113 != ''">and F_1_1_3 = #{f113}</if>
  107. <if test="f114 != null and f114 != ''">and F_1_1_4 = #{f114}</if>
  108. <if test="f115 != null and f115 != ''">and F_1_1_5 = #{f115}</if>
  109. <if test="f116 != null and f116 != ''">and F_1_1_6 = #{f116}</if>
  110. <if test="f121 != null and f121 != ''">and F_1_2_1 = #{f121}</if>
  111. <if test="f122 != null and f122 != ''">and F_1_2_2 = #{f122}</if>
  112. <if test="f123 != null and f123 != ''">and F_1_2_3 = #{f123}</if>
  113. <if test="f124 != null and f124 != ''">and F_1_2_4 = #{f124}</if>
  114. <if test="f125 != null and f125 != ''">and F_1_2_5 = #{f125}</if>
  115. <if test="f131 != null and f131 != ''">and F_1_3_1 = #{f131}</if>
  116. <if test="f132 != null and f132 != ''">and F_1_3_2 = #{f132}</if>
  117. <if test="f141 != null and f141 != ''">and F_1_4_1 = #{f141}</if>
  118. <if test="f142 != null and f142 != ''">and F_1_4_2 = #{f142}</if>
  119. <if test="f143 != null and f143 != ''">and F_1_4_3 = #{f143}</if>
  120. <if test="f144 != null and f144 != ''">and F_1_4_4 = #{f144}</if>
  121. <if test="f145 != null and f145 != ''">and F_1_4_5 = #{f145}</if>
  122. <if test="f146 != null and f146 != ''">and F_1_4_6 = #{f146}</if>
  123. <if test="f151 != null and f151 != ''">and F_1_5_1 = #{f151}</if>
  124. <if test="f152 != null and f152 != ''">and F_1_5_2 = #{f152}</if>
  125. <if test="f161 != null and f161 != ''">and F_1_6_1 = #{f161}</if>
  126. <if test="note != null and note != ''">and NOTE = #{note}</if>
  127. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  128. <if test="intm != null">and INTM = #{intm}</if>
  129. <if test="uptm != null">and UPTM = #{uptm}</if>
  130. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  131. <if test="state != null and state != ''">and STATE = #{state}</if>
  132. </trim>
  133. </sql>
  134. <select id="get" resultMap="bisInspFjpjmgdpTrgtResultMap" parameterType="String" >
  135. select <include refid="table_columns" /> from BIS_INSP_FJPJMGDP_TRGT where RGSTR_ID = #{id}
  136. </select>
  137. <select id="getBy" resultMap="bisInspFjpjmgdpTrgtResultMap">
  138. select <include refid="table_columns" /> from BIS_INSP_FJPJMGDP_TRGT <include refid="page_where" />
  139. </select>
  140. <select id="findAll" resultMap="bisInspFjpjmgdpTrgtResultMap">
  141. select <include refid="table_columns" /> from BIS_INSP_FJPJMGDP_TRGT
  142. </select>
  143. <select id="findList" resultMap="bisInspFjpjmgdpTrgtResultMap">
  144. select <include refid="table_columns" /> from BIS_INSP_FJPJMGDP_TRGT <include refid="page_where" />
  145. </select>
  146. <select id="selectCount" resultType="int" >
  147. select count(ID) from BIS_INSP_FJPJMGDP_TRGT <include refid="page_where" />
  148. </select>
  149. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjpjmgdpTrgt">
  150. insert into BIS_INSP_FJPJMGDP_TRGT( <include refid="table_columns" /> )
  151. values ( <include refid="entity_properties" /> )
  152. </insert>
  153. <delete id="delete" parameterType="java.lang.String">
  154. update BIS_INSP_FJPJMGDP_TRGT set DATA_STAT='9' where ID = #{id}
  155. </delete>
  156. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjpjmgdpTrgt">
  157. delete from BIS_INSP_FJPJMGDP_TRGT <include refid="page_where" />
  158. </delete>
  159. <update id="deleteInFlag" parameterType="java.lang.String">
  160. update BIS_INSP_FJPJMGDP_TRGT set flag_valid = 0 where ID = #{id}
  161. </update>
  162. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjpjmgdpTrgt">
  163. update BIS_INSP_FJPJMGDP_TRGT
  164. <trim prefix="set" suffixOverrides=",">
  165. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  166. F_1_1_1 = #{f111},
  167. F_1_1_2 = #{f112},
  168. F_1_1_3 = #{f113},
  169. F_1_1_4 = #{f114},
  170. F_1_1_5 = #{f115},
  171. F_1_1_6 = #{f116},
  172. F_1_2_1 = #{f121},
  173. F_1_2_2 = #{f122},
  174. F_1_2_3 = #{f123},
  175. F_1_2_4 = #{f124},
  176. F_1_2_5 = #{f125},
  177. F_1_3_1 = #{f131},
  178. F_1_3_2 = #{f132},
  179. F_1_4_1 = #{f141},
  180. F_1_4_2 = #{f142},
  181. F_1_4_3 = #{f143},
  182. F_1_4_4 = #{f144},
  183. F_1_4_5 = #{f145},
  184. F_1_4_6 = #{f146},
  185. F_1_5_1 = #{f151},
  186. F_1_5_2 = #{f152},
  187. F_1_6_1 = #{f161},
  188. <if test="note != null and note != ''">NOTE = #{note},</if>
  189. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  190. <if test="intm != null">INTM = #{intm},</if>
  191. <if test="uptm != null">UPTM = #{uptm},</if>
  192. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  193. <if test="state != null and state != ''">STATE = #{state},</if>
  194. </trim>
  195. <where>ID = #{id}</where>
  196. </update>
  197. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjpjmgdpTrgt">
  198. update BIS_INSP_FJPJMGDP_TRGT
  199. <trim prefix="set" suffixOverrides=",">
  200. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  201. F_1_1_1 = #{f111},
  202. F_1_1_2 = #{f112},
  203. F_1_1_3 = #{f113},
  204. F_1_1_4 = #{f114},
  205. F_1_1_5 = #{f115},
  206. F_1_1_6 = #{f116},
  207. F_1_2_1 = #{f121},
  208. F_1_2_2 = #{f122},
  209. F_1_2_3 = #{f123},
  210. F_1_2_4 = #{f124},
  211. F_1_2_5 = #{f125},
  212. F_1_3_1 = #{f131},
  213. F_1_3_2 = #{f132},
  214. F_1_4_1 = #{f141},
  215. F_1_4_2 = #{f142},
  216. F_1_4_3 = #{f143},
  217. F_1_4_4 = #{f144},
  218. F_1_4_5 = #{f145},
  219. F_1_4_6 = #{f146},
  220. F_1_5_1 = #{f151},
  221. F_1_5_2 = #{f152},
  222. F_1_6_1 = #{f161},
  223. <if test="note != null and note != ''">NOTE = #{note},</if>
  224. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  225. <if test="intm != null">INTM = #{intm},</if>
  226. <if test="uptm != null">UPTM = #{uptm},</if>
  227. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  228. <if test="state != null and state != ''">STATE = #{state},</if>
  229. </trim>
  230. <include refid="page_where" />
  231. </update>
  232. <!-- 其他自定义SQL -->
  233. </mapper>