BisInspFjpjlglSystemDao.xml 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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.BisInspFjpjlglSystemDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspFjpjlglSystem" id="bisInspFjpjlglSystemResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="f211" column="F_2_1_1"/>
  8. <result property="f212" column="F_2_1_2"/>
  9. <result property="f213" column="F_2_1_3"/>
  10. <result property="f221" column="F_2_2_1"/>
  11. <result property="f222" column="F_2_2_2"/>
  12. <result property="f231" column="F_2_3_1"/>
  13. <result property="f232" column="F_2_3_2"/>
  14. <result property="f233" column="F_2_3_3"/>
  15. <result property="f241" column="F_2_4_1"/>
  16. <result property="f242" column="F_2_4_2"/>
  17. <result property="f243" column="F_2_4_3"/>
  18. <result property="f244" column="F_2_4_4"/>
  19. <result property="f245" column="F_2_4_5"/>
  20. <result property="note" column="NOTE"/>
  21. <result property="persId" column="PERS_ID"/>
  22. <result property="intm" column="INTM"/>
  23. <result property="uptm" column="UPTM"/>
  24. <result property="dataStat" column="DATA_STAT"/>
  25. <result property="state" column="STATE"/>
  26. </resultMap>
  27. <sql id="table_columns">
  28. ID,
  29. RGSTR_ID,
  30. F_2_1_1,
  31. F_2_1_2,
  32. F_2_1_3,
  33. F_2_2_1,
  34. F_2_2_2,
  35. F_2_3_1,
  36. F_2_3_2,
  37. F_2_3_3,
  38. F_2_4_1,
  39. F_2_4_2,
  40. F_2_4_3,
  41. F_2_4_4,
  42. F_2_4_5,
  43. NOTE,
  44. PERS_ID,
  45. INTM,
  46. UPTM,
  47. DATA_STAT,
  48. STATE
  49. </sql>
  50. <sql id="entity_properties">
  51. #{id},
  52. #{rgstrId},
  53. #{f211},
  54. #{f212},
  55. #{f213},
  56. #{f221},
  57. #{f222},
  58. #{f231},
  59. #{f232},
  60. #{f233},
  61. #{f241},
  62. #{f242},
  63. #{f243},
  64. #{f244},
  65. #{f245},
  66. #{note},
  67. #{persId},
  68. #{intm},
  69. #{uptm},
  70. #{dataStat},
  71. #{state}
  72. </sql>
  73. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  74. <sql id="page_where">
  75. <trim prefix="where" prefixOverrides="and | or ">
  76. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  77. <if test="f211 != null and f211 != ''">and F_2_1_1 = #{f211}</if>
  78. <if test="f212 != null and f212 != ''">and F_2_1_2 = #{f212}</if>
  79. <if test="f213 != null and f213 != ''">and F_2_1_3 = #{f213}</if>
  80. <if test="f221 != null and f221 != ''">and F_2_2_1 = #{f221}</if>
  81. <if test="f222 != null and f222 != ''">and F_2_2_2 = #{f222}</if>
  82. <if test="f231 != null and f231 != ''">and F_2_3_1 = #{f231}</if>
  83. <if test="f232 != null and f232 != ''">and F_2_3_2 = #{f232}</if>
  84. <if test="f233 != null and f233 != ''">and F_2_3_3 = #{f233}</if>
  85. <if test="f241 != null and f241 != ''">and F_2_4_1 = #{f241}</if>
  86. <if test="f242 != null and f242 != ''">and F_2_4_2 = #{f242}</if>
  87. <if test="f243 != null and f243 != ''">and F_2_4_3 = #{f243}</if>
  88. <if test="f244 != null and f244 != ''">and F_2_4_4 = #{f244}</if>
  89. <if test="f245 != null and f245 != ''">and F_2_4_5 = #{f245}</if>
  90. <if test="note != null and note != ''">and NOTE = #{note}</if>
  91. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  92. <if test="intm != null">and INTM = #{intm}</if>
  93. <if test="uptm != null">and UPTM = #{uptm}</if>
  94. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  95. <if test="state != null and state != ''">and STATE = #{state}</if>
  96. </trim>
  97. </sql>
  98. <select id="get" resultMap="bisInspFjpjlglSystemResultMap" parameterType="String" >
  99. select <include refid="table_columns" /> from BIS_INSP_FJPJLGL_SYSTEM where RGSTR_ID = #{id}
  100. </select>
  101. <select id="getBy" resultMap="bisInspFjpjlglSystemResultMap">
  102. select <include refid="table_columns" /> from BIS_INSP_FJPJLGL_SYSTEM <include refid="page_where" />
  103. </select>
  104. <select id="findAll" resultMap="bisInspFjpjlglSystemResultMap">
  105. select <include refid="table_columns" /> from BIS_INSP_FJPJLGL_SYSTEM
  106. </select>
  107. <select id="findList" resultMap="bisInspFjpjlglSystemResultMap">
  108. select <include refid="table_columns" /> from BIS_INSP_FJPJLGL_SYSTEM <include refid="page_where" />
  109. </select>
  110. <select id="selectCount" resultType="int" >
  111. select count(ID) from BIS_INSP_FJPJLGL_SYSTEM <include refid="page_where" />
  112. </select>
  113. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjpjlglSystem">
  114. insert into BIS_INSP_FJPJLGL_SYSTEM( <include refid="table_columns" /> )
  115. values ( <include refid="entity_properties" /> )
  116. </insert>
  117. <delete id="delete" parameterType="java.lang.String">
  118. update BIS_INSP_FJPJLGL_SYSTEM set DATA_STAT='9' where ID = #{id}
  119. </delete>
  120. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjpjlglSystem">
  121. delete from BIS_INSP_FJPJLGL_SYSTEM <include refid="page_where" />
  122. </delete>
  123. <update id="deleteInFlag" parameterType="java.lang.String">
  124. update BIS_INSP_FJPJLGL_SYSTEM set flag_valid = 0 where ID = #{id}
  125. </update>
  126. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjpjlglSystem">
  127. update BIS_INSP_FJPJLGL_SYSTEM
  128. <trim prefix="set" suffixOverrides=",">
  129. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  130. F_2_1_1 = #{f211},
  131. F_2_1_2 = #{f212},
  132. F_2_1_3 = #{f213},
  133. F_2_2_1 = #{f221},
  134. F_2_2_2 = #{f222},
  135. F_2_3_1 = #{f231},
  136. F_2_3_2 = #{f232},
  137. F_2_3_3 = #{f233},
  138. F_2_4_1 = #{f241},
  139. F_2_4_2 = #{f242},
  140. F_2_4_3 = #{f243},
  141. F_2_4_4 = #{f244},
  142. F_2_4_5 = #{f245},
  143. <if test="note != null and note != ''">NOTE = #{note},</if>
  144. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  145. <if test="intm != null">INTM = #{intm},</if>
  146. <if test="uptm != null">UPTM = #{uptm},</if>
  147. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  148. <if test="state != null and state != ''">STATE = #{state},</if>
  149. </trim>
  150. <where>ID = #{id}</where>
  151. </update>
  152. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspFjpjlglSystem">
  153. update BIS_INSP_FJPJLGL_SYSTEM
  154. <trim prefix="set" suffixOverrides=",">
  155. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  156. F_2_1_1 = #{f211},
  157. F_2_1_2 = #{f212},
  158. F_2_1_3 = #{f213},
  159. F_2_2_1 = #{f221},
  160. F_2_2_2 = #{f222},
  161. F_2_3_1 = #{f231},
  162. F_2_3_2 = #{f232},
  163. F_2_3_3 = #{f233},
  164. F_2_4_1 = #{f241},
  165. F_2_4_2 = #{f242},
  166. F_2_4_3 = #{f243},
  167. F_2_4_4 = #{f244},
  168. F_2_4_5 = #{f245},
  169. <if test="note != null and note != ''">NOTE = #{note},</if>
  170. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  171. <if test="intm != null">INTM = #{intm},</if>
  172. <if test="uptm != null">UPTM = #{uptm},</if>
  173. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  174. <if test="state != null and state != ''">STATE = #{state},</if>
  175. </trim>
  176. <include refid="page_where" />
  177. </update>
  178. <!-- 其他自定义SQL -->
  179. </mapper>