| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="cn.com.goldenwater.dcproj.dao.BisInspWiuqhWintDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWiuqhWint" id="bisInspWiuqhWintResultMap">
- <result property="id" column="ID"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="wintId" column="WINT_ID"/>
- <result property="wintCode" column="WINT_CODE"/>
- <result property="wintName" column="WINT_NAME"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="adName" column="AD_NAME"/>
- <result property="wintPos" column="WINT_POS"/>
- <result property="centerX" column="CENTER_X"/>
- <result property="centerY" column="CENTER_Y"/>
- <result property="gdX" column="GD_X"/>
- <result property="gdY" column="GD_Y"/>
- <result property="wrpNm" column="WRP_NM"/>
- <result property="watLicCode" column="WAT_LIC_CODE"/>
- <result property="wiuContact" column="WIU_CONTACT"/>
- <result property="wiuContactTel" column="WIU_CONTACT_TEL"/>
- <result property="isTitpotwwotadowdp" column="IS_TITPOTWWOTADOWDP"/>
- <result property="cpwrdscIsEapdwav" column="CPWRDSC_IS_EAPDWAV"/>
- <result property="isWip" column="IS_WIP"/>
- <result property="isEqeaip" column="IS_EQEAIP"/>
- <result property="isIwimmf" column="IS_IWIMMF"/>
- <result property="wimmfIsNr" column="WIMMF_IS_NR"/>
- <result property="wimmfIsPva" column="WIMMF_IS_PVA"/>
- <result property="isSwilfwissar" column="IS_SWILFWISSAR"/>
- <result property="isPwrffsal" column="IS_PWRFFSAL"/>
- <result property="dwosqIsPwrfpmr" column="DWOSQ_IS_PWRFPMR"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="status" column="STATUS"/>
- <result property="dataStat" column="DATA_STAT"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- RGSTR_ID,
- WINT_ID,
- WINT_CODE,
- WINT_NAME,
- AD_CODE,
- AD_NAME,
- WINT_POS,
- CENTER_X,
- CENTER_Y,
- GD_X,
- GD_Y,
- WRP_NM,
- WAT_LIC_CODE,
- WIU_CONTACT,
- WIU_CONTACT_TEL,
- IS_TITPOTWWOTADOWDP,
- CPWRDSC_IS_EAPDWAV,
- IS_WIP,
- IS_EQEAIP,
- IS_IWIMMF,
- WIMMF_IS_NR,
- WIMMF_IS_PVA,
- IS_SWILFWISSAR,
- IS_PWRFFSAL,
- DWOSQ_IS_PWRFPMR,
- PERS_ID,
- INTM,
- UPTM,
- STATUS,
- DATA_STAT
- </sql>
- <sql id="entity_properties">
- #{id},
- #{rgstrId},
- #{wintId},
- #{wintCode},
- #{wintName},
- #{adCode},
- #{adName},
- #{wintPos},
- #{centerX},
- #{centerY},
- #{gdX},
- #{gdY},
- #{wrpNm},
- #{watLicCode},
- #{wiuContact},
- #{wiuContactTel},
- #{isTitpotwwotadowdp},
- #{cpwrdscIsEapdwav},
- #{isWip},
- #{isEqeaip},
- #{isIwimmf},
- #{wimmfIsNr},
- #{wimmfIsPva},
- #{isSwilfwissar},
- #{isPwrffsal},
- #{dwosqIsPwrfpmr},
- #{persId},
- #{intm},
- #{uptm},
- #{status},
- #{dataStat}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="rgstrId != null and rgstrId != ''">
- and RGSTR_ID = #{rgstrId}
- </if>
- <if test="wintId != null and wintId != ''">
- and WINT_ID = #{wintId}
- </if>
- <if test="wintCode != null and wintCode != ''">
- and WINT_CODE = #{wintCode}
- </if>
- <if test="wintName != null and wintName != ''">
- and WINT_NAME = #{wintName}
- </if>
- <if test="adCode != null and adCode != ''">
- and AD_CODE = #{adCode}
- </if>
- <if test="adName != null and adName != ''">
- and AD_NAME = #{adName}
- </if>
- <if test="wintPos != null and wintPos != ''">
- and WINT_POS = #{wintPos}
- </if>
- <if test="centerX != null and centerX != ''">
- and CENTER_X = #{centerX}
- </if>
- <if test="centerY != null and centerY != ''">
- and CENTER_Y = #{centerY}
- </if>
- <if test="gdX != null and gdX != ''">
- and GD_X = #{gdX}
- </if>
- <if test="gdY != null and gdY != ''">
- and GD_Y = #{gdY}
- </if>
- <if test="wrpNm != null and wrpNm != ''">
- and WRP_NM = #{wrpNm}
- </if>
- <if test="watLicCode != null and watLicCode != ''">
- and WAT_LIC_CODE = #{watLicCode}
- </if>
- <if test="wiuContact != null and wiuContact != ''">
- and WIU_CONTACT = #{wiuContact}
- </if>
- <if test="wiuContactTel != null and wiuContactTel != ''">
- and WIU_CONTACT_TEL = #{wiuContactTel}
- </if>
- <if test="isTitpotwwotadowdp != null and isTitpotwwotadowdp != ''">
- and IS_TITPOTWWOTADOWDP = #{isTitpotwwotadowdp}
- </if>
- <if test="cpwrdscIsEapdwav != null and cpwrdscIsEapdwav != ''">
- and CPWRDSC_IS_EAPDWAV = #{cpwrdscIsEapdwav}
- </if>
- <if test="isWip != null and isWip != ''">
- and IS_WIP = #{isWip}
- </if>
- <if test="isEqeaip != null and isEqeaip != ''">
- and IS_EQEAIP = #{isEqeaip}
- </if>
- <if test="isIwimmf != null and isIwimmf != ''">
- and IS_IWIMMF = #{isIwimmf}
- </if>
- <if test="wimmfIsNr != null and wimmfIsNr != ''">
- and WIMMF_IS_NR = #{wimmfIsNr}
- </if>
- <if test="wimmfIsPva != null and wimmfIsPva != ''">
- and WIMMF_IS_PVA = #{wimmfIsPva}
- </if>
- <if test="isSwilfwissar != null and isSwilfwissar != ''">
- and IS_SWILFWISSAR = #{isSwilfwissar}
- </if>
- <if test="isPwrffsal != null and isPwrffsal != ''">
- and IS_PWRFFSAL = #{isPwrffsal}
- </if>
- <if test="dwosqIsPwrfpmr != null and dwosqIsPwrfpmr != ''">
- and DWOSQ_IS_PWRFPMR = #{dwosqIsPwrfpmr}
- </if>
- <if test="persId != null and persId != ''">
- and PERS_ID = #{persId}
- </if>
- <if test="intm != null">
- and INTM = #{intm}
- </if>
- <if test="uptm != null">
- and UPTM = #{uptm}
- </if>
- <if test="status != null and status != ''">
- and STATUS = #{status}
- </if>
- <if test="dataStat != null and dataStat != ''">
- and DATA_STAT = #{dataStat}
- </if>
- and DATA_STAT='0'
- </trim>
- </sql>
- <select id="get" resultMap="bisInspWiuqhWintResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from BIS_INSP_WIUQH_WINT where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspWiuqhWintResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_WIUQH_WINT
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspWiuqhWintResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_WIUQH_WINT
- </select>
- <select id="findList" resultMap="bisInspWiuqhWintResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_WIUQH_WINT
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from BIS_INSP_WIUQH_WINT
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiuqhWint">
- insert into BIS_INSP_WIUQH_WINT(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_WIUQH_WINT set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiuqhWint">
- update BIS_INSP_WIUQH_WINT set DATA_STAT='9'
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_WIUQH_WINT set DATA_STAT = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiuqhWint">
- update BIS_INSP_WIUQH_WINT
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
- = #{rgstrId},
- </if>
- <if test="wintId != null and wintId != ''">WINT_ID
- = #{wintId},
- </if>
- <if test="wintCode != null and wintCode != ''">WINT_CODE
- = #{wintCode},
- </if>
- <if test="wintName != null and wintName != ''">WINT_NAME
- = #{wintName},
- </if>
- <if test="adCode != null and adCode != ''">AD_CODE
- = #{adCode},
- </if>
- <if test="adName != null and adName != ''">AD_NAME
- = #{adName},
- </if>
- <if test="wintPos != null and wintPos != ''">WINT_POS
- = #{wintPos},
- </if>
- <if test="centerX != null and centerX != ''">CENTER_X
- = #{centerX},
- </if>
- <if test="centerY != null and centerY != ''">CENTER_Y
- = #{centerY},
- </if>
- <if test="gdX != null and gdX != ''">GD_X
- = #{gdX},
- </if>
- <if test="gdY != null and gdY != ''">GD_Y
- = #{gdY},
- </if>
- <if test="wrpNm != null and wrpNm != ''">WRP_NM
- = #{wrpNm},
- </if>
- <if test="watLicCode != null and watLicCode != ''">WAT_LIC_CODE
- = #{watLicCode},
- </if>
- <if test="wiuContact != null and wiuContact != ''">WIU_CONTACT
- = #{wiuContact},
- </if>
- <if test="wiuContactTel != null and wiuContactTel != ''">WIU_CONTACT_TEL
- = #{wiuContactTel},
- </if>
- <if test="isTitpotwwotadowdp != null and isTitpotwwotadowdp != ''">IS_TITPOTWWOTADOWDP
- = #{isTitpotwwotadowdp},
- </if>
- <if test="cpwrdscIsEapdwav != null and cpwrdscIsEapdwav != ''">CPWRDSC_IS_EAPDWAV
- = #{cpwrdscIsEapdwav},
- </if>
- <if test="isWip != null and isWip != ''">IS_WIP
- = #{isWip},
- </if>
- <if test="isEqeaip != null and isEqeaip != ''">IS_EQEAIP
- = #{isEqeaip},
- </if>
- <if test="isIwimmf != null and isIwimmf != ''">IS_IWIMMF
- = #{isIwimmf},
- </if>
- <if test="wimmfIsNr != null and wimmfIsNr != ''">WIMMF_IS_NR
- = #{wimmfIsNr},
- </if>
- <if test="wimmfIsPva != null and wimmfIsPva != ''">WIMMF_IS_PVA
- = #{wimmfIsPva},
- </if>
- <if test="isSwilfwissar != null and isSwilfwissar != ''">IS_SWILFWISSAR
- = #{isSwilfwissar},
- </if>
- <if test="isPwrffsal != null and isPwrffsal != ''">IS_PWRFFSAL
- = #{isPwrffsal},
- </if>
- <if test="dwosqIsPwrfpmr != null and dwosqIsPwrfpmr != ''">DWOSQ_IS_PWRFPMR
- = #{dwosqIsPwrfpmr},
- </if>
- <if test="persId != null and persId != ''">PERS_ID
- = #{persId},
- </if>
- <if test="intm != null">INTM
- = #{intm},
- </if>
- <if test="uptm != null">UPTM
- = #{uptm},
- </if>
- <if test="status != null and status != ''">STATUS
- = #{status},
- </if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT
- = #{dataStat},
- </if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWiuqhWint">
- update BIS_INSP_WIUQH_WINT
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
- = #{rgstrId},
- </if>
- <if test="wintId != null and wintId != ''">WINT_ID
- = #{wintId},
- </if>
- <if test="wintCode != null and wintCode != ''">WINT_CODE
- = #{wintCode},
- </if>
- <if test="wintName != null and wintName != ''">WINT_NAME
- = #{wintName},
- </if>
- <if test="adCode != null and adCode != ''">AD_CODE
- = #{adCode},
- </if>
- <if test="adName != null and adName != ''">AD_NAME
- = #{adName},
- </if>
- <if test="wintPos != null and wintPos != ''">WINT_POS
- = #{wintPos},
- </if>
- <if test="centerX != null and centerX != ''">CENTER_X
- = #{centerX},
- </if>
- <if test="centerY != null and centerY != ''">CENTER_Y
- = #{centerY},
- </if>
- <if test="gdX != null and gdX != ''">GD_X
- = #{gdX},
- </if>
- <if test="gdY != null and gdY != ''">GD_Y
- = #{gdY},
- </if>
- <if test="wrpNm != null and wrpNm != ''">WRP_NM
- = #{wrpNm},
- </if>
- <if test="watLicCode != null and watLicCode != ''">WAT_LIC_CODE
- = #{watLicCode},
- </if>
- <if test="wiuContact != null and wiuContact != ''">WIU_CONTACT
- = #{wiuContact},
- </if>
- <if test="wiuContactTel != null and wiuContactTel != ''">WIU_CONTACT_TEL
- = #{wiuContactTel},
- </if>
- <if test="isTitpotwwotadowdp != null and isTitpotwwotadowdp != ''">IS_TITPOTWWOTADOWDP
- = #{isTitpotwwotadowdp},
- </if>
- <if test="cpwrdscIsEapdwav != null and cpwrdscIsEapdwav != ''">CPWRDSC_IS_EAPDWAV
- = #{cpwrdscIsEapdwav},
- </if>
- <if test="isWip != null and isWip != ''">IS_WIP
- = #{isWip},
- </if>
- <if test="isEqeaip != null and isEqeaip != ''">IS_EQEAIP
- = #{isEqeaip},
- </if>
- <if test="isIwimmf != null and isIwimmf != ''">IS_IWIMMF
- = #{isIwimmf},
- </if>
- <if test="wimmfIsNr != null and wimmfIsNr != ''">WIMMF_IS_NR
- = #{wimmfIsNr},
- </if>
- <if test="wimmfIsPva != null and wimmfIsPva != ''">WIMMF_IS_PVA
- = #{wimmfIsPva},
- </if>
- <if test="isSwilfwissar != null and isSwilfwissar != ''">IS_SWILFWISSAR
- = #{isSwilfwissar},
- </if>
- <if test="isPwrffsal != null and isPwrffsal != ''">IS_PWRFFSAL
- = #{isPwrffsal},
- </if>
- <if test="dwosqIsPwrfpmr != null and dwosqIsPwrfpmr != ''">DWOSQ_IS_PWRFPMR
- = #{dwosqIsPwrfpmr},
- </if>
- <if test="persId != null and persId != ''">PERS_ID
- = #{persId},
- </if>
- <if test="intm != null">INTM
- = #{intm},
- </if>
- <if test="uptm != null">UPTM
- = #{uptm},
- </if>
- <if test="status != null and status != ''">STATUS
- = #{status},
- </if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT
- = #{dataStat},
- </if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- <select id="baseById" resultType="cn.com.goldenwater.dcproj.model.AttWintBaseB">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID,
- T.WINT_CODE,
- T.WINT_NAME,
- T.AD_CODE,
- T.AD_NAME,
- T.WINT_POS,
- T.WAIN_LONG,
- T.WAIN_LAT,
- T.LOC_WRZ1RD_NAME,
- T.LOC_WRZ2RD_NAME,
- T.LOC_WRZ3RD_NAME, T.WAIN_TYPE, T.CHAR_DEP_NM,
- T.CHAR_DEP_PERS, T.CHAR_DEP_TEL, T.WAIN_INT_NAME,
- T.WAIN_INT_TYPE, T.WAIN_WASO_TYPE, T.WAIN_WASO_NAME,
- T.DES_Q, T.DES_DAY_Q, T.DES_YEAR_Q,
- T.IN_TM, T.UP_TM, T.GD_X, T.GD_Y
- FROM ATT_WINT_BASE_B T
- WHERE
- T.ID NOT IN (SELECT WINT_ID FROM BIS_INSP_WIUQH_WINT WHERE RGSTR_ID = #{rgstrId})
- <if test="adCode !=null and adCode !=''">AND T.AD_CODE LIKE '${adCode}%'</if>
- )
- <where>
- <if test="wintName != null and wintName != ''">and WINT_NAME like '%${wintName}%'</if>
- <if test="adCode != null and adCode != ''">and AD_CODE LIKE '${adCode}%'</if>
- </where>
- ORDER BY AD_CODE, ID
- </select>
- </mapper>
|