| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436 |
- <?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.BisInspWrm2021UsrDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspWrm2021Usr" id="bisInspWrm2021UsrResultMap">
- <result property="dataStat" column="DATA_STAT"/>
- <result property="id" column="ID"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="usrNm" column="USR_NM"/>
- <result property="mwrNm" column="MWR_NM"/>
- <result property="loc" column="LOC"/>
- <result property="mwrNo" column="MWR_NO"/>
- <result property="mwrCon" column="MWR_CON"/>
- <result property="mwrConTel" column="MWR_CON_TEL"/>
- <result property="chkDep" column="CHK_DEP"/>
- <result property="chkPers" column="CHK_PERS"/>
- <result property="chkTm" column="CHK_TM"/>
- <result property="isNcrtGtwt" column="IS_NCRT_GTWT"/>
- <result property="isCrtEnd" column="IS_CRT_END"/>
- <result property="isCrtApp" column="IS_CRT_APP"/>
- <result property="isCrtGtwt" column="IS_CRT_GTWT"/>
- <result property="isOverGtwt" column="IS_OVER_GTWT"/>
- <result property="isBuldGtwt" column="IS_BULD_GTWT"/>
- <result property="isBuldGtwtRun" column="IS_BULD_GTWT_RUN"/>
- <result property="isBuldGtwtChk" column="IS_BULD_GTWT_CHK"/>
- <result property="isBuldGtwtBook" column="IS_BULD_GTWT_BOOK"/>
- <result property="isMendGtwt" column="IS_MEND_GTWT"/>
- <result property="isNprdData" column="IS_NPRD_DATA"/>
- <result property="isCostAll" column="IS_COST_ALL"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="status" column="STATUS"/>
- </resultMap>
- <sql id="table_columns">
- DATA_STAT,
- ID,
- RGSTR_ID,
- USR_NM,
- MWR_NM,
- LOC,
- MWR_NO,
- MWR_CON,
- MWR_CON_TEL,
- CHK_DEP,
- CHK_PERS,
- CHK_TM,
- IS_NCRT_GTWT,
- IS_CRT_END,
- IS_CRT_APP,
- IS_CRT_GTWT,
- IS_OVER_GTWT,
- IS_BULD_GTWT,
- IS_BULD_GTWT_RUN,
- IS_BULD_GTWT_CHK,
- IS_BULD_GTWT_BOOK,
- IS_MEND_GTWT,
- IS_NPRD_DATA,
- IS_COST_ALL,
- PERS_ID,
- INTM,
- UPTM,
- STATUS
- </sql>
- <sql id="entity_properties">
- #{dataStat},
- #{id},
- #{rgstrId},
- #{usrNm},
- #{mwrNm},
- #{loc},
- #{mwrNo},
- #{mwrCon},
- #{mwrConTel},
- #{chkDep},
- #{chkPers},
- #{chkTm},
- #{isNcrtGtwt},
- #{isCrtEnd},
- #{isCrtApp},
- #{isCrtGtwt},
- #{isOverGtwt},
- #{isBuldGtwt},
- #{isBuldGtwtRun},
- #{isBuldGtwtChk},
- #{isBuldGtwtBook},
- #{isMendGtwt},
- #{isNprdData},
- #{isCostAll},
- #{persId},
- #{intm},
- #{uptm},
- #{status}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="dataStat != null and dataStat != ''">
- and DATA_STAT = #{dataStat}
- </if>
- <if test="rgstrId != null and rgstrId != ''">
- and RGSTR_ID = #{rgstrId}
- </if>
- <if test="usrNm != null and usrNm != ''">
- and USR_NM = #{usrNm}
- </if>
- <if test="mwrNm != null and mwrNm != ''">
- and MWR_NM = #{mwrNm}
- </if>
- <if test="loc != null and loc != ''">
- and LOC = #{loc}
- </if>
- <if test="mwrNo != null and mwrNo != ''">
- and MWR_NO = #{mwrNo}
- </if>
- <if test="mwrCon != null and mwrCon != ''">
- and MWR_CON = #{mwrCon}
- </if>
- <if test="mwrConTel != null and mwrConTel != ''">
- and MWR_CON_TEL = #{mwrConTel}
- </if>
- <if test="chkDep != null and chkDep != ''">
- and CHK_DEP = #{chkDep}
- </if>
- <if test="chkPers != null and chkPers != ''">
- and CHK_PERS = #{chkPers}
- </if>
- <if test="chkTm != null">
- and CHK_TM = #{chkTm}
- </if>
- <if test="isNcrtGtwt != null and isNcrtGtwt != ''">
- and IS_NCRT_GTWT = #{isNcrtGtwt}
- </if>
- <if test="isCrtEnd != null and isCrtEnd != ''">
- and IS_CRT_END = #{isCrtEnd}
- </if>
- <if test="isCrtApp != null and isCrtApp != ''">
- and IS_CRT_APP = #{isCrtApp}
- </if>
- <if test="isCrtGtwt != null and isCrtGtwt != ''">
- and IS_CRT_GTWT = #{isCrtGtwt}
- </if>
- <if test="isOverGtwt != null and isOverGtwt != ''">
- and IS_OVER_GTWT = #{isOverGtwt}
- </if>
- <if test="isBuldGtwt != null and isBuldGtwt != ''">
- and IS_BULD_GTWT = #{isBuldGtwt}
- </if>
- <if test="isBuldGtwtRun != null and isBuldGtwtRun != ''">
- and IS_BULD_GTWT_RUN = #{isBuldGtwtRun}
- </if>
- <if test="isBuldGtwtChk != null and isBuldGtwtChk != ''">
- and IS_BULD_GTWT_CHK = #{isBuldGtwtChk}
- </if>
- <if test="isBuldGtwtBook != null and isBuldGtwtBook != ''">
- and IS_BULD_GTWT_BOOK = #{isBuldGtwtBook}
- </if>
- <if test="isMendGtwt != null and isMendGtwt != ''">
- and IS_MEND_GTWT = #{isMendGtwt}
- </if>
- <if test="isNprdData != null and isNprdData != ''">
- and IS_NPRD_DATA = #{isNprdData}
- </if>
- <if test="isCostAll != null and isCostAll != ''">
- and IS_COST_ALL = #{isCostAll}
- </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>
- and DATA_STAT='0'
- </trim>
- </sql>
- <select id="get" resultMap="bisInspWrm2021UsrResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from BIS_INSP_WRM2021_USR where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspWrm2021UsrResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_WRM2021_USR
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspWrm2021UsrResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_WRM2021_USR
- </select>
- <select id="findList" resultMap="bisInspWrm2021UsrResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_WRM2021_USR
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from BIS_INSP_WRM2021_USR
- <include refid="page_where"/>
- </select>
- <select id="findBaseInfo" resultType="cn.com.goldenwater.dcproj.model.AttWintBaseB">
- SELECT
- *
- FROM
- ATT_WINT_BASE_B
- WHERE WINT_CODE NOT IN (
- SELECT MWR_NO FROM BIS_INSP_WRM2021_USR and MWR_NO is not null
- <where>
- <if test="id !=null and id != ''">
- and RGSTR_ID = #{id}
- </if>
- </where>
- )
- <if test="name !=null and name != ''">
- and WINT_NAME like '%${name}%'
- </if>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrm2021Usr">
- insert into BIS_INSP_WRM2021_USR(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_WRM2021_USR set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrm2021Usr">
- update BIS_INSP_WRM2021_USR set DATA_STAT='9'
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_WRM2021_USR set DATA_STAT = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrm2021Usr">
- update BIS_INSP_WRM2021_USR
- <trim prefix="set" suffixOverrides=",">
- <if test="dataStat != null and dataStat != ''">DATA_STAT
- = #{dataStat},
- </if>
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
- = #{rgstrId},
- </if>
- <if test="usrNm != null and usrNm != ''">USR_NM
- = #{usrNm},
- </if>
- <if test="mwrNm != null and mwrNm != ''">MWR_NM
- = #{mwrNm},
- </if>
- <if test="loc != null and loc != ''">LOC
- = #{loc},
- </if>
- <if test="mwrNo != null and mwrNo != ''">MWR_NO
- = #{mwrNo},
- </if>
- <if test="mwrCon != null and mwrCon != ''">MWR_CON
- = #{mwrCon},
- </if>
- <if test="mwrConTel != null and mwrConTel != ''">MWR_CON_TEL
- = #{mwrConTel},
- </if>
- <if test="chkDep != null and chkDep != ''">CHK_DEP
- = #{chkDep},
- </if>
- <if test="chkPers != null and chkPers != ''">CHK_PERS
- = #{chkPers},
- </if>
- <if test="chkTm != null">CHK_TM
- = #{chkTm},
- </if>
- <if test="isNcrtGtwt != null and isNcrtGtwt != ''">IS_NCRT_GTWT
- = #{isNcrtGtwt},
- </if>
- <if test="isCrtEnd != null and isCrtEnd != ''">IS_CRT_END
- = #{isCrtEnd},
- </if>
- <if test="isCrtApp != null and isCrtApp != ''">IS_CRT_APP
- = #{isCrtApp},
- </if>
- <if test="isCrtGtwt != null and isCrtGtwt != ''">IS_CRT_GTWT
- = #{isCrtGtwt},
- </if>
- <if test="isOverGtwt != null and isOverGtwt != ''">IS_OVER_GTWT
- = #{isOverGtwt},
- </if>
- <if test="isBuldGtwt != null and isBuldGtwt != ''">IS_BULD_GTWT
- = #{isBuldGtwt},
- </if>
- <if test="isBuldGtwtRun != null and isBuldGtwtRun != ''">IS_BULD_GTWT_RUN
- = #{isBuldGtwtRun},
- </if>
- <if test="isBuldGtwtChk != null and isBuldGtwtChk != ''">IS_BULD_GTWT_CHK
- = #{isBuldGtwtChk},
- </if>
- <if test="isBuldGtwtBook != null and isBuldGtwtBook != ''">IS_BULD_GTWT_BOOK
- = #{isBuldGtwtBook},
- </if>
- <if test="isMendGtwt != null and isMendGtwt != ''">IS_MEND_GTWT
- = #{isMendGtwt},
- </if>
- <if test="isNprdData != null and isNprdData != ''">IS_NPRD_DATA
- = #{isNprdData},
- </if>
- <if test="isCostAll != null and isCostAll != ''">IS_COST_ALL
- = #{isCostAll},
- </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>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspWrm2021Usr">
- update BIS_INSP_WRM2021_USR
- <trim prefix="set" suffixOverrides=",">
- <if test="dataStat != null and dataStat != ''">DATA_STAT
- = #{dataStat},
- </if>
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
- = #{rgstrId},
- </if>
- <if test="usrNm != null and usrNm != ''">USR_NM
- = #{usrNm},
- </if>
- <if test="mwrNm != null and mwrNm != ''">MWR_NM
- = #{mwrNm},
- </if>
- <if test="loc != null and loc != ''">LOC
- = #{loc},
- </if>
- <if test="mwrNo != null and mwrNo != ''">MWR_NO
- = #{mwrNo},
- </if>
- <if test="mwrCon != null and mwrCon != ''">MWR_CON
- = #{mwrCon},
- </if>
- <if test="mwrConTel != null and mwrConTel != ''">MWR_CON_TEL
- = #{mwrConTel},
- </if>
- <if test="chkDep != null and chkDep != ''">CHK_DEP
- = #{chkDep},
- </if>
- <if test="chkPers != null and chkPers != ''">CHK_PERS
- = #{chkPers},
- </if>
- <if test="chkTm != null">CHK_TM
- = #{chkTm},
- </if>
- <if test="isNcrtGtwt != null and isNcrtGtwt != ''">IS_NCRT_GTWT
- = #{isNcrtGtwt},
- </if>
- <if test="isCrtEnd != null and isCrtEnd != ''">IS_CRT_END
- = #{isCrtEnd},
- </if>
- <if test="isCrtApp != null and isCrtApp != ''">IS_CRT_APP
- = #{isCrtApp},
- </if>
- <if test="isCrtGtwt != null and isCrtGtwt != ''">IS_CRT_GTWT
- = #{isCrtGtwt},
- </if>
- <if test="isOverGtwt != null and isOverGtwt != ''">IS_OVER_GTWT
- = #{isOverGtwt},
- </if>
- <if test="isBuldGtwt != null and isBuldGtwt != ''">IS_BULD_GTWT
- = #{isBuldGtwt},
- </if>
- <if test="isBuldGtwtRun != null and isBuldGtwtRun != ''">IS_BULD_GTWT_RUN
- = #{isBuldGtwtRun},
- </if>
- <if test="isBuldGtwtChk != null and isBuldGtwtChk != ''">IS_BULD_GTWT_CHK
- = #{isBuldGtwtChk},
- </if>
- <if test="isBuldGtwtBook != null and isBuldGtwtBook != ''">IS_BULD_GTWT_BOOK
- = #{isBuldGtwtBook},
- </if>
- <if test="isMendGtwt != null and isMendGtwt != ''">IS_MEND_GTWT
- = #{isMendGtwt},
- </if>
- <if test="isNprdData != null and isNprdData != ''">IS_NPRD_DATA
- = #{isNprdData},
- </if>
- <if test="isCostAll != null and isCostAll != ''">IS_COST_ALL
- = #{isCostAll},
- </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>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|