| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454 |
- <?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.StStbprpBDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.StStbprpB" id="stStbprpBResultMap">
- <result property="stcd" column="STCD"/>
- <result property="stnm" column="STNM"/>
- <result property="rvnm" column="RVNM"/>
- <result property="hnnm" column="HNNM"/>
- <result property="bsnm" column="BSNM"/>
- <result property="lgtdOld" column="LGTD_OLD"/>
- <result property="lttdOld" column="LTTD_OLD"/>
- <result property="stlc" column="STLC"/>
- <result property="addvcd" column="ADDVCD"/>
- <result property="mdbz" column="MDBZ"/>
- <result property="mdpr" column="MDPR"/>
- <result property="dtmnm" column="DTMNM"/>
- <result property="dtmel" column="DTMEL"/>
- <result property="sttp" column="STTP"/>
- <result property="dfrtms" column="DFRTMS"/>
- <result property="fritm" column="FRITM"/>
- <result property="frgrd" column="FRGRD"/>
- <result property="bgfrym" column="BGFRYM"/>
- <result property="edfrym" column="EDFRYM"/>
- <result property="admauth" column="ADMAUTH"/>
- <result property="stbk" column="STBK"/>
- <result property="phcd" column="PHCD"/>
- <result property="esstym" column="ESSTYM"/>
- <result property="lgtd1" column="LGTD1"/>
- <result property="lttd1" column="LTTD1"/>
- <result property="locality" column="LOCALITY"/>
- <result property="direction" column="DIRECTION"/>
- <result property="basincd" column="BASINCD"/>
- <result property="moditime" column="MODITIME"/>
- <result property="entpoint" column="ENTPOINT"/>
- <result property="stperson" column="STPERSON"/>
- <result property="mobphone" column="MOBPHONE"/>
- <result property="fieldcap" column="FIELDCAP"/>
- <result property="rainfall" column="RAINFALL"/>
- <result property="moisture" column="MOISTURE"/>
- <result property="comments" column="COMMENTS"/>
- <result property="drna" column="DRNA"/>
- <result property="lgtd" column="LGTD"/>
- <result property="lttd" column="LTTD"/>
- <result property="dtpr" column="DTPR"/>
- <result property="atcunit" column="ATCUNIT"/>
- <result property="stazt" column="STAZT"/>
- <result property="dstrvm" column="DSTRVM"/>
- <result property="usfl" column="USFL"/>
- </resultMap>
- <sql id="table_columns">
- STCD,
- STNM,
- RVNM,
- HNNM,
- BSNM,
- LGTD_OLD,
- LTTD_OLD,
- STLC,
- ADDVCD,
- MDBZ,
- MDPR,
- DTMNM,
- DTMEL,
- STTP,
- DFRTMS,
- FRITM,
- FRGRD,
- BGFRYM,
- EDFRYM,
- ADMAUTH,
- STBK,
- PHCD,
- ESSTYM,
- LGTD1,
- LTTD1,
- LOCALITY,
- DIRECTION,
- BASINCD,
- MODITIME,
- ENTPOINT,
- STPERSON,
- MOBPHONE,
- FIELDCAP,
- RAINFALL,
- MOISTURE,
- COMMENTS,
- DRNA,
- LGTD,
- LTTD,
- DTPR,
- ATCUNIT,
- STAZT,
- DSTRVM,
- USFL
- </sql>
- <sql id="table_columns_B">
- STCD,
- STNM,
- RVNM,
- HNNM,
- BSNM,
- LGTD_OLD,
- LTTD_OLD,
- STLC,
- ADDVCD,
- MDBZ,
- MDPR,
- DTMNM,
- DTMEL,
- STTP,
- DFRTMS,
- FRITM,
- FRGRD,
- BGFRYM,
- EDFRYM,
- ADMAUTH,
- PHCD,
- ESSTYM,
- LGTD1,
- LTTD1,
- LOCALITY,
- DIRECTION,
- BASINCD,
- MODITIME,
- ENTPOINT,
- STPERSON,
- MOBPHONE,
- FIELDCAP,
- RAINFALL,
- MOISTURE,
- COMMENTS,
- DRNA,
- LGTD,
- LTTD,
- DTPR,
- ATCUNIT,
- STAZT,
- DSTRVM,
- USFL
- </sql>
- <sql id="entity_properties">
- #{stcd},
- #{stnm},
- #{rvnm},
- #{hnnm},
- #{bsnm},
- #{lgtdOld},
- #{lttdOld},
- #{stlc},
- #{addvcd},
- #{mdbz},
- #{mdpr},
- #{dtmnm},
- #{dtmel},
- #{sttp},
- #{dfrtms},
- #{fritm},
- #{frgrd},
- #{bgfrym},
- #{edfrym},
- #{admauth},
- #{stbk},
- #{phcd},
- #{esstym},
- #{lgtd1},
- #{lttd1},
- #{locality},
- #{direction},
- #{basincd},
- #{moditime},
- #{entpoint},
- #{stperson},
- #{mobphone},
- #{fieldcap},
- #{rainfall},
- #{moisture},
- #{comments},
- #{drna},
- #{lgtd},
- #{lttd},
- #{dtpr},
- #{atcunit},
- #{stazt},
- #{dstrvm},
- #{usfl}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="stnm != null and stnm != ''">and STNM = #{stnm}</if>
- <if test="rvnm != null and rvnm != ''">and RVNM = #{rvnm}</if>
- <if test="hnnm != null and hnnm != ''">and HNNM = #{hnnm}</if>
- <if test="bsnm != null and bsnm != ''">and BSNM = #{bsnm}</if>
- <if test="lgtdOld != null and lgtdOld != ''">and LGTD_OLD = #{lgtdOld}</if>
- <if test="lttdOld != null and lttdOld != ''">and LTTD_OLD = #{lttdOld}</if>
- <if test="stlc != null and stlc != ''">and STLC = #{stlc}</if>
- <if test="addvcd != null and addvcd != ''">and ADDVCD = #{addvcd}</if>
- <if test="mdbz != null and mdbz != ''">and MDBZ = #{mdbz}</if>
- <if test="mdpr != null and mdpr != ''">and MDPR = #{mdpr}</if>
- <if test="dtmnm != null and dtmnm != ''">and DTMNM = #{dtmnm}</if>
- <if test="dtmel != null and dtmel != ''">and DTMEL = #{dtmel}</if>
- <if test="sttp != null and sttp != ''">and STTP = #{sttp}</if>
- <if test="dfrtms != null and dfrtms != ''">and DFRTMS = #{dfrtms}</if>
- <if test="fritm != null and fritm != ''">and FRITM = #{fritm}</if>
- <if test="frgrd != null">and FRGRD = #{frgrd}</if>
- <if test="bgfrym != null and bgfrym != ''">and BGFRYM = #{bgfrym}</if>
- <if test="edfrym != null and edfrym != ''">and EDFRYM = #{edfrym}</if>
- <if test="admauth != null and admauth != ''">and ADMAUTH = #{admauth}</if>
- <if test="stbk != null">and STBK = #{stbk}</if>
- <if test="phcd != null and phcd != ''">and PHCD = #{phcd}</if>
- <if test="esstym != null and esstym != ''">and ESSTYM = #{esstym}</if>
- <if test="lgtd1 != null and lgtd1 != ''">and LGTD1 = #{lgtd1}</if>
- <if test="lttd1 != null and lttd1 != ''">and LTTD1 = #{lttd1}</if>
- <if test="locality != null and locality != ''">and LOCALITY = #{locality}</if>
- <if test="direction != null and direction != ''">and DIRECTION = #{direction}</if>
- <if test="basincd != null and basincd != ''">and BASINCD = #{basincd}</if>
- <if test="moditime != null">and MODITIME = #{moditime}</if>
- <if test="entpoint != null and entpoint != ''">and ENTPOINT = #{entpoint}</if>
- <if test="stperson != null and stperson != ''">and STPERSON = #{stperson}</if>
- <if test="mobphone != null and mobphone != ''">and MOBPHONE = #{mobphone}</if>
- <if test="fieldcap != null and fieldcap != ''">and FIELDCAP = #{fieldcap}</if>
- <if test="rainfall != null and rainfall != ''">and RAINFALL = #{rainfall}</if>
- <if test="moisture != null and moisture != ''">and MOISTURE = #{moisture}</if>
- <if test="comments != null and comments != ''">and COMMENTS = #{comments}</if>
- <if test="drna != null and drna != ''">and DRNA = #{drna}</if>
- <if test="lgtd != null and lgtd != ''">and LGTD = #{lgtd}</if>
- <if test="lttd != null and lttd != ''">and LTTD = #{lttd}</if>
- <if test="dtpr != null and dtpr != ''">and DTPR = #{dtpr}</if>
- <if test="atcunit != null and atcunit != ''">and ATCUNIT = #{atcunit}</if>
- <if test="stazt != null and stazt != ''">and STAZT = #{stazt}</if>
- <if test="dstrvm != null and dstrvm != ''">and DSTRVM = #{dstrvm}</if>
- <if test="usfl != null and usfl != ''">and USFL = #{usfl}</if>
- </trim>
- </sql>
- <select id="get" resultMap="stStbprpBResultMap" parameterType="String">
- select
- <include refid="table_columns_B"/>
- from ST_STBPRP_B where STCD = #{id}
- </select>
- <select id="getBy" resultMap="stStbprpBResultMap">
- select
- <include refid="table_columns"/>
- from ST_STBPRP_B
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="stStbprpBResultMap">
- select
- <include refid="table_columns"/>
- from ST_STBPRP_B
- </select>
- <select id="findList" resultMap="stStbprpBResultMap">
- select
- <include refid="table_columns"/>
- from ST_STBPRP_B
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from ST_STBPRP_B
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.StStbprpB">
- insert into ST_STBPRP_B(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from ST_STBPRP_B where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.StStbprpB">
- delete from ST_STBPRP_B
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ST_STBPRP_B set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.StStbprpB">
- update ST_STBPRP_B
- <trim prefix="set" suffixOverrides=",">
- <if test="stnm != null and stnm != ''">STNM = #{stnm},</if>
- <if test="rvnm != null and rvnm != ''">RVNM = #{rvnm},</if>
- <if test="hnnm != null and hnnm != ''">HNNM = #{hnnm},</if>
- <if test="bsnm != null and bsnm != ''">BSNM = #{bsnm},</if>
- <if test="lgtdOld != null and lgtdOld != ''">LGTD_OLD = #{lgtdOld},</if>
- <if test="lttdOld != null and lttdOld != ''">LTTD_OLD = #{lttdOld},</if>
- <if test="stlc != null and stlc != ''">STLC = #{stlc},</if>
- <if test="addvcd != null and addvcd != ''">ADDVCD = #{addvcd},</if>
- <if test="mdbz != null and mdbz != ''">MDBZ = #{mdbz},</if>
- <if test="mdpr != null and mdpr != ''">MDPR = #{mdpr},</if>
- <if test="dtmnm != null and dtmnm != ''">DTMNM = #{dtmnm},</if>
- <if test="dtmel != null and dtmel != ''">DTMEL = #{dtmel},</if>
- <if test="sttp != null and sttp != ''">STTP = #{sttp},</if>
- <if test="dfrtms != null and dfrtms != ''">DFRTMS = #{dfrtms},</if>
- <if test="fritm != null and fritm != ''">FRITM = #{fritm},</if>
- <if test="frgrd != null">FRGRD = #{frgrd},</if>
- <if test="bgfrym != null and bgfrym != ''">BGFRYM = #{bgfrym},</if>
- <if test="edfrym != null and edfrym != ''">EDFRYM = #{edfrym},</if>
- <if test="admauth != null and admauth != ''">ADMAUTH = #{admauth},</if>
- <if test="stbk != null">STBK = #{stbk},</if>
- <if test="phcd != null and phcd != ''">PHCD = #{phcd},</if>
- <if test="esstym != null and esstym != ''">ESSTYM = #{esstym},</if>
- <if test="lgtd1 != null and lgtd1 != ''">LGTD1 = #{lgtd1},</if>
- <if test="lttd1 != null and lttd1 != ''">LTTD1 = #{lttd1},</if>
- <if test="locality != null and locality != ''">LOCALITY = #{locality},</if>
- <if test="direction != null and direction != ''">DIRECTION = #{direction},</if>
- <if test="basincd != null and basincd != ''">BASINCD = #{basincd},</if>
- <if test="moditime != null">MODITIME = #{moditime},</if>
- <if test="entpoint != null and entpoint != ''">ENTPOINT = #{entpoint},</if>
- <if test="stperson != null and stperson != ''">STPERSON = #{stperson},</if>
- <if test="mobphone != null and mobphone != ''">MOBPHONE = #{mobphone},</if>
- <if test="fieldcap != null and fieldcap != ''">FIELDCAP = #{fieldcap},</if>
- <if test="rainfall != null and rainfall != ''">RAINFALL = #{rainfall},</if>
- <if test="moisture != null and moisture != ''">MOISTURE = #{moisture},</if>
- <if test="comments != null and comments != ''">COMMENTS = #{comments},</if>
- <if test="drna != null and drna != ''">DRNA = #{drna},</if>
- <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
- <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
- <if test="dtpr != null and dtpr != ''">DTPR = #{dtpr},</if>
- <if test="atcunit != null and atcunit != ''">ATCUNIT = #{atcunit},</if>
- <if test="stazt != null and stazt != ''">STAZT = #{stazt},</if>
- <if test="dstrvm != null and dstrvm != ''">DSTRVM = #{dstrvm},</if>
- <if test="usfl != null and usfl != ''">USFL = #{usfl},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.StStbprpB">
- update ST_STBPRP_B
- <trim prefix="set" suffixOverrides=",">
- <if test="stnm != null and stnm != ''">STNM = #{stnm},</if>
- <if test="rvnm != null and rvnm != ''">RVNM = #{rvnm},</if>
- <if test="hnnm != null and hnnm != ''">HNNM = #{hnnm},</if>
- <if test="bsnm != null and bsnm != ''">BSNM = #{bsnm},</if>
- <if test="lgtdOld != null and lgtdOld != ''">LGTD_OLD = #{lgtdOld},</if>
- <if test="lttdOld != null and lttdOld != ''">LTTD_OLD = #{lttdOld},</if>
- <if test="stlc != null and stlc != ''">STLC = #{stlc},</if>
- <if test="addvcd != null and addvcd != ''">ADDVCD = #{addvcd},</if>
- <if test="mdbz != null and mdbz != ''">MDBZ = #{mdbz},</if>
- <if test="mdpr != null and mdpr != ''">MDPR = #{mdpr},</if>
- <if test="dtmnm != null and dtmnm != ''">DTMNM = #{dtmnm},</if>
- <if test="dtmel != null and dtmel != ''">DTMEL = #{dtmel},</if>
- <if test="sttp != null and sttp != ''">STTP = #{sttp},</if>
- <if test="dfrtms != null and dfrtms != ''">DFRTMS = #{dfrtms},</if>
- <if test="fritm != null and fritm != ''">FRITM = #{fritm},</if>
- <if test="frgrd != null">FRGRD = #{frgrd},</if>
- <if test="bgfrym != null and bgfrym != ''">BGFRYM = #{bgfrym},</if>
- <if test="edfrym != null and edfrym != ''">EDFRYM = #{edfrym},</if>
- <if test="admauth != null and admauth != ''">ADMAUTH = #{admauth},</if>
- <if test="stbk != null">STBK = #{stbk},</if>
- <if test="phcd != null and phcd != ''">PHCD = #{phcd},</if>
- <if test="esstym != null and esstym != ''">ESSTYM = #{esstym},</if>
- <if test="lgtd1 != null and lgtd1 != ''">LGTD1 = #{lgtd1},</if>
- <if test="lttd1 != null and lttd1 != ''">LTTD1 = #{lttd1},</if>
- <if test="locality != null and locality != ''">LOCALITY = #{locality},</if>
- <if test="direction != null and direction != ''">DIRECTION = #{direction},</if>
- <if test="basincd != null and basincd != ''">BASINCD = #{basincd},</if>
- <if test="moditime != null">MODITIME = #{moditime},</if>
- <if test="entpoint != null and entpoint != ''">ENTPOINT = #{entpoint},</if>
- <if test="stperson != null and stperson != ''">STPERSON = #{stperson},</if>
- <if test="mobphone != null and mobphone != ''">MOBPHONE = #{mobphone},</if>
- <if test="fieldcap != null and fieldcap != ''">FIELDCAP = #{fieldcap},</if>
- <if test="rainfall != null and rainfall != ''">RAINFALL = #{rainfall},</if>
- <if test="moisture != null and moisture != ''">MOISTURE = #{moisture},</if>
- <if test="comments != null and comments != ''">COMMENTS = #{comments},</if>
- <if test="drna != null and drna != ''">DRNA = #{drna},</if>
- <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
- <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
- <if test="dtpr != null and dtpr != ''">DTPR = #{dtpr},</if>
- <if test="atcunit != null and atcunit != ''">ATCUNIT = #{atcunit},</if>
- <if test="stazt != null and stazt != ''">STAZT = #{stazt},</if>
- <if test="dstrvm != null and dstrvm != ''">DSTRVM = #{dstrvm},</if>
- <if test="usfl != null and usfl != ''">USFL = #{usfl},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- <select id="findListBy" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam"
- resultType="cn.com.goldenwater.dcproj.model.StStbprpB">
- SELECT T.STCD,
- T.STNM,
- T.RVNM,
- T.HNNM,
- T.BSNM,
- T.LGTD_OLD,
- T.LTTD_OLD,
- T.STLC,
- T.ADDVCD,
- T.MDBZ,
- T.MDPR,
- T.DTMNM,
- T.DTMEL,
- T.STTP,
- T.DFRTMS,
- T.FRITM,
- T.FRGRD,
- T.BGFRYM,
- T.EDFRYM,
- T.ADMAUTH,
- T.PHCD,
- T.ESSTYM,
- T.LGTD1,
- T.LTTD1,
- T.LOCALITY,
- T.DIRECTION,
- T.BASINCD,
- T.MODITIME,
- T.ENTPOINT,
- T.STPERSON,
- T.MOBPHONE,
- T.FIELDCAP,
- T.RAINFALL,
- T.MOISTURE,
- T.COMMENTS,
- T.DRNA,
- T.LGTD,
- T.LTTD,
- T.DTPR,
- T.ATCUNIT,
- T.STAZT,
- T.DSTRVM,
- T.USFL FROM ST_STBPRP_B T WHERE 1 = 1
- <if test="adCode != null and adCode != ''">and T.ADDVCD LIKE '${adCode}%'</if>
- <if test="stnm != null and stnm != ''">and T.STNM LIKE '%${stnm}%'</if>
- <if test="frgrd != null and frgrd != ''">and T.FRGRD IN (${frgrd})</if>
- <if test="maxLgtd != null and maxLgtd != '' and minLgtd != null and minLgtd != ''">and T.lgtd BETWEEN #{minLgtd}
- AND #{maxLgtd}
- </if>
- <if test="maxLttd != null and maxLttd != '' and minLttd != null and minLttd != ''">and T.lttd BETWEEN #{minLttd}
- AND #{maxLttd}
- </if>
- </select>
- </mapper>
|