| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250 |
- <?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,
- NVL(B.state, 0) as state,
- NVL(B.state, 0) as 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,
- NVL(B.state, 0) as 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,
- NVL(B.state, 0) as 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,
- NVL(b.state, '0') AS 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>
- <when test='type== "128"'>
- (select ID code, AD_CODE,e.gd_x lgtd,e.gd_y lttd,e.center_x lgtdPc,e.center_y lttdPc FROM BIS_INSP_BASE_NEW 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 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,
- NVL(B.state, 0) as 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, NVL(B.state, '0') 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,
- NVL(B.state, 0) as 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,
- NVL(B.state, 0) as 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,
- nvl(B.state, 0) as 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,
- NVL(B.state, 0) as 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,
- NVL(B.state, 0) as 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,
- NVL(B.state, 0) as 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,
- NVL(B.state, 0) as 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,
- NVL(B.state, 0) as 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,
- NVL(B.state, 0) as 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,
- NVL(B.STATE, 0) AS 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,
- NVL(B.STATE, 0) AS 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,
- NVL(B.STATE, 0) 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,
- NVL(B.STATE, 0) AS 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,
- NVL(B.STATE, 0) AS 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,
- NVL(B.STATE, 0) AS 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,
- NVL(B.STATE, 0) AS 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,
- NVL(B.STATE, 0) AS 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,
- NVL(B.STATE, 0) AS 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,
- NVL (B.STATE, 0) AS 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
- , NVL(B.STATE, 0) AS 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,
- NVL (B.STATE, 0) AS 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,
- NVL (B.STATE, 0) AS 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 .OBJ_TYPE,
- 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,
- 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_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,
- 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_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,
- 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_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,
- 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_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>
|