BisInspWrmRgstrWintDao.xml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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.BisInspWrmRgstrWintDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWrmRgstrWint" id="bisInspWrmRgstrWintResultMap">
  5. <result property="centerX" column="CENTER_X" />
  6. <result property="centerY" column="CENTER_Y" />
  7. <result property="gdX" column="GD_X" />
  8. <result property="gdY" column="GD_Y" />
  9. <result property="wrpNm" column="WRP_NM" />
  10. <result property="watLicCode" column="WAT_LIC_CODE" />
  11. <result property="wiuContact" column="WIU_CONTACT" />
  12. <result property="wiuContactTel" column="WIU_CONTACT_TEL" />
  13. <result property="isTitpotwwotadowdp" column="IS_TITPOTWWOTADOWDP" />
  14. <result property="cpwrdscIsEapdwav" column="CPWRDSC_IS_EAPDWAV" />
  15. <result property="isWip" column="IS_WIP" />
  16. <result property="isEqeaip" column="IS_EQEAIP" />
  17. <result property="isIwimmf" column="IS_IWIMMF" />
  18. <result property="wimmfIsNr" column="WIMMF_IS_NR" />
  19. <result property="wimmfIsPva" column="WIMMF_IS_PVA" />
  20. <result property="isSwilfwissar" column="IS_SWILFWISSAR" />
  21. <result property="isPwrffsal" column="IS_PWRFFSAL" />
  22. <result property="dwosqIsPwrfpmr" column="DWOSQ_IS_PWRFPMR" />
  23. <result property="persId" column="PERS_ID" />
  24. <result property="intm" column="INTM" />
  25. <result property="uptm" column="UPTM" />
  26. <result property="status" column="STATUS"/>
  27. <result property="id" column="ID" />
  28. <result property="rgstrId" column="RGSTR_ID" />
  29. <result property="wintId" column="WINT_ID" />
  30. <result property="wintCode" column="WINT_CODE" />
  31. <result property="wintName" column="WINT_NAME" />
  32. <result property="adCode" column="AD_CODE" />
  33. <result property="adName" column="AD_NAME" />
  34. <result property="wintPos" column="WINT_POS" />
  35. </resultMap>
  36. <sql id="table_columns">
  37. CENTER_X,
  38. CENTER_Y,
  39. GD_X,
  40. GD_Y,
  41. WRP_NM,
  42. WAT_LIC_CODE,
  43. WIU_CONTACT,
  44. WIU_CONTACT_TEL,
  45. IS_TITPOTWWOTADOWDP,
  46. CPWRDSC_IS_EAPDWAV,
  47. IS_WIP,
  48. IS_EQEAIP,
  49. IS_IWIMMF,
  50. WIMMF_IS_NR,
  51. WIMMF_IS_PVA,
  52. IS_SWILFWISSAR,
  53. IS_PWRFFSAL,
  54. DWOSQ_IS_PWRFPMR,
  55. PERS_ID,
  56. INTM,
  57. UPTM,
  58. STATUS,
  59. ID,
  60. RGSTR_ID,
  61. WINT_ID,
  62. WINT_CODE,
  63. WINT_NAME,
  64. AD_CODE,
  65. AD_NAME,
  66. WINT_POS
  67. </sql>
  68. <sql id="entity_properties">
  69. #{centerX},
  70. #{centerY},
  71. #{gdX},
  72. #{gdY},
  73. #{wrpNm},
  74. #{watLicCode},
  75. #{wiuContact},
  76. #{wiuContactTel},
  77. #{isTitpotwwotadowdp},
  78. #{cpwrdscIsEapdwav},
  79. #{isWip},
  80. #{isEqeaip},
  81. #{isIwimmf},
  82. #{wimmfIsNr},
  83. #{wimmfIsPva},
  84. #{isSwilfwissar},
  85. #{isPwrffsal},
  86. #{dwosqIsPwrfpmr},
  87. #{persId},
  88. #{intm},
  89. #{uptm},
  90. #{status},
  91. #{id},
  92. #{rgstrId},
  93. #{wintId},
  94. #{wintCode},
  95. #{wintName},
  96. #{adCode},
  97. #{adName},
  98. #{wintPos}
  99. </sql>
  100. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  101. <sql id="page_where">
  102. <trim prefix="where" prefixOverrides="and | or ">
  103. <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
  104. <if test="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
  105. <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
  106. <if test="wrpNm != null and wrpNm != ''">and WRP_NM = #{wrpNm}</if>
  107. <if test="watLicCode != null and watLicCode != ''">and WAT_LIC_CODE = #{watLicCode}</if>
  108. <if test="wiuContact != null and wiuContact != ''">and WIU_CONTACT = #{wiuContact}</if>
  109. <if test="wiuContactTel != null and wiuContactTel != ''">and WIU_CONTACT_TEL = #{wiuContactTel}</if>
  110. <if test="isTitpotwwotadowdp != null and isTitpotwwotadowdp != ''">and IS_TITPOTWWOTADOWDP = #{isTitpotwwotadowdp}</if>
  111. <if test="cpwrdscIsEapdwav != null and cpwrdscIsEapdwav != ''">and CPWRDSC_IS_EAPDWAV = #{cpwrdscIsEapdwav}</if>
  112. <if test="isWip != null and isWip != ''">and IS_WIP = #{isWip}</if>
  113. <if test="isEqeaip != null and isEqeaip != ''">and IS_EQEAIP = #{isEqeaip}</if>
  114. <if test="isIwimmf != null and isIwimmf != ''">and IS_IWIMMF = #{isIwimmf}</if>
  115. <if test="wimmfIsNr != null and wimmfIsNr != ''">and WIMMF_IS_NR = #{wimmfIsNr}</if>
  116. <if test="wimmfIsPva != null and wimmfIsPva != ''">and WIMMF_IS_PVA = #{wimmfIsPva}</if>
  117. <if test="isSwilfwissar != null and isSwilfwissar != ''">and IS_SWILFWISSAR = #{isSwilfwissar}</if>
  118. <if test="isPwrffsal != null and isPwrffsal != ''">and IS_PWRFFSAL = #{isPwrffsal}</if>
  119. <if test="dwosqIsPwrfpmr != null and dwosqIsPwrfpmr != ''">and DWOSQ_IS_PWRFPMR = #{dwosqIsPwrfpmr}</if>
  120. <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
  121. <if test="intm != null">and INTM = #{intm}</if>
  122. <if test="uptm != null">and UPTM = #{uptm}</if>
  123. <if test="status != null and status != ''">and STATUS = #{status}</if>
  124. <if test="id != null and id != ''">and ID = #{id}</if>
  125. <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
  126. <if test="wintId != null and wintId != ''">and WINT_ID = #{wintId}</if>
  127. <if test="wintCode != null and wintCode != ''">and WINT_CODE = #{wintCode}</if>
  128. <if test="wintName != null and wintName != ''">and WINT_NAME = #{wintName}</if>
  129. <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
  130. <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
  131. <if test="wintPos != null and wintPos != ''">and WINT_POS = #{wintPos}</if>
  132. </trim>
  133. </sql>
  134. <select id="get" resultMap="bisInspWrmRgstrWintResultMap" parameterType="String" >
  135. select <include refid="table_columns" /> from BIS_INSP_WRM_RGSTR_WINT where ID = #{id}
  136. </select>
  137. <select id="getBy" resultMap="bisInspWrmRgstrWintResultMap">
  138. select <include refid="table_columns" /> from BIS_INSP_WRM_RGSTR_WINT <include refid="page_where" />
  139. </select>
  140. <select id="findAll" resultMap="bisInspWrmRgstrWintResultMap">
  141. select <include refid="table_columns" /> from BIS_INSP_WRM_RGSTR_WINT
  142. </select>
  143. <select id="findList" resultMap="bisInspWrmRgstrWintResultMap">
  144. select <include refid="table_columns" /> from BIS_INSP_WRM_RGSTR_WINT <include refid="page_where" />
  145. </select>
  146. <select id="selectCount" resultType="int" >
  147. select count(ID) from BIS_INSP_WRM_RGSTR_WINT <include refid="page_where" />
  148. </select>
  149. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrmRgstrWint">
  150. insert into BIS_INSP_WRM_RGSTR_WINT( <include refid="table_columns" /> )
  151. values ( <include refid="entity_properties" /> )
  152. </insert>
  153. <delete id="delete" parameterType="java.lang.String">
  154. delete from BIS_INSP_WRM_RGSTR_WINT where ID = #{id}
  155. </delete>
  156. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrmRgstrWint">
  157. delete from BIS_INSP_WRM_RGSTR_WINT <include refid="page_where" />
  158. </delete>
  159. <update id="deleteInFlag" parameterType="java.lang.String">
  160. update BIS_INSP_WRM_RGSTR_WINT set flag_valid = 0 where>ID = #{id}
  161. </update>
  162. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrmRgstrWint">
  163. update BIS_INSP_WRM_RGSTR_WINT
  164. <trim prefix="set" suffixOverrides=",">
  165. <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
  166. <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
  167. <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
  168. <if test="wrpNm != null and wrpNm != ''">WRP_NM = #{wrpNm},</if>
  169. <if test="watLicCode != null and watLicCode != ''">WAT_LIC_CODE = #{watLicCode},</if>
  170. <if test="wiuContact != null and wiuContact != ''">WIU_CONTACT = #{wiuContact},</if>
  171. <if test="wiuContactTel != null and wiuContactTel != ''">WIU_CONTACT_TEL = #{wiuContactTel},</if>
  172. <if test="isTitpotwwotadowdp != null and isTitpotwwotadowdp != ''">IS_TITPOTWWOTADOWDP = #{isTitpotwwotadowdp},</if>
  173. <if test="cpwrdscIsEapdwav != null and cpwrdscIsEapdwav != ''">CPWRDSC_IS_EAPDWAV = #{cpwrdscIsEapdwav},</if>
  174. <if test="isWip != null and isWip != ''">IS_WIP = #{isWip},</if>
  175. <if test="isEqeaip != null and isEqeaip != ''">IS_EQEAIP = #{isEqeaip},</if>
  176. <if test="isIwimmf != null and isIwimmf != ''">IS_IWIMMF = #{isIwimmf},</if>
  177. <if test="wimmfIsNr != null and wimmfIsNr != ''">WIMMF_IS_NR = #{wimmfIsNr},</if>
  178. <if test="wimmfIsPva != null and wimmfIsPva != ''">WIMMF_IS_PVA = #{wimmfIsPva},</if>
  179. <if test="isSwilfwissar != null and isSwilfwissar != ''">IS_SWILFWISSAR = #{isSwilfwissar},</if>
  180. <if test="isPwrffsal != null and isPwrffsal != ''">IS_PWRFFSAL = #{isPwrffsal},</if>
  181. <if test="dwosqIsPwrfpmr != null and dwosqIsPwrfpmr != ''">DWOSQ_IS_PWRFPMR = #{dwosqIsPwrfpmr},</if>
  182. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  183. <if test="intm != null">INTM = #{intm},</if>
  184. <if test="uptm != null">UPTM = #{uptm},</if>
  185. <if test="status != null and status != ''">STATUS = #{status},</if>
  186. <if test="id != null and id != ''">ID = #{id},</if>
  187. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  188. <if test="wintId != null and wintId != ''">WINT_ID = #{wintId},</if>
  189. <if test="wintCode != null and wintCode != ''">WINT_CODE = #{wintCode},</if>
  190. <if test="wintName != null and wintName != ''">WINT_NAME = #{wintName},</if>
  191. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  192. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  193. <if test="wintPos != null and wintPos != ''">WINT_POS = #{wintPos},</if>
  194. </trim>
  195. <where>ID = #{id}</where>
  196. </update>
  197. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrmRgstrWint">
  198. update BIS_INSP_WRM_RGSTR_WINT
  199. <trim prefix="set" suffixOverrides=",">
  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="wrpNm != null and wrpNm != ''">WRP_NM = #{wrpNm},</if>
  204. <if test="watLicCode != null and watLicCode != ''">WAT_LIC_CODE = #{watLicCode},</if>
  205. <if test="wiuContact != null and wiuContact != ''">WIU_CONTACT = #{wiuContact},</if>
  206. <if test="wiuContactTel != null and wiuContactTel != ''">WIU_CONTACT_TEL = #{wiuContactTel},</if>
  207. <if test="isTitpotwwotadowdp != null and isTitpotwwotadowdp != ''">IS_TITPOTWWOTADOWDP = #{isTitpotwwotadowdp},</if>
  208. <if test="cpwrdscIsEapdwav != null and cpwrdscIsEapdwav != ''">CPWRDSC_IS_EAPDWAV = #{cpwrdscIsEapdwav},</if>
  209. <if test="isWip != null and isWip != ''">IS_WIP = #{isWip},</if>
  210. <if test="isEqeaip != null and isEqeaip != ''">IS_EQEAIP = #{isEqeaip},</if>
  211. <if test="isIwimmf != null and isIwimmf != ''">IS_IWIMMF = #{isIwimmf},</if>
  212. <if test="wimmfIsNr != null and wimmfIsNr != ''">WIMMF_IS_NR = #{wimmfIsNr},</if>
  213. <if test="wimmfIsPva != null and wimmfIsPva != ''">WIMMF_IS_PVA = #{wimmfIsPva},</if>
  214. <if test="isSwilfwissar != null and isSwilfwissar != ''">IS_SWILFWISSAR = #{isSwilfwissar},</if>
  215. <if test="isPwrffsal != null and isPwrffsal != ''">IS_PWRFFSAL = #{isPwrffsal},</if>
  216. <if test="dwosqIsPwrfpmr != null and dwosqIsPwrfpmr != ''">DWOSQ_IS_PWRFPMR = #{dwosqIsPwrfpmr},</if>
  217. <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
  218. <if test="intm != null">INTM = #{intm},</if>
  219. <if test="uptm != null">UPTM = #{uptm},</if>
  220. <if test="status != null and status != ''">STATUS = #{status},</if>
  221. <if test="id != null and id != ''">ID = #{id},</if>
  222. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
  223. <if test="wintId != null and wintId != ''">WINT_ID = #{wintId},</if>
  224. <if test="wintCode != null and wintCode != ''">WINT_CODE = #{wintCode},</if>
  225. <if test="wintName != null and wintName != ''">WINT_NAME = #{wintName},</if>
  226. <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
  227. <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
  228. <if test="wintPos != null and wintPos != ''">WINT_POS = #{wintPos},</if>
  229. </trim>
  230. <include refid="page_where" />
  231. </update>
  232. <!-- 其他自定义SQL -->
  233. <select id="findBaseInfo" resultType="cn.com.goldenwater.dcproj.model.AttWintBaseB">
  234. SELECT
  235. *
  236. FROM
  237. ATT_WINT_BASE_B
  238. WHERE
  239. ID NOT IN
  240. ( SELECT WINT_ID FROM BIS_INSP_WRM_RGSTR_WINT
  241. <where>
  242. <if test="id !=null and id != ''">
  243. and RGSTR_ID = #{id}
  244. </if>
  245. <if test="rgstrId !=null and rgstrId != ''">
  246. and RGSTR_ID = #{rgstrId}
  247. </if>
  248. </where>
  249. )
  250. <if test="name !=null and name != ''">
  251. and WINT_NAME like '%${name}%'
  252. </if>
  253. <if test="adCode !=null and adCode != ''">
  254. and AD_CODE like '${adCode}%'
  255. </if>
  256. </select>
  257. </mapper>