| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539 |
- <?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.AttGrwBaseDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttGrwBase" id="attGrwBaseResultMap">
- <result property="stcd" column="STCD"/>
- <result property="dtmmdpr" column="DTMMDPR"/>
- <result property="dtmnm" column="DTMNM"/>
- <result property="esstym" column="ESSTYM"/>
- <result property="lgtdPc" column="LGTD_PC"/>
- <result property="isart" column="ISART"/>
- <result property="stlc" column="STLC"/>
- <result property="welldep" column="WELLDEP"/>
- <result property="note" column="NOTE"/>
- <result property="lttd" column="LTTD"/>
- <result property="aqme" column="AQME"/>
- <result property="burcn" column="BURCN"/>
- <result property="pbprj" column="PBPRJ"/>
- <result property="bwsttp" column="BWSTTP"/>
- <result property="stnm" column="STNM"/>
- <result property="adcd" column="ADCD"/>
- <result property="sttp" column="STTP"/>
- <result property="stel" column="STEL"/>
- <result property="calym" column="CALYM"/>
- <result property="rvnm" column="RVNM"/>
- <result property="gogunt" column="GOGUNT"/>
- <result property="prtc" column="PRTC"/>
- <result property="grdlvl" column="GRDLVL"/>
- <result property="adnm" column="ADNM"/>
- <result property="lttdPc" column="LTTD_PC"/>
- <result property="lgtd" column="LGTD"/>
- <result property="wsttp" column="WSTTP"/>
- <result property="ostcd" column="OSTCD"/>
- <result property="esstyr" column="ESSTYR"/>
- <result property="intm" column="INTM"/>
- <result property="stndpnt" column="STNDPNT"/>
- <result property="mnun" column="MNUN"/>
- <result property="onun" column="ONUN"/>
- <result property="spghgh" column="SPGHGH"/>
- </resultMap>
- <sql id="table_columns">
- STCD ,
- DTMMDPR ,
- DTMNM ,
- TO_CHAR(ESSTYM,'YYYY-MM-DD') ESSTYM,
- LGTD_PC ,
- ISART ,
- STLC ,
- WELLDEP ,
- NOTE ,
- LTTD ,
- AQME ,
- BURCN ,
- PBPRJ ,
- BWSTTP ,
- STNM ,
- ADCD ,
- STTP ,
- STEL ,
- TO_CHAR(CALYM,'YYYY-MM-DD') CALYM,
- RVNM ,
- GOGUNT ,
- PRTC ,
- GRDLVL ,
- ADNM ,
- LTTD_PC ,
- LGTD ,
- WSTTP ,
- OSTCD ,
- ESSTYR ,
- TO_CHAR(INTM,'YYYY-MM-DD HH24:MI:SS') INTM,
- STNDPNT ,
- MNUN ,
- ONUN ,
- SPGHGH
- </sql>
- <sql id="table_columns2">
- STCD ,
- DTMMDPR ,
- DTMNM ,
- ESSTYM ,
- LGTD_PC ,
- ISART ,
- STLC ,
- WELLDEP ,
- NOTE ,
- LTTD ,
- AQME ,
- BURCN ,
- PBPRJ ,
- BWSTTP ,
- STNM ,
- ADCD ,
- STTP ,
- STEL ,
- CALYM ,
- RVNM ,
- GOGUNT ,
- PRTC ,
- GRDLVL ,
- ADNM ,
- LTTD_PC ,
- LGTD ,
- WSTTP ,
- OSTCD ,
- ESSTYR ,
- INTM ,
- STNDPNT ,
- MNUN ,
- ONUN ,
- SPGHGH
- </sql>
- <sql id="entity_properties">
- #{stcd},
- #{dtmmdpr},
- #{dtmnm},
- TO_DATE(#{esstym},'YYYY-MM-DD'),
- #{lgtdPc},
- #{isart},
- #{stlc},
- #{welldep},
- #{note},
- #{lttd},
- #{aqme},
- #{burcn},
- #{pbprj},
- #{bwsttp},
- #{stnm},
- #{adcd},
- #{sttp},
- #{stel},
- TO_DATE(#{calym},'YYYY-MM-DD'),
- #{rvnm},
- #{gogunt},
- #{prtc},
- #{grdlvl},
- #{adnm},
- #{lttdPc},
- #{lgtd},
- #{wsttp},
- #{ostcd},
- #{esstyr},
- TO_DATE(#{intm},'YYYY-MM-DD HH24:MI:SS') ,
- #{stndpnt},
- #{mnun},
- #{onun},
- #{spghgh}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="stcd != null and stcd != ''">and STCD = #{stcd}</if>
- <if test="dtmmdpr != null and dtmmdpr != ''">and DTMMDPR = #{dtmmdpr}</if>
- <if test="dtmnm != null and dtmnm != ''">and DTMNM = #{dtmnm}</if>
- <if test="esstym != null and esstym != ''">and ESSTYM = TO_DATE(#{esstym},'YYYY-MM-DD')</if>
- <if test="lgtdPc != null">and LGTD_PC = #{lgtdPc}</if>
- <if test="isart != null and isart != ''">and ISART = #{isart}</if>
- <if test="stlc != null and stlc != ''">and STLC = #{stlc}</if>
- <if test="welldep != null">and WELLDEP = #{welldep}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="lttd != null">and LTTD = #{lttd}</if>
- <if test="aqme != null and aqme != ''">and AQME = #{aqme}</if>
- <if test="burcn != null and burcn != ''">and BURCN = #{burcn}</if>
- <if test="pbprj != null and pbprj != ''">and PBPRJ = #{pbprj}</if>
- <if test="bwsttp != null and bwsttp != ''">and BWSTTP = #{bwsttp}</if>
- <if test="stnm != null and stnm != ''">and STNM like '%${stnm}%'</if>
- <if test="adcd != null and adcd != ''">and ADCD like '${adcd}%'</if>
- <if test="sttp != null and sttp != ''">and STTP = #{sttp}</if>
- <if test="stel != null and stel != ''">and STEL = #{stel}</if>
- <if test="calym != null and calym != ''">and CALYM = TO_DATE(#{calym},'YYYY-MM-DD')</if>
- <if test="rvnm != null and rvnm != ''">and RVNM = #{rvnm}</if>
- <if test="gogunt != null and gogunt != ''">and GOGUNT = #{gogunt}</if>
- <if test="prtc != null and prtc != ''">and PRTC = #{prtc}</if>
- <if test="grdlvl != null">and GRDLVL = #{grdlvl}</if>
- <if test="adnm != null and adnm != ''">and ADNM = #{adnm}</if>
- <if test="lttdPc != null">and LTTD_PC = #{lttdPc}</if>
- <if test="lgtd != null">and LGTD = #{lgtd}</if>
- <if test="wsttp != null and wsttp != ''">and WSTTP = #{wsttp}</if>
- <if test="ostcd != null and ostcd != ''">and OSTCD = #{ostcd}</if>
- <if test="esstyr != null and esstyr != ''">and ESSTYR = #{esstyr}</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="mnun != null and mnun != ''">and MNUN = #{mnun}</if>
- <if test="onun != null and onun != ''">and ONUN = #{onun}</if>
- <if test="spghgh != null">and SPGHGH = #{spghgh}</if>
- <if test="province != null and province != ''">and ADCD like '${province}%'</if>
- </trim>
- </sql>
- <select id="get" resultMap="attGrwBaseResultMap" parameterType="String" >
- select <include refid="table_columns" /> from ATT_GRW_BASE where STCD = #{stcd}
- </select>
- <select id="getBy" resultMap="attGrwBaseResultMap">
- select <include refid="table_columns" /> from ATT_GRW_BASE <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="attGrwBaseResultMap">
- select <include refid="table_columns" /> from ATT_GRW_BASE
- </select>
- <select id="findList" resultMap="attGrwBaseResultMap">
- select <include refid="table_columns" /> from ATT_GRW_BASE <include refid="page_where" /> ORDER BY STCD
- </select>
- <select id="selectCount" resultType="int" >
- select count(STCD) from ATT_GRW_BASE <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttGrwBase">
- insert into ATT_GRW_BASE( <include refid="table_columns2" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from ATT_GRW_BASE where STCD = #{stcd}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttGrwBase">
- delete from ATT_GRW_BASE <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_GRW_BASE set flag_valid = 0 where STCD = #{stcd}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttGrwBase">
- update ATT_GRW_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="dtmmdpr != null and dtmmdpr != ''"> DTMMDPR = #{dtmmdpr},</if>
- <if test="dtmnm != null and dtmnm != ''"> DTMNM = #{dtmnm},</if>
- <if test="esstym != null and esstym != ''"> ESSTYM = TO_DATE(#{esstym},'YYYY-MM-DD'),</if>
- <if test="lgtdPc != null"> LGTD_PC = #{lgtdPc},</if>
- <if test="isart != null and isart != ''"> ISART = #{isart},</if>
- <if test="stlc != null and stlc != ''"> STLC = #{stlc},</if>
- <if test="welldep != null"> WELLDEP = #{welldep},</if>
- <if test="note != null and note != ''"> NOTE = #{note},</if>
- <if test="lttd != null"> LTTD = #{lttd},</if>
- <if test="aqme != null and aqme != ''"> AQME = #{aqme},</if>
- <if test="burcn != null and burcn != ''"> BURCN = #{burcn},</if>
- <if test="pbprj != null and pbprj != ''"> PBPRJ = #{pbprj},</if>
- <if test="bwsttp != null and bwsttp != ''"> BWSTTP = #{bwsttp},</if>
- <if test="stnm != null and stnm != ''"> STNM = #{stnm},</if>
- <if test="adcd != null and adcd != ''"> ADCD = #{adcd},</if>
- <if test="sttp != null and sttp != ''"> STTP = #{sttp},</if>
- <if test="stel != null and stel != ''"> STEL = #{stel},</if>
- <if test="calym != null and calym != ''"> CALYM = TO_DATE(#{calym},'YYYY-MM-DD'),</if>
- <if test="rvnm != null and rvnm != ''"> RVNM = #{rvnm},</if>
- <if test="gogunt != null and gogunt != ''"> GOGUNT = #{gogunt},</if>
- <if test="prtc != null and prtc != ''"> PRTC = #{prtc},</if>
- <if test="grdlvl != null"> GRDLVL = #{grdlvl},</if>
- <if test="adnm != null and adnm != ''"> ADNM = #{adnm},</if>
- <if test="lttdPc != null"> LTTD_PC = #{lttdPc},</if>
- <if test="lgtd != null"> LGTD = #{lgtd},</if>
- <if test="wsttp != null and wsttp != ''"> WSTTP = #{wsttp},</if>
- <if test="ostcd != null and ostcd != ''"> OSTCD = #{ostcd},</if>
- <if test="esstyr != null and esstyr != ''"> ESSTYR = #{esstyr},</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="mnun != null and mnun != ''"> MNUN = #{mnun},</if>
- <if test="onun != null and onun != ''"> ONUN = #{onun},</if>
- <if test="spghgh != null"> SPGHGH = #{spghgh},</if>
- </trim>
- <where>STCD = #{stcd}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttGrwBase">
- update ATT_GRW_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="stcd != null and stcd != ''"> STCD = #{stcd},</if>
- <if test="dtmmdpr != null and dtmmdpr != ''"> DTMMDPR = #{dtmmdpr},</if>
- <if test="dtmnm != null and dtmnm != ''"> DTMNM = #{dtmnm},</if>
- <if test="esstym != null and esstym != ''"> ESSTYM = TO_DATE(#{esstym},'YYYY-MM-DD'),</if>
- <if test="lgtdPc != null"> LGTD_PC = #{lgtdPc},</if>
- <if test="isart != null and isart != ''"> ISART = #{isart},</if>
- <if test="stlc != null and stlc != ''"> STLC = #{stlc},</if>
- <if test="welldep != null"> WELLDEP = #{welldep},</if>
- <if test="note != null and note != ''"> NOTE = #{note},</if>
- <if test="lttd != null"> LTTD = #{lttd},</if>
- <if test="aqme != null and aqme != ''"> AQME = #{aqme},</if>
- <if test="burcn != null and burcn != ''"> BURCN = #{burcn},</if>
- <if test="pbprj != null and pbprj != ''"> PBPRJ = #{pbprj},</if>
- <if test="bwsttp != null and bwsttp != ''"> BWSTTP = #{bwsttp},</if>
- <if test="stnm != null and stnm != ''"> STNM = #{stnm},</if>
- <if test="adcd != null and adcd != ''"> ADCD = #{adcd},</if>
- <if test="sttp != null and sttp != ''"> STTP = #{sttp},</if>
- <if test="stel != null and stel != ''"> STEL = #{stel},</if>
- <if test="calym != null and calym != ''"> CALYM = TO_DATE(#{calym},'YYYY-MM-DD'),</if>
- <if test="rvnm != null and rvnm != ''"> RVNM = #{rvnm},</if>
- <if test="gogunt != null and gogunt != ''"> GOGUNT = #{gogunt},</if>
- <if test="prtc != null and prtc != ''"> PRTC = #{prtc},</if>
- <if test="grdlvl != null"> GRDLVL = #{grdlvl},</if>
- <if test="adnm != null and adnm != ''"> ADNM = #{adnm},</if>
- <if test="lttdPc != null"> LTTD_PC = #{lttdPc},</if>
- <if test="lgtd != null"> LGTD = #{lgtd},</if>
- <if test="wsttp != null and wsttp != ''"> WSTTP = #{wsttp},</if>
- <if test="ostcd != null and ostcd != ''"> OSTCD = #{ostcd},</if>
- <if test="esstyr != null and esstyr != ''"> ESSTYR = #{esstyr},</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="mnun != null and mnun != ''"> MNUN = #{mnun},</if>
- <if test="onun != null and onun != ''"> ONUN = #{onun},</if>
- <if test="spghgh != null"> SPGHGH = #{spghgh},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- <select id="getListBy" parameterType="cn.com.goldenwater.dcproj.param.AttGrwListByParam" resultMap="attGrwBaseResultMap">
- select A.STCD ,
- A.DTMMDPR ,
- A.DTMNM ,
- TO_CHAR(A.ESSTYM,'YYYY-MM-DD') ESSTYM,
- A.LGTD_PC ,
- A.ISART ,
- A.STLC ,
- A.WELLDEP ,
- A.NOTE ,
- A.LTTD ,
- A.AQME ,
- A.BURCN ,
- A.PBPRJ ,
- A.BWSTTP ,
- A.STNM ,
- A.ADCD ,
- A.STTP ,
- A.STEL ,
- TO_CHAR(A.CALYM,'YYYY-MM-DD') CALYM,
- A.RVNM ,
- A.GOGUNT ,
- A.PRTC ,
- A.GRDLVL ,
- A.ADNM ,
- A.LTTD_PC ,
- A.LGTD ,
- A.WSTTP ,
- A.OSTCD ,
- A.ESSTYR ,
- TO_CHAR(A.INTM,'YYYY-MM-DD HH24:MI:SS') INTM,
- A.STNDPNT ,
- A.MNUN ,
- A.ONUN ,
- A.SPGHGH
- FROM
- ATT_GRW_BASE a
- LEFT JOIN ( SELECT * FROM BIS_INSP_ALL_OBJ WHERE ID IN (select ID from BIS_INSP_ALL
- start with ID IN (SELECT ID FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persId})
- connect by prior ID = PID) AND PTYPE='5') b ON b.CODE = a.STCD
- WHERE 1=1
- AND b.CODE IS NULL
- AND A.ADCD IN ( select DISTINCT C.AD_CODE from BIS_INSP_ALL_RLATION A
- LEFT JOIN BIS_INSP_ALL B ON A.ID=B.ID LEFT JOIN BIS_INSP_SEL_AREA C ON C.ID LIKE A.ID||'%'
- LEFT JOIN BIS_INSP_ALL_OBJ D ON D.ID LIKE A.ID || '%'
- WHERE A.PERSID=#{persId} )
- <if test="stnm != null and stnm.length()>0">AND a.STNM like CONCAT('%',CONCAT(#{stnm}, '%'))</if>
- <if test="sttp != null and sttp != ''">and (A.STTP Like #{sttp}||'%' OR A.STTP=#{sttp2})</if>
- <if test="adnm != null and adnm != ''">and A.ADNM Like '%'||#{adnm}||'%'</if>
- <if test="adcd != null and adcd != ''">and A.ADCD Like #{adcd}||'%'</if>
- </select>
- <!--获取不在某督察组的地下水信息-->
- <select id="getGrwNotInGroup" parameterType="cn.com.goldenwater.dcproj.param.InGroupGrwParam" resultType="cn.com.goldenwater.dcproj.model.AttGrwBase">
- SELECT STCD,
- STNM,
- ADCD,
- ADNM,
- GOGUNT,
- STLC,
- LGTD,
- LTTD,
- LGTD_PC,
- LTTD_PC,
- RVNM,
- WELLDEP,
- STNDPNT,
- GRDLVL,
- SPGHGH,
- STTP,
- WSTTP,
- PRTC,
- BWSTTP,
- ISART,
- BURCN,
- AQME,
- PBPRJ,
- ESSTYM,
- CALYM,
- ONUN,
- MNUN,
- OSTCD,
- INTM,
- ESSTYR,
- STEL,
- DTMNM,
- DTMMDPR,
- NOTE FROM ATT_GRW_BASE WHERE STCD NOT IN
- (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID = #{groupId} AND PTYPE = '5'
- <choose>
- <when test="province !=null and province !=''">
- and ad_code like '${province}%'
- </when>
- <otherwise>
- and ad_code is null
- </otherwise>
- </choose>
- )
- <if test="stcd != null and stcd != ''">and STCD = #{stcd}</if>
- <if test="stnm != null and stnm != ''">and STNM LIKE '%${stnm}%'</if>
- <if test="sttp != null and sttp != ''">and STTP = #{sttp}</if>
- <if test="adcd != null and adcd != ''">and ${adcd}</if>
- <if test="adnm != null and adnm != ''">and adnm LIKE '%${adnm}%'</if>
- <if test="province !=null and province !=''">
- and adcd like '${province}%'
- </if>
- </select>
- <select id="getListByInspGroupIdObjType" parameterType="cn.com.goldenwater.dcproj.param.PagePersObjParam" resultType="cn.com.goldenwater.dcproj.model.GrwBaseByType">
- select t.*,C.id,C.PNM,o.obj_id
- from ATT_GRW_BASE t
- left join BIS_INSP_ALL_OBJ o
- on o.CODE = t.stcd LEFT JOIN BIS_INSP_ALL C ON o.ID = C.ID
- and o.ptype = #{objType}
- where 1 = 1
- <if test='isAll == "0"'>and o.ID = #{inspGroupId}</if>
- <if test='isAll == "1"'>and o.ID LIKE '${inspGroupId}%'</if>
- <if test="stnm != null and stnm != ''">and t.stnm LIKE '%${stnm}%'</if>
- <if test="sttp != null and sttp != ''">and t.sttp = #{sttp}</if>
- <if test="adCode != null and adCode != ''">and t.ADCD LIKE '${adCode}%'</if>
- <choose>
- <when test="province !=null and province !=''">
- and o.ad_code like '${province}%'
- </when>
- <otherwise>
- and o.ad_code is null
- </otherwise>
- </choose>
- </select>
- <select id="getObjByPersId" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam" resultType="cn.com.goldenwater.dcproj.model.AttPersGrw">
- SELECT A.STCD,
- A.STNM,
- A.ADCD,
- A.ADNM,
- A.GOGUNT,
- A.STLC,
- A.LGTD,
- A.LTTD,
- A.LGTD_PC,
- A.LTTD_PC,
- A.RVNM,
- A.WELLDEP,
- A.STNDPNT,
- A.GRDLVL,
- A.SPGHGH,
- A.STTP,
- A.WSTTP,
- A.PRTC,
- A.BWSTTP,
- A.ISART,
- A.BURCN,
- A.AQME,
- A.PBPRJ,
- A.ESSTYM,
- A.CALYM,
- A.ONUN,
- A.MNUN,
- A.OSTCD,
- A.INTM,
- A.ESSTYR,
- A.STEL,
- A.DTMNM,
- A.DTMMDPR,B.OBJ_ID,
- A.NOTE FROM ATT_GRW_BASE A LEFT JOIN BIS_INSP_ALL_OBJ B ON A.STCD = B.CODE
- WHERE B.PTYPE = '5'
- AND
- REGEXP_LIKE(
- B.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID =#{persGuid}
- <include refid="orgIdSql"/>
- )>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID =#{persGuid}
- <include refid="orgIdSql"/> GROUP BY PERSID
- )
- else (select 'non' from dual) end)
- ||')')
- <choose>
- <when test="province !=null and province !=''">
- and B.ad_code like '${province}%'
- </when>
- <otherwise>
- and B.ad_code is null
- </otherwise>
- </choose>
- <if test="province != null and province != ''">and A.ADCD LIKE '${province}%'</if>
- <if test="adCode != null and adCode != ''">and A.ADCD LIKE '${adCode}%'</if>
- <if test="stnm != null and stnm != ''">and A.stnm LIKE '%${stnm}%'</if>
- <if test="maxLgtd != null and maxLgtd != '' and minLgtd != null and minLgtd != ''">and A.LGTD_PC BETWEEN #{minLgtd} AND #{maxLgtd}</if>
- <if test="maxLttd != null and maxLttd != '' and minLttd != null and minLttd != ''">and A.LTTD_PC BETWEEN #{minLttd} AND #{maxLttd}</if>
- </select>
- <sql id="orgIdSql">
- <choose>
- <when test="orgId !=null and orgId !=''">
- and ORG_ID=#{orgId}
- </when>
- <otherwise>
- and ORG_ID is null
- </otherwise>
- </choose>
- </sql>
- <select id="getObjListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.model.AttGrwBase" parameterType="String">
- select t.*
- from ATT_GRW_BASE t
- where t.stcd not in (
- select CODE from BIS_INSP_ALL_OBJ B where id like concat(#{inspGroupId},'%') and B.obj_type=#{objType}
- <choose>
- <when test="province !=null and province !=''">
- and B.AD_CODE =#{province}
- </when>
- <otherwise>
- and B.AD_CODE is null
- </otherwise>
- </choose>
- )
- <if test="adName != null and adName != ''">and t.nm LIKE '%${adName}%'</if>
- <if test="adCode != null and adCode != ''">and t.AD_CODE LIKE '${adCode}%'</if>
- </select>
- </mapper>
|