| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 |
- <?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.AttGrwBaseCrrctDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttGrwBaseCrrct" id="attGrwBaseCrrctResultMap">
- <result property="dtmmdpr" column="DTMMDPR"/>
- <result property="pbprj" column="PBPRJ"/>
- <result property="adnm" column="ADNM"/>
- <result property="aqme" column="AQME"/>
- <result property="uptm" column="UPTM"/>
- <result property="bwsttp" column="BWSTTP"/>
- <result property="isart" column="ISART"/>
- <result property="lgtd" column="LGTD"/>
- <result property="mnun" column="MNUN"/>
- <result property="stel" column="STEL"/>
- <result property="grdlvl" column="GRDLVL"/>
- <result property="calym" column="CALYM"/>
- <result property="stlc" column="STLC"/>
- <result property="onun" column="ONUN"/>
- <result property="dtmnm" column="DTMNM"/>
- <result property="edtrPesr" column="EDTR_PESR"/>
- <result property="adcd" column="ADCD"/>
- <result property="note" column="NOTE"/>
- <result property="stnm" column="STNM"/>
- <result property="intm" column="INTM"/>
- <result property="stndpnt" column="STNDPNT"/>
- <result property="burcn" column="BURCN"/>
- <result property="sttp" column="STTP"/>
- <result property="esstym" column="ESSTYM"/>
- <result property="crrctId" column="CRRCT_ID"/>
- <result property="stcd" column="STCD"/>
- <result property="ostcd" column="OSTCD"/>
- <result property="spghgh" column="SPGHGH"/>
- <result property="chkState" column="CHK_STATE"/>
- <result property="welldep" column="WELLDEP"/>
- <result property="lttdPc" column="LTTD_PC"/>
- <result property="rvnm" column="RVNM"/>
- <result property="lttd" column="LTTD"/>
- <result property="esstyr" column="ESSTYR"/>
- <result property="lgtdPc" column="LGTD_PC"/>
- <result property="prtc" column="PRTC"/>
- <result property="gogunt" column="GOGUNT"/>
- <result property="wsttp" column="WSTTP"/>
- </resultMap>
- <sql id="table_columns">
- DTMMDPR ,
- PBPRJ ,
- ADNM ,
- AQME ,
- TO_CHAR(UPTM,'YYYY-MM-DD HH24:MI:SS') UPTM,
- BWSTTP ,
- ISART ,
- LGTD ,
- MNUN ,
- STEL ,
- GRDLVL ,
- TO_CHAR(CALYM,'YYYY-MM-DD') CALYM,
- STLC ,
- ONUN ,
- DTMNM ,
- EDTR_PESR ,
- ADCD ,
- NOTE ,
- STNM ,
- TO_CHAR(INTM,'YYYY-MM-DD HH24:MI:SS') INTM,
- STNDPNT ,
- BURCN ,
- STTP ,
- TO_CHAR(ESSTYM,'YYYY-MM-DD') ESSTYM,
- CRRCT_ID ,
- STCD ,
- OSTCD ,
- SPGHGH ,
- CHK_STATE ,
- WELLDEP ,
- LTTD_PC ,
- RVNM ,
- LTTD ,
- ESSTYR ,
- LGTD_PC ,
- PRTC ,
- GOGUNT ,
- WSTTP
- </sql>
- <sql id="table_columns2">
- DTMMDPR ,
- PBPRJ ,
- ADNM ,
- AQME ,
- UPTM ,
- BWSTTP ,
- ISART ,
- LGTD ,
- MNUN ,
- STEL ,
- GRDLVL ,
- CALYM ,
- STLC ,
- ONUN ,
- DTMNM ,
- EDTR_PESR ,
- ADCD ,
- NOTE ,
- STNM ,
- INTM ,
- STNDPNT ,
- BURCN ,
- STTP ,
- ESSTYM ,
- CRRCT_ID ,
- STCD ,
- OSTCD ,
- SPGHGH ,
- CHK_STATE ,
- WELLDEP ,
- LTTD_PC ,
- RVNM ,
- LTTD ,
- ESSTYR ,
- LGTD_PC ,
- PRTC ,
- GOGUNT ,
- WSTTP
- </sql>
- <sql id="entity_properties">
- #{dtmmdpr},
- #{pbprj},
- #{adnm},
- #{aqme},
- TO_DATE(#{uptm},'YYYY-MM-DD HH24:MI:SS') ,
- #{bwsttp},
- #{isart},
- #{lgtd},
- #{mnun},
- #{stel},
- #{grdlvl},
- TO_DATE(#{calym},'YYYY-MM-DD'),
- #{stlc},
- #{onun},
- #{dtmnm},
- #{edtrPesr},
- #{adcd},
- #{note},
- #{stnm},
- TO_DATE(#{intm},'YYYY-MM-DD HH24:MI:SS') ,
- #{stndpnt},
- #{burcn},
- #{sttp},
- TO_DATE(#{esstym},'YYYY-MM-DD'),
- #{crrctId},
- #{stcd},
- #{ostcd},
- #{spghgh},
- #{chkState},
- #{welldep},
- #{lttdPc},
- #{rvnm},
- #{lttd},
- #{esstyr},
- #{lgtdPc},
- #{prtc},
- #{gogunt},
- #{wsttp}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="dtmmdpr != null and dtmmdpr != ''">and DTMMDPR = #{dtmmdpr}</if>
- <if test="pbprj != null and pbprj != ''">and PBPRJ = #{pbprj}</if>
- <if test="adnm != null and adnm != ''">and ADNM = #{adnm}</if>
- <if test="aqme != null and aqme != ''">and AQME = #{aqme}</if>
- <if test="uptm != null and uptm != ''">and UPTM = TO_DATE(#{uptm},'YYYY-MM-DD HH24:MI:SS')</if>
- <if test="bwsttp != null and bwsttp != ''">and BWSTTP = #{bwsttp}</if>
- <if test="isart != null and isart != ''">and ISART = #{isart}</if>
- <if test="lgtd != null">and LGTD = #{lgtd}</if>
- <if test="mnun != null and mnun != ''">and MNUN = #{mnun}</if>
- <if test="stel != null and stel != ''">and STEL = #{stel}</if>
- <if test="grdlvl != null">and GRDLVL = #{grdlvl}</if>
- <if test="calym != null and calym != ''">and CALYM = TO_DATE(#{calym},'YYYY-MM-DD')</if>
- <if test="stlc != null and stlc != ''">and STLC = #{stlc}</if>
- <if test="onun != null and onun != ''">and ONUN = #{onun}</if>
- <if test="dtmnm != null and dtmnm != ''">and DTMNM = #{dtmnm}</if>
- <if test="edtrPesr != null and edtrPesr != ''">and EDTR_PESR = #{edtrPesr}</if>
- <if test="adcd != null and adcd != ''">and ADCD = #{adcd}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="stnm != null and stnm != ''">and STNM = #{stnm}</if>
- <if test="intm != null and intm != ''">and INTM = TO_DATE(#{intm},'YYYY-MM-DD HH24:MI:SS')</if>
- <if test="stndpnt != null">and STNDPNT = #{stndpnt}</if>
- <if test="burcn != null and burcn != ''">and BURCN = #{burcn}</if>
- <if test="sttp != null and sttp != ''">and STTP = #{sttp}</if>
- <if test="esstym != null and esstym != ''">and ESSTYM = TO_DATE(#{esstym},'YYYY-MM-DD')</if>
- <if test="crrctId != null and crrctId != ''">and CRRCT_ID = #{crrctId}</if>
- <if test="stcd != null and stcd != ''">and STCD = #{stcd}</if>
- <if test="ostcd != null and ostcd != ''">and OSTCD = #{ostcd}</if>
- <if test="spghgh != null">and SPGHGH = #{spghgh}</if>
- <if test="chkState != null and chkState != ''">and CHK_STATE = #{chkState}</if>
- <if test="welldep != null">and WELLDEP = #{welldep}</if>
- <if test="lttdPc != null">and LTTD_PC = #{lttdPc}</if>
- <if test="rvnm != null and rvnm != ''">and RVNM = #{rvnm}</if>
- <if test="lttd != null">and LTTD = #{lttd}</if>
- <if test="esstyr != null and esstyr != ''">and ESSTYR = #{esstyr}</if>
- <if test="lgtdPc != null">and LGTD_PC = #{lgtdPc}</if>
- <if test="prtc != null and prtc != ''">and PRTC = #{prtc}</if>
- <if test="gogunt != null and gogunt != ''">and GOGUNT = #{gogunt}</if>
- <if test="wsttp != null and wsttp != ''">and WSTTP = #{wsttp}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attGrwBaseCrrctResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from att_grw_base_crrct where CRRCT_ID = #{id}
- </select>
- <select id="getBy" resultMap="attGrwBaseCrrctResultMap">
- select
- <include refid="table_columns"/>
- from att_grw_base_crrct
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="attGrwBaseCrrctResultMap">
- select
- <include refid="table_columns"/>
- from att_grw_base_crrct
- </select>
- <select id="findList" resultMap="attGrwBaseCrrctResultMap">
- select
- <include refid="table_columns"/>
- from att_grw_base_crrct
- <include refid="page_where"/>
- ORDER BY CRRCT_ID
- </select>
- <select id="selectCount" resultType="int">
- select count(CRRCT_ID) from att_grw_base_crrct
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttGrwBaseCrrct">
- insert into att_grw_base_crrct(
- <include refid="table_columns2"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from att_grw_base_crrct where CRRCT_ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttGrwBaseCrrct">
- delete from att_grw_base_crrct
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update att_grw_base_crrct set flag_valid = 0 where CRRCT_ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttGrwBaseCrrct">
- update att_grw_base_crrct
- <trim prefix="set" suffixOverrides=",">
- <if test="dtmmdpr != null and dtmmdpr != ''">DTMMDPR = #{dtmmdpr},</if>
- <if test="pbprj != null and pbprj != ''">PBPRJ = #{pbprj},</if>
- <if test="adnm != null and adnm != ''">ADNM = #{adnm},</if>
- <if test="aqme != null and aqme != ''">AQME = #{aqme},</if>
- <if test="uptm != null and uptm != ''">UPTM = TO_DATE(#{uptm},'YYYY-MM-DD HH24:MI:SS'),</if>
- <if test="bwsttp != null and bwsttp != ''">BWSTTP = #{bwsttp},</if>
- <if test="isart != null and isart != ''">ISART = #{isart},</if>
- <if test="lgtd != null">LGTD = #{lgtd},</if>
- <if test="mnun != null and mnun != ''">MNUN = #{mnun},</if>
- <if test="stel != null and stel != ''">STEL = #{stel},</if>
- <if test="grdlvl != null">GRDLVL = #{grdlvl},</if>
- <if test="calym != null and calym != ''">CALYM = TO_DATE(#{calym},'YYYY-MM-DD'),</if>
- <if test="stlc != null and stlc != ''">STLC = #{stlc},</if>
- <if test="onun != null and onun != ''">ONUN = #{onun},</if>
- <if test="dtmnm != null and dtmnm != ''">DTMNM = #{dtmnm},</if>
- <if test="edtrPesr != null and edtrPesr != ''">EDTR_PESR = #{edtrPesr},</if>
- <if test="adcd != null and adcd != ''">ADCD = #{adcd},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="stnm != null and stnm != ''">STNM = #{stnm},</if>
- <if test="intm != null and intm != ''">INTM = TO_DATE(#{intm},'YYYY-MM-DD HH24:MI:SS'),</if>
- <if test="stndpnt != null">STNDPNT = #{stndpnt},</if>
- <if test="burcn != null and burcn != ''">BURCN = #{burcn},</if>
- <if test="sttp != null and sttp != ''">STTP = #{sttp},</if>
- <if test="esstym != null and esstym != ''">ESSTYM = TO_DATE(#{esstym},'YYYY-MM-DD'),</if>
- <if test="stcd != null and stcd != ''">STCD = #{stcd},</if>
- <if test="ostcd != null and ostcd != ''">OSTCD = #{ostcd},</if>
- <if test="spghgh != null">SPGHGH = #{spghgh},</if>
- <if test="chkState != null and chkState != ''">CHK_STATE = #{chkState},</if>
- <if test="welldep != null">WELLDEP = #{welldep},</if>
- <if test="lttdPc != null">LTTD_PC = #{lttdPc},</if>
- <if test="rvnm != null and rvnm != ''">RVNM = #{rvnm},</if>
- <if test="lttd != null">LTTD = #{lttd},</if>
- <if test="esstyr != null and esstyr != ''">ESSTYR = #{esstyr},</if>
- <if test="lgtdPc != null">LGTD_PC = #{lgtdPc},</if>
- <if test="prtc != null and prtc != ''">PRTC = #{prtc},</if>
- <if test="gogunt != null and gogunt != ''">GOGUNT = #{gogunt},</if>
- <if test="wsttp != null and wsttp != ''">WSTTP = #{wsttp},</if>
- </trim>
- <where>CRRCT_ID = #{crrctId}</where>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|