72d826e7e761127ea55ca6db4b2f397f34968ce5.svn-base 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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.AttJspwiu2024BaseDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttJspwiu2024Base" id="attJspwiu2024BaseResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="name" column="NAME"/>
  7. <result property="leglPers" column="LEGL_PERS"/>
  8. <result property="adCode" column="AD_CODE"/>
  9. <result property="adName" column="AD_NAME"/>
  10. <result property="idnt" column="IDNT"/>
  11. <result property="busAddr" column="BUS_ADDR"/>
  12. <result property="industry" column="INDUSTRY"/>
  13. <result property="industryCode" column="INDUSTRY_CODE"/>
  14. <result property="majorProduct" column="MAJOR_PRODUCT"/>
  15. <result property="waterIntake" column="WATER_INTAKE"/>
  16. <result property="conPers" column="CON_PERS"/>
  17. <result property="conPersTel" column="CON_PERS_TEL"/>
  18. <result property="centerX" column="CENTER_X"/>
  19. <result property="centerY" column="CENTER_Y"/>
  20. <result property="gdX" column="GD_X"/>
  21. <result property="gdY" column="GD_Y"/>
  22. <result property="persId" column="PERS_ID"/>
  23. <result property="intm" column="INTM"/>
  24. <result property="uptm" column="UPTM"/>
  25. <result property="note" column="NOTE"/>
  26. <result property="dataStat" column="DATA_STAT"/>
  27. </resultMap>
  28. <sql id="table_columns">
  29. ID,
  30. NAME,
  31. LEGL_PERS,
  32. AD_CODE,
  33. AD_NAME,
  34. IDNT,
  35. BUS_ADDR,
  36. INDUSTRY,
  37. INDUSTRY_CODE,
  38. MAJOR_PRODUCT,
  39. WATER_INTAKE,
  40. CON_PERS,
  41. CON_PERS_TEL,
  42. CENTER_X,
  43. CENTER_Y,
  44. GD_X,
  45. GD_Y,
  46. PERS_ID,
  47. INTM,
  48. UPTM,
  49. NOTE,
  50. DATA_STAT
  51. </sql>
  52. <sql id="entity_properties">
  53. #{id},
  54. #{name},
  55. #{leglPers},
  56. #{adCode},
  57. #{adName},
  58. #{idnt},
  59. #{busAddr},
  60. #{industry},
  61. #{industryCode},
  62. #{majorProduct},
  63. #{waterIntake},
  64. #{conPers},
  65. #{conPersTel},
  66. #{centerX},
  67. #{centerY},
  68. #{gdX},
  69. #{gdY},
  70. #{persId},
  71. #{intm},
  72. #{uptm},
  73. #{note},
  74. #{dataStat}
  75. </sql>
  76. <!-- 浣跨敤like鐢ㄦ硶锛歝olumnName like concat('%',#columnName#,'%') -->
  77. <sql id="page_where">
  78. <trim prefix="where" prefixOverrides="and | or ">
  79. <if test="name != null and name != ''">and NAME = #{name}</if>
  80. <if test="leglPers != null and leglPers != ''">and LEGL_PERS = #{leglPers}</if>
  81. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  82. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  83. <if test="idnt != null and idnt != ''">and IDNT = #{idnt}</if>
  84. <if test="busAddr != null and busAddr != ''">and BUS_ADDR = #{busAddr}</if>
  85. <if test="industry != null and industry != ''">and INDUSTRY = #{industry}</if>
  86. <if test="industryCode != null and industryCode != ''">and INDUSTRY_CODE = #{industryCode}</if>
  87. <if test="majorProduct != null and majorProduct != ''">and MAJOR_PRODUCT = #{majorProduct}</if>
  88. <if test="waterIntake != null and waterIntake != ''">and WATER_INTAKE = #{waterIntake}</if>
  89. <if test="conPers != null and conPers != ''">and CON_PERS = #{conPers}</if>
  90. <if test="conPersTel != null and conPersTel != ''">and CON_PERS_TEL = #{conPersTel}</if>
  91. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  92. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  93. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  94. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  95. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  96. <if test="intm != null">and INTM = #{intm}</if>
  97. <if test="uptm != null">and UPTM = #{uptm}</if>
  98. <if test="note != null and note != ''">and NOTE = #{note}</if>
  99. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  100. </trim>
  101. </sql>
  102. <select id="get" resultMap="attJspwiu2024BaseResultMap" parameterType="String" >
  103. select <include refid="table_columns" /> from ATT_JSPWIU2024_BASE where ID = #{id}
  104. </select>
  105. <select id="getBy" resultMap="attJspwiu2024BaseResultMap">
  106. select <include refid="table_columns" /> from ATT_JSPWIU2024_BASE <include refid="page_where" />
  107. </select>
  108. <select id="findAll" resultMap="attJspwiu2024BaseResultMap">
  109. select <include refid="table_columns" /> from ATT_JSPWIU2024_BASE
  110. </select>
  111. <select id="findList" resultMap="attJspwiu2024BaseResultMap">
  112. select <include refid="table_columns" /> from ATT_JSPWIU2024_BASE <include refid="page_where" />
  113. </select>
  114. <select id="selectCount" resultType="int" >
  115. select count(ID) from ATT_JSPWIU2024_BASE <include refid="page_where" />
  116. </select>
  117. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttJspwiu2024Base">
  118. insert into ATT_JSPWIU2024_BASE( <include refid="table_columns" /> )
  119. values ( <include refid="entity_properties" /> )
  120. </insert>
  121. <delete id="delete" parameterType="java.lang.String">
  122. update ATT_JSPWIU2024_BASE set DATA_STAT='9' where ID = #{id}
  123. </delete>
  124. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttJspwiu2024Base">
  125. delete from ATT_JSPWIU2024_BASE <include refid="page_where" />
  126. </delete>
  127. <update id="deleteInFlag" parameterType="java.lang.String">
  128. update ATT_JSPWIU2024_BASE set flag_valid = 0 where ID = #{id}
  129. </update>
  130. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttJspwiu2024Base">
  131. update ATT_JSPWIU2024_BASE
  132. <trim prefix="set" suffixOverrides=",">
  133. <if test="name != null and name != ''">NAME = #{name},</if>
  134. <if test="leglPers != null and leglPers != ''">LEGL_PERS = #{leglPers},</if>
  135. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  136. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  137. <if test="idnt != null and idnt != ''">IDNT = #{idnt},</if>
  138. <if test="busAddr != null and busAddr != ''">BUS_ADDR = #{busAddr},</if>
  139. <if test="industry != null and industry != ''">INDUSTRY = #{industry},</if>
  140. <if test="industryCode != null and industryCode != ''">INDUSTRY_CODE = #{industryCode},</if>
  141. <if test="majorProduct != null and majorProduct != ''">MAJOR_PRODUCT = #{majorProduct},</if>
  142. <if test="waterIntake != null and waterIntake != ''">WATER_INTAKE = #{waterIntake},</if>
  143. <if test="conPers != null and conPers != ''">CON_PERS = #{conPers},</if>
  144. <if test="conPersTel != null and conPersTel != ''">CON_PERS_TEL = #{conPersTel},</if>
  145. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  146. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  147. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  148. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  149. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  150. <if test="intm != null">INTM = #{intm},</if>
  151. <if test="uptm != null">UPTM = #{uptm},</if>
  152. <if test="note != null and note != ''">NOTE = #{note},</if>
  153. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  154. </trim>
  155. <where>ID = #{id}</where>
  156. </update>
  157. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttJspwiu2024Base">
  158. update ATT_JSPWIU2024_BASE
  159. <trim prefix="set" suffixOverrides=",">
  160. <if test="name != null and name != ''">NAME = #{name},</if>
  161. <if test="leglPers != null and leglPers != ''">LEGL_PERS = #{leglPers},</if>
  162. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  163. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  164. <if test="idnt != null and idnt != ''">IDNT = #{idnt},</if>
  165. <if test="busAddr != null and busAddr != ''">BUS_ADDR = #{busAddr},</if>
  166. <if test="industry != null and industry != ''">INDUSTRY = #{industry},</if>
  167. <if test="industryCode != null and industryCode != ''">INDUSTRY_CODE = #{industryCode},</if>
  168. <if test="majorProduct != null and majorProduct != ''">MAJOR_PRODUCT = #{majorProduct},</if>
  169. <if test="waterIntake != null and waterIntake != ''">WATER_INTAKE = #{waterIntake},</if>
  170. <if test="conPers != null and conPers != ''">CON_PERS = #{conPers},</if>
  171. <if test="conPersTel != null and conPersTel != ''">CON_PERS_TEL = #{conPersTel},</if>
  172. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  173. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  174. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  175. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  176. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  177. <if test="intm != null">INTM = #{intm},</if>
  178. <if test="uptm != null">UPTM = #{uptm},</if>
  179. <if test="note != null and note != ''">NOTE = #{note},</if>
  180. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  181. </trim>
  182. <include refid="page_where" />
  183. </update>
  184. <!-- 鍏朵粬鑷畾涔塖QL -->
  185. <!-- 其他自定义SQL -->
  186. <select id="getObjId" resultMap="attJspwiu2024BaseResultMap" parameterType="String" >
  187. select <include refid="table_columns" /> from ATT_JSPWIU2024_BASE where ID = (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE OBJ_ID = #{objId} )
  188. </select>
  189. </mapper>