BisInspWiuqhWintDao.xml 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  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.BisInspWiuqhWintDao">
  4. <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWiuqhWint" id="bisInspWiuqhWintResultMap">
  5. <result property="id" column="ID"/>
  6. <result property="rgstrId" column="RGSTR_ID"/>
  7. <result property="wintId" column="WINT_ID"/>
  8. <result property="wintCode" column="WINT_CODE"/>
  9. <result property="wintName" column="WINT_NAME"/>
  10. <result property="adCode" column="AD_CODE"/>
  11. <result property="adName" column="AD_NAME"/>
  12. <result property="wintPos" column="WINT_POS"/>
  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="wrpNm" column="WRP_NM"/>
  18. <result property="watLicCode" column="WAT_LIC_CODE"/>
  19. <result property="wiuContact" column="WIU_CONTACT"/>
  20. <result property="wiuContactTel" column="WIU_CONTACT_TEL"/>
  21. <result property="isTitpotwwotadowdp" column="IS_TITPOTWWOTADOWDP"/>
  22. <result property="cpwrdscIsEapdwav" column="CPWRDSC_IS_EAPDWAV"/>
  23. <result property="isWip" column="IS_WIP"/>
  24. <result property="isEqeaip" column="IS_EQEAIP"/>
  25. <result property="isIwimmf" column="IS_IWIMMF"/>
  26. <result property="wimmfIsNr" column="WIMMF_IS_NR"/>
  27. <result property="wimmfIsPva" column="WIMMF_IS_PVA"/>
  28. <result property="isSwilfwissar" column="IS_SWILFWISSAR"/>
  29. <result property="isPwrffsal" column="IS_PWRFFSAL"/>
  30. <result property="dwosqIsPwrfpmr" column="DWOSQ_IS_PWRFPMR"/>
  31. <result property="persId" column="PERS_ID"/>
  32. <result property="intm" column="INTM"/>
  33. <result property="uptm" column="UPTM"/>
  34. <result property="status" column="STATUS"/>
  35. <result property="dataStat" column="DATA_STAT"/>
  36. </resultMap>
  37. <sql id="table_columns">
  38. ID,
  39. RGSTR_ID,
  40. WINT_ID,
  41. WINT_CODE,
  42. WINT_NAME,
  43. AD_CODE,
  44. AD_NAME,
  45. WINT_POS,
  46. CENTER_X,
  47. CENTER_Y,
  48. GD_X,
  49. GD_Y,
  50. WRP_NM,
  51. WAT_LIC_CODE,
  52. WIU_CONTACT,
  53. WIU_CONTACT_TEL,
  54. IS_TITPOTWWOTADOWDP,
  55. CPWRDSC_IS_EAPDWAV,
  56. IS_WIP,
  57. IS_EQEAIP,
  58. IS_IWIMMF,
  59. WIMMF_IS_NR,
  60. WIMMF_IS_PVA,
  61. IS_SWILFWISSAR,
  62. IS_PWRFFSAL,
  63. DWOSQ_IS_PWRFPMR,
  64. PERS_ID,
  65. INTM,
  66. UPTM,
  67. STATUS,
  68. DATA_STAT
  69. </sql>
  70. <sql id="entity_properties">
  71. #{id},
  72. #{rgstrId},
  73. #{wintId},
  74. #{wintCode},
  75. #{wintName},
  76. #{adCode},
  77. #{adName},
  78. #{wintPos},
  79. #{centerX},
  80. #{centerY},
  81. #{gdX},
  82. #{gdY},
  83. #{wrpNm},
  84. #{watLicCode},
  85. #{wiuContact},
  86. #{wiuContactTel},
  87. #{isTitpotwwotadowdp},
  88. #{cpwrdscIsEapdwav},
  89. #{isWip},
  90. #{isEqeaip},
  91. #{isIwimmf},
  92. #{wimmfIsNr},
  93. #{wimmfIsPva},
  94. #{isSwilfwissar},
  95. #{isPwrffsal},
  96. #{dwosqIsPwrfpmr},
  97. #{persId},
  98. #{intm},
  99. #{uptm},
  100. #{status},
  101. #{dataStat}
  102. </sql>
  103. <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
  104. <sql id="page_where">
  105. <trim prefix="where" prefixOverrides="and | or ">
  106. <if test="rgstrId != null and rgstrId != ''">
  107. and RGSTR_ID = #{rgstrId}
  108. </if>
  109. <if test="wintId != null and wintId != ''">
  110. and WINT_ID = #{wintId}
  111. </if>
  112. <if test="wintCode != null and wintCode != ''">
  113. and WINT_CODE = #{wintCode}
  114. </if>
  115. <if test="wintName != null and wintName != ''">
  116. and WINT_NAME = #{wintName}
  117. </if>
  118. <if test="adCode != null and adCode != ''">
  119. and AD_CODE = #{adCode}
  120. </if>
  121. <if test="adName != null and adName != ''">
  122. and AD_NAME = #{adName}
  123. </if>
  124. <if test="wintPos != null and wintPos != ''">
  125. and WINT_POS = #{wintPos}
  126. </if>
  127. <if test="centerX != null and centerX != ''">
  128. and CENTER_X = #{centerX}
  129. </if>
  130. <if test="centerY != null and centerY != ''">
  131. and CENTER_Y = #{centerY}
  132. </if>
  133. <if test="gdX != null and gdX != ''">
  134. and GD_X = #{gdX}
  135. </if>
  136. <if test="gdY != null and gdY != ''">
  137. and GD_Y = #{gdY}
  138. </if>
  139. <if test="wrpNm != null and wrpNm != ''">
  140. and WRP_NM = #{wrpNm}
  141. </if>
  142. <if test="watLicCode != null and watLicCode != ''">
  143. and WAT_LIC_CODE = #{watLicCode}
  144. </if>
  145. <if test="wiuContact != null and wiuContact != ''">
  146. and WIU_CONTACT = #{wiuContact}
  147. </if>
  148. <if test="wiuContactTel != null and wiuContactTel != ''">
  149. and WIU_CONTACT_TEL = #{wiuContactTel}
  150. </if>
  151. <if test="isTitpotwwotadowdp != null and isTitpotwwotadowdp != ''">
  152. and IS_TITPOTWWOTADOWDP = #{isTitpotwwotadowdp}
  153. </if>
  154. <if test="cpwrdscIsEapdwav != null and cpwrdscIsEapdwav != ''">
  155. and CPWRDSC_IS_EAPDWAV = #{cpwrdscIsEapdwav}
  156. </if>
  157. <if test="isWip != null and isWip != ''">
  158. and IS_WIP = #{isWip}
  159. </if>
  160. <if test="isEqeaip != null and isEqeaip != ''">
  161. and IS_EQEAIP = #{isEqeaip}
  162. </if>
  163. <if test="isIwimmf != null and isIwimmf != ''">
  164. and IS_IWIMMF = #{isIwimmf}
  165. </if>
  166. <if test="wimmfIsNr != null and wimmfIsNr != ''">
  167. and WIMMF_IS_NR = #{wimmfIsNr}
  168. </if>
  169. <if test="wimmfIsPva != null and wimmfIsPva != ''">
  170. and WIMMF_IS_PVA = #{wimmfIsPva}
  171. </if>
  172. <if test="isSwilfwissar != null and isSwilfwissar != ''">
  173. and IS_SWILFWISSAR = #{isSwilfwissar}
  174. </if>
  175. <if test="isPwrffsal != null and isPwrffsal != ''">
  176. and IS_PWRFFSAL = #{isPwrffsal}
  177. </if>
  178. <if test="dwosqIsPwrfpmr != null and dwosqIsPwrfpmr != ''">
  179. and DWOSQ_IS_PWRFPMR = #{dwosqIsPwrfpmr}
  180. </if>
  181. <if test="persId != null and persId != ''">
  182. and PERS_ID = #{persId}
  183. </if>
  184. <if test="intm != null">
  185. and INTM = #{intm}
  186. </if>
  187. <if test="uptm != null">
  188. and UPTM = #{uptm}
  189. </if>
  190. <if test="status != null and status != ''">
  191. and STATUS = #{status}
  192. </if>
  193. <if test="dataStat != null and dataStat != ''">
  194. and DATA_STAT = #{dataStat}
  195. </if>
  196. and DATA_STAT='0'
  197. </trim>
  198. </sql>
  199. <select id="get" resultMap="bisInspWiuqhWintResultMap" parameterType="String">
  200. select
  201. <include refid="table_columns"/>
  202. from BIS_INSP_WIUQH_WINT where ID = #{id}
  203. </select>
  204. <select id="getBy" resultMap="bisInspWiuqhWintResultMap">
  205. select
  206. <include refid="table_columns"/>
  207. from BIS_INSP_WIUQH_WINT
  208. <include refid="page_where"/>
  209. </select>
  210. <select id="findAll" resultMap="bisInspWiuqhWintResultMap">
  211. select
  212. <include refid="table_columns"/>
  213. from BIS_INSP_WIUQH_WINT
  214. </select>
  215. <select id="findList" resultMap="bisInspWiuqhWintResultMap">
  216. select
  217. <include refid="table_columns"/>
  218. from BIS_INSP_WIUQH_WINT
  219. <include refid="page_where"/>
  220. </select>
  221. <select id="selectCount" resultType="int">
  222. select count(ID) from BIS_INSP_WIUQH_WINT
  223. <include refid="page_where"/>
  224. </select>
  225. <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiuqhWint">
  226. insert into BIS_INSP_WIUQH_WINT(
  227. <include refid="table_columns"/>
  228. )
  229. values (
  230. <include refid="entity_properties"/>
  231. )
  232. </insert>
  233. <delete id="delete" parameterType="java.lang.String">
  234. update BIS_INSP_WIUQH_WINT set DATA_STAT='9' where ID = #{id}
  235. </delete>
  236. <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiuqhWint">
  237. update BIS_INSP_WIUQH_WINT set DATA_STAT='9'
  238. <include refid="page_where"/>
  239. </delete>
  240. <update id="deleteInFlag" parameterType="java.lang.String">
  241. update BIS_INSP_WIUQH_WINT set DATA_STAT = '9' where ID = #{id}
  242. </update>
  243. <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiuqhWint">
  244. update BIS_INSP_WIUQH_WINT
  245. <trim prefix="set" suffixOverrides=",">
  246. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  247. = #{rgstrId},
  248. </if>
  249. <if test="wintId != null and wintId != ''">WINT_ID
  250. = #{wintId},
  251. </if>
  252. <if test="wintCode != null and wintCode != ''">WINT_CODE
  253. = #{wintCode},
  254. </if>
  255. <if test="wintName != null and wintName != ''">WINT_NAME
  256. = #{wintName},
  257. </if>
  258. <if test="adCode != null and adCode != ''">AD_CODE
  259. = #{adCode},
  260. </if>
  261. <if test="adName != null and adName != ''">AD_NAME
  262. = #{adName},
  263. </if>
  264. <if test="wintPos != null and wintPos != ''">WINT_POS
  265. = #{wintPos},
  266. </if>
  267. <if test="centerX != null and centerX != ''">CENTER_X
  268. = #{centerX},
  269. </if>
  270. <if test="centerY != null and centerY != ''">CENTER_Y
  271. = #{centerY},
  272. </if>
  273. <if test="gdX != null and gdX != ''">GD_X
  274. = #{gdX},
  275. </if>
  276. <if test="gdY != null and gdY != ''">GD_Y
  277. = #{gdY},
  278. </if>
  279. <if test="wrpNm != null and wrpNm != ''">WRP_NM
  280. = #{wrpNm},
  281. </if>
  282. <if test="watLicCode != null and watLicCode != ''">WAT_LIC_CODE
  283. = #{watLicCode},
  284. </if>
  285. <if test="wiuContact != null and wiuContact != ''">WIU_CONTACT
  286. = #{wiuContact},
  287. </if>
  288. <if test="wiuContactTel != null and wiuContactTel != ''">WIU_CONTACT_TEL
  289. = #{wiuContactTel},
  290. </if>
  291. <if test="isTitpotwwotadowdp != null and isTitpotwwotadowdp != ''">IS_TITPOTWWOTADOWDP
  292. = #{isTitpotwwotadowdp},
  293. </if>
  294. <if test="cpwrdscIsEapdwav != null and cpwrdscIsEapdwav != ''">CPWRDSC_IS_EAPDWAV
  295. = #{cpwrdscIsEapdwav},
  296. </if>
  297. <if test="isWip != null and isWip != ''">IS_WIP
  298. = #{isWip},
  299. </if>
  300. <if test="isEqeaip != null and isEqeaip != ''">IS_EQEAIP
  301. = #{isEqeaip},
  302. </if>
  303. <if test="isIwimmf != null and isIwimmf != ''">IS_IWIMMF
  304. = #{isIwimmf},
  305. </if>
  306. <if test="wimmfIsNr != null and wimmfIsNr != ''">WIMMF_IS_NR
  307. = #{wimmfIsNr},
  308. </if>
  309. <if test="wimmfIsPva != null and wimmfIsPva != ''">WIMMF_IS_PVA
  310. = #{wimmfIsPva},
  311. </if>
  312. <if test="isSwilfwissar != null and isSwilfwissar != ''">IS_SWILFWISSAR
  313. = #{isSwilfwissar},
  314. </if>
  315. <if test="isPwrffsal != null and isPwrffsal != ''">IS_PWRFFSAL
  316. = #{isPwrffsal},
  317. </if>
  318. <if test="dwosqIsPwrfpmr != null and dwosqIsPwrfpmr != ''">DWOSQ_IS_PWRFPMR
  319. = #{dwosqIsPwrfpmr},
  320. </if>
  321. <if test="persId != null and persId != ''">PERS_ID
  322. = #{persId},
  323. </if>
  324. <if test="intm != null">INTM
  325. = #{intm},
  326. </if>
  327. <if test="uptm != null">UPTM
  328. = #{uptm},
  329. </if>
  330. <if test="status != null and status != ''">STATUS
  331. = #{status},
  332. </if>
  333. <if test="dataStat != null and dataStat != ''">DATA_STAT
  334. = #{dataStat},
  335. </if>
  336. </trim>
  337. <where>ID = #{id}</where>
  338. </update>
  339. <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiuqhWint">
  340. update BIS_INSP_WIUQH_WINT
  341. <trim prefix="set" suffixOverrides=",">
  342. <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
  343. = #{rgstrId},
  344. </if>
  345. <if test="wintId != null and wintId != ''">WINT_ID
  346. = #{wintId},
  347. </if>
  348. <if test="wintCode != null and wintCode != ''">WINT_CODE
  349. = #{wintCode},
  350. </if>
  351. <if test="wintName != null and wintName != ''">WINT_NAME
  352. = #{wintName},
  353. </if>
  354. <if test="adCode != null and adCode != ''">AD_CODE
  355. = #{adCode},
  356. </if>
  357. <if test="adName != null and adName != ''">AD_NAME
  358. = #{adName},
  359. </if>
  360. <if test="wintPos != null and wintPos != ''">WINT_POS
  361. = #{wintPos},
  362. </if>
  363. <if test="centerX != null and centerX != ''">CENTER_X
  364. = #{centerX},
  365. </if>
  366. <if test="centerY != null and centerY != ''">CENTER_Y
  367. = #{centerY},
  368. </if>
  369. <if test="gdX != null and gdX != ''">GD_X
  370. = #{gdX},
  371. </if>
  372. <if test="gdY != null and gdY != ''">GD_Y
  373. = #{gdY},
  374. </if>
  375. <if test="wrpNm != null and wrpNm != ''">WRP_NM
  376. = #{wrpNm},
  377. </if>
  378. <if test="watLicCode != null and watLicCode != ''">WAT_LIC_CODE
  379. = #{watLicCode},
  380. </if>
  381. <if test="wiuContact != null and wiuContact != ''">WIU_CONTACT
  382. = #{wiuContact},
  383. </if>
  384. <if test="wiuContactTel != null and wiuContactTel != ''">WIU_CONTACT_TEL
  385. = #{wiuContactTel},
  386. </if>
  387. <if test="isTitpotwwotadowdp != null and isTitpotwwotadowdp != ''">IS_TITPOTWWOTADOWDP
  388. = #{isTitpotwwotadowdp},
  389. </if>
  390. <if test="cpwrdscIsEapdwav != null and cpwrdscIsEapdwav != ''">CPWRDSC_IS_EAPDWAV
  391. = #{cpwrdscIsEapdwav},
  392. </if>
  393. <if test="isWip != null and isWip != ''">IS_WIP
  394. = #{isWip},
  395. </if>
  396. <if test="isEqeaip != null and isEqeaip != ''">IS_EQEAIP
  397. = #{isEqeaip},
  398. </if>
  399. <if test="isIwimmf != null and isIwimmf != ''">IS_IWIMMF
  400. = #{isIwimmf},
  401. </if>
  402. <if test="wimmfIsNr != null and wimmfIsNr != ''">WIMMF_IS_NR
  403. = #{wimmfIsNr},
  404. </if>
  405. <if test="wimmfIsPva != null and wimmfIsPva != ''">WIMMF_IS_PVA
  406. = #{wimmfIsPva},
  407. </if>
  408. <if test="isSwilfwissar != null and isSwilfwissar != ''">IS_SWILFWISSAR
  409. = #{isSwilfwissar},
  410. </if>
  411. <if test="isPwrffsal != null and isPwrffsal != ''">IS_PWRFFSAL
  412. = #{isPwrffsal},
  413. </if>
  414. <if test="dwosqIsPwrfpmr != null and dwosqIsPwrfpmr != ''">DWOSQ_IS_PWRFPMR
  415. = #{dwosqIsPwrfpmr},
  416. </if>
  417. <if test="persId != null and persId != ''">PERS_ID
  418. = #{persId},
  419. </if>
  420. <if test="intm != null">INTM
  421. = #{intm},
  422. </if>
  423. <if test="uptm != null">UPTM
  424. = #{uptm},
  425. </if>
  426. <if test="status != null and status != ''">STATUS
  427. = #{status},
  428. </if>
  429. <if test="dataStat != null and dataStat != ''">DATA_STAT
  430. = #{dataStat},
  431. </if>
  432. </trim>
  433. <include refid="page_where"/>
  434. </update>
  435. <!-- 其他自定义SQL -->
  436. <select id="baseById" resultType="cn.com.goldenwater.dcproj.model.AttWintBaseB">
  437. SELECT DISTINCT * FROM (
  438. SELECT
  439. T.ID,
  440. T.WINT_CODE,
  441. T.WINT_NAME,
  442. T.AD_CODE,
  443. T.AD_NAME,
  444. T.WINT_POS,
  445. T.WAIN_LONG,
  446. T.WAIN_LAT,
  447. T.LOC_WRZ1RD_NAME,
  448. T.LOC_WRZ2RD_NAME,
  449. T.LOC_WRZ3RD_NAME, T.WAIN_TYPE, T.CHAR_DEP_NM,
  450. T.CHAR_DEP_PERS, T.CHAR_DEP_TEL, T.WAIN_INT_NAME,
  451. T.WAIN_INT_TYPE, T.WAIN_WASO_TYPE, T.WAIN_WASO_NAME,
  452. T.DES_Q, T.DES_DAY_Q, T.DES_YEAR_Q,
  453. T.IN_TM, T.UP_TM, T.GD_X, T.GD_Y
  454. FROM ATT_WINT_BASE_B T
  455. WHERE
  456. T.ID NOT IN (SELECT WINT_ID FROM BIS_INSP_WIUQH_WINT WHERE RGSTR_ID = #{rgstrId})
  457. <if test="adCode !=null and adCode !=''">AND T.AD_CODE LIKE '${adCode}%'</if>
  458. )
  459. <where>
  460. <if test="wintName != null and wintName != ''">and WINT_NAME like '%${wintName}%'</if>
  461. <if test="adCode != null and adCode != ''">and AD_CODE LIKE '${adCode}%'</if>
  462. </where>
  463. ORDER BY AD_CODE, ID
  464. </select>
  465. </mapper>