| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245 |
- <?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.SupervisionPlanDao">
- <sql id="choseSql">
- <choose>
- <when test="province !=null and province !=''">
- and B.ad_code like '${province}%'
- </when>
- <otherwise>
- and B.ad_code is null
- </otherwise>
- </choose>
- </sql>
- <sql id="baseChoseSql">
- <choose>
- <when test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </when>
- <otherwise>
- and t.ad_code is null
- </otherwise>
- </choose>
- </sql>
- <select id="getNodeByPersid" resultType="cn.com.goldenwater.dcproj.dto.AllNodeDto">
- SELECT A.ID,A.PID,A.PNM NM FROM BIS_INSP_ALL A LEFT JOIN BIS_INSP_ALL_RLATION B ON A.ID = B.ID
- WHERE B.PERSID = #{persid} and A.ID LIKE '${ptype}%'
- <include refid="choseSql"/>
- </select>
- <select id="getAllInfoByPersidAndOrgId" resultType="cn.com.goldenwater.dcproj.dto.PersAllInfoDto">
- SELECT DISTINCT A.ID,A.PID,A.ORG_ID,A.YEAR_TASK_ID INSP_TASK,A.PNM NM,SUBSTR(A.ID,0,3) PTYPE,TO_CHAR(A.STTM,'YYYY-MM-DD')
- STTM,TO_CHAR(A.ENTM,'YYYY-MM-DD') ENTM ,BIPY.CHK_NAME,BIPY.CHK_TYPE FROM BIS_INSP_ALL A
- LEFT JOIN BIS_INSP_PLAN_YEAR BIPY ON BIPY.ID = A.YEAR_TASK_ID
- LEFT JOIN BIS_INSP_ALL_RLATION B ON A.ID = B.ID
- WHERE A.ID LIKE '${orgIdStr}%' AND LENGTH(A.ID) = 12
- <if test="inspYear != null and inspYear != ''">AND A.INSP_YEAR = #{inspYear}</if>
- <if test="inspMnth != null and inspMnth != ''">AND A.INSP_MNTH = #{inspMnth}</if>
- <if test="yearPlanId !=null and yearPlanId != ''">AND A.YEAR_TASK_ID = #{yearPlanId}</if>
- <!--
- AND REGEXP_LIKE(
- A.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION B WHERE PERSID = #{persid} and B.type=#{inspType}
- <include refid="choseSql"/>
- )>0 then
- (SELECT LISTAGG(id, '|') WITHIN GROUP(ORDER BY PERSID) as
- id FROM BIS_INSP_ALL_RLATION B WHERE PERSID = #{persid} and B.type=#{inspType} <include refid="choseSql"/> )
- else (select 'non' from dual) end)
- ||')')
- -->
- ORDER BY A.ID
- </select>
- <select id="getPersAllDtoList" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.PersAllDto">
- select A.GUID,A.PERS_NAME,B.PERTYPE persType from BIS_INSP_ALL_RLATION_PERS A LEFT JOIN BIS_INSP_ALL_RLATION B
- ON A.GUID = B.PERSID
- WHERE B.ID = #{id}
- <include refid="choseSql"/>
- </select>
- <select id="getPersAllObjDtoList" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.PersAllObjDto">
- select B.CODE,B.NM name,B.PTYPE,B.OBJ_ID from BIS_INSP_ALL_OBJ B WHERE B.ID = #{id}
- <include refid="choseSql"/>
- </select>
- <select id="getPersAllAreaDtoList" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.PersAllAreaDto">
- select A.AD_CODE,A.AD_NAME from BIS_INSP_SEL_AREA A WHERE A.ID = #{id}
- <choose>
- <when test="province !=null and province !=''">
- AND A.ORG_ID=#{orgId}
- </when>
- <otherwise>
- AND A.ORG_ID is null
- </otherwise>
- </choose>
- </select>
- <select id="getNode" resultType="cn.com.goldenwater.dcproj.dto.AllNodeDto">
- SELECT A.ID,A.PID,A.PNM NM FROM BIS_INSP_ALL A WHERE A.ID LIKE '${id}%' AND LENGTH(A.ID) = 9
- </select>
- <select id="getNodeById" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.AllNodeDto">
- SELECT A.ID,A.PID,A.PNM NM FROM BIS_INSP_ALL A WHERE A.ID = #{id}
- </select>
- <select id="getSupResByGroup" parameterType="cn.com.goldenwater.dcproj.param.InGroupResParam"
- resultType="cn.com.goldenwater.dcproj.dto.AttSupResBase">
- SELECT distinct *
- FROM (SELECT A.rs_code code,
- A.rs_name as name,
- A.rs_name as nm,
- case when B.state is not null then B.state else '0' end state,
- case when B.state is not null then B.state else '0' end hst_insp,
- A.RS_NAME,
- A.BUILD_STAT,
- A.LONGITUDE,
- A.LATITUDE,
- A.LOCATION,
- A.ENG_SCAL,
- A.LIM_STAG,
- A.TOT_CAP,
- A.RS_ADM_NAME,
- A.RS_ADM_CODE,
- A.RS_ADM_DEP,
- A.ADM_ATT_REL,
- A.ADM_DIV,
- A.ADM_DIV AS AD_CODE,
- A.RS_TYPE,
- A.DAM_TYPE_MAT,
- A.DAM_TYPE_STR,
- A.DAM_SIZE_HIG,
- A.CENTER_X,
- A.CENTER_Y,
- A.SRC,
- A.DATA_QUALITY,
- A.CENTER_X_GD,
- A.CENTER_Y_GD,
- A.RS_LOC,
- A.REG_CODE,
- A.COMP_DATE,
- A.INTM,
- A.REG_NO,
- A.PERS_ID,
- A.UPTM,
- A.CHK_STATE,
- A.EDTR_PESR,
- A.SLPC_ADM_DIV,
- A.ADM_DIV_NAME,
- A.ADM_DIV_NAME AS AD_NAME,
- AD.AD_FULL_NAME,
- A.PROVINCIAL
- FROM ATT_RS_BASE A
- LEFT JOIN (
- SELECT a.RS_CODE, '1' as state
- FROM ATT_RS_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o
- where o.code = a.RS_CODE
- and o.ptype = #{pType}
- and to_char(o.OBJ_INTM,'yyyy')=to_char(sysdate,'yyyy')
- )
- ) B ON A.RS_CODE = B.RS_CODE
- LEFT JOIN ATT_AD_BASE AD ON AD.AD_CODE = A.ADM_DIV
- WHERE
- A.RS_CODE NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ B
- WHERE ID = #{groupId}
- AND PTYPE = #{pType}
- <include refid="choseSql"/>
- )
- ) c
- <where>
- <if test="province !=null and province !=''">and adm_div like '${province}%'</if>
- <if test="adnm != null and adnm != ''">and ADM_DIV_NAME LIKE '%${adnm}%'</if>
- <if test="rsName != null and rsName != ''">and RS_NAME LIKE '%${rsName}%'</if>
- <if test="nm != null and nm != ''">and RS_NAME LIKE '%${nm}%'</if>
- <if test="engScal != null and engScal != ''">and ENG_SCAL IN (${engScal})</if>
- <if test="adcd != null and adcd != ''">and ${adcd}</if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- <if test="isSupn != null and isSupn != ''">and state = #{isSupn}</if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy} ,</if>
- code asc
- </select>
- <select id="getSupResStndByGroup" parameterType="cn.com.goldenwater.dcproj.param.InGroupResParam"
- resultType="cn.com.goldenwater.dcproj.dto.AttSupResBase">
- SELECT distinct *
- FROM (SELECT A.rs_code code,
- A.rs_name as 'name',
- A.rs_name as nm,
- A.rs_name,
- A.longitude,
- A.latitude,
- A.location,
- A.eng_scal,
- A.lim_stag,
- A.tot_cap,
- A.rs_adm_name,
- A.rs_adm_code,
- A.rs_adm_dep,
- A.adm_att_rel,
- A.adm_div,
- A.rs_type,
- A.dam_type_mat,
- A.dam_type_str,
- A.dam_size_hig,
- A.center_x,
- A.center_y,
- A.src,
- A.data_quality,
- A.center_x_gd,
- A.center_y_gd,
- A.rs_loc,
- A.reg_code,
- A.comp_date,
- A.intm,
- A.reg_no,
- A.hst_insp,
- A.pers_id,
- A.uptm,
- A.chk_state,
- A.edtr_pesr,
- A.slpc_adm_div,
- A.adm_div_name,
- case when b.code is null then '0' else '1' end
- STATE
- FROM ATT_RS_BASE A
- LEFT JOIN (select * from BIS_INSP_ALL_OBJ B where 1=1
- <include refid="choseSql"/>
- ) B
- ON A.rs_code = B.CODE
- WHERE A.RS_CODE NOT IN (SELECT CODE
- FROM BIS_INSP_ALL_OBJ B
- WHERE ID = #{groupId}
- AND PTYPE = #{pType}
- <include refid="choseSql"/>
- )
- <if test="province !=null and province !=''">
- and A.adm_div like '${province}%'
- </if>
- <if test="adnm != null and adnm != ''">and A.ADM_DIV_NAME LIKE '%${adnm}%'</if>
- <if test="rsName != null and rsName != ''">and A.RS_NAME LIKE '%${rsName}%'</if>
- <if test="engScal != null and engScal != ''">and A.ENG_SCAL IN (${engScal})</if>
- <if test="adcd != null and adcd != ''">and ${adcd}</if>
- ) c
- WHERE 1 = 1
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy} ,</if>
- code asc
- </select>
- <select id="getSupResRsmlByGroup" parameterType="cn.com.goldenwater.dcproj.param.InGroupResParam"
- resultType="cn.com.goldenwater.dcproj.dto.AttSupResBase">
- SELECT distinct *
- FROM (SELECT A.rs_code code,
- A.rs_name as name,
- A.rs_name as nm,
- A.rs_name,
- A.longitude,
- A.latitude,
- A.location,
- A.eng_scal,
- A.lim_stag,
- A.tot_cap,
- A.rs_adm_name,
- A.rs_adm_code,
- A.rs_adm_dep,
- A.adm_att_rel,
- A.adm_div,
- A.rs_type,
- A.dam_type_mat,
- A.dam_type_str,
- A.dam_size_hig,
- A.center_x,
- A.center_y,
- A.src,
- A.data_quality,
- A.center_x_gd,
- A.center_y_gd,
- A.rs_loc,
- A.reg_code,
- A.comp_date,
- A.intm,
- A.reg_no,
- A.hst_insp,
- A.pers_id,
- A.uptm,
- A.chk_state,
- A.edtr_pesr,
- A.slpc_adm_div,
- A.adm_div_name,
- case when b.state is null then '0' else b.state end STATE
- FROM ATT_RS_BASE A
- LEFT JOIN (
- SELECT a.rs_code, '1' as state
- FROM ATT_RS_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.rs_code and o.ptype = #{pType})
- ) B ON A.rs_code = B.rs_code
- WHERE A.RS_CODE NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ B WHERE ID = #{groupId} AND PTYPE = #{pType})
- <if test="province !=null and province !=''">and A.adm_div like '${province}%'</if>
- <if test="adnm != null and adnm != ''">and A.ADM_DIV_NAME LIKE '%${adnm}%'</if>
- <if test="rsName != null and rsName != ''">and A.RS_NAME LIKE '%${rsName}%'</if>
- <if test="engScal != null and engScal != ''">and A.ENG_SCAL IN (${engScal})</if>
- <if test="adcd != null and adcd != ''">and ${adcd}</if>
- ) c
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy} ,</if>
- code asc
- </select>
- <!--查询不在范围内的对象-->
- <select id="getSupRivListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.AttSupResBase">
- select RS_CODE code,
- RS_NAME as name,
- RS_NAME as nm,
- LONGITUDE,
- LATITUDE,
- LOCATION,
- ENG_SCAL,
- LIM_STAG,
- TOT_CAP,
- RS_ADM_NAME,
- RS_ADM_CODE,
- RS_ADM_DEP,
- ADM_ATT_REL,
- ADM_DIV,
- RS_TYPE,
- DAM_TYPE_MAT,
- DAM_TYPE_STR,
- DAM_SIZE_HIG,
- CENTER_X,
- CENTER_Y,
- SRC,
- DATA_QUALITY,
- CENTER_X_GD,
- CENTER_Y_GD,
- RS_LOC,
- REG_CODE,
- COMP_DATE,
- INTM,
- REG_NO,
- HST_INSP,
- PERS_ID,
- UPTM,
- CHK_STATE,
- EDTR_PESR,
- SLPC_ADM_DIV,
- ADM_DIV_NAME,
- COMP_DATE_STR,
- PROVINCIAL
- from ATT_RS_BASE t
- where t.rs_code not in (
- select CODE from BIS_INSP_ALL_OBJ B where id like concat(#{inspGroupId},'%')
- )
- <include refid="baseChoseSql"/>
- <if test="rsName != null and rsName != ''">and t.RS_NAME LIKE '%${rsName}%'</if>
- <if test="nm != null and nm != ''">and t.RS_NAME LIKE '%${nm}%'</if>
- <if test="adCode != null and adCode != ''">and t.ADM_DIV LIKE '${adCode}%'</if>
- <if test="engScal != null and engScal != ''">and t.ENG_SCAL = #{engScal}</if>
- <if test="rsAdmDep != null and rsAdmDep != ''">and t.RS_ADM_DEP = #{rsAdmDep}</if>
- </select>
- <select id="getSupCwsListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.AttSupAdBase">
- select distinct * from (
- SELECT A.GUID,
- A.AD_CODE code,
- A.AD_NAME as name,
- A.AD_NAME as nm,
- A.AD_NAME,
- case when B.state is not null then B.state else '0' end state,
- A.LOW_LEFT_LONG,
- A.LOW_LEFT_LAT,
- A.UP_RIGHT_LONG,
- A.UP_RIGHT_LAT,
- A.UP_AD_NAME,
- A.AD_GRAD,
- A.AD_ABBR_NAME,
- A.AD_STAT,
- A.AD_AREA,
- A.AD_FULL_NAME,
- A.NOTE,
- A.EFF_DATE,
- A.EXPR_DATE,
- A.AD_STAT_LONG,
- A.AD_STAT_LAT,
- A.DOMAIN_CODE,
- A.AD_SIGN,
- A.MODIFIER_PEOPLE,
- A.UPD_DATE,
- A.IS_REPORT,
- A.AD_FCODE,
- A.IS_POVERYT,
- A.SRC,
- A.REMARK,
- A.AD_LONG,
- A.AD_LAT,
- A.LGTD,
- A.LTTD,
- A.LGTDPC,
- A.LTTDPC
- FROM ATT_AD_X_BASE A
- LEFT JOIN (
- SELECT a.AD_CODE, '1' as state
- FROM ATT_AD_X_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o
- where o.code = a.AD_CODE
- and o.ptype = #{objType}
- and to_char(o.OBJ_INTM,'yyyy')=to_char(sysdate,'yyyy')
- )
- ) B ON A.AD_CODE = B.AD_CODE
- WHERE
- A.AD_GRAD IN (${adGrad})
- and A.AD_CODE NOT in (
- select CODE from BIS_INSP_ALL_OBJ B where id like concat(#{inspGroupId},'%')
- <include refid="choseSql"/>
- )
- <if test="province !=null and province !=''">
- and A.AD_CODE like '${province}%'
- </if>
- <if test="adName != null and adName != ''">and A.AD_NAME LIKE '%${adName}%'</if>
- <if test="nm != null and nm != ''">and A.AD_NAME LIKE '%${nm}%'</if>
- <if test="adCode != null and adCode != ''">and A.ad_code like '${adCode}%'</if>
- ORDER BY
- <!-- <if test="orderBy != null and orderBy != ''"> ${orderBy},</if>-->
- A.AD_CODE
- ) w
- <where>
- <if test="isSupn != null and isSupn != ''">and state = #{isSupn}</if>
- </where>
- </select>
- <select id="getSupMfdpListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.AttSupAdBase">
- select distinct * from (
- SELECT A.GUID,
- A.AD_CODE code,
- A.AD_NAME as name,
- A.AD_NAME as nm,
- A.AD_NAME,
- A.LOW_LEFT_LONG,
- A.LOW_LEFT_LAT,
- A.UP_RIGHT_LONG,
- A.UP_RIGHT_LAT,
- A.UP_AD_NAME,
- A.AD_GRAD,
- A.AD_ABBR_NAME,
- A.AD_STAT,
- A.AD_AREA,
- A.AD_FULL_NAME,
- A.NOTE,
- A.EFF_DATE,
- A.EXPR_DATE,
- A.AD_STAT_LONG,
- A.AD_STAT_LAT,
- A.DOMAIN_CODE,
- A.AD_SIGN,
- A.MODIFIER_PEOPLE,
- A.UPD_DATE,
- A.IS_REPORT,
- A.AD_FCODE,
- A.IS_POVERYT,
- A.SRC,
- A.REMARK,
- A.AD_LONG,
- A.AD_LAT,
- A.LGTD,
- A.LTTD,
- A.LGTDPC,
- A.LTTDPC,
- case when b.STATE is null then '0' else b.STATE end STATE
- FROM ATT_AD_X_BASE A
- LEFT JOIN (
- SELECT A.AD_CODE AS CODE, '1' AS STATE
- FROM ATT_AD_X_BASE A
- WHERE EXISTS (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.AD_CODE AND O.PTYPE = #{objType})
- ) B ON A.AD_CODE = B.CODE
- WHERE A.AD_GRAD='4' and A.AD_CODE NOT in (
- select CODE from BIS_INSP_ALL_OBJ B where id like concat(#{inspGroupId},'%')
- <include refid="choseSql"/>
- )
- <if test="province !=null and province !=''">AND A.AD_CODE LIKE '${province}%'</if>
- <if test="adName != null and adName != ''">and A.AD_NAME LIKE '%${adName}%'</if>
- <if test="nm != null and nm != ''">and A.AD_NAME LIKE '%${nm}%'</if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">A.${orderBy},</if>
- A.AD_CODE
- ) w
- </select>
- <select id="getSupWtdListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.BisInspSupWtdst">
- select distinct * from (
- select t.wtdst_id code,
- t.wtdst_type,
- t.wtdst_nm as name,
- t.wtdst_nm as nm,
- t.wtdst_state,
- t.loc_ad,
- t.wtdst_dtle,
- t.wtdst_wrkam,
- t.plan_rcvr_tm,
- t.intm,
- t.uptm,
- t.note,
- t.wtdst_lgtd,
- t.wtdst_lttd,
- t.loc_nm,
- t.obj_type,
- t.obj_code,
- t.obj_name,
- t.center_x_gd,
- t.center_y_gd,
- t.PROVINCIAL,
- case when b.state is null then '0' else '1' end STATE
- from BIS_INSP_WTDST t
- LEFT JOIN (
- SELECT a.wtdst_id, '1' as state
- FROM BIS_INSP_WTDST a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.wtdst_id and o.ptype = '3')
- ) B ON T.wtdst_id = B.wtdst_id
- where t.wtdst_id NOT in (
- select CODE from BIS_INSP_ALL_OBJ B where id like concat(#{inspGroupId},'%')
- )
- <if test="province !=null and province !=''">
- and t.loc_ad like '${province}%'
- </if>
- <if test="wtdstNm != null and wtdstNm != ''">and t.WTDST_NM LIKE '%${wtdstNm}%'</if>
- <if test="nm != null and nm != ''">and t.WTDST_NM LIKE '%${nm}%'</if>
- <if test="wtdstState != null and wtdstState != ''">and t.WTDST_STATE = #{wtdstState}</if>
- <if test="wtdstType != null and wtdstType != ''">and t.WTDST_TYPE = #{wtdstType}</if>
- <if test="year != null and year != ''">and t.year = #{year}</if>
- <if test="prjState != null and prjState != ''">and t.PRJ_STATE = #{prjState}</if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">t.${orderBy},</if>
- t.loc_ad
- ) w
- </select>
- <select id="getSupEmpListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.EmpwtprjDto">
- SELECT distinct * FROM
- (SELECT t.id code,t.id,
- case when B.state is not null then B.state else '0' end state,
- t.ptype,
- t.ad_code,
- t.nm name,t.nm,
- t.stwktm,
- t.plantm,
- t.estapp,
- t.lgtd,
- t.lttd,
- t.lgtd_pc,
- t.lttd_pc,
- t.intm,
- t.uptm,
- t.note,
- t.unit_id,
- t.unit_nm,
- t.ad_name,
- t.eng_sta,
- t.buid_time_year
- FROM ATT_EMPWTPRJ_BASE t
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_EMPWTPRJ_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.id and o.ptype = #{objType})
- ) B ON T.ID = B.ID
- where t.ID NOT in (
- select CODE from BIS_INSP_ALL_OBJ B where id like concat(#{inspGroupId},'%')
- <if test="objType !=null and objType !=''">
- and pType=#{objType}
- </if>
- )
- <if test="nm != null and nm != ''">and t.NM LIKE '%${nm}%'</if>
- <if test="province !=null and province !=''">
- and t.AD_CODE like '${province}%'
- </if>
- AND t.ENG_STA = #{engSta}
- )
- WHERE 1 = 1
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <!--获取不在督查组范围内的稽察项目-->
- <select id="getSupPawpListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.model.TacAttPawpBase">
- SELECT distinct * FROM
- (SELECT t.id code, t.name as nm,t.*,'' AS OBJ_ID,case when b.code is null then '' else '1' end as
- STATE FROM TAC_ATT_PAWP_BASE t LEFT JOIN BIS_INSP_ALL_OBJ B ON t.id = B.CODE
- where t.ID NOT in (
- select CODE from BIS_INSP_ALL_OBJ B where id like concat(#{inspGroupId},'%')
- )
- <if test="nm != null and nm != ''">and t.name LIKE '%${nm}%'</if>
- <if test="province !=null and province !=''">
- and t.AD_CODE like '${province}%'
- </if>
- <if test="engSta != null and engSta != ''">and t.type LIKE '%${engSta}%'</if>
- )
- WHERE OBJ_ID IS NULL
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code,name
- </select>
- <select id="getSupGrwListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.GrwDto">
- select distinct * FROM
- (SELECT t.stcd code,t.stcd,
- t.stnm name,t.stnm,t.stnm nm,
- t.adcd,
- t.adnm,
- t.gogunt,
- t.stlc,
- t.lgtd,
- t.lttd,
- t.rvnm,
- t.welldep,
- t.stndpnt,
- t.grdlvl,
- t.spghgh,
- t.sttp,
- t.wsttp,
- t.prtc,
- t.bwsttp,
- t.isart,
- t.burcn,
- t.aqme,
- t.pbprj,
- t.esstym,
- t.calym,
- t.onun,
- t.mnun,
- t.ostcd,
- t.intm,
- t.esstyr,
- t.stel,
- t.dtmnm,
- t.dtmmdpr,
- t.note,
- t.lgtd_pc,
- t.lttd_pc,B.OBJ_ID,case when b.code is null then '' else '1' end
- STATE FROM Att_Grw_Base t LEFT JOIN BIS_INSP_ALL_OBJ B ON t.stcd = B.CODE
- where t.STCD NOT in (
- select CODE from BIS_INSP_ALL_OBJ B where id like concat(#{inspGroupId},'%')
- )
- <if test="province !=null and province !=''">
- and t.ADCD like '${province}%'
- </if>
- <if test="nm != null and nm != ''">and t.stnm LIKE '%${nm}%'</if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- <if test="sttp != null and sttp != ''">and t.sttp = #{sttp}</if>
- <if test="gateType != null and gateType != ''">and t.sttp like concat(#{gateType},'%')</if>
- ) w
- ORDER BY
- <if test="orderBy != null and orderBy != ''">w.${orderBy},</if>
- w.stcd
- </select>
- <select id="getSupWagaListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.WagaDto">
- select distinct * FROM
- (SELECT t.obj_code,t.obj_code code,
- t.gate_name,t.gate_name name,t.gate_name nm,
- t.ad_code,
- t.loc_rv_name,
- t.gate_type,
- t.gate_flow,
- t.eng_scal,
- t.fl_gate_flow,
- t.des_fl_sta,
- t.che_fl_sta,
- t.che_gate_flow,
- t.che_des_fl_sta,
- t.che_che_fl_sta,
- t.dra_gate_flow,
- t.dra_des_fl_sta,
- t.dra_che_fl_sta,
- t.if_dra_dou,
- t.int_gate_flow,
- t.int_des_fl_sta,
- t.int_che_fl_sta,
- t.int_div_ab,
- t.int_use,
- t.int_use_irr_name,
- t.if_int_dou,
- t.tide_gate_flow,
- t.tide_des_sta,
- t.tide_che_sta,
- t.if_gate,
- t.if_dou_dile,
- t.eng_sta,
- t.buid_time_year,
- t.buid_time_mon,
- t.sta_time_year,
- t.sta_time_mon,
- t.eng_grad,
- t.main_con_grad,
- t.hole_num,
- t.hole_wid,
- t.sub_gate_num,
- t.sub_gate_wid,
- t.location_xiang,
- t.location_cun,
- t.gate_adm_name,
- t.gate_adm_dep,
- t.if_dem,
- t.if_aff_ri,
- t.adm_att_rel,
- t.center_x,
- t.center_y,
- t.gd_x,
- t.gd_y,
- t.gate_adm_org,
- t.PROVINCIAL,
- case when B.state is not null then B.state else '0' end STATE
- FROM ATT_WAGA_BASE t
- LEFT JOIN (
- SELECT a.OBJ_CODE, '1' as state
- FROM ATT_WAGA_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o
- where o.code = a.OBJ_CODE
- and o.ptype = #{objType}
- and to_char(o.OBJ_INTM,'yyyy')=to_char(sysdate,'yyyy')
- )
- ) B ON T.OBJ_CODE = B.OBJ_CODE
- where t.obj_code NOT in (
- select CODE from BIS_INSP_ALL_OBJ B where id like concat(#{inspGroupId},'%')
- )
- <if test="province !=null and province !=''">and t.AD_CODE like '${province}%'</if>
- <if test="rsName != null and rsName != ''">and t.gate_name LIKE '%${rsName}%'</if>
- <if test="nm != null and nm != ''">and t.gate_name LIKE '%${nm}%'</if>
- <if test="gateType != null and gateType != ''">and t.gate_TYPE = #{gateType}</if>
- <if test="engScal != null and engScal != ''">and t.ENG_SCAL = #{engScal}</if>
- <if test="engSta != null and engSta != ''">and t.ENG_STA = #{engSta}</if>
- )
- <where>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- obj_code
- </select>
- <insert id="insertPers">
- INSERT INTO BIS_INSP_ALL_RLATION(ID,PERSID,PERTYPE,ORG_ID,AD_CODE,TYPE) VALUES (#{id},#{guid},#{persType},#{orgId},#{adCode},#{type})
- </insert>
- <select id="getLgtdAndLttd" resultType="cn.com.goldenwater.dcproj.dto.LgtdAndLttd">
- SELECT * FROM
- <choose>
- <when test='type == "001" or type =="036" or type =="024" or type == "022" or type == "026" or type == "034"
- or type == "080" or type == "084" or type == "096" or type == "106" '>
- (select RS_CODE code, ADM_DIV AD_CODE,CENTER_X_GD lgtd,CENTER_Y_GD lttd,CENTER_X lgtdPc,CENTER_Y lttdPc
- FROM
- ATT_RS_BASE WHERE RS_CODE = #{code})
- </when>
- <when test=' type == "002" or type == "014" or type == "015" or type == "023" or type =="025" or type == "027"
- or type == "028" or type == "032" or type == "037" or type == "041" or type == "053"
- or type == "056" or type == "071" or type == "073" or type == "079" or type == "082" or type == "083"
- or type == "094" or type == "097" or type == "101" or type == "102" or type == "108"
- or type == "110" '>
- (select AD_CODE code, AD_CODE,LGTD lgtd,LTTD lttd,LGTDPC lgtdPc,LTTDPC lttdPc FROM ATT_AD_X_BASE WHERE
- AD_CODE = #{code})
- </when>
- <when test='type == "003"'>
- (select WTDST_ID code, LOC_AD AD_CODE,CENTER_X_GD lgtd,CENTER_Y_GD lttd,WTDST_LGTD lgtdPc,WTDST_LTTD
- lttdPc
- FROM
- BIS_INSP_WTDST WHERE WTDST_ID = #{code})
- </when>
- <when test='type == "004" or type=="099" or type=="100"'>
- (select ID code, AD_CODE,LGTD lgtd,LTTD lttd,LGTD_PC lgtdPc,LTTD_PC lttdPc FROM ATT_EMPWTPRJ_BASE WHERE
- ID =
- #{code})
- </when>
- <when test='type == "005"'>
- (select STCD code,ADCD AD_CODE, ADCD AD_CODE,LGTD lgtd,LTTD lttd,LGTD_PC lgtdPc,LTTD_PC lttdPc FROM
- ATT_GRW_BASE
- WHERE STCD = #{code})
- </when>
- <when test='type == "006" or type == "081" '>
- (select OBJ_CODE code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_WAGA_BASE
- WHERE
- OBJ_CODE = #{code})
- </when>
- <when test='type == "007"'>
- (select ID code, AD_CODE,LGTD lgtd,LTTD lttd,LGTD_PC lgtdPc,LTTD_PC lttdPc FROM ATT_EMPWTPRJ_BASE WHERE
- ID =
- #{code})
- </when>
- <when test='type == "008"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM TAC_ATT_PAWP_BASE
- WHERE ID
- =
- #{code})
- </when>
- <when test='type == "009"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_FSC_BASE where ID
- =
- #{code})
- </when>
- <when test='type == "010"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_OTHER_BASE where
- ID =
- #{code})
- </when>
- <when test='type == "011"'>
- (select SD_CODE code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_SD_BASE where
- SD_CODE =
- #{code})
- </when>
- <when test='type == "012" or type == "112"'>
- (select ID code , AD_CODE,GD_X lgtd,GD_Y lttd,WIU_Long lgtdPc,WIU_LAT lttdPc FROM ATT_WIU_BASE t where
- ID =
- #{code})
- </when>
- <when test='type == "013"'>
- (select ID code, AD_CODE,SWHS_LONG_GD lgtd,SWHS_LAT_GD lttd,SWHS_LONG lgtdPc,SWHS_LAT lttdPc FROM
- ATT_SWHS_BASE where
- ID = #{code})
- </when>
- <when test='type == "016"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,PC_X lgtdPc,PC_Y lttdPc FROM ATT_WUNT_BASE where ID =
- #{code})
- </when>
- <when test='type == "017" or type == "091" '>
- ( select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM
- ATT_PRD_CSTR_PROJ_BASE e
- where ID = #{code})
- </when>
- <when test='type == "018"'>
- ( select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM
- ATT_JSKEJIAN_FLKDIS_BASE e
- where ID = #{code})
- </when>
- <when test='type == "019"'>
- ( select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM
- ATT_JSKEJIAN_WATER_BASE e
- where ID = #{code})
- </when>
- <when test='type == "020"'>
- ( select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM
- ATT_JSKEJIAN_ECOFRD_BASE e
- where ID = #{code})
- </when>
- <when test="type == '042'">
- (select AD_CODE code, AD_CODE,LGTD lgtd,LTTD lttd,LGTDPC lgtdPc,LTTDPC lttdPc FROM ATT_ZHEJIANG_JG_BASE
- WHERE AD_CODE
- =#{code})
- </when>
- <when test="type == '031'">
- (select ID code, AD_CODE,wain_Long lgtd,wain_Lat lttd FROM ATT_WINT_BASE WHERE ID = #{code})
- </when>
- <when test="type == '030'">
- (select ID code, NAME,TYPE, AD_CODE FROM ATT_EFP_BASE WHERE ID = #{code})
- </when>
- <when test="type == '029'">
- (select ID code, SAP_NAME,BAS_CODE, AD_CODE FROM ATT_WAGA_SAP_BASE WHERE ID = #{code})
- </when>
- <when test='type == "033" or type == "054"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_WTUNT_BASE WHERE
- ID =
- #{code})
- </when>
- <when test='type == "055" or type == "057"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_WTGT_BASE WHERE ID
- =
- #{code})
- </when>
- <when test="type == '035'">
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_SAMRMP_BASE WHERE
- ID =
- #{code})
- </when>
- <when test='type == "062"'>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM ATT_CDEP_BASE
- e
- where ID = #{code})
- </when>
- <when test='type == "067"'>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM ATT_BID_BASE e
- where ID = #{code})
- </when>
- <when test='type == "068" or type == "105" or type == "119"'>
- (select AD_CODE code, AD_CODE,lgtd,lttd,lgtdPc,lttdPc FROM ATT_AD_BASE e where AD_CODE = #{code})
- </when>
- <when test='type == "069"'>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM ATT_DEP_BASE e
- where ID = #{code})
- </when>
- <when test='type == "070"'>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM ATT_GROW_BASE
- e
- where ID = #{code})
- </when>
- <when test='type == "072"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_WIUQH_BASE WHERE
- ID =
- #{code})
- </when>
- <when test='type == "074"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_SAFETY_BASE WHERE
- ID =
- #{code})
- </when>
- <when test='type == "075"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_YNDEP_BASE WHERE
- ID =
- #{code})
- </when>
- <when test='type == "076"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_DPGM_BASE WHERE ID
- =
- #{code})
- </when>
- <when test='type == "077"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_RVGM_BASE WHERE ID
- =
- #{code})
- </when>
- <when test='type == "078"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_WTPRJ_BASE WHERE
- ID =
- #{code})
- </when>
- <when test='type == "089"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_UNWT_BASE WHERE ID
- =
- #{code})
- </when>
- <when test='type == "093"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_FLOODQH_BASE WHERE
- ID
- =
- #{code})
- </when>
- <when test='type == "095"'>
- (select ID code, AD_CODE,GD_X lgtd,GD_Y lttd,CENTER_X lgtdPc,CENTER_Y lttdPc FROM ATT_DSTFLDQH_BASE
- WHERE ID
- =
- #{code})
- </when>
- <when test='type == "098"'>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM ATT_FUND_BASE
- e
- where ID = #{code})
- </when>
- <when test='type== "104"'>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM ATT_STSTN_BASE
- e
- where ID = #{code})
- </when>
- <when test='type== "109"'>
- (select cws_code code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM
- ATT_CWSJX_BASE e
- where cws_code = #{code})
- </when>
- <when test='type== "113"'>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM
- BIS_INSP_SWHSJS e
- where ID = #{code})
- </when>
- <when test='type== "116"'>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM ATT_HYSTP_BASE
- e
- where ID = #{code})
- </when>
- <when test='type== "117"'>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM ATT_RDWPGD_BASE
- e
- where ID = #{code})
- </when>
- <when test='type== "120"'>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM ATT_JSPWIU_BASE e
- where ID = #{code})
- </when>
- <when test='type== "126"'>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM ATT_JSPWIU2024_BASE e
- where ID = #{code})
- </when>
- <otherwise>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM
- ATT_GNRL_BASE e
- where ID = #{code})
- </otherwise>
- </choose>
- </select>
- <insert id="insertSupArea">
- INSERT INTO BIS_INSP_SEL_AREA(AREA_ID,ID,AD_CODE,AD_NAME,ORG_ID) VALUES(#{uuid},#{id},#{adCode},#{adName},#{orgId})
- </insert>
- <select id="getPers" resultType="cn.com.goldenwater.dcproj.dto.ObjIdDto">
- SELECT PERSID guid,ID id,PERTYPE persType FROM BIS_INSP_ALL_RLATION B WHERE ID = #{id} AND PERSID = #{guid}
- <include refid="choseSql"/>
- </select>
- <update id="updatePersType">
- UPDATE BIS_INSP_ALL_RLATION SET PERTYPE = #{persType} WHERE ID = #{id} AND PERSID = #{guid}
- <if test="orgId !=null and orgId !=''">
- and org_id=#{orgId}
- </if>
- </update>
- <select id="getPersType" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.PersTypeDto">
- SELECT r.id id,r.pnm name FROM BIS_INSP_ALL r left join
- (SELECT DISTINCT SUBSTR(A.ID,0,3) rid FROM BIS_INSP_ALL A LEFT JOIN BIS_INSP_ALL_RLATION B ON A.ID = B.ID
- WHERE B.PERSID = #{persid}
- <include refid="choseSql"/>
- ) p on r.id = p.rid
- where p.rid is not null ORDER BY r.id
- </select>
- <select id="updateTeamLeader" parameterType="String">
- UPDATE BIS_INSP_ALL_RLATION SET PERTYPE = '2' WHERE ID = #{id}
- </select>
- <update id="updateGroupNm">
- UPDATE BIS_INSP_ALL SET PNM = #{nm} WHERE ID = #{id}
- </update>
- <select id="getPersTypeByPersid" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.PersTypeDto">
- SELECT DISTINCT A.CODE id,A.NAME name FROM ATT_INSP_TYPE A LEFT JOIN BIS_INS_NTFCTN B ON A.CODE = B.INSP_TYPE
- LEFT JOIN BIS_INSP_RECV_UNIT C ON B.ID = C.NTFCTN_ID
- LEFT JOIN BIS_INSP_ALL_RLATION_PERS D ON C.ORG_ID = D.ORG_ID
- WHERE B.FLAG_VALID = '1' AND C.FLAG_VALID = '1'
- AND D.GUID = #{persid} and C.ORG_ID=#{orgId}
- ORDER BY A.CODE
- </select>
- <select id="getPersTypeByPersidOrg" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.PersTypeDto">
- select DISTINCT to_number(t.code) id,t.NAME from ATT_INSP_TYPE t,bis_insp_all_rlation r
- where t.code=substr(r.id,0,3) and r.persid=#{persid}
- <choose>
- <when test="province !=null and province !=''">
- and r.ad_code =#{province}
- </when>
- <otherwise>
- and r.ad_code is null
- </otherwise>
- </choose>
- order by to_number(t.code)
- </select>
- <select id="getAllInfoByPersid" resultType="cn.com.goldenwater.dcproj.dto.PersAllInfoDto">
- SELECT DISTINCT A.ID,A.PID,A.PNM NM,A.STTM,A.ENTM FROM BIS_INSP_ALL A LEFT JOIN BIS_INSP_ALL_RLATION B ON A.ID =
- B.ID
- WHERE A.ID LIKE '${ptype}%' AND A.PID = #{id}
- <include refid="choseSql"/>
- </select>
- <select id="getPersAllObjDtoListByType" parameterType="String"
- resultType="cn.com.goldenwater.dcproj.dto.PersAllObjDto">
- select B.CODE,B.NM name,B.org_id from BIS_INSP_ALL_OBJ B WHERE B.ID = #{id}
- <include refid="choseSql"/>
- </select>
- <select id="getNodeBy" resultType="cn.com.goldenwater.dcproj.dto.ObjectNameDto">
- SELECT ID,PNM NAME FROM BIS_INSP_ALL WHERE ID LIKE '${id}' AND INSP_YEAR = #{inspYear}
- AND province=#{province}
- AND INSP_MNTH = #{inspMnth} AND ROWNUM < 2
- </select>
- <select id="getMaxGroupId" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.ObjIdDto">
- SELECT MAX(ID) AS id FROM BIS_INSP_ALL WHERE PID = #{id} and PROVINCE=#{province}
- </select>
- <sql id="table_columns_node">
- ID,
- PID,
- PNM,
- STTM,
- ENTM,
- ORG_ID,
- INSP_YEAR,
- INSP_MNTH,
- INSP_TASK,
- PROVINCE,
- INSP_TYPE,
- YEAR_TASK_ID
- </sql>
- <sql id="entity_properties_node">
- #{id},
- #{pid},
- #{pnm},
- to_date(#{sttm},'YYYY-MM-DD HH24:MI:SS'),
- to_date(#{entm},'YYYY-MM-DD HH24:MI:SS'),
- #{orgId},
- #{inspYear},
- #{inspMnth},
- #{inspTask},
- #{province},
- #{inspType},
- #{yearTaskId}
- </sql>
- <insert id="insertNode" parameterType="cn.com.goldenwater.dcproj.dto.BisInspAllNodeDto">
- insert into BIS_INSP_ALL(
- <include refid="table_columns_node"/>
- )
- values (
- <include refid="entity_properties_node"/>
- )
- </insert>
- <update id="updateNode" parameterType="cn.com.goldenwater.dcproj.dto.BisInspAllDto">
- update BIS_INSP_ALL
- <trim prefix="set" suffixOverrides=",">
- <if test="pid != null and pid != ''">PID = #{pid},</if>
- <if test="pnm != null and pnm != ''">PNM = #{pnm},</if>
- <if test="sttm != null">STTM = TO_DATE(#{sttm},'YYYY-MM-DD'),</if>
- <if test="entm != null">ENTM = TO_DATE(#{entm},'YYYY-MM-DD'),</if>
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="psn != null and psn != ''">PSN = #{psn},</if>
- <if test="inspYear != null and inspYear != ''">INSP_YEAR = #{inspYear},</if>
- <if test="inspMnth != null and inspMnth != ''">INSP_MNTH = #{inspMnth},</if>
- <if test="inspTask != null and inspTask != ''">INSP_TASK = #{inspTask},</if>
- <if test="inspTask != null and inspTask != ''">YEAR_TASK_ID = #{inspTask},</if>
- <if test="quantity != null">QUANTITY = #{quantity},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <select id="getPersInfo" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.BisInspAllRlationPersDto">
- SELECT * FROM BIS_INSP_ALL_RLATION_PERS WHERE GUID = #{persid}
- </select>
- <select id="getNodeByOrgId" parameterType="String" resultType="cn.com.goldenwater.dcproj.dto.AllNodeDto">
- SELECT ID id,PID pid,PNM,org_id nm FROM BIS_INSP_ALL WHERE ID LIKE '${orgIdStr}%' AND LENGTH(ID) = 9 AND PROVINCE=#{province}
- </select>
- <delete id="deleteNodeByPersid" parameterType="java.lang.String">
- delete from bis_insp_all_rlation where length(id) <= 6 and PERSID = #{persid}
- </delete>
- <select id="getSupFscListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.AttFscBaseDto">
- SELECT DISTINCT * from (
- select T.id,
- T.Code,
- T.NAME,
- T.NAME as nm,
- T.TYPE,
- T.ADM_ORG,
- T.AD_CODE,
- T.LOCATION,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.PERS_ID,
- T.INTM,
- T.UPTM,B.OBJ_ID ,case when b.code is null then '' else '1' end state
- from ATT_FSC_BASE t LEFT JOIN BIS_INSP_ALL_OBJ B on T.id = B.Code
- where t.id not in (select code from bis_insp_all_obj where id like concat(#{inspGroupId},'%'))
- <if test="nm != null and nm != ''">AND T.name like '%${nm}%'</if>
- <if test="type != null and type != ''">
- And t.type = #{type}
- </if>
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- ) WHERE 1 = 1
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getPrdListNotInspGroupId" parameterType="cn.com.goldenwater.dcproj.param.InspObjParam"
- resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID CODE, T.NAME AS NM,
- T.ID,T.NAME, T.TYPE, T.LOCATION,T.GD_X ,T.GD_Y,T.AD_CODE,T.AD_NAME,
- CASE WHEN B.STATE IS NULL then '0' else B.STATE end STATE
- FROM ATT_PRD_CSTR_PROJ_BASE T
- LEFT JOIN (
- SELECT A.ID, '1' AS STATE FROM ATT_PRD_CSTR_PROJ_BASE A
- WHERE EXISTS (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- <if test="province !=null and province !=''">and t.ad_code like '${province}%'</if>
- ) w
- <where>
- <if test="nm != null and nm != ''">and nm like '%${nm}%'</if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- <if test="type != null and type != ''">and TYPE = #{type}</if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- AD_CODE
- </select>
- <select id="getJSWAListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto"
- parameterType="cn.com.goldenwater.dcproj.param.InspObjParam">
- select distinct * from (
- select t.id,t.id as code,t.name,t.name as nm,t.location as location,t.pblm_desc,t.gd_x as gdX,t.gd_y as
- gdY,t.ad_code,t.pblm_type as type,t.ad_name,
- B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state
- FROM ATT_JSKEJIAN_WATER_BASE T LEFT JOIN (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.id
- = B.CODE
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- ) w where 1=1
- <if test="nm != null and nm != ''">
- and nm like '%${nm}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getEcofrdListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto"
- parameterType="cn.com.goldenwater.dcproj.param.InspObjParam">
- select distinct * from (
- select t.id,t.id as code,t.ASSIGN_NUM name,t.ASSIGN_NUM as nm,t.location as location,t.REPORT_CONTENT as
- type,t.gd_x as gdX,t.gd_y
- as gdY,t.ad_code,t.ad_name,
- B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state
- FROM ATT_JSKEJIAN_ECOFRD_BASE T LEFT JOIN (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON
- T.id = B.CODE
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- ) w where 1=1
- <if test="nm != null and nm != ''">
- and nm like '%${nm}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getJSFLListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto"
- parameterType="cn.com.goldenwater.dcproj.param.InspObjParam">
- select distinct * from (
- select
- t.id, t.id as code, t.name, t.name as nm,
- case when B.state is not null then B.state else '0' end state,
- t.location as location, t.pblm_type as type,
- t.pblm_desc,t.gd_x,t.gd_y,t.ad_code,
- t.ad_name,t.RECT_CONC, t.INTM
- FROM ATT_JSKEJIAN_FLKDIS_BASE T
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_JSKEJIAN_FLKDIS_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o
- where o.code = a.ID
- and o.ptype = #{objType}
- and to_char(o.OBJ_INTM,'yyyy')=to_char(sysdate,'yyyy')
- )
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ
- WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- <if test="svType != null and svType != ''">
- <choose>
- <when test='svType == "1"'>
- and t.INTM < (select trunc(sysdate,'yyyy') from dual )
- </when>
- <otherwise>
- and t.INTM >= (select trunc(sysdate,'yyyy') from dual )
- </otherwise>
- </choose>
- </if>
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- ) w where 1=1
- <if test="nm != null and nm != ''">
- and nm like '%${nm}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- <if test="isSupn != null and isSupn != ''">and state = #{isSupn}</if>
- <if test="isBack != null and isBack != ''">
- <choose>
- <when test='isBack == "1"'>
- and (to_char(INTM,'yyyy') <![CDATA[ < ]]> to_char(sysdate,'yyyy') or INTM IS NULL)
- </when>
- <otherwise>
- and to_char(INTM,'yyyy') = to_char(sysdate,'yyyy')
- </otherwise>
- </choose>
- </if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSupOtherListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.AttOtherBaseDto">
- SELECT DISTINCT * from (
- select T.id,
- T.Code,
- T.NAME,
- T.NAME as nm,
- T.TYPE,
- T.ADM_ORG,
- T.AD_CODE,
- T.LOCATION,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.PERS_ID,
- T.INTM,
- T.UPTM,B.OBJ_ID ,case when b.code is null then '' else '1' end state
- from ATT_OTHER_BASE t LEFT JOIN BIS_INSP_ALL_OBJ B on T.id = B.Code
- where t.id not in (select code from bis_insp_all_obj where id like concat(#{inspGroupId},'%'))
- <if test="nm != null and nm != ''">AND T.name like '%${nm}%'</if>
- <if test="type != null and type != ''">
- And t.type = #{type}
- </if>
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- ) WHERE 1 = 1
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSupSdListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.model.AttSdBase">
- SELECT DISTINCT * from (
- select
- T.SD_CODE as id,
- T.SD_CODE as code,
- T.SD_CODE,
- T.SD_NAME,
- T.SD_NAME AS name,
- T.SD_NAME AS nm,
- T.SD_TYPE,
- T.SD_TYPE_STR,
- T.CON_AREA,
- T.TOT_CAP,
- T.SDR_CAP,
- T.FLCO_YEAR,
- T.WARP_CAP,
- T.DAM_SIZE_HIG,
- T.DAM_TOP_LEN,
- T.AD_CODE,
- T.SD_LOC,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.ASINTTDS,
- T.NO_SPWAY,
- T.DAM_TEAR,
- T.DAM_LAND_SUB_SIDE,
- T.DAM_RSOG,
- T.DAM_LOPC,
- T.DS_LTS,
- T.DS_CC,
- T.DS_OC,
- T.FRS_MAR,
- T.FRS_TBD,
- T.FRS_OTH,
- T.NOTE,
- T.IN_TM,
- T.UP_TM,B.OBJ_ID ,case when b.code is null then '' else '1' end state
- from ATT_SD_BASE t LEFT JOIN BIS_INSP_ALL_OBJ B on T.sd_code = B.Code
- where t.sd_code not in (select code from bis_insp_all_obj where id like concat(#{inspGroupId},'%'))
- <if test="nm != null and nm != ''">AND T.SD_NAME like '%${nm}%'</if>
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- ) WHERE 1 = 1
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSupSwhsListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.model.AttSwhsBase">
- SELECT DISTINCT * FROM (
- SELECT T.ID,
- T.ID as code,
- T.SWHS_CODE,
- T.SWHS_NAME,
- T.SWHS_NAME AS nm,
- T.SWHS_NAME AS name,
- T.SWHS_LONG,
- T.SWHS_LAT,
- T.AD_CODE,
- T.SWHS_LOC,
- T.WAIN_WASO_TYPE,
- T.WAT_AREA,
- T.WAIN_NUM,
- T.WAIN_USE,
- T.WASU_OBJ_TYPE,
- T.WASU_TOWN_NAME,
- T.WASU_TOWN_NAME_2,
- T.WASU_TOWN_NAME_3,
- T.DES_ANN_WAIN,
- T.DES_ANN_WASU_POP,
- T.RUN_YEAR,
- T.WINT_RV_NAME,
- T.WINT_LAKE_NAME,
- T.WINT_RS_NAME,
- T.WAQU_GOAL,
- T.IF_MON_WQUA,
- T.WQUA_CAT,
- T.IF_WQUA_UPTO_STA,
- T.IF_WS_PROT,
- T.WAT_AREA_1ST_PROT,
- T.LAND_AREA_1ST_PROT,
- T.WAT_AREA_2ND_PROT,
- T.LAND_AREA_2ND_PROT,
- T.QUS_PROT,
- T.INS_NAME,
- T.TRA,
- T.PERS_ID,
- T.NOTE,
- T.EFF_DATE,
- T.EXPR_DATE,
- T.SWHS_LONG_GD,
- T.SWHS_LAT_GD,
- T.DISPLAY_LEVEL,
- B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state
- FROM ATT_SWHS_BASE T LEFT JOIN BIS_INSP_ALL_OBJ B ON T.ID = B.CODE
- WHERE T.ID NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- ) WHERE 1 = 1
- <if test="nm != null and nm != ''">
- and nm like '%${nm}%'
- </if>
- <if test="note != null and note != ''">
- and NOTE = ${note}
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSupWiuListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.model.AttWiuBase"
- parameterType="cn.com.goldenwater.dcproj.param.InspObjParam">
- SELECT DISTINCT * from (
- SELECT T.ID, T.ID AS CODE,
- T.WIU_CODE,
- T.WIU_NAME,
- T.WIU_NAME AS NM,
- T.WIU_NAME AS NAME,
- T.WINT_CODE,
- T.IDT_TYPE,
- T.NAME AS USER_NM,
- T.WIU_NAT,
- T.WIU_NAT_NAME,
- T.CODE_TYPE,
- T.CODE_VAL,
- T.WIU_CONTACT,
- T.WIU_CONTACT_TEL,
- T.IN_TM,
- T.UP_TM,
- T.AD_CODE,
- T.AD_NAME,
- CASE WHEN B.state IS NULL then '' else '1' end state,
- w.WINT_NAME,w.WINT_POS
- FROM ATT_WIU_BASE T
- LEFT JOIN ATT_WINT_BASE_B w ON t.WINT_CODE = w.ID
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_WIU_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.ID and o.ptype = #{objType})
- ) B ON T.ID = B.ID
- WHERE T.ID NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- )
- <where>
- <if test="nm != null and nm != ''">and nm like '%${nm}%'</if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getAdXBaseListNotInspGroupId" parameterType="cn.com.goldenwater.dcproj.param.InspObjParam"
- resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- select
- t.ad_code as id, t.ad_code as code,t.ad_name as nm,t.ad_name as name,
- t.ad_full_name, t.ad_full_name as location,
- t.lgtd as gdX,t.lttd as gdY,t.ad_long as pcX,t.ad_lat as pcY,
- t.ad_code, t.AD_GRAD, case when B.state is not null then B.state else '0' end state
- FROM ATT_AD_X_BASE T
- LEFT JOIN (
- SELECT a.AD_CODE, '1' as state
- FROM ATT_AD_X_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.AD_CODE and o.ptype = #{objType})
- ) B ON T.AD_CODE = B.AD_CODE
- WHERE
- T.ad_code NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- <if test="province !=null and province !=''">and t.ad_code like '${province}%'</if>
- ) w
- where w.AD_GRAD IN (${adGrad})
- <if test="nm != null and nm != ''">and nm like '%${nm}%'</if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getAdBaseListNotInspGroupId" parameterType="cn.com.goldenwater.dcproj.param.InspObjParam"
- resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct *
- from (
- select
- t.ad_code as id, t.ad_name as nm, t.ad_code as code, t.ad_name as name, t.ad_full_name as location,
- t.lgtd as gdX, t.lttd as gdY, t.ad_code, t.AD_GRAD,
- t.ad_long as pcX,t.ad_lat as pcY,
- B.OBJ_ID, CASE WHEN B.CODE IS NULL then '' else '1' end state
- FROM ATT_AD_X_BASE T
- LEFT JOIN
- (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.AD_CODE = B.CODE
- WHERE
- T.ad_code NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- ) w where w.AD_GRAD = '3'
- <if test="nm != null and nm != ''">
- and nm like '%${nm}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getWuntListNotInspGroupId" parameterType="cn.com.goldenwater.dcproj.param.InspObjParam"
- resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- select t.id as id,t.UT_NAME as nm,t.id as code,t.UT_NAME as name,t.UT_ADDR as location,t.pc_x as gdX,t.pc_Y as
- gdY,t.ad_code,t.UT_TYPE as
- type,t.TRD_TYPE,t.UT_TYPE,t.UT_PPT,
- t.GD_X as pcX,t.GD_Y as pcY,
- B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state
- FROM ATT_WUNT_BASE T LEFT JOIN (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.AD_CODE =
- B.CODE
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- ) w where 1=1
- <if test="nm != null and nm != ''">
- and nm like '%${nm}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <!--获取不在督查组中的对象-->
- <select id="getNotSuperviseGroupObj" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- select
- t.id as id,
- t.id as code,
- t.ad_code,
- t.AD_FULL_NAME AS adName,
- t.DEPART_NM AS nm,
- t.DEPART_NM AS name,
- B.OBJ_ID,
- CASE WHEN B.CODE IS NULL then '' else '1' end state
- FROM
- ATT_ZHEJIANG_JG_BASE T
- LEFT JOIN
- (
- select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}
- ) B ON T.AD_CODE = B.CODE
- WHERE
- T.id NOT IN
- (
- SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%')
- )
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- ) w where 1=1
- <if test="nm != null and nm != ''">
- and nm like '%${nm}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getRsBaseListNotInspGroupId" parameterType="cn.com.goldenwater.dcproj.param.InspObjParam"
- resultType="cn.com.goldenwater.dcproj.model.AttRsBase">
- select DISTINCT * from (
- select T.RS_CODE as code,t.RS_NAME as nm,t.*,B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state from
- ATT_RS_BASE t left join
- (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = '26') B ON T.rs_code =B.CODE
- WHERE T.RS_CODE NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- and t.ENG_SCAL in ('1','2','3')
- <if test="nm != null and nm != ''">
- and t.RS_NAME like '%${nm}%'
- </if>
- <if test="engScal != null and engScal != ''">
- and t.ENG_SCAL = #{engScal}
- </if>
- ) w where 1=1
- <if test="province != null and province != ''">and w.adm_div like '${province}%'</if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ADM_DIV
- </select>
- <select id="getSapBaseListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.model.BisInspWagaSapRgstr">
- select distinct * from (
- SELECT
- t.id AS id,
- t.id AS code,
- t.SAP_NAME AS nm,
- t.AD_NAME as adName,
- t.SAP_NAME AS sapName,
- t.ad_code,
- B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state
- FROM ATT_WAGA_SAP_BASE T
- LEFT JOIN (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.id = B.CODE
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w where 1=1
- <if test="nm != null and nm != ''">
- and sapName like '%${nm}%'
- </if>
- <if test="province != null and province != ''">and w.ad_code like '${province}%'</if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getEfpBaseListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- t.id AS id,
- t.id as code,
- t.Name as nm,
- t.Name as name,
- case when B.state is not null then B.state else '0' end state,
- t.type,
- t.PRO,
- t.BAS,
- t.ORG_ID,
- t.ORD
- FROM ATT_EFP_BASE T
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_EFP_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.id and o.ptype = #{objType})
- ) B ON T.ID = B.ID
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="nm != null and nm != ''">
- and NM like '%${nm}%'
- </if>
- <if test="type != null and type != ''">
- and type = #{type}
- </if>
- </where>
- </select>
- <!-- <if test="orgId !=null and orgId !=''">-->
- <!-- and ORG_ID like '${orgId}%'-->
- <!-- </if>-->
- <select id="getWintuBaseListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.model.BisInspWintRgstr">
- select distinct * from (
- SELECT
- t.id AS id,
- t.id as code,
- t.WINT_NAME as nm,
- t.WINT_NAME as name,
- case when B.state is not null then B.state else '0' end state,
- t.WAIN_TYPE wainIntType,
- t.AD_CODE,
- t.AD_NAME adName,
- t.AD_NAME loc,
- t.WIU_NAME bChkUnit,
- t.WIU_CONTACT contact,
- t.WIU_CONTACT_TEL contactTel,
- t.WIU_PRINCIPAL principal,
- t.WIU_PRINCIPAL_TEL principalTel
- FROM ATT_WINT_BASE T
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_WINT_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.id and o.ptype = #{objType})
- ) B ON T.ID = B.ID
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- where
- 1=1
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and NM like '%${nm}%'
- </if>
- <if test="type != null and type != ''">
- and type = #{type}
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- </select>
- <select id="getWuntuBaseListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.model.BisInspSvwtWuntRgstr">
- select distinct * from (
- SELECT
- t.id AS id,
- t.WINT_CODE as code,
- t.WINT_NAME as nm,
- t.WINT_NAME as name,
- t.WAIN_TYPE wainIntType,
- t.AD_CODE,
- t.AD_NAME adName,
- t.AD_NAME loc,
- t.WIU_NAME bChkUnit,
- t.WIU_CONTACT contact,
- t.WIU_CONTACT_TEL contactTel,
- t.WIU_PRINCIPAL principal,
- t.WIU_PRINCIPAL_TEL principalTel,
- B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state
- FROM ATT_WINT_BASE T
- LEFT JOIN (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.id = B.CODE
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- where
- 1=1
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and NM like '%${nm}%'
- </if>
- <if test="type != null and type != ''">
- and type = #{type}
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- </select>
- <select id="getWtuntBaseListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- t.id AS id, t.id as code,
- t.UT_NAME as nm,
- t.ad_code, t.ad_name as adName,T.PRINCIPAL_TEL, T.NOTE,
- B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state,AD.AD_GRAD,
- T.UT_TYPE type
- FROM ATT_WTUNT_BASE T
- LEFT JOIN (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.id = B.CODE
- LEFT JOIN ATT_AD_BASE AD ON t.AD_CODE = AD.AD_CODE
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- where 1=1
- <if test="province !=null and province !=''">and ad_code like '${province}%'</if>
- <if test="nm != null and nm != ''">and NM like '%${nm}%'</if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- <if test="type != null and type != ''">AND TYPE = #{type}</if>
- <if test="adGrad != null and adGrad != ''">and AD_GRAD = #{adGrad}</if>
- </select>
- <select id="getWtgtBaseListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state, AD.AD_GRAD,
- t.id AS id,
- t.id as code,
- t.DEP_NAME as nm,
- t.AD_CODE, t.AD_NAME,
- T.WINT_CODE,
- T.DEP_PERS,
- T.DEP_PERS_TEL,T.PRINCIPAL_TEL, T.NOTE,
- T.LOC location
- FROM ATT_WTGT_BASE T
- LEFT JOIN (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.id = B.CODE
- LEFT JOIN ATT_AD_BASE AD ON t.AD_CODE = AD.AD_CODE
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and ad_code like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and NM like '%${nm}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- <if test="adGrad != null and adGrad != ''">and AD_GRAD = #{adGrad}</if>
- </where>
- </select>
- <select id="getAdBaseMunicipalLevelListNotInspGroupIds" parameterType="cn.com.goldenwater.dcproj.param.InspObjParam"
- resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct *
- from (
- select
- t.ad_code as id, t.ad_code as code, t.ad_name as nm, t.ad_full_name as location,
- t.lgtd as gdX, t.lttd as gdY, t.ad_code, t.AD_GRAD,
- t.ad_long as pcX,t.ad_lat as pcY
- FROM ATT_AD_BASE T
- LEFT JOIN
- (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.AD_CODE = B.CODE
- WHERE
- T.ad_code NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- ) w where w.AD_GRAD = '3'
- <if test="nm != null and nm != ''">
- and nm like '%${nm}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getAdBaseCountyLevelListNotInspGroupIds" parameterType="cn.com.goldenwater.dcproj.param.InspObjParam"
- resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct *
- from (
- select
- t.ad_code as id, t.ad_code as code, t.ad_name as nm, t.ad_full_name as location,
- t.lgtd as gdX, t.lttd as gdY, t.ad_code, t.AD_GRAD,
- t.ad_long as pcX,t.ad_lat as pcY
- FROM ATT_AD_BASE T
- LEFT JOIN
- (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.AD_CODE = B.CODE
- WHERE
- T.ad_code NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- <if test="province !=null and province !=''">
- and t.ad_code like '${province}%'
- </if>
- ) w
- where w.AD_GRAD = '4'
- <if test="nm != null and nm != ''">
- and nm like '%${nm}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getRsListNotInGroup" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- select t.rs_code as id,T.Rs_Code as code,t.rs_name as nm,
- t.ENG_SCAL,t.build_stat,t.location,t.adm_div as
- ad_code,t.adm_div_name as ad_name
- ,B.OBJ_ID,
- CASE WHEN B.CODE IS NULL then '' else '1' end state
- from ATT_RS_BASE t
- LEFT JOIN (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.RS_CODE = B.CODE
- WHERE t.rs_code NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- and t.build_stat in ('2','3')
- ) w where 1=1
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and NM like '%${nm}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- <if test="engScal != null and engScal != ''"></if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSamListNotInGroup" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- select T.id,T.id as code,t.prj_name as nm,t.ad_code,t.ad_name,t.addr as location
- ,B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state
- from ATT_SAMRMP_BASE T
- LEFT JOIN (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.ID = B.CODE
- WHERE t.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w where 1=1
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and NM like '%${nm}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSupCdepListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- t.id AS id,
- t.id AS code,
- t.DEP_CODE as depCode,
- t.DEP_NAME as nm,
- t.AD_CODE as AD_CODE,
- t.AD_NAME as adName,
- t.LOC as location,
- t.PRINCIPAL principal,
- t.CONTACT as depPers,
- B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state
- FROM ATT_CDEP_BASE T
- LEFT JOIN (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.id = B.CODE
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- where
- 1=1
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%${nm}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSupBidListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- t.id AS id,
- t.id AS code,
- t.BID_CODE as bidCode,
- t.BID_NAME as nm,
- t.AD_CODE as AD_CODE,
- t.AD_NAME as adName,
- t.LOC as location,
- t.LEGAL_PERS as legalPers,
- t.CONTACT as depPers,
- B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state
- FROM ATT_BID_BASE T
- LEFT JOIN (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.id = B.CODE
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- where
- 1=1
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSupRlrwListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- t.LAND_CODE AS id,
- t.LAND_CODE AS code,
- t.LAND_NAME as nm,
- t.AD_CODE as AD_CODE,
- t.AD_NAME as adName,
- t.CONTACT as depPers,
- B.OBJ_ID,CASE WHEN B.CODE IS NULL then '' else '1' end state
- FROM ATT_RLRW_BASE T
- LEFT JOIN (select * FROM BIS_INSP_ALL_OBJ o where o.ptype = #{objType}) B ON T.LAND_CODE = B.CODE
- WHERE T.LAND_CODE NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- where
- 1=1
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%${depName}%'
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSupDrdmpListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- t.id AS code,
- t.DEP_NAME as nm,
- t.LOC as location,
- case when B.state is not null then B.state else '0' end state,
- t.DEP_NAME,
- t.AD_CODE,
- t.AD_NAME,
- t.WINT_CODE,
- t.LOC
- FROM ATT_DEP_BASE T
- LEFT JOIN (
- SELECT a.ID, '1' as state FROM ATT_DEP_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.id and o.ptype = #{objType})
- ) B ON T.ID = B.ID
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSupGrowListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- t.id AS id,
- case when B.state is not null then B.state else '0' end state,
- t.id AS code,
- t.WELL_NAME AS nm,
- t.AD_CODE as AD_CODE,
- t.AD_NAME as adName,
- t.CONTACT as depPers,
- t.well_type as type
- FROM ATT_GROW_BASE T
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_GROW_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.id and o.ptype = #{objType})
- ) B ON T.ID = B.ID
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- where
- 1=1
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%${nm}%'
- </if>
- <if test="type != null and type != ''">
- and w.type = #{type}
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSupFundListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- t.id AS id,
- case when B.state is not null then B.state else '0' end state,
- t.id AS code,
- t.Proj_Name AS nm,
- t.AD_CODE as AD_CODE,
- t.AD_NAME as adName,
- t.plan_funds as planFunds,
- decode(t.Proj_Type,1,'中小河流治理',2,'新建小型水库',3,'中型灌区',4,'水土保持',5,'山洪灾害防治',6,'农村饮水工程维修养护',7,'小型水库维修养护',8,'山洪灾害防治设施维修养护项目',9,'农业水价综合改革',10,'大中型水库移民',11,'其他')
- as type
- FROM ATT_FUND_BASE T
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_FUND_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.id and o.ptype = #{objType})
- ) B ON T.ID = B.ID
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- where
- 1=1
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%${nm}%'
- </if>
- <if test="type != null and type != ''">
- and w.type = #{type}
- </if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSupWiuqhListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- t.id AS code,
- t.NM,
- t.LOC as location,
- case when B.state is not null then B.state else '0' end state,
- t.AD_CODE, t.AD_NAME, t.APP_NO, t.WT_APP_NO,
- t.APP_DEP, t.WT_TYPE, t.WT_MSR, t.WT_TM,
- t.WT_SUR, t.WT_USR, t.DEP_PERS, t.PERS_PHONE,
- t.DEP_CNT_PERS, t.DEP_CNT_PERS_PHONE, t.NOTE,
- t.CENTER_X, t.CENTER_Y,
- t.GD_X, t.GD_Y, t.INTM, t.UPTM, t.DATA_STAT
- FROM ATT_WIUQH_BASE T
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_WIUQH_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.id and o.ptype = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSafetyListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- t.id,
- t.id AS code,
- t.NAME AS NM,
- t.LOC as location,
- case when B.state is not null then B.state else '0' end state,
- t.NAME,
- t.MG_PERS,
- t.MG_PERS_TEL,
- t.AD_CODE,
- t.AD_NAME,
- t.LOC,
- t.NOTE,
- t.CENTER_X,
- t.CENTER_Y,
- t.GD_X,
- t.GD_Y,
- t.INTM,
- t.UPTM,
- t.DATA_STAT
- FROM ATT_SAFETY_BASE T
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_SAFETY_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.id and o.ptype = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getYndepListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- t.id AS code,
- t.AD_NAME AS NM,
- t.LOC as location,
- REPLACE(A.AD_FULL_NAME, '-', '') AS AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end state,
- t.DEP_NAME,
- t.UT_LEAD,
- t.PRINCIPAL_TEL,
- t.DEP_PERS,
- t.DEP_PERS_TEL,
- t.AD_CODE,
- t.AD_NAME,
- t.LOC,
- t.NOTE,
- t.CENTER_X,
- t.CENTER_Y,
- t.GD_X,
- t.GD_Y,
- t.INTM,
- t.UPTM,
- t.DATA_STAT
- FROM ATT_YNDEP_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_YNDEP_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.id and o.ptype = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getRvgmListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- select distinct * from (
- SELECT
- t.id AS code,
- t.DEP_NAME AS NM,
- t.LOC as location,
- A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end state,
- t.DEP_NAME,
- t.UT_LEAD,
- t.PRINCIPAL_TEL,
- t.DEP_PERS,
- t.DEP_PERS_TEL,
- t.AD_CODE,
- t.AD_NAME,
- t.LOC,
- t.NOTE,
- t.CENTER_X,
- t.CENTER_Y,
- t.GD_X,
- t.GD_Y,
- t.INTM,
- t.UPTM,
- t.DATA_STAT
- FROM ATT_RVGM_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_RVGM_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.id and o.ptype = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getDpgmListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE,
- T.NM,
- T.LOC AS LOCATION,
- A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T.ID,
- T.RV_PERS,
- T.GM_DUTIES,
- T.RV_PERS_TEL,
- T.PERS_ID,
- T.AD_CODE,
- T.AD_NAME,
- T.LOC,
- T.NOTE,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.INTM,
- T.UPTM,
- T.DATA_STAT
- FROM ATT_DPGM_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_DPGM_BASE a
- WHERE Exists (select code FROM BIS_INSP_ALL_OBJ o where o.code = a.id and o.ptype = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getWtprjListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE,
- T.NM,
- T.LOC AS LOCATION,
- A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T.ID,
- T.PRJ_TYPE,
- T.PRJ_CTGY,
- T.PRJ_RISK,
- T.AD_CODE,
- T.AD_NAME,
- T.LOC,
- T.NOTE,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.INTM,
- T.UPTM,
- T.DATA_STAT
- FROM ATT_WTPRJ_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_WTPRJ_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getUnwtListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE,
- T.NM,
- T.LOC AS LOCATION,
- A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end AS STATE,
- T.ID,
- T.AD_CODE,
- T.AD_NAME,
- T.LOC,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.INTM,
- T.UPTM,
- T.DATA_STAT
- FROM ATT_UNWT_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_UNWT_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getFloodqhListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE,
- T.LOC AS LOCATION,
- A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T.ID,
- T.NM,
- T.FLOOD_TYPE,
- T.AD_CODE,
- T.AD_NAME,
- T.LOC,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.INTM,
- T.UPTM,
- T.DATA_STAT
- FROM ATT_FLOODQH_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_FLOODQH_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getDstfldqhListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE,
- T.LOC AS LOCATION,
- A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T.ID,
- T.NM,
- T.NM AS NAME,
- T.PRJT_TYPE AS PRJ_TYPE,
- T.AD_CODE,
- T.AD_NAME,
- T.LOC,
- T.UNIT,
- T.CONTENT,
- T.NOTE,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.INTM,
- T.UPTM,
- T.DATA_STAT
- FROM ATT_DSTFLDQH_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_DSTFLDQH_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getAddAxListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.AttSupAdBase">
- select distinct * from (
- SELECT A.GUID,
- A.AD_CODE code,
- A.AD_NAME name,
- A.LOW_LEFT_LONG,
- A.LOW_LEFT_LAT,
- A.UP_RIGHT_LONG,
- A.UP_RIGHT_LAT,
- A.UP_AD_NAME,
- A.AD_GRAD,
- A.AD_ABBR_NAME,
- A.AD_STAT,
- A.AD_AREA,
- A.AD_FULL_NAME,
- A.NOTE,
- A.EFF_DATE,
- A.EXPR_DATE,
- A.AD_STAT_LONG,
- A.AD_STAT_LAT,
- A.DOMAIN_CODE,
- A.AD_SIGN,
- A.MODIFIER_PEOPLE,
- A.UPD_DATE,
- A.IS_REPORT,
- A.AD_FCODE,
- (case when A.IS_POVERYT is null then '0' else A.IS_POVERYT end) IS_POVERYT,
- A.SRC,
- A.REMARK,
- A.AD_LONG,
- A.AD_LAT,
- A.LGTD,
- A.LTTD,
- A.LGTDPC,
- A.LTTDPC
- FROM ATT_AD_BASE A
- WHERE A.AD_GRAD='4'
- AND A.AD_CODE IN (SELECT DISTINCT T.AD_CODE FROM ATT_HYST_BASE T WHERE T.AD_CODE IS NOT NULL)
- AND A.AD_CODE NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%')
- <if test="province !=null and province !=''">and ad_code like '${province}%'</if>
- )
- <if test="adName != null and adName != ''">and A.AD_NAME LIKE '%${adName}%'</if>
- <if test="nm != null and nm != ''">and AD_NAME like '%${nm}%'</if>
- <if test="adCode != null and adCode != ''">and ${adCode}</if>
- <if test="isPkx != null and isPkx != ''">and A.IS_POVERYT =#{isPkx}</if>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- AD_CODE
- ) w
- </select>
- <select id="getStstnListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE,
- T.LOC AS LOCATION,
- A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T.ID,
- T.NM,
- T.NM AS NAME,
- T.PRJC_TYPE AS PRJ_TYPE,
- T.AD_CODE,
- T.AD_NAME,
- T.LOC,
- T.COST,
- T.COST_YEAR,
- T.MGR,
- T.OWNER,
- T.QUALITY,
- T.DESIGN,
- T.SUPERVISOR,
- T.BUILD,
- T.PRJC_PERS,
- T.PRJC_PRES_TEL,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.INTM,
- T.UPTM,
- T.DATA_STAT
- FROM ATT_STSTN_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_STSTN_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getGnrlListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE,
- T.LOC AS LOCATION,
- A.AD_FULL_NAME,
- T.SECT_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T.ID,
- T.NM,
- T.NM AS NAME,
- T.AD_CODE,
- T.AD_NAME,
- T.LOC,
- T.NOTE,
- T.CENTER_X, T.CENTER_Y, T.GD_X, T.GD_Y, T.INTM, T.UPTM, T.OBJ_TYPE
- FROM ATT_GNRL_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_GNRL_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- <if test="type != null and type != ''">
- and OBJ_TYPE = #{type}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getSwhsjsListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE, T.WAIN_LOC AS LOCATION, A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE, T.ID,
- T.SWHS_NAME AS NM,
- T.SWHS_NAME AS NAME,
- T.AD_CODE,
- T.AD_NAME,
- T.NOTE,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.INTM,
- T.UPTM,
- T.DATA_STAT,
- T.SWHS_CODE,
- T.SWHS_NAME,
- T.WAIN_WASO_TYPE,
- T.SWHS_USE,
- T.SWHS_LEVEL,
- T.WAIN_LOC,
- T.INS_NAME,
- T.INS_PER,
- T.INS_PER_PHONE,
- T.DEPT,
- T.DEPT_PER,
- T.DEPT_PER_PHONE
- FROM ATT_SWHSJS_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_SWHSJS_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getRsvrSdListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.rs_code AS CODE, T.LOCATION AS LOCATION, A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE, T.rs_code ID,
- T.rs_name AS NM,
- T.rs_name AS RS_NAME,
- T.rs_name AS NAME,
- T.adm_div AD_CODE,
- T.location AD_NAME,
- T.CENTER_X,
- T.CENTER_Y,
- T.CENTER_X_GD GD_X ,
- T.CENTER_Y_GD GD_Y
- FROM att_rs_base T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.adm_div
- LEFT JOIN (
- SELECT a.rs_code , '1' as state
- FROM att_rs_base a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.rs_code AND O.PTYPE = #{objType})
- ) B ON T.rs_code = B.rs_code
- WHERE
- T.rs_code NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getXsdyhglListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T . ID AS CODE,
- T .LOC AS LOCATION,
- A .AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T . ID,
- T .NM AS NM,
- T .NM AS NAME,
- T .AD_CODE,
- T .AD_NAME,
- T .NOTE,
- T .CENTER_X,
- T .CENTER_Y,
- T .GD_X,
- T .GD_Y,
- T .INTM,
- T .UPTM,
- T .DATA_STAT
- FROM ATT_HYSTP_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_HYSTP_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getRdwpGdListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT *
- FROM (
- SELECT T.ID AS CODE
- , T.SITE_OF_PRJ AS LOCATION
- , A.AD_FULL_NAME
- , case when B.state is not null then B.state else '0' end STATE
- , T.ID
- , T.PRJ_NAME AS NM
- , T.PRJ_NAME AS NAME
- , T.PRJ_TYPE
- , T.AD_CODE
- , T.AD_NAME
- , T.INTM
- , T.UPTM
- , T.DATA_STAT
- FROM ATT_RDWPGD_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' AS state
- FROM ATT_RDWPGD_BASE a
- WHERE EXISTS(
- SELECT CODE
- FROM BIS_INSP_ALL_OBJ O
- WHERE O.CODE = A.ID
- AND O.PTYPE = #{objType}
- )
- ) B
- ON T.ID = B.ID
- WHERE T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- <if test="prjType != null and prjType != ''">
- and PRJ_TYPE = #{prjType}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getYearMonth" resultType="java.util.Map">
- SELECT A.ID,A.PNM,A.INSP_YEAR,A.INSP_MNTH, TO_CHAR(A.STTM,'YYYY-MM-DD') STTM,TO_CHAR(A.ENTM,'YYYY-MM-DD') ENTM ,B.CHK_NAME FROM BIS_INSP_ALL A LEFT JOIN BIS_INSP_PLAN_YEAR B ON B.ID = A.YEAR_TASK_ID where A.ID=#{groupId} and A.INSP_YEAR is not null and A.INSP_MNTH is not null
- </select>
- <select id="getPersAllDtoByIdsList" resultType="cn.com.goldenwater.dcproj.dto.PersAllDto">
- SELECT DISTINCT A.GUID, A.PERS_NAME, B.PERTYPE persType
- FROM BIS_INSP_ALL_RLATION_PERS A
- LEFT JOIN BIS_INSP_ALL_RLATION B
- ON A.GUID = B.PERSID
- WHERE B.ID IN (${ids})
- </select>
- <select id="getPersAllAreaDtoByIdsList" resultType="cn.com.goldenwater.dcproj.dto.PersAllAreaDto">
- SELECT DISTINCT A.AD_CODE, A.AD_NAME
- FROM BIS_INSP_SEL_AREA A
- WHERE A.ID IN (${ids})
- </select>
- <select id="getPersAllObjDtoByIdList" parameterType="String"
- resultType="cn.com.goldenwater.dcproj.dto.PersAllObjDto">
- select B.CODE, B.NM name, B.PTYPE, B.OBJ_ID
- from BIS_INSP_ALL_OBJ B
- WHERE B.ID = #{id}
- </select>
- <select id="getJsPwiuListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T .ID AS CODE,
- A .AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T .ID,
- T .NAME AS NM,
- T .NAME AS NAME,
- T .AD_CODE,
- T .AD_NAME,
- T.DEP_TYPE as utType,
- T.TMP_TYPE as trdType,
- T .NOTE,
- T .CENTER_X,
- T .CENTER_Y,
- T .GD_X,
- T .GD_Y,
- T .INTM,
- T .UPTM,
- T .DATA_STAT
- FROM ATT_JSPWIU_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_JSPWIU_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and NM like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getJsPwiu2024ListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T .ID AS CODE,
- A .AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T .ID,
- T .NAME AS NM,
- T .NAME AS NAME,
- T .AD_CODE,
- T .AD_NAME,
- T .NOTE,
- T .CENTER_X,
- T .CENTER_Y,
- T .GD_X,
- T .GD_Y,
- T .INTM,
- T .UPTM,
- T .DATA_STAT
- FROM ATT_JSPWIU2024_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_JSPWIU2024_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and NM like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getFjgnrlListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T .ID AS CODE,
- A .AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T .ID,
- T .NM,
- T .NM AS NAME,
- T .AD_CODE,
- T .AD_NAME,
- T .NOTE,
- T .CENTER_X,
- T .CENTER_Y,
- T .GD_X,
- T .GD_Y,
- T .INTM,
- T .UPTM,
- T .DATA_STAT
- FROM BIS_INSP_BASE_NEW T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM BIS_INSP_BASE_NEW a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and NM like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getFpjlglListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE,
- A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T.ID,
- T.NAME AS NM,
- T.NAME AS NAME,
- T.AD_CODE,
- T.AD_NAME,
- T.BUS_ADDR,
- T.CON_PERS,
- T.CON_PERS_TEL,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.INTM,
- T.UPTM,
- T.DATA_STAT
- FROM ATT_FJPJLGL_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_FJPJLGL_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getFjpjmgdpListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE,
- A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T.ID,
- T.NAME AS NM,
- T.NAME AS NAME,
- T.AD_CODE,
- T.AD_NAME,
- T.BUS_ADDR,
- T.CON_PERS,
- T.CON_PERS_TEL,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.INTM,
- T.UPTM,
- T.DATA_STAT
- FROM ATT_FJPJMGDP_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_FJPJMGDP_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getFjaccpListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE,
- A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T.ID,
- T.NAME AS NM,
- T.NAME AS NAME,
- T.AD_CODE,
- T.AD_NAME,
- T.BUS_ADDR,
- T.CON_PERS,
- T.CON_PERS_TEL,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.INTM,
- T.UPTM,
- T.DATA_STAT
- FROM ATT_FJACCP_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_FJACCP_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getFjsduListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE,
- A.AD_FULL_NAME,
- case when B.state is not null then B.state else '0' end STATE,
- T.ID,
- T.NAME AS NM,
- T.NAME AS NAME,
- T.AD_CODE,
- T.AD_NAME,
- T.BUS_ADDR,
- T.CON_PERS,
- T.CON_PERS_TEL,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.INTM,
- T.UPTM,
- T.DATA_STAT
- FROM ATT_FJSDU_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_FJSDU_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- <select id="getFjpjcsuListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.dto.SupervisionPlanDto">
- SELECT DISTINCT * FROM (
- SELECT
- T.ID AS CODE,
- A.AD_FULL_NAME,
- NVL(B.STATE, 0) AS STATE,
- T.ID,
- T.NAME AS NM,
- T.NAME AS NAME,
- T.AD_CODE,
- T.AD_NAME,
- T.BUS_ADDR,
- T.CON_PERS,
- T.CON_PERS_TEL,
- T.CENTER_X,
- T.CENTER_Y,
- T.GD_X,
- T.GD_Y,
- T.INTM,
- T.UPTM,
- T.DATA_STAT
- FROM ATT_FJPJCSU_BASE T
- LEFT JOIN ATT_AD_BASE A ON A.AD_CODE = T.AD_CODE
- LEFT JOIN (
- SELECT a.ID, '1' as state
- FROM ATT_FJPJCSU_BASE a
- WHERE Exists (SELECT CODE FROM BIS_INSP_ALL_OBJ O WHERE O.CODE = A.ID AND O.PTYPE = #{objType})
- ) B ON T.ID = B.ID
- WHERE
- T.id NOT IN (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE ID LIKE CONCAT(#{inspGroupId},'%'))
- ) w
- <where>
- <if test="province !=null and province !=''">
- and AD_CODE like '${province}%'
- </if>
- <if test="nm != null and nm != ''">
- and nm like '%' || #{nm} || '%'
- </if>
- <if test="adCode != null and adCode != ''">
- and ${adCode}
- </if>
- </where>
- ORDER BY
- <if test="orderBy != null and orderBy != ''">${orderBy},</if>
- ad_code
- </select>
- </mapper>
|