AttWagaCrrctDao.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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.AttWagaCrrctDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.AttWagaCrrct" id="attWagaCrrctResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="objCode" column="OBJ_CODE"/>
  7. <result property="gateName" column="GATE_NAME"/>
  8. <result property="adCode" column="AD_CODE"/>
  9. <result property="locRvName" column="LOC_RV_NAME"/>
  10. <result property="gateType" column="GATE_TYPE"/>
  11. <result property="gateFlow" column="GATE_FLOW"/>
  12. <result property="engScal" column="ENG_SCAL"/>
  13. <result property="engSta" column="ENG_STA"/>
  14. <result property="buidTimeYear" column="BUID_TIME_YEAR"/>
  15. <result property="buidTimeMon" column="BUID_TIME_MON"/>
  16. <result property="staTimeYear" column="STA_TIME_YEAR"/>
  17. <result property="staTimeMon" column="STA_TIME_MON"/>
  18. <result property="locationCun" column="LOCATION_CUN"/>
  19. <result property="locationXiang" column="LOCATION_XIANG"/>
  20. <result property="gateAdmName" column="GATE_ADM_NAME"/>
  21. <result property="gateAdmOrg" column="GATE_ADM_ORG"/>
  22. <result property="centerX" column="CENTER_X"/>
  23. <result property="centerY" column="CENTER_Y"/>
  24. <result property="gdX" column="GD_X"/>
  25. <result property="gdY" column="GD_Y"/>
  26. <result property="persId" column="PERS_ID"/>
  27. <result property="cTm" column="C_TM"/>
  28. <result property="upTm" column="UP_TM"/>
  29. </resultMap>
  30. <sql id="table_columns">
  31. ID,
  32. OBJ_CODE,
  33. GATE_NAME,
  34. AD_CODE,
  35. LOC_RV_NAME,
  36. GATE_TYPE,
  37. GATE_FLOW,
  38. ENG_SCAL,
  39. ENG_STA,
  40. BUID_TIME_YEAR,
  41. BUID_TIME_MON,
  42. STA_TIME_YEAR,
  43. STA_TIME_MON,
  44. LOCATION_CUN,
  45. GATE_ADM_NAME,
  46. GATE_ADM_ORG,
  47. CENTER_X,
  48. CENTER_Y,
  49. GD_X,
  50. GD_Y,
  51. PERS_ID,
  52. C_TM,
  53. UP_TM,LOCATION_XIANG
  54. </sql>
  55. <sql id="entity_properties">
  56. #{id},
  57. #{objCode},
  58. #{gateName},
  59. #{adCode},
  60. #{locRvName},
  61. #{gateType},
  62. #{gateFlow},
  63. #{engScal},
  64. #{engSta},
  65. #{buidTimeYear},
  66. #{buidTimeMon},
  67. #{staTimeYear},
  68. #{staTimeMon},
  69. #{locationCun},
  70. #{gateAdmName},
  71. #{gateAdmOrg},
  72. #{centerX},
  73. #{centerY},
  74. #{gdX},
  75. #{gdY},
  76. #{persId},
  77. #{cTm},
  78. #{upTm},#{locationXiang}
  79. </sql>
  80. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  81. <sql id="page_where">
  82. <trim prefix="where" prefixOverrides="and | or ">
  83. <if test="objCode != null and objCode != ''">and OBJ_CODE = #{objCode}</if>
  84. <if test="gateName != null and gateName != ''">and GATE_NAME = #{gateName}</if>
  85. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  86. <if test="locRvName != null and locRvName != ''">and LOC_RV_NAME = #{locRvName}</if>
  87. <if test="gateType != null and gateType != ''">and GATE_TYPE = #{gateType}</if>
  88. <if test="gateFlow != null and gateFlow != ''">and GATE_FLOW = #{gateFlow}</if>
  89. <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
  90. <if test="engSta != null and engSta != ''">and ENG_STA = #{engSta}</if>
  91. <if test="buidTimeYear != null and buidTimeYear != ''">and BUID_TIME_YEAR = #{buidTimeYear}</if>
  92. <if test="buidTimeMon != null and buidTimeMon != ''">and BUID_TIME_MON = #{buidTimeMon}</if>
  93. <if test="staTimeYear != null and staTimeYear != ''">and STA_TIME_YEAR = #{staTimeYear}</if>
  94. <if test="staTimeMon != null and staTimeMon != ''">and STA_TIME_MON = #{staTimeMon}</if>
  95. <if test="locationCun != null and locationCun != ''">and LOCATION_CUN = #{locationCun}</if>
  96. <if test="gateAdmName != null and gateAdmName != ''">and GATE_ADM_NAME = #{gateAdmName}</if>
  97. <if test="gateAdmOrg != null and gateAdmOrg != ''">and GATE_ADM_ORG = #{gateAdmOrg}</if>
  98. <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
  99. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  100. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  101. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  102. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  103. <if test="cTm != null">and C_TM = #{cTm}</if>
  104. <if test="upTm != null">and UP_TM = #{upTm}</if>
  105. <if test="locationXiang != null">and location_Xiang = #{locationXiang}</if>
  106. </trim>
  107. </sql>
  108. <select id="get" resultMap="attWagaCrrctResultMap" parameterType="String">
  109. select
  110. <include refid="table_columns"/>
  111. from ATT_WAGA_CRRCT where ID = #{id}
  112. </select>
  113. <select id="getBy" resultMap="attWagaCrrctResultMap">
  114. select
  115. <include refid="table_columns"/>
  116. from ATT_WAGA_CRRCT
  117. <include refid="page_where"/>
  118. </select>
  119. <select id="findAll" resultMap="attWagaCrrctResultMap">
  120. select
  121. <include refid="table_columns"/>
  122. from ATT_WAGA_CRRCT
  123. </select>
  124. <select id="findList" resultMap="attWagaCrrctResultMap">
  125. select
  126. <include refid="table_columns"/>
  127. from ATT_WAGA_CRRCT
  128. <include refid="page_where"/>
  129. </select>
  130. <select id="selectCount" resultType="int">
  131. select count(ID) from ATT_WAGA_CRRCT
  132. <include refid="page_where"/>
  133. </select>
  134. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWagaCrrct">
  135. insert into ATT_WAGA_CRRCT(
  136. <include refid="table_columns"/>
  137. )
  138. values (
  139. <include refid="entity_properties"/>
  140. )
  141. </insert>
  142. <delete id="delete" parameterType="java.lang.String">
  143. delete from ATT_WAGA_CRRCT where ID = #{id}
  144. </delete>
  145. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWagaCrrct">
  146. delete from ATT_WAGA_CRRCT
  147. <include refid="page_where"/>
  148. </delete>
  149. <update id="deleteInFlag" parameterType="java.lang.String">
  150. update ATT_WAGA_CRRCT set flag_valid = 0 where ID = #{id}
  151. </update>
  152. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWagaCrrct">
  153. update ATT_WAGA_CRRCT
  154. <trim prefix="set" suffixOverrides=",">
  155. <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
  156. <if test="gateName != null and gateName != ''">GATE_NAME = #{gateName},</if>
  157. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  158. <if test="locRvName != null and locRvName != ''">LOC_RV_NAME = #{locRvName},</if>
  159. <if test="gateType != null and gateType != ''">GATE_TYPE = #{gateType},</if>
  160. <if test="gateFlow != null and gateFlow != ''">GATE_FLOW = #{gateFlow},</if>
  161. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  162. <if test="engSta != null and engSta != ''">ENG_STA = #{engSta},</if>
  163. <if test="buidTimeYear != null and buidTimeYear != ''">BUID_TIME_YEAR = #{buidTimeYear},</if>
  164. <if test="buidTimeMon != null and buidTimeMon != ''">BUID_TIME_MON = #{buidTimeMon},</if>
  165. <if test="staTimeYear != null and staTimeYear != ''">STA_TIME_YEAR = #{staTimeYear},</if>
  166. <if test="staTimeMon != null and staTimeMon != ''">STA_TIME_MON = #{staTimeMon},</if>
  167. <if test="locationCun != null and locationCun != ''">LOCATION_CUN = #{locationCun},</if>
  168. <if test="gateAdmName != null and gateAdmName != ''">GATE_ADM_NAME = #{gateAdmName},</if>
  169. <if test="gateAdmOrg != null and gateAdmOrg != ''">GATE_ADM_ORG = #{gateAdmOrg},</if>
  170. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  171. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  172. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  173. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  174. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  175. <if test="cTm != null">C_TM = #{cTm},</if>
  176. <if test="upTm != null">UP_TM = #{upTm},</if>
  177. <if test="locationXiang != null">location_Xiang = #{locationXiang},</if>
  178. </trim>
  179. <where>ID = #{id}</where>
  180. </update>
  181. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWagaCrrct">
  182. update ATT_WAGA_CRRCT
  183. <trim prefix="set" suffixOverrides=",">
  184. <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
  185. <if test="gateName != null and gateName != ''">GATE_NAME = #{gateName},</if>
  186. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  187. <if test="locRvName != null and locRvName != ''">LOC_RV_NAME = #{locRvName},</if>
  188. <if test="gateType != null and gateType != ''">GATE_TYPE = #{gateType},</if>
  189. <if test="gateFlow != null and gateFlow != ''">GATE_FLOW = #{gateFlow},</if>
  190. <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
  191. <if test="engSta != null and engSta != ''">ENG_STA = #{engSta},</if>
  192. <if test="buidTimeYear != null and buidTimeYear != ''">BUID_TIME_YEAR = #{buidTimeYear},</if>
  193. <if test="buidTimeMon != null and buidTimeMon != ''">BUID_TIME_MON = #{buidTimeMon},</if>
  194. <if test="staTimeYear != null and staTimeYear != ''">STA_TIME_YEAR = #{staTimeYear},</if>
  195. <if test="staTimeMon != null and staTimeMon != ''">STA_TIME_MON = #{staTimeMon},</if>
  196. <if test="locationCun != null and locationCun != ''">LOCATION_CUN = #{locationCun},</if>
  197. <if test="gateAdmName != null and gateAdmName != ''">GATE_ADM_NAME = #{gateAdmName},</if>
  198. <if test="gateAdmOrg != null and gateAdmOrg != ''">GATE_ADM_ORG = #{gateAdmOrg},</if>
  199. <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
  200. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  201. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  202. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  203. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  204. <if test="cTm != null">C_TM = #{cTm},</if>
  205. <if test="upTm != null">UP_TM = #{upTm},</if>
  206. </trim>
  207. <include refid="page_where"/>
  208. </update>
  209. <!-- 其他自定义SQL -->
  210. </mapper>