dd3bc1d3fa9397e48835bc4dcab6cde297b4a95e.svn-base 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  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.TacPawpRaiobisDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.TacPawpRaiobis" id="tacPawpRaiobisResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="year" column="YEAR"/>
  8. <result property="yearIssuedSum" column="YEAR_ISSUED_SUM"/>
  9. <result property="yearIssuedCenter" column="YEAR_ISSUED_CENTER"/>
  10. <result property="yearIssuedPro" column="YEAR_ISSUED_PRO"/>
  11. <result property="yearIssuedCity" column="YEAR_ISSUED_CITY"/>
  12. <result property="yearIssuedCunty" column="YEAR_ISSUED_CUNTY"/>
  13. <result property="yearIssuedOther" column="YEAR_ISSUED_OTHER"/>
  14. <result property="totalIssuedSum" column="TOTAL_ISSUED_SUM"/>
  15. <result property="totalIssuedCenter" column="TOTAL_ISSUED_CENTER"/>
  16. <result property="totalIssuedPro" column="TOTAL_ISSUED_PRO"/>
  17. <result property="totalIssuedCity" column="TOTAL_ISSUED_CITY"/>
  18. <result property="totalIssuedCunty" column="TOTAL_ISSUED_CUNTY"/>
  19. <result property="totalIssuedOther" column="TOTAL_ISSUED_OTHER"/>
  20. <result property="isDat" column="IS_DAT"/>
  21. <result property="yearInvestYear" column="YEAR_INVEST_YEAR"/>
  22. <result property="yearInvest" column="YEAR_INVEST"/>
  23. <result property="yearInvestScale" column="YEAR_INVEST_SCALE"/>
  24. <result property="totalInvest" column="TOTAL_INVEST"/>
  25. <result property="totalInvestScale" column="TOTAL_INVEST_SCALE"/>
  26. <result property="mainWorks" column="MAIN_WORKS"/>
  27. <result property="pjctImgPgrs" column="PJCT_IMG_PGRS"/>
  28. <result property="remark" column="REMARK"/>
  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. </resultMap>
  35. <sql id="table_columns">
  36. ID,
  37. RGSTR_ID,
  38. YEAR,
  39. YEAR_ISSUED_SUM,
  40. YEAR_ISSUED_CENTER,
  41. YEAR_ISSUED_PRO,
  42. YEAR_ISSUED_CITY,
  43. YEAR_ISSUED_CUNTY,
  44. YEAR_ISSUED_OTHER,
  45. TOTAL_ISSUED_SUM,
  46. TOTAL_ISSUED_CENTER,
  47. TOTAL_ISSUED_PRO,
  48. TOTAL_ISSUED_CITY,
  49. TOTAL_ISSUED_CUNTY,
  50. TOTAL_ISSUED_OTHER,
  51. IS_DAT,
  52. YEAR_INVEST_YEAR,
  53. YEAR_INVEST,
  54. YEAR_INVEST_SCALE,
  55. TOTAL_INVEST,
  56. TOTAL_INVEST_SCALE,
  57. MAIN_WORKS,
  58. PJCT_IMG_PGRS,
  59. REMARK,
  60. NOTE,
  61. PERS_ID,
  62. INTM,
  63. UPTM,
  64. DATA_STAT
  65. </sql>
  66. <sql id="entity_properties">
  67. #{id},
  68. #{rgstrId},
  69. #{year},
  70. #{yearIssuedSum},
  71. #{yearIssuedCenter},
  72. #{yearIssuedPro},
  73. #{yearIssuedCity},
  74. #{yearIssuedCunty},
  75. #{yearIssuedOther},
  76. #{totalIssuedSum},
  77. #{totalIssuedCenter},
  78. #{totalIssuedPro},
  79. #{totalIssuedCity},
  80. #{totalIssuedCunty},
  81. #{totalIssuedOther},
  82. #{isDat},
  83. #{yearInvestYear},
  84. #{yearInvest},
  85. #{yearInvestScale},
  86. #{totalInvest},
  87. #{totalInvestScale},
  88. #{mainWorks},
  89. #{pjctImgPgrs},
  90. #{remark},
  91. #{note},
  92. #{persId},
  93. #{intm},
  94. #{uptm},
  95. #{dataStat}
  96. </sql>
  97. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  98. <sql id="page_where">
  99. <trim prefix="where" prefixOverrides="and | or ">
  100. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  101. <if test="year != null and year != ''">and YEAR = #{year}</if>
  102. <if test="yearIssuedSum != null and yearIssuedSum != ''">and YEAR_ISSUED_SUM = #{yearIssuedSum}</if>
  103. <if test="yearIssuedCenter != null and yearIssuedCenter != ''">and YEAR_ISSUED_CENTER =
  104. #{yearIssuedCenter}
  105. </if>
  106. <if test="yearIssuedPro != null and yearIssuedPro != ''">and YEAR_ISSUED_PRO = #{yearIssuedPro}</if>
  107. <if test="yearIssuedCity != null and yearIssuedCity != ''">and YEAR_ISSUED_CITY = #{yearIssuedCity}</if>
  108. <if test="yearIssuedCunty != null and yearIssuedCunty != ''">and YEAR_ISSUED_CUNTY = #{yearIssuedCunty}</if>
  109. <if test="yearIssuedOther != null and yearIssuedOther != ''">and YEAR_ISSUED_OTHER = #{yearIssuedOther}</if>
  110. <if test="totalIssuedSum != null and totalIssuedSum != ''">and TOTAL_ISSUED_SUM = #{totalIssuedSum}</if>
  111. <if test="totalIssuedCenter != null and totalIssuedCenter != ''">and TOTAL_ISSUED_CENTER =
  112. #{totalIssuedCenter}
  113. </if>
  114. <if test="totalIssuedPro != null and totalIssuedPro != ''">and TOTAL_ISSUED_PRO = #{totalIssuedPro}</if>
  115. <if test="totalIssuedCity != null and totalIssuedCity != ''">and TOTAL_ISSUED_CITY = #{totalIssuedCity}</if>
  116. <if test="totalIssuedCunty != null and totalIssuedCunty != ''">and TOTAL_ISSUED_CUNTY =
  117. #{totalIssuedCunty}
  118. </if>
  119. <if test="totalIssuedOther != null and totalIssuedOther != ''">and TOTAL_ISSUED_OTHER =
  120. #{totalIssuedOther}
  121. </if>
  122. <if test="isDat != null and isDat != ''">and IS_DAT = #{isDat}</if>
  123. <if test="yearInvestYear != null and yearInvestYear != ''">and YEAR_INVEST_YEAR = #{yearInvestYear}</if>
  124. <if test="yearInvest != null and yearInvest != ''">and YEAR_INVEST = #{yearInvest}</if>
  125. <if test="yearInvestScale != null and yearInvestScale != ''">and YEAR_INVEST_SCALE = #{yearInvestScale}</if>
  126. <if test="totalInvest != null and totalInvest != ''">and TOTAL_INVEST = #{totalInvest}</if>
  127. <if test="totalInvestScale != null and totalInvestScale != ''">and TOTAL_INVEST_SCALE =
  128. #{totalInvestScale}
  129. </if>
  130. <if test="mainWorks != null and mainWorks != ''">and MAIN_WORKS = #{mainWorks}</if>
  131. <if test="pjctImgPgrs != null and pjctImgPgrs != ''">and PJCT_IMG_PGRS = #{pjctImgPgrs}</if>
  132. <if test="remark != null and remark != ''">and REMARK like '%${remark}%'</if>
  133. <if test="note != null and note != ''">and NOTE like '%${note}%'</if>
  134. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  135. <if test="intm != null">and INTM = #{intm}</if>
  136. <if test="uptm != null">and UPTM = #{uptm}</if>
  137. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  138. </trim>
  139. </sql>
  140. <select id="get" resultMap="tacPawpRaiobisResultMap" parameterType="String">
  141. select
  142. <include refid="table_columns"/>
  143. from TAC_PAWP_RAIOBIS where ID = #{id}
  144. </select>
  145. <select id="getBy" resultMap="tacPawpRaiobisResultMap">
  146. select
  147. <include refid="table_columns"/>
  148. from TAC_PAWP_RAIOBIS
  149. <include refid="page_where"/>
  150. </select>
  151. <select id="findAll" resultMap="tacPawpRaiobisResultMap">
  152. select
  153. <include refid="table_columns"/>
  154. from TAC_PAWP_RAIOBIS
  155. </select>
  156. <select id="findList" resultMap="tacPawpRaiobisResultMap">
  157. select
  158. <include refid="table_columns"/>
  159. from TAC_PAWP_RAIOBIS
  160. <include refid="page_where"/>
  161. </select>
  162. <select id="selectCount" resultType="int">
  163. select count(ID) from TAC_PAWP_RAIOBIS
  164. <include refid="page_where"/>
  165. </select>
  166. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacPawpRaiobis">
  167. insert into TAC_PAWP_RAIOBIS(
  168. <include refid="table_columns"/>
  169. )
  170. values (
  171. <include refid="entity_properties"/>
  172. )
  173. </insert>
  174. <delete id="delete" parameterType="java.lang.String">
  175. delete from TAC_PAWP_RAIOBIS where ID = #{id}
  176. </delete>
  177. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpRaiobis">
  178. delete from TAC_PAWP_RAIOBIS
  179. <include refid="page_where"/>
  180. </delete>
  181. <update id="deleteInFlag" parameterType="java.lang.String">
  182. update TAC_PAWP_RAIOBIS set flag_valid = 0 where ID = #{id}
  183. </update>
  184. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacPawpRaiobis">
  185. update TAC_PAWP_RAIOBIS
  186. <trim prefix="set" suffixOverrides=",">
  187. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  188. <if test="year != null">YEAR = #{year},</if>
  189. <if test="yearIssuedSum != null">YEAR_ISSUED_SUM = #{yearIssuedSum},</if>
  190. <if test="yearIssuedCenter != null">YEAR_ISSUED_CENTER = #{yearIssuedCenter},</if>
  191. <if test="yearIssuedPro != null">YEAR_ISSUED_PRO = #{yearIssuedPro},</if>
  192. <if test="yearIssuedCity != null">YEAR_ISSUED_CITY = #{yearIssuedCity},</if>
  193. <if test="yearIssuedCunty != null">YEAR_ISSUED_CUNTY = #{yearIssuedCunty},</if>
  194. <if test="yearIssuedOther != null">YEAR_ISSUED_OTHER = #{yearIssuedOther},</if>
  195. <if test="totalIssuedSum != null">TOTAL_ISSUED_SUM = #{totalIssuedSum},</if>
  196. <if test="totalIssuedCenter != null">TOTAL_ISSUED_CENTER = #{totalIssuedCenter},</if>
  197. <if test="totalIssuedPro != null">TOTAL_ISSUED_PRO = #{totalIssuedPro},</if>
  198. <if test="totalIssuedCity != null">TOTAL_ISSUED_CITY = #{totalIssuedCity},</if>
  199. <if test="totalIssuedCunty != null">TOTAL_ISSUED_CUNTY = #{totalIssuedCunty},</if>
  200. <if test="totalIssuedOther != null">TOTAL_ISSUED_OTHER = #{totalIssuedOther},</if>
  201. <if test="isDat != null">IS_DAT = #{isDat},</if>
  202. <if test="yearInvestYear != null">YEAR_INVEST_YEAR = #{yearInvestYear},</if>
  203. <if test="yearInvest != null">YEAR_INVEST = #{yearInvest},</if>
  204. <if test="yearInvestScale != null">YEAR_INVEST_SCALE = #{yearInvestScale},</if>
  205. <if test="totalInvest != null">TOTAL_INVEST = #{totalInvest},</if>
  206. <if test="totalInvestScale != null">TOTAL_INVEST_SCALE = #{totalInvestScale},</if>
  207. <if test="mainWorks != null">MAIN_WORKS = #{mainWorks},</if>
  208. <if test="pjctImgPgrs != null">PJCT_IMG_PGRS = #{pjctImgPgrs},</if>
  209. <if test="remark != null">REMARK = #{remark},</if>
  210. <if test="note != null">NOTE = #{note},</if>
  211. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  212. <if test="intm != null">INTM = #{intm},</if>
  213. <if test="uptm != null">UPTM = #{uptm},</if>
  214. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  215. </trim>
  216. <where>ID = #{id}</where>
  217. </update>
  218. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacPawpRaiobis">
  219. update TAC_PAWP_RAIOBIS
  220. <trim prefix="set" suffixOverrides=",">
  221. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  222. <if test="year != null">YEAR = #{year},</if>
  223. <if test="yearIssuedSum != null">YEAR_ISSUED_SUM = #{yearIssuedSum},</if>
  224. <if test="yearIssuedCenter != null">YEAR_ISSUED_CENTER = #{yearIssuedCenter},</if>
  225. <if test="yearIssuedPro != null">YEAR_ISSUED_PRO = #{yearIssuedPro},</if>
  226. <if test="yearIssuedCity != null">YEAR_ISSUED_CITY = #{yearIssuedCity},</if>
  227. <if test="yearIssuedCunty != null">YEAR_ISSUED_CUNTY = #{yearIssuedCunty},</if>
  228. <if test="yearIssuedOther != null">YEAR_ISSUED_OTHER = #{yearIssuedOther},</if>
  229. <if test="totalIssuedSum != null">TOTAL_ISSUED_SUM = #{totalIssuedSum},</if>
  230. <if test="totalIssuedCenter != null">TOTAL_ISSUED_CENTER = #{totalIssuedCenter},</if>
  231. <if test="totalIssuedPro != null">TOTAL_ISSUED_PRO = #{totalIssuedPro},</if>
  232. <if test="totalIssuedCity != null">TOTAL_ISSUED_CITY = #{totalIssuedCity},</if>
  233. <if test="totalIssuedCunty != null">TOTAL_ISSUED_CUNTY = #{totalIssuedCunty},</if>
  234. <if test="totalIssuedOther != null">TOTAL_ISSUED_OTHER = #{totalIssuedOther},</if>
  235. <if test="isDat != null">IS_DAT = #{isDat},</if>
  236. <if test="yearInvestYear != null">YEAR_INVEST_YEAR = #{yearInvestYear},</if>
  237. <if test="yearInvest != null">YEAR_INVEST = #{yearInvest},</if>
  238. <if test="yearInvestScale != null">YEAR_INVEST_SCALE = #{yearInvestScale},</if>
  239. <if test="totalInvest != null">TOTAL_INVEST = #{totalInvest},</if>
  240. <if test="totalInvestScale != null">TOTAL_INVEST_SCALE = #{totalInvestScale},</if>
  241. <if test="mainWorks != null">MAIN_WORKS = #{mainWorks},</if>
  242. <if test="pjctImgPgrs != null">PJCT_IMG_PGRS = #{pjctImgPgrs},</if>
  243. <if test="remark != null">REMARK = #{remark},</if>
  244. <if test="note != null">NOTE = #{note},</if>
  245. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  246. <if test="intm != null">INTM = #{intm},</if>
  247. <if test="uptm != null">UPTM = #{uptm},</if>
  248. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  249. </trim>
  250. <include refid="page_where"/>
  251. </update>
  252. <!-- 其他自定义SQL -->
  253. </mapper>