ad678371bee7aa9369fad8f8e9e8d9bdeea2b5db.svn-base 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  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.BisInspFjsduSafdlDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspFjsduSafdl" id="bisInspFjsduSafdlResultMap">
  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="f5210" column="F_5_2_10"/>
  24. <result property="f531" column="F_5_3_1"/>
  25. <result property="f532" column="F_5_3_2"/>
  26. <result property="f533" column="F_5_3_3"/>
  27. <result property="note" column="NOTE"/>
  28. <result property="persId" column="PERS_ID"/>
  29. <result property="intm" column="INTM"/>
  30. <result property="uptm" column="UPTM"/>
  31. <result property="dataStat" column="DATA_STAT"/>
  32. <result property="state" column="STATE"/>
  33. </resultMap>
  34. <sql id="table_columns">
  35. ID,
  36. RGSTR_ID,
  37. F_5_1_1,
  38. F_5_1_2,
  39. F_5_1_3,
  40. F_5_1_4,
  41. F_5_1_5,
  42. F_5_1_6,
  43. F_5_1_7,
  44. F_5_2_1,
  45. F_5_2_2,
  46. F_5_2_3,
  47. F_5_2_4,
  48. F_5_2_5,
  49. F_5_2_6,
  50. F_5_2_7,
  51. F_5_2_8,
  52. F_5_2_9,
  53. F_5_2_10,
  54. F_5_3_1,
  55. F_5_3_2,
  56. F_5_3_3,
  57. NOTE,
  58. PERS_ID,
  59. INTM,
  60. UPTM,
  61. DATA_STAT,
  62. STATE
  63. </sql>
  64. <sql id="entity_properties">
  65. #{id},
  66. #{rgstrId},
  67. #{f511},
  68. #{f512},
  69. #{f513},
  70. #{f514},
  71. #{f515},
  72. #{f516},
  73. #{f517},
  74. #{f521},
  75. #{f522},
  76. #{f523},
  77. #{f524},
  78. #{f525},
  79. #{f526},
  80. #{f527},
  81. #{f528},
  82. #{f529},
  83. #{f5210},
  84. #{f531},
  85. #{f532},
  86. #{f533},
  87. #{note},
  88. #{persId},
  89. #{intm},
  90. #{uptm},
  91. #{dataStat},
  92. #{state}
  93. </sql>
  94. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  95. <sql id="page_where">
  96. <trim prefix="where" prefixOverrides="and | or ">
  97. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  98. <if test="f511 != null and f511 != ''">and F_5_1_1 = #{f511}</if>
  99. <if test="f512 != null and f512 != ''">and F_5_1_2 = #{f512}</if>
  100. <if test="f513 != null and f513 != ''">and F_5_1_3 = #{f513}</if>
  101. <if test="f514 != null and f514 != ''">and F_5_1_4 = #{f514}</if>
  102. <if test="f515 != null and f515 != ''">and F_5_1_5 = #{f515}</if>
  103. <if test="f516 != null and f516 != ''">and F_5_1_6 = #{f516}</if>
  104. <if test="f517 != null and f517 != ''">and F_5_1_7 = #{f517}</if>
  105. <if test="f521 != null and f521 != ''">and F_5_2_1 = #{f521}</if>
  106. <if test="f522 != null and f522 != ''">and F_5_2_2 = #{f522}</if>
  107. <if test="f523 != null and f523 != ''">and F_5_2_3 = #{f523}</if>
  108. <if test="f524 != null and f524 != ''">and F_5_2_4 = #{f524}</if>
  109. <if test="f525 != null and f525 != ''">and F_5_2_5 = #{f525}</if>
  110. <if test="f526 != null and f526 != ''">and F_5_2_6 = #{f526}</if>
  111. <if test="f527 != null and f527 != ''">and F_5_2_7 = #{f527}</if>
  112. <if test="f528 != null and f528 != ''">and F_5_2_8 = #{f528}</if>
  113. <if test="f529 != null and f529 != ''">and F_5_2_9 = #{f529}</if>
  114. <if test="f5210 != null and f5210 != ''">and F_5_2_10 = #{f5210}</if>
  115. <if test="f531 != null and f531 != ''">and F_5_3_1 = #{f531}</if>
  116. <if test="f532 != null and f532 != ''">and F_5_3_2 = #{f532}</if>
  117. <if test="f533 != null and f533 != ''">and F_5_3_3 = #{f533}</if>
  118. <if test="note != null and note != ''">and NOTE = #{note}</if>
  119. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  120. <if test="intm != null">and INTM = #{intm}</if>
  121. <if test="uptm != null">and UPTM = #{uptm}</if>
  122. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  123. <if test="state != null and state != ''">and STATE = #{state}</if>
  124. </trim>
  125. </sql>
  126. <select id="get" resultMap="bisInspFjsduSafdlResultMap" parameterType="String" >
  127. select <include refid="table_columns" /> from BIS_INSP_FJSDU_SAFDL where RGSTR_ID = #{id}
  128. </select>
  129. <select id="getBy" resultMap="bisInspFjsduSafdlResultMap">
  130. select <include refid="table_columns" /> from BIS_INSP_FJSDU_SAFDL <include refid="page_where" />
  131. </select>
  132. <select id="findAll" resultMap="bisInspFjsduSafdlResultMap">
  133. select <include refid="table_columns" /> from BIS_INSP_FJSDU_SAFDL
  134. </select>
  135. <select id="findList" resultMap="bisInspFjsduSafdlResultMap">
  136. select <include refid="table_columns" /> from BIS_INSP_FJSDU_SAFDL <include refid="page_where" />
  137. </select>
  138. <select id="selectCount" resultType="int" >
  139. select count(ID) from BIS_INSP_FJSDU_SAFDL <include refid="page_where" />
  140. </select>
  141. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjsduSafdl">
  142. insert into BIS_INSP_FJSDU_SAFDL( <include refid="table_columns" /> )
  143. values ( <include refid="entity_properties" /> )
  144. </insert>
  145. <delete id="delete" parameterType="java.lang.String">
  146. update BIS_INSP_FJSDU_SAFDL set DATA_STAT='9' where ID = #{id}
  147. </delete>
  148. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjsduSafdl">
  149. delete from BIS_INSP_FJSDU_SAFDL <include refid="page_where" />
  150. </delete>
  151. <update id="deleteInFlag" parameterType="java.lang.String">
  152. update BIS_INSP_FJSDU_SAFDL set flag_valid = 0 where ID = #{id}
  153. </update>
  154. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjsduSafdl">
  155. update BIS_INSP_FJSDU_SAFDL
  156. <trim prefix="set" suffixOverrides=",">
  157. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  158. F_5_1_1 = #{f511},
  159. F_5_1_2 = #{f512},
  160. F_5_1_3 = #{f513},
  161. F_5_1_4 = #{f514},
  162. F_5_1_5 = #{f515},
  163. F_5_1_6 = #{f516},
  164. F_5_1_7 = #{f517},
  165. F_5_2_1 = #{f521},
  166. F_5_2_2 = #{f522},
  167. F_5_2_3 = #{f523},
  168. F_5_2_4 = #{f524},
  169. F_5_2_5 = #{f525},
  170. F_5_2_6 = #{f526},
  171. F_5_2_7 = #{f527},
  172. F_5_2_8 = #{f528},
  173. F_5_2_9 = #{f529},
  174. F_5_2_10 = #{f5210},
  175. F_5_3_1 = #{f531},
  176. F_5_3_2 = #{f532},
  177. F_5_3_3 = #{f533},
  178. <if test="note != null and note != ''">NOTE = #{note},</if>
  179. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  180. <if test="intm != null">INTM = #{intm},</if>
  181. <if test="uptm != null">UPTM = #{uptm},</if>
  182. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  183. <if test="state != null and state != ''">STATE = #{state},</if>
  184. </trim>
  185. <where>ID = #{id}</where>
  186. </update>
  187. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjsduSafdl">
  188. update BIS_INSP_FJSDU_SAFDL
  189. <trim prefix="set" suffixOverrides=",">
  190. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  191. F_5_1_1 = #{f511},
  192. F_5_1_2 = #{f512},
  193. F_5_1_3 = #{f513},
  194. F_5_1_4 = #{f514},
  195. F_5_1_5 = #{f515},
  196. F_5_1_6 = #{f516},
  197. F_5_1_7 = #{f517},
  198. F_5_2_1 = #{f521},
  199. F_5_2_2 = #{f522},
  200. F_5_2_3 = #{f523},
  201. F_5_2_4 = #{f524},
  202. F_5_2_5 = #{f525},
  203. F_5_2_6 = #{f526},
  204. F_5_2_7 = #{f527},
  205. F_5_2_8 = #{f528},
  206. F_5_2_9 = #{f529},
  207. F_5_2_10 = #{f5210},
  208. F_5_3_1 = #{f531},
  209. F_5_3_2 = #{f532},
  210. F_5_3_3 = #{f533},
  211. <if test="note != null and note != ''">NOTE = #{note},</if>
  212. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  213. <if test="intm != null">INTM = #{intm},</if>
  214. <if test="uptm != null">UPTM = #{uptm},</if>
  215. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  216. <if test="state != null and state != ''">STATE = #{state},</if>
  217. </trim>
  218. <include refid="page_where" />
  219. </update>
  220. <!-- 其他自定义SQL -->
  221. </mapper>