| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002 |
- <?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.GeneralInfoDao">
- <select id="getGroup" resultType="cn.com.goldenwater.dcproj.dto.PersInfoDto">
- SELECT A.ID,A.PNM NM FROM BIS_INSP_ALL A LEFT JOIN BIS_INSP_ALL_RLATION B ON A.ID = B.ID
- WHERE B.PERSID = #{persid}
- <if test="sttm != null and sttm != '' and entm != null and entm != ''">
- AND A.STTM >= TO_DATE(#{sttm},'YYYY-MM-DD') AND A.ENTM <= TO_DATE(#{entm},'YYYY-MM-DD')
- </if>
- <include refid="choseSql"/>
- ORDER BY A.ID
- </select>
- <sql id="choseSql">
- <choose>
- <when test="province !=null and province !=''">
- and B.ad_code=#{province}
- </when>
- <otherwise>
- and B.ad_code is null
- </otherwise>
- </choose>
- </sql>
- <sql id="chose_Sql">
- <choose>
- <when test="province !=null and province !=''">
- and C.ad_code=#{province}
- </when>
- <otherwise>
- and C.ad_code is null
- </otherwise>
- </choose>
- </sql>
- <select id="getPersResInfoDtoList" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.PersResInfoDto">
- SELECT A.* FROM ATT_RS_BASE A LEFT JOIN BIS_INSP_ALL_OBJ C ON A.RS_CODE = C.CODE
- left join BIS_INSP_ALL_RLATION B on C.id=B.id
- WHERE C.PTYPE = #{ptype} AND C.ID = #{id}
- <include refid="choseSql"/>
- <if test="ptype =='1'.toString()">
- AND A.ENG_SCAL in(4,5)
- </if>
- <if test="ptype =='36'.toString()">
- AND A.ENG_SCAL in(1,2,3)
- </if>
- </select>
- <select id="getPersCwsInfoDtoList" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.PersCwsInfoDto">
- SELECT A.* FROM ATT_CWS_BASE A LEFT JOIN BIS_INSP_ALL_OBJ B ON A.ADDVCD = B.CODE
- left join BIS_INSP_ALL_RLATION C on C.id=B.id
- WHERE B.PTYPE = '2' AND B.ID = #{id}
- <include refid="chose_Sql"/>
- </select>
- <select id="getPersWtdstInfoDtoList" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.PersWtdstInfoDto">
- SELECT A.* FROM BIS_INSP_WTDST A LEFT JOIN BIS_INSP_ALL_OBJ C ON A.WTDST_ID = C.CODE
- left join BIS_INSP_ALL_RLATION B on C.id=B.id
- WHERE C.PTYPE = '3' AND C.ID = #{id}
- <include refid="choseSql"/>
- </select>
- <select id="getPersGrwInfoDtoList" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.PersGrwInfoDto">
- SELECT A.* FROM ATT_GRW_BASE A LEFT JOIN BIS_INSP_ALL_OBJ B ON A.STCD = B.CODE
- left join BIS_INSP_ALL_RLATION C on C.id=B.id
- WHERE B.PTYPE = '5' AND B.ID = #{id}
- <include refid="chose_Sql"/>
- </select>
- <select id="getRsSupData" parameterType="cn.com.goldenwater.dcproj.param.RsStatusInfoParam" resultType="cn.com.goldenwater.dcproj.dto.RsStatusInfoDto">
- select A1.RS_CODE,
- A1.RS_NAME,
- A1.LONGITUDE,
- A1.LATITUDE,
- A1.LOCATION,
- A1.ENG_SCAL,
- A1.LIM_STAG,
- A1.TOT_CAP,
- A1.RS_ADM_NAME,
- A1.RS_ADM_CODE,
- A1.RS_ADM_DEP,
- A1.ADM_ATT_REL,
- A1.ADM_DIV,
- A1.RS_TYPE,
- A1.DAM_TYPE_MAT,
- A1.DAM_TYPE_STR,
- A1.DAM_SIZE_HIG,
- A1.CENTER_X,
- A1.CENTER_Y,
- A1.SRC,
- A1.DATA_QUALITY,
- A1.CENTER_X_GD,
- A1.CENTER_Y_GD,
- A1.RS_LOC,
- A1.REG_CODE,
- A1.COMP_DATE,
- A1.INTM,
- A1.REG_NO,
- A1.HST_INSP,
- A1.PERS_ID,
- A1.CHK_STATE,
- A1.EDTR_PESR,
- A1.SLPC_ADM_DIV,
- A1.DISPLAY_LEVEL,
- A1.ADM_DIV_NAME,
- T.RGSTR_ID,T.OBJ_ID,T.rgstrStatus,to_char(T.UPTM,'yyyy')UPTM
- from ATT_RS_BASE A1
- LEFT JOIN ( select A.RS_CODE, a.OBJ_ID, a.STATE rgstrStatus, a.RGSTR_ID,A.UPTM from BIS_INSP_RSVR_RGSTR A JOIN (
- select rs_code,max(uptm)uptm from BIS_INSP_RSVR_RGSTR group by rs_code ) B ON A.RS_CODE=B.RS_CODE AND A.UPTM=B.UPTM
- ) T
- ON A1.rs_code = T.RS_CODE where 1=1
- <if test="engScal != null and engScal != ''">and A1.ENG_SCAL = #{engScal}</if>
- <choose>
- <when test="province !=null and province !=''">
- and A1.RS_CODE like '${adCode}%'
- </when>
- <otherwise>
- and A2.RS_CODE is null
- </otherwise>
- </choose>
- <if test="status != null and status != ''">
- <choose>
- <when test='status=="0"'>
- and (T.rgstrStatus = #{status} or T.rgstrStatus is null)
- </when>
- <otherwise>
- and T.rgstrStatus = #{status}
- </otherwise>
- </choose>
- </if>
- <if test="rsName != null and rsName != ''">and A1.RS_NAME like '%${rsName}%'</if>
- <if test="adCode != null and adCode != ''">and A1.ADM_DIV like '${adCode}%'</if>
- <if test="totCap != null and totCap != ''">and A1.TOT_CAP >= #{totCap}</if>
- <if test="maxLgtd != null and maxLgtd != '' and minLgtd != null and minLgtd != ''">and A1.CENTER_X BETWEEN #{minLgtd} AND #{maxLgtd}</if>
- <if test="maxLttd != null and maxLttd != '' and minLttd != null and minLttd != ''">and A1.CENTER_Y BETWEEN #{minLttd} AND #{maxLttd}</if>
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and A1.CENTER_X_GD BETWEEN #{mincenterXGd} AND #{maxcenterXGd}</if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and A1.CENTER_Y_GD BETWEEN #{mincenterYGd} AND #{maxcenterYGd}</if>
- <if test="displayLevel != null and displayLevel != ''">
- AND to_number(A1.DISPLAY_LEVEL) <= to_number(#{displayLevel})
- </if>
- </select>
- <select id="getEmptprjData" parameterType="cn.com.goldenwater.dcproj.param.EmptprjPadMapInfoParam" resultType="cn.com.goldenwater.dcproj.dto.EmpwtprjPadMapDto">
- select A1.*,
- T.OBJ_ID,T.rgstrStatus rgstrStatus from ATT_EMPWTPRJ_BASE A1
- LEFT JOIN BIS_INSP_ALL_OBJ A2 ON A1.ID = A2.CODE
- LEFT JOIN
- (SELECT A.ID,B.OBJ_ID,C.STATE rgstrStatus,C.ID RGSTR_ID FROM ATT_EMPWTPRJ_BASE A LEFT JOIN BIS_INSP_ALL_OBJ B ON A.ID = B.CODE
- LEFT JOIN BIS_INSP_KEY_REGISTER C ON B.OBJ_ID = C.OBJ_ID
- <if test="rgstrStatus != null and rgstrStatus != ''">and C.STATE = #{rsvrState}</if>
- ) T ON A2.CODE = T.ID WHERE 1 = 1
- <if test="nm != null and nm != ''">and A1.NM like '%${nm}%'</if>
- <if test="adCode != null and adCode != ''">and A1.AD_CODE like '${adCode}%'</if>
- <if test="ptype != null and ptype != ''">and A1.ptype = #{ptype}</if>
- <if test="engSta != null and engSta != ''">and A1.ENG_STA = #{engSta}</if>
- <if test="maxLgtd != null and maxLgtd != '' and minLgtd != null and minLgtd != ''">and A1.LGTD_PC BETWEEN #{minLgtd} AND #{maxLgtd}</if>
- <if test="maxLttd != null and maxLttd != '' and minLttd != null and minLttd != ''">and A1.LTTD_PC BETWEEN #{minLttd} AND #{maxLttd}</if>
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and A1.LGTD BETWEEN #{mincenterXGd} AND #{maxcenterXGd}</if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and A1.LTTD BETWEEN #{mincenterYGd} AND #{maxcenterYGd}</if>
- <if test='status == "1"'>and A1.HST_INSP = '1' and T.OBJ_ID IS NULL</if>
- <if test='status == "2"'>and A1.HST_INSP ! = '1' AND T.OBJ_ID IS NOT NULL
- AND
- REGEXP_LIKE(
- A2.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION C WHERE PERSID = #{persGuid}
- <include refid="orgIdSql"/>
- )>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION C WHERE PERSID = #{persGuid}
- <include refid="orgIdSql"/> GROUP BY PERSID
- )
- else (select 'non' from dual) end)
- ||')')</if>
- <if test='status == "3"'>and A1.HST_INSP = '1' AND T.OBJ_ID IS NOT NULL
- AND
- REGEXP_LIKE(
- A2.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION C WHERE PERSID = #{persGuid}
- <include refid="orgIdSql"/>
- )>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION C WHERE PERSID = #{persGuid}
- <include refid="orgIdSql"/> GROUP BY PERSID
- )
- else (select 'non' from dual) end)
- ||')')</if>
- <if test='status == "4"'>and A1.HST_INSP ! = '1' AND T.OBJ_ID IS NULL</if>
- </select>
- <sql id="table_columns_inte">
- ID,
- INTE_NAME,
- PERSID,
- LGTD,
- LTTD,
- INTE_TIME,
- DES
- </sql>
- <sql id="entity_properties_inte">
- #{id},
- #{inteName},
- #{persid},
- #{lgtd},
- #{lttd},
- to_date(#{inteTime},'YYYY-MM-DD HH24:MI:SS'),
- #{des}
- </sql>
- <insert id="insertInte" parameterType="cn.com.goldenwater.dcproj.model.AttInteBase">
- insert into ATT_INTE_BASE( <include refid="table_columns_inte" /> )
- values ( <include refid="entity_properties_inte" /> )
- </insert>
- <select id="getIntePage" parameterType="cn.com.goldenwater.dcproj.param.StartAndEndTimeParam" resultType="cn.com.goldenwater.dcproj.model.AttInteBase">
- SELECT ID,INTE_NAME,PERSID,LGTD,LTTD,TO_CHAR(INTE_TIME,'YYYY-MM-DD HH24:MI:SS') INTE_TIME,DES
- FROM ATT_INTE_BASE WHERE 1 = 1 AND PERSID = #{persGuid}
- <if test="name != null and name != ''">and INTE_NAME LIKE '%${name}%'</if>
- <if test="sttm != null and sttm != '' and entm != null and entm != ''">
- and INTE_TIME BETWEEN TO_DATE(#{sttm},'YYYY-MM-DD HH24:MI:SS') AND TO_DATE(#{entm},'YYYY-MM-DD HH24:MI:SS')
- ORDER BY INTE_TIME DESC
- </if>
- </select>
- <delete id="deleteInte" parameterType="String">
- DELETE FROM ATT_INTE_BASE WHERE ID = #{id}
- </delete>
- <update id="updateInte" parameterType="cn.com.goldenwater.dcproj.model.AttInteBase">
- update ATT_INTE_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="inteName != null and inteName != ''">INTE_NAME = #{inteName},</if>
- <if test="persid != null and persid != ''">PERSID = #{persid},</if>
- <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
- <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
- <if test="inteTime != null">INTE_TIME = to_date(#{inteTime},'YYYY-MM-DD HH24:MI:SS'),</if>
- <if test="des != null and des != ''">DES = #{des},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <select id="getWorkInfoByPersId" parameterType="String" resultType="cn.com.goldenwater.dcproj.model.BisInspWorkInfo">
- SELECT A.CODE,A.PTYPE "TYPE",A.NM "NAME",A.LGTD LON,A.LTTD LAT,B.PERSID "PERS_ID",A.OBJ_ID FROM
- BIS_INSP_ALL_OBJ A LEFT JOIN BIS_INSP_ALL_RLATION B ON A.ID = B.ID
- <where>
- A.obj_id not in (select obj_id from BIS_INSP_WORK_INFO o where o.type=#{ptype})
- <if test="ptype !=null and ptype !=''">
- and A.ptype=#{ptype}
- </if>
- </where>
- </select>
- <select id="getWorkDetailByPersId" parameterType="String" resultType="cn.com.goldenwater.dcproj.model.BisInspWorkInfo">
- SELECT A.CODE,A.PTYPE TYPE,A.NM NAME,A.LGTD LON,A.LTTD LAT,B.PERS_ID,B.STTM,B.ENTM,B.OBJ_ID FROM
- BIS_INSP_ALL_OBJ A JOIN BIS_INSP_WORK_INFO B ON A.OBJ_ID = B.OBJ_ID
- where B.PERS_ID=#{persId}
- </select>
- <select id="getSttmEntm" resultType="cn.com.goldenwater.dcproj.model.PersLoc">
- SELECT a.pers_id,a.pers_name,a.lon,a.latitude,a.longitude,
- a.lat,to_char(a.operate_time,'YYYY-MM-DD HH24:MI:SS') operateTime
- FROM pers_position a
- WHERE
- a.pers_id in( #{persId}) and
- SQRT(
- (((#{lon} - a.lon) * ACOS(-1) * 12656 *
- COS(((#{lon} + a.lon) / 2) * ACOS(-1) / 180) / 180) *
- ((#{lon} - a.lon) * ACOS(-1) * 12656 *
- COS(((#{lon} + a.lon) / 2) * ACOS(-1) / 180) / 180)) +
- (((#{lat} - a.lat) * ACOS(-1) * 12656 / 180) *
- ((#{lat} - a.lat) * ACOS(-1) * 12656 / 180))) < 2
- order by a.operate_time
- </select>
- <select id="getMaxSttmEntm" resultType="cn.com.goldenwater.dcproj.model.SttmEntm">
- SELECT max(a.operate_time) entm,min(a.operate_time) sttm
- FROM pers_position a
- WHERE
- a.pers_id in( #{persId}) and
- SQRT(
- (((#{lon} - a.lon) * ACOS(-1) * 12656 *
- COS(((#{lon} + a.lon) / 2) * ACOS(-1) / 180) / 180) *
- ((#{lon} - a.lon) * ACOS(-1) * 12656 *
- COS(((#{lon} + a.lon) / 2) * ACOS(-1) / 180) / 180)) +
- (((#{lat} - a.lat) * ACOS(-1) * 12656 / 180) *
- ((#{lat} - a.lat) * ACOS(-1) * 12656 / 180))) < 2
- </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="getObjRsCount" parameterType="cn.com.goldenwater.dcproj.param.GeneralInfoParam"
- resultType="cn.com.goldenwater.dcproj.dto.RsCountDto">
- select count(b.ad_code) rsCount,b.ad_code,b.ad_name,b.lgtd,b.lttd from (
- select A1.RS_CODE,
- A1.RS_NAME,
- A1.LONGITUDE,
- A1.LATITUDE,
- A1.LOCATION,
- A1.ENG_SCAL,
- A1.LIM_STAG,
- A1.TOT_CAP,
- A1.RS_ADM_NAME,
- A1.RS_ADM_CODE,
- A1.RS_ADM_DEP,
- A1.ADM_ATT_REL,
- A1.ADM_DIV,
- A1.RS_TYPE,
- A1.DAM_TYPE_MAT,
- A1.DAM_TYPE_STR,
- A1.DAM_SIZE_HIG,
- A1.CENTER_X,
- A1.CENTER_Y,
- A1.SRC,
- A1.DATA_QUALITY,
- A1.CENTER_X_GD,
- A1.CENTER_Y_GD,
- A1.RS_LOC,
- A1.REG_CODE,
- A1.COMP_DATE,
- A1.INTM,
- A1.REG_NO,
- A1.HST_INSP,
- A1.PERS_ID,
- A1.UPTM,
- A1.CHK_STATE,
- A1.EDTR_PESR,
- A1.SLPC_ADM_DIV,T.RGSTR_ID,
- A1.DISPLAY_LEVEL,
- A1.ADM_DIV_NAME,T.OBJ_ID,T.rgstrStatus rgstrStatus
- from ATT_RS_BASE A1 LEFT JOIN BIS_INSP_ALL_OBJ A2 ON A1.RS_CODE = A2.CODE
- LEFT JOIN
- (SELECT A.RS_CODE,B.OBJ_ID,C.STATE rgstrStatus,C.RGSTR_ID FROM ATT_RS_BASE A LEFT JOIN BIS_INSP_ALL_OBJ B ON
- A.RS_CODE = B.CODE
- LEFT JOIN BIS_INSP_RSVR_RGSTR C ON B.OBJ_ID = C.OBJ_ID
- ) T ON A2.CODE = T.RS_CODE
- where 1 = 1
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and
- A1.CENTER_X_GD BETWEEN #{mincenterXGd} AND #{maxcenterXGd}
- </if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and
- A1.CENTER_Y_GD BETWEEN #{mincenterYGd} AND #{maxcenterYGd}
- </if>
- <if test='status == "1"'>and A1.HST_INSP = '1' and T.OBJ_ID IS NULL</if>
- <if test='status == "2"'>and A1.HST_INSP ! = '1' AND T.OBJ_ID IS NOT NULL
- AND
- REGEXP_LIKE(
- A2.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID = #{persId}
- <include refid="orgIdSql"/>
- )>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persId}
- <include refid="orgIdSql"/> GROUP BY PERSID
- )
- else (select 'non' from dual) end)
- ||')')
- </if>
- <if test='status == "3"'>and A1.HST_INSP = '1' AND T.OBJ_ID IS NOT NULL
- AND
- REGEXP_LIKE(
- A2.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID = #{persId}
- <include refid="orgIdSql"/>
- )>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persId}
- <include refid="orgIdSql"/> group by persid
- )
- else (select 'non' from dual) end)
- ||')')
- </if>
- <if test='status == "4"'>and A1.HST_INSP ! = '1' AND T.OBJ_ID IS NULL</if>
- ) x LEFT JOIN ATT_AD_X_BASE b
- <if test="adGrad == 2">
- on concat(substr(x.ADM_DIV,0,2),'0000000000') = b.AD_code
- </if>
- <if test="adGrad == 3">
- on concat(substr(x.ADM_DIV,0,4),'00000000') = b.AD_code
- </if>
- where b.ad_Grad = ${adGrad}
- group by b.ad_code,b.ad_name,b.lgtd,b.lttd
- </select>
- <!-- 督查行政村 综合展示统计-->
- <select id="getObjVlgCount" parameterType="cn.com.goldenwater.dcproj.param.GeneralInfoParam"
- resultType="cn.com.goldenwater.dcproj.dto.RsCountDto">
- select count(b.ad_code) rsCount,b.ad_code,b.ad_name,b.lgtd,b.lttd from (
- SELECT A.VILL_ID,
- A.ENG_ID,
- A.VILLAGE_CODE,
- A.IS_POVERTY,
- A.IS_FLUEXC,
- A.IS_MTAREA,
- A.IS_CENWT_SUPPLY,
- A.WATERSUPPLY_PER,
- A.VISIT_DATE,
- A.REC_PERS_ID,
- A.REC_PERS2,
- A.REC_PERS_TEL,
- A.CREATE_TIME,
- A.UPDATE_TIME,
- A.STATUS,
- A.AD_NM,C.OBJ_ID,
- A.WAS_POVERTY,ad.LGTD lgtdPc,ad.LTTD lttdPc,ad.AD_LONG centerXGd,ad.AD_LAT centerYGd
- FROM BIS_INSP_SECSURVEY_VLG A LEFT JOIN BIS_INSP_VILL_RGSTR B ON A.ENG_ID = B.ENG_ID
- LEFT JOIN BIS_INSP_ALL_OBJ C ON B.OBJ_ID = C.OBJ_ID
- LEFT JOIN ATT_AD_X_BASE ad on A.VILLAGE_CODE = ad.AD_CODE
- WHERE 1 = 1 AND C.PTYPE = #{objType}
- AND
- REGEXP_LIKE(
- C.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID = #{persId}
- <include refid="orgIdSql"/>
- )>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persId}
- <include refid="orgIdSql"/> group by persid
- )
- else (select 'non' from dual) end)
- ||')')
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and
- ad.AD_LONG BETWEEN #{mincenterXGd} AND #{maxcenterXGd}
- </if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and
- ad.AD_LAT BETWEEN #{mincenterYGd} AND #{maxcenterYGd}
- </if>
- ) x LEFT JOIN ATT_AD_X_BASE b
- <if test="adGrad == 2">
- on concat(substr(x.VILLAGE_CODE,0,2),'0000000000') = b.AD_code
- </if>
- <if test="adGrad == 3">
- on concat(substr(x.VILLAGE_CODE,0,4),'00000000') = b.AD_code
- </if>
- where b.ad_Grad = ${adGrad}
- group by b.ad_code,b.ad_name,b.lgtd,b.lttd
- </select>
- <select id="getObjCwsCount" parameterType="cn.com.goldenwater.dcproj.param.GeneralInfoParam"
- resultType="cn.com.goldenwater.dcproj.dto.RsCountDto">
- select count(b.ad_code) rsCount,b.ad_code,b.ad_name,b.lgtd,b.lttd from (
- SELECT A.GUID,
- A.CWS_CODE,
- A.CWS_NAME,
- A.CWS_LONG,
- A.CWS_LAT,
- A.CWS_LOC,
- A.ENG_TYPE,
- A.WASU_TYPE,
- A.WASU_RANG,
- A.DES_WASU_SCAL,
- A.DES_WASU_POP,
- A.ENG_STAT,
- A.START_DATE,
- A.COMP_DATE,
- A.NOTE,
- A.EFF_DATE,
- A.EXPR_DATE,
- A.ADDVCD,
- A.CENTER_X_GD,
- A.CENTER_Y_GD,
- A.INTM,
- A.EDTR_PESR,
- A.UPTM,C.OBJ_ID,
- A.CHK_STATE FROM ATT_CWS_BASE A
- LEFT JOIN BIS_INSP_ALL_OBJ C ON A.ADDVCD = C.CODE
- WHERE 1 = 1 AND C.PTYPE = #{objType}
- AND
- REGEXP_LIKE(
- C.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID = #{persId}
- <include refid="orgIdSql"/>
- )>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persId}
- <include refid="orgIdSql"/> group by persid
- )
- else (select 'non' from dual) end)
- ||')')
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and
- A.CENTER_X_GD BETWEEN #{mincenterXGd} AND #{maxcenterXGd}
- </if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and
- A.CENTER_Y_GD BETWEEN #{mincenterYGd} AND #{maxcenterYGd}
- </if>
- ) x LEFT JOIN ATT_AD_X_BASE b
- <if test="adGrad == 2">
- on concat(substr(x.ADDVCD,0,2),'0000000000') = b.AD_code
- </if>
- <if test="adGrad == 3">
- on concat(substr(x.ADDVCD,0,4),'00000000') = b.AD_code
- </if>
- where b.ad_Grad = ${adGrad}
- group by b.ad_code,b.ad_name,b.lgtd,b.lttd
- </select>
- <select id="getObjPspCount" parameterType="cn.com.goldenwater.dcproj.param.GeneralInfoParam"
- resultType="cn.com.goldenwater.dcproj.dto.RsCountDto">
- select count(b.ad_code) rsCount,b.ad_code,b.ad_name,b.lgtd,b.lttd from (
- SELECT A.ENG_SUR_ID,
- A.ENG_ID,
- A.WATER_SOURCE_NM,
- A.VILLAGE_NM,
- A.CWS_CODE,
- A.PLAN_INS_AMOUNT,
- A.SOURCE_TYPE,
- A.IS_PROTECT_AREA,
- A.WATER_QUALITY,
- A.IS_PROTECT_MARK,
- A.IS_POLL_SOURCE,
- A.IS_SPARE,
- A.VISIT_DATE,
- A.REC_PERS_ID,
- A.REC_PERS2,
- A.REC_PERS_TEL,
- A.CREATE_TIME,
- A.UPDATE_TIME,
- A.STATUS,
- A.WTSR_CD,
- A.PRO_PLBM,
- A.MK_PLBM,
- A.POLL_PLBM,
- A.SP_PLBM,
- A.LGTD,
- A.LTTD,
- A.LGTD centerXGd,
- A.LTTD centerYGd,
- A.LGTDPC lgtdPc,
- A.LTTDPC lttdPc,C.OBJ_ID,c.code,
- A.POLL_NOTE FROM BIS_INSP_PRO_SOURCE_PROTECT A LEFT JOIN BIS_INSP_VILL_RGSTR B ON A.ENG_ID = B.ENG_ID
- LEFT JOIN BIS_INSP_ALL_OBJ C ON B.OBJ_ID = C.OBJ_ID
- WHERE 1 = 1 AND C.PTYPE = #{objType} AND B.ENG_ID IS NOT NULL
- AND
- REGEXP_LIKE(
- C.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID = #{persId} <include refid="orgIdSql"/>)>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persId} <include refid="orgIdSql"/> group by persid)
- else (select 'non' from dual) end)
- ||')')
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and
- A.LGTD BETWEEN #{mincenterXGd} AND #{maxcenterXGd}
- </if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and
- A.LTTD BETWEEN #{mincenterYGd} AND #{maxcenterYGd}
- </if>
- ) x LEFT JOIN ATT_AD_X_BASE b
- <if test="adGrad == 2">
- on concat(substr(x.code,0,2),'0000000000') = b.AD_code
- </if>
- <if test="adGrad == 3">
- on concat(substr(x.code,0,4),'00000000') = b.AD_code
- </if>
- where b.ad_Grad = ${adGrad}
- group by b.ad_code,b.ad_name,b.lgtd,b.lttd
- </select>
- <select id="getObjAdBaseCount" parameterType="cn.com.goldenwater.dcproj.param.GeneralInfoParam"
- resultType="cn.com.goldenwater.dcproj.dto.RsCountDto">
- select count(b.ad_code) rsCount,b.ad_code,b.ad_name,b.lgtd,b.lttd from (
- SELECT * FROM BIS_INSP_ALL_OBJ A LEFT JOIN ATT_AD_BASE B ON A.CODE = B.AD_CODE
- WHERE A.PTYPE = '2'
- AND
- REGEXP_LIKE(
- A.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID = #{persId} <include refid="orgIdSql"/>)>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persId} <include refid="orgIdSql"/> group by persid)
- else (select 'non' from dual) end)
- ||')')
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and
- B.AD_LONG BETWEEN #{mincenterXGd} AND #{maxcenterXGd}
- </if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and
- B.AD_LAT BETWEEN #{mincenterYGd} AND #{maxcenterYGd}
- </if>
- ) x LEFT JOIN ATT_AD_X_BASE b
- <if test="adGrad == 2">
- on concat(substr(x.code,0,2),'0000000000') = b.AD_code
- </if>
- <if test="adGrad == 3">
- on concat(substr(x.code,0,4),'00000000') = b.AD_code
- </if>
- where b.ad_Grad = ${adGrad}
- group by b.ad_code,b.ad_name,b.lgtd,b.lttd
- </select>
- <select id="getObjWtdstCount" parameterType="cn.com.goldenwater.dcproj.param.GeneralInfoParam"
- resultType="cn.com.goldenwater.dcproj.dto.RsCountDto">
- select count(b.ad_code) rsCount,b.ad_code,b.ad_name,b.lgtd,b.lttd from (
- SELECT A.WTDST_ID,
- A.WTDST_TYPE,
- A.WTDST_NM,
- A.WTDST_STATE,
- A.LOC_AD,
- A.WTDST_DTLE,
- A.WTDST_WRKAM,
- A.PLAN_RCVR_TM,
- A.INTM,
- A.UPTM,
- A.NOTE,
- A.WTDST_LGTD,
- A.WTDST_LTTD,
- A.LOC_NM,B.ID,
- A.CENTER_X_GD,
- A.CENTER_Y_GD,
- B.NM,
- B.PTYPE,
- B.LGTD,
- B.LTTD,AD.AD_NAME adName,
- B.OBJ_ID,
- TR.AD_NM
- FROM BIS_INSP_WTDST A LEFT JOIN BIS_INSP_ALL_OBJ B ON A.WTDST_ID = B.CODE
- LEFT JOIN ATT_AD_BASE AD ON A.LOC_AD = AD.AD_CODE
- LEFT JOIN BIS_INSP_WTDST_TRACK TR ON B.OBJ_ID = TR.OBJ_ID
- WHERE B.PTYPE = #{objType} AND
- <!--
- REGEXP_LIKE(
- B.Id,'^('||(SELECT LISTAGG(id, '|') WITHIN GROUP(ORDER BY PERSID) as id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persGuid})||')'
- )
- -->
- REGEXP_LIKE(
- B.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID =#{persId} <include refid="orgIdSql"/>)>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID =#{persId} <include refid="orgIdSql"/> group by persid)
- else (select 'non' from dual) end)
- ||')')
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and
- A.CENTER_X_GD BETWEEN #{mincenterXGd} AND #{maxcenterXGd}
- </if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and
- A.CENTER_Y_GD BETWEEN #{mincenterYGd} AND #{maxcenterYGd}
- </if>
- ) x LEFT JOIN ATT_AD_X_BASE b
- <if test="adGrad == 2">
- on concat(substr(x.LOC_AD,0,2),'0000000000') = b.AD_code
- </if>
- <if test="adGrad == 3">
- on concat(substr(x.LOC_AD,0,4),'00000000') = b.AD_code
- </if>
- where b.ad_Grad = ${adGrad}
- group by b.ad_code,b.ad_name,b.lgtd,b.lttd
- </select>
- <select id="getObjEmpwtCount" parameterType="cn.com.goldenwater.dcproj.param.GeneralInfoParam"
- resultType="cn.com.goldenwater.dcproj.dto.RsCountDto">
- select count(b.ad_code) rsCount,b.ad_code,b.ad_name,b.lgtd,b.lttd from (
- select A1.*,
- T.OBJ_ID,T.rgstrStatus rgstrStatus from ATT_EMPWTPRJ_BASE A1
- LEFT JOIN BIS_INSP_ALL_OBJ A2 ON A1.ID = A2.CODE
- LEFT JOIN
- (SELECT A.ID,B.OBJ_ID,C.STATE rgstrStatus,C.ID RGSTR_ID FROM ATT_EMPWTPRJ_BASE A LEFT JOIN BIS_INSP_ALL_OBJ B ON
- A.ID = B.CODE
- LEFT JOIN BIS_INSP_KEY_REGISTER C ON B.OBJ_ID = C.OBJ_ID
- ) T ON A2.CODE = T.ID WHERE 1 = 1
- <if test="engSta != null and engSta != ''">and A1.ENG_STA = #{engSta}</if>
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and
- A1.LGTD BETWEEN #{mincenterXGd} AND #{maxcenterXGd}
- </if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and
- A1.LTTD BETWEEN #{mincenterYGd} AND #{maxcenterYGd}
- </if>
- <if test='status == "1"'>and A1.HST_INSP = '1' and T.OBJ_ID IS NULL</if>
- <if test='status == "2"'>and A1.HST_INSP ! = '1' AND T.OBJ_ID IS NOT NULL
- AND
- REGEXP_LIKE(
- A2.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID = #{persId} <include refid="orgIdSql"/>)>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persId} <include refid="orgIdSql"/> group by persid)
- else (select 'non' from dual) end)
- ||')')
- </if>
- <if test='status == "3"'>and A1.HST_INSP = '1' AND T.OBJ_ID IS NOT NULL
- AND
- REGEXP_LIKE(
- A2.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID = #{persId} <include refid="orgIdSql"/>)>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persId} <include refid="orgIdSql"/> group by persid)
- else (select 'non' from dual) end)
- ||')')
- </if>
- <if test='status == "4"'>and A1.HST_INSP ! = '1' AND T.OBJ_ID IS NULL</if>
- ) x LEFT JOIN ATT_AD_X_BASE b
- <if test="adGrad == 2">
- on concat(substr(x.AD_CODE,0,2),'0000000000') = b.AD_code
- </if>
- <if test="adGrad == 3">
- on concat(substr(x.AD_CODE,0,4),'00000000') = b.AD_code
- </if>
- where b.ad_Grad = ${adGrad}
- group by b.ad_code,b.ad_name,b.lgtd,b.lttd
- </select>
- <select id="getObjWagaCount" parameterType="cn.com.goldenwater.dcproj.param.GeneralInfoParam"
- resultType="cn.com.goldenwater.dcproj.dto.RsCountDto">
- select count(b.ad_code) rsCount,b.ad_code,b.ad_name,b.lgtd,b.lttd from (
- SELECT A.OBJ_CODE,
- A.GATE_NAME,
- A.AD_CODE,
- A.LOC_RV_NAME,
- A.GATE_TYPE,
- A.GATE_FLOW,
- A.ENG_SCAL,
- A.FL_GATE_FLOW,
- A.DES_FL_STA,
- A.CHE_FL_STA,
- A.CHE_GATE_FLOW,
- A.CHE_DES_FL_STA,
- A.CHE_CHE_FL_STA,
- A.DRA_GATE_FLOW,
- A.DRA_DES_FL_STA,
- A.DRA_CHE_FL_STA,
- A.IF_DRA_DOU,
- A.INT_GATE_FLOW,
- A.INT_DES_FL_STA,
- A.INT_CHE_FL_STA,
- A.INT_DIV_AB,
- A.INT_USE,
- A.INT_USE_IRR_NAME,
- A.IF_INT_DOU,
- A.TIDE_GATE_FLOW,
- A.TIDE_DES_STA,
- A.TIDE_CHE_STA,
- A.IF_GATE,
- A.IF_DOU_DILE,
- A.ENG_STA,
- A.BUID_TIME_YEAR,
- A.BUID_TIME_MON,
- A.STA_TIME_YEAR,
- A.STA_TIME_MON,
- A.ENG_GRAD,
- A.MAIN_CON_GRAD,
- A.HOLE_NUM,
- A.HOLE_WID,
- A.SUB_GATE_NUM,
- A.SUB_GATE_WID,
- A.LOCATION_XIANG,
- A.LOCATION_CUN,
- A.GATE_ADM_NAME,
- A.GATE_ADM_DEP,
- A.IF_DEM,
- A.IF_AFF_RI,
- A.ADM_ATT_REL,
- A.CENTER_X,
- A.CENTER_Y,
- A.GD_X,B.OBJ_ID,B.ID groupId,C.ID rgstrId,
- A.GD_Y FROM ATT_WAGA_BASE A LEFT JOIN BIS_INSP_ALL_OBJ B ON A.OBJ_CODE = B.CODE
- LEFT JOIN ATT_WAGA_RGSTR C ON B.OBJ_ID = C.OBJ_ID
- WHERE B.PTYPE = #{objType} AND
- <!--
- REGEXP_LIKE(
- B.Id,'^('||(SELECT LISTAGG(id, '|') WITHIN GROUP(ORDER BY PERSID) as id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persGuid})||')'
- )
- -->
- REGEXP_LIKE(
- B.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID =#{persId} <include refid="orgIdSql"/>)>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID =#{persId} <include refid="orgIdSql"/> group by persid)
- else (select 'non' from dual) end)
- ||')')
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and
- A.GD_X BETWEEN #{mincenterXGd} AND #{maxcenterXGd}
- </if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and
- A.GD_Y BETWEEN #{mincenterYGd} AND #{maxcenterYGd}
- </if>
- ) x LEFT JOIN ATT_AD_X_BASE b
- <if test="adGrad == 2">
- on concat(substr(x.AD_CODE,0,2),'0000000000') = b.AD_code
- </if>
- <if test="adGrad == 3">
- on concat(substr(x.AD_CODE,0,4),'00000000') = b.AD_code
- </if>
- where b.ad_Grad = ${adGrad}
- group by b.ad_code,b.ad_name,b.lgtd,b.lttd
- </select>
- <select id="getBaseList" resultType="cn.com.goldenwater.dcproj.dto.BisInspBaseListDto" parameterType="cn.com.goldenwater.dcproj.param.GeneralInfoParam">
- select * from VIEW_BASE_LIST t where t.objType = #{objType}
- <if test="name != null and name != ''"> and t.nm like '%${name}%'</if>
- <if test="adCode != null and adCode != ''">
- and t.adCode like '${adCode}%'
- </if>
- <if test="maxLgtd != null and maxLgtd != '' and minLgtd != null and minLgtd != ''">and t.PCX BETWEEN
- #{minLgtd} AND #{maxLgtd}
- </if>
- <if test="maxLttd != null and maxLttd != '' and minLttd != null and minLttd != ''">and t.PCY BETWEEN
- #{minLttd} AND #{maxLttd}
- </if>
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and
- t.GDX BETWEEN #{mincenterXGd} AND #{maxcenterXGd}
- </if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and
- t.GDY BETWEEN #{mincenterYGd} AND #{maxcenterYGd}
- </if>
- <if test="displayLevel != null and displayLevel != ''">
- AND to_number(t.DISPLAY_LEVEL) <= to_number(#{displayLevel})
- </if>
- </select>
- <select id="getObjTypeList" parameterType="cn.com.goldenwater.dcproj.param.GeneralInfoParam"
- resultType="cn.com.goldenwater.dcproj.model.AttInspType">
- select * FROM ATT_INSP_TYPE
- where code IN (select rot.INSP_TYPE FROM REL_ORG_INSP_TYPE rot
- <where>
- <if test="orgId != null and orgId != '' ">
- AND rot.ORG_ID = #{orgId}
- </if>
- </where>
- )
- </select>
- <resultMap type="cn.com.goldenwater.dcproj.vo.BisInspPblmMapVo" id="BisInspPblmVoMap">
- <result property="pblmsTypeId" column="PBLMS_TYPE_ID"/>
- <result property="regid" column="REGID"/>
- <result property="commonFileIds" column="COMMON_FILE_IDS"/>
- <result property="fileNo" column="FILE_NO"/>
- <result property="fileNoNumber" column="FILE_NO_NUMBER"/>
- <result property="pblmsId" column="PBLMS_ID"/>
- <result property="pblmId" column="PBLM_ID"/>
- <result property="quote" column="QUOTE"/>
- <result property="waterUserId" column="WATER_USER_ID"/>
- <result property="objId" column="OBJ_ID"/>
- <result property="objType" column="OBJ_TYPE"/>
- <result property="inspGroupId" column="INSP_GROUP_ID"/>
- <result property="pguid" column="PGUID"/>
- <result property="inspPblmType" column="INSP_PBLM_TYPE"/>
- <result property="inspPblmCode" column="INSP_PBLM_CODE"/>
- <result property="inspPblmName" column="INSP_PBLM_NAME"/>
- <result property="inspPblmDesc" column="INSP_PBLM_DESC"/>
- <result property="inspAddDesc" column="INSP_ADD_DESC"/>
- <result property="pblmLong" column="PBLM_LONG"/>
- <result property="pblmLat" column="PBLM_LAT"/>
- <result property="ifCasePblm" column="IF_CASE_PBLM"/>
- <result property="inspPblmOrgName" column="INSP_PBLM_ORG_NAME"/>
- <result property="pblmPersName" column="PBLM_PERS_NAME"/>
- <result property="inspPblmCate" column="INSP_PBLM_CATE"/>
- <result property="pblmStat" column="PBLM_STAT"/>
- <result property="reviOpin" column="REVI_OPIN"/>
- <result property="reviConc" column="REVI_CONC"/>
- <result property="reviOrgGuid" column="REVI_ORG_GUID"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="collTime" column="COLL_TIME"/>
- <result property="villType" column="VILL_TYPE"/>
- <result property="recPers" column="REC_PERS"/>
- <result property="note" column="NOTE"/>
- <result property="persName" column="PERS_NAME"/>
- <result property="inspPblmsName" column="insp_pblms_name"/>
- <result property="checkPoint" column="check_point"/>
- <result property="nm" column="nm"/>
- <result property="objNm" column="obj_nm"/>
- <result property="cwsName" column="cws_name"/>
- <result property="cwsCode" column="CWS_CODE"/>
- <result property="villageCode" column="VILLAGE_CODE"/>
- <result property="pblmDesc" column="pblm_desc"/>
- <result property="state" column="state"/>
- <result property="code" column="CODE"/>
- <result property="adFullName" column="AD_FULL_NAME"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="orgNm" column="ORG_NM"/>
- <result property="orgId" column="ORG_ID"/>
- <result property="rsName" column="rs_name"/>
- <result property="hasVedio" column="HAS_VEDIO"/>
- <result property="problemType" column="PROBLEM_TYPE"/>
- <result property="nature" column="NATURE"/>
- <result property="reviOrg" column="revi_org"/>
- <result property="qualityTypeId" column="QUALITY_TYPE_ID"/>
- <result property="defectTypeId" column="DEFECT_TYPE_ID"/>
- <result property="fdbkId" column="FDBK_ID"/>
- <result property="unitNm" column="unit_nm"/>
- <result property="itemId" column="ITEM_ID"/>
- <result property="snNum" column="sn_num"/>
- <result property="attach" column="attach"/>
- <result property="sheet" column="sheet"/>
- <result property="engScal" column="eng_scal"/>
- <result property="wagaScal" column="waga_Scal"/>
- <result property="gateType" column="gate_type"/>
- <result property="sttp" column="sttp"/>
- <result property="rePtype" column="re_ptype"/>
- <result property="pnm" column="pnm"/>
- <result property="oid" column="oid"/>
- <result property="uptm" column="UP_TM"/>
- <result property="pblmNameBz" column="PBLM_NAME_BZ"/>
- <result property="checkPointBz" column="CHECK_POINT_BZ"/>
- <result property="checkPoint" column="CHECK_POINT"/>
- <result property="snNumBz" column="SN_NUM_BZ"/>
- <result property="pblmDescBz" column="PBLM_DESC_BZ"/>
- <result property="pblmReason" column="PBLM_REASON"/>
- <result property="pblmSggtn" column="PBLM_SGGTN"/>
- <result property="gongdiBzId" column="GONGDI_BZ_ID"/>
- <result property="objCode" column="OBJ_CODE"/>
- <result property="objName" column="OBJ_NAME"/>
- <result property="objAdCode" column="OBJ_AD_CODE"/>
- <result property="attachBz" column="attach_bz"/>
- <result property="wtdstNote" column="WTDST_NOTE"/>
- <result property="score" column="SCORE"/>
- <result property="provincial" column="PROVINCIAL"/>
- <result property="belongOrgId" column="BELONG_ORG_ID"/>
- <result property="belongAdCode" column="BELONG_AD_CODE"/>
- <!-- pblist -->
- <result property="id" column="ID"/>
- <result property="dutyName" column="DUTY_NAME"/>
- <result property="pblmClassify" column="PBLM_CLASSIFY"/>
- <result property="pblmNub" column="PBLM_NUB"/>
- <result property="pblmNubName" column="PBLM_NUB_NAME"/>
- <result property="pblmNo" column="PBLM_NO"/>
- <result property="pblmAdName" column="PBLM_AD_NAME"/>
- <result property="pblmTm" column="PBLM_TM"/>
- <result property="pblmCrtm" column="PBLM_CRTM"/>
- <result property="isRect" column="IS_RECT"/>
- <result property="pblmPltm" column="PBLM_PLTM"/>
- <result property="pblmActm" column="PBLM_ACTM"/>
- <result property="crtState" column="CRT_STATE"/>
- <result property="crtInfo" column="CRT_INFO"/>
- <result property="crtNote" column="CRT_NOTE"/>
- <result property="pblmState" column="PBLM_STATE"/>
- <result property="pblmOut" column="PBLM_OUT"/>
- <result property="sendOrgId" column="SEND_ORG_ID"/>
- <result property="sendOrgName" column="SEND_ORG_NAME"/>
- <result property="recvOrgId" column="RECV_ORG_ID"/>
- <result property="recvOrgName" column="RECV_ORG_NAME"/>
- <result property="tranOrgId" column="TRAN_ORG_ID"/>
- <result property="tranOrgName" column="TRAN_ORG_NAME"/>
- <result property="persId" column="PERS_ID"/>
- <result property="plIntm" column="PL_INTM"/>
- <result property="plDataStat" column="PL_DATA_STAT"/>
- <result property="isStart" column="IS_START"/>
- <result property="impSource" column="IMP_SOURCE"/>
- <result property="isSite" column="IS_SITE"/>
- <result property="chkDept" column="CHK_DEPT"/>
- <result property="dcBatch" column="DC_BATCH"/>
- <result property="selfInspProcessState" column="SELF_INSP_PROCESS_STATE"/>
- <result property="damRegCode" column="DAM_REG_CODE"/>
- <result property="reviewStat" column="REVIEW_STAT"/>
- <result property="reviewResult" column="REVIEW_RESULT"/>
- <result property="reviewNote" column="REVIEW_NOTE"/>
- <result property="reviewTm" column="REVIEW_TM"/>
- </resultMap>
- <select id="selectPblmListByObjType" parameterType="cn.com.goldenwater.dcproj.param.GeneralInfoParam" resultMap="BisInspPblmVoMap">
- select p.*,
- pl.ID,
- pl.DUTY_NAME,
- pl.PBLM_CLASSIFY,
- pl.PBLM_NUB,
- pl.PBLM_NUB_NAME,
- pl.PBLM_NO,
- pl.PBLM_AD_NAME,
- pl.PBLM_TM,
- pl.PBLM_CRTM,
- pl.IS_RECT,
- pl.PBLM_PLTM,
- pl.PBLM_ACTM,
- pl.CRT_STATE,
- pl.CRT_INFO,
- pl.CRT_NOTE,
- pl.PBLM_STATE,
- pl.PBLM_OUT,
- pl.SEND_ORG_ID,
- pl.SEND_ORG_NAME,
- pl.RECV_ORG_ID,
- pl.RECV_ORG_NAME,
- pl.TRAN_ORG_ID,
- pl.TRAN_ORG_NAME,
- pl.PERS_ID,
- pl.INTM as PL_INTM,
- pl.DATA_STAT as PL_DATA_STAT,
- pl.IS_START,
- pl.IMP_SOURCE,
- pl.IS_SITE,
- pl.CHK_DEPT,
- pl.DC_BATCH,
- pl.SELF_INSP_PROCESS_STATE,
- pl.DAM_REG_CODE,
- pl.REVIEW_STAT,
- pl.REVIEW_RESULT,
- pl.REVIEW_NOTE,
- pl.REVIEW_TM
- from BIS_INSP_PBLM p
- left join BIS_INSP_PBLM_PLIST pl on pl.PBLM_ID = p.PBLM_ID
- <where>
- <if test="adCode != null and adCode != ''">and p.OBJ_AD_CODE like '${adCode}%'</if>
- <if test="startTime != null and startTime != ''">AND p.COLL_TIME >= TO_DATE(#{startTime},'YYYY-MM-DD')</if>
- <if test="endTime != null and endTime != ''">AND p.COLL_TIME < TO_DATE(#{endTime},'YYYY-MM-DD')+1</if>
- <if test="lv != null and lv != ''">AND p.INSP_PBLM_CATE = #{lv}</if>
- <if test="objType != null and objType != ''">and p.OBJ_TYPE = #{objType}</if>
- </where>
- ORDER BY p.OBJ_AD_CODE, p.OBJ_TYPE, p.OBJ_NAME
- </select>
- </mapper>
|