217543b38c6bfbf05eea632513d031d943b1baac.svn-base 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  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.BisInspBaseNewDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspBaseNew" id="bisInspBaseNewResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="objType" column="OBJ_TYPE"/>
  7. <result property="code" column="CODE"/>
  8. <result property="nm" column="NM"/>
  9. <result property="adCode" column="AD_CODE"/>
  10. <result property="adName" column="AD_NAME"/>
  11. <result property="loc" column="LOC"/>
  12. <result property="note" column="NOTE"/>
  13. <result property="centerX" column="CENTER_X"/>
  14. <result property="centerY" column="CENTER_Y"/>
  15. <result property="gdX" column="GD_X"/>
  16. <result property="gdY" column="GD_Y"/>
  17. <result property="intm" column="INTM"/>
  18. <result property="uptm" column="UPTM"/>
  19. <result property="dataStat" column="DATA_STAT"/>
  20. <result property="sectName" column="SECT_NAME"/>
  21. </resultMap>
  22. <sql id="table_columns">
  23. ID
  24. ,
  25. OBJ_TYPE,
  26. CODE,
  27. NM,
  28. AD_CODE,
  29. AD_NAME,
  30. LOC,
  31. NOTE,
  32. CENTER_X,
  33. CENTER_Y,
  34. GD_X,
  35. GD_Y,
  36. INTM,
  37. UPTM,
  38. DATA_STAT,
  39. SECT_NAME
  40. </sql>
  41. <sql id="entity_properties">
  42. #{id}
  43. ,
  44. #{objType},
  45. #{code},
  46. #{nm},
  47. #{adCode},
  48. #{adName},
  49. #{loc},
  50. #{note},
  51. #{centerX},
  52. #{centerY},
  53. #{gdX},
  54. #{gdY},
  55. #{intm},
  56. #{uptm},
  57. #{dataStat},
  58. #{sectName}
  59. </sql>
  60. <sql id="page_where">
  61. <trim prefix="where" prefixOverrides="and | or ">
  62. <if test="objType != null and objType != ''">and OBJ_TYPE = #{objType}</if>
  63. <if test="code != null and code != ''">and CODE = #{code}</if>
  64. <if test="nm != null and nm != ''">and NM = #{nm}</if>
  65. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  66. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  67. <if test="loc != null and loc != ''">and LOC = #{loc}</if>
  68. <if test="note != null and note != ''">and NOTE = #{note}</if>
  69. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  70. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  71. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  72. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  73. <if test="intm != null">and INTM = #{intm}</if>
  74. <if test="uptm != null">and UPTM = #{uptm}</if>
  75. <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
  76. <if test="sectName != null and sectName != ''">and SECT_NAME = #{sectName}</if>
  77. and DATA_STAT='0'
  78. </trim>
  79. </sql>
  80. <select id="get" resultMap="bisInspBaseNewResultMap" parameterType="String">
  81. select
  82. <include refid="table_columns"/>
  83. from BIS_INSP_BASE_NEW where ID = #{id}
  84. </select>
  85. <select id="getBy" resultMap="bisInspBaseNewResultMap">
  86. select
  87. <include refid="table_columns"/>
  88. from BIS_INSP_BASE_NEW
  89. <include refid="page_where"/>
  90. </select>
  91. <select id="findAll" resultMap="bisInspBaseNewResultMap">
  92. select
  93. <include refid="table_columns"/>
  94. from BIS_INSP_BASE_NEW
  95. </select>
  96. <select id="findList" resultMap="bisInspBaseNewResultMap">
  97. select
  98. <include refid="table_columns"/>
  99. from BIS_INSP_BASE_NEW
  100. <include refid="page_where"/>
  101. </select>
  102. <select id="selectCount" resultType="int">
  103. select count(ID) from BIS_INSP_BASE_NEW
  104. <include refid="page_where"/>
  105. </select>
  106. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspBaseNew">
  107. insert into BIS_INSP_BASE_NEW(
  108. <include refid="table_columns"/>
  109. )
  110. values (
  111. <include refid="entity_properties"/>
  112. )
  113. </insert>
  114. <delete id="delete" parameterType="java.lang.String">
  115. update BIS_INSP_BASE_NEW
  116. set DATA_STAT='9'
  117. where ID = #{id}
  118. </delete>
  119. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspBaseNew">
  120. update BIS_INSP_BASE_NEW set DATA_STAT='9'
  121. <include refid="page_where"/>
  122. </delete>
  123. <update id="deleteInFlag" parameterType="java.lang.String">
  124. update BIS_INSP_BASE_NEW
  125. set DATA_STAT = '9'
  126. where ID = #{id}
  127. </update>
  128. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspBaseNew">
  129. update BIS_INSP_BASE_NEW
  130. <trim prefix="set" suffixOverrides=",">
  131. <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
  132. <if test="code != null and code != ''">CODE = #{code},</if>
  133. <if test="nm != null and nm != ''">NM = #{nm},</if>
  134. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  135. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  136. <if test="loc != null and loc != ''">LOC = #{loc},</if>
  137. <if test="note != null and note != ''">NOTE = #{note},</if>
  138. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  139. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  140. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  141. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  142. <if test="intm != null">INTM = #{intm},</if>
  143. <if test="uptm != null">UPTM = #{uptm},</if>
  144. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  145. <if test="sectName != null and sectName != ''">SECT_NAME = #{sectName},</if>
  146. </trim>
  147. <where>ID = #{id}</where>
  148. </update>
  149. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspBaseNew">
  150. update BIS_INSP_BASE_NEW
  151. <trim prefix="set" suffixOverrides=",">
  152. <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
  153. <if test="code != null and code != ''">CODE = #{code},</if>
  154. <if test="nm != null and nm != ''">NM = #{nm},</if>
  155. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  156. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  157. <if test="loc != null and loc != ''">LOC = #{loc},</if>
  158. <if test="note != null and note != ''">NOTE = #{note},</if>
  159. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  160. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  161. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  162. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  163. <if test="intm != null">INTM = #{intm},</if>
  164. <if test="uptm != null">UPTM = #{uptm},</if>
  165. <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
  166. <if test="sectName != null and sectName != ''">SECT_NAME = #{sectName},</if>
  167. </trim>
  168. <include refid="page_where"/>
  169. </update>
  170. <!-- 其他自定义SQL -->
  171. <select id="getTypes" resultType="string">
  172. select DISTINCT OBJ_TYPE
  173. from BIS_INSP_BASE_NEW
  174. where DATA_STAT = '0'
  175. </select>
  176. </mapper>