| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948 |
- <?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.AttRsBaseDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttRsBase" id="attRsBaseResultMap">
- <result property="engScal" column="ENG_SCAL"/>
- <result property="limStag" column="LIM_STAG"/>
- <result property="totCap" column="TOT_CAP"/>
- <result property="rsAdmName" column="RS_ADM_NAME"/>
- <result property="rsAdmCode" column="RS_ADM_CODE"/>
- <result property="rsAdmDep" column="RS_ADM_DEP"/>
- <result property="admAttRel" column="ADM_ATT_REL"/>
- <result property="rsCode" column="RS_CODE"/>
- <result property="rsName" column="RS_NAME"/>
- <result property="longitude" column="LONGITUDE"/>
- <result property="latitude" column="LATITUDE"/>
- <result property="location" column="LOCATION"/>
- <result property="admDiv" column="ADM_DIV"/>
- <result property="rsType" column="RS_TYPE"/>
- <result property="damTypeMat" column="DAM_TYPE_MAT"/>
- <result property="damTypeStr" column="DAM_TYPE_STR"/>
- <result property="damSizeHig" column="DAM_SIZE_HIG"/>
- <result property="centerX" column="CENTER_X"/>
- <result property="centerY" column="CENTER_Y"/>
- <result property="rsLoc" column="RS_LOC"/>
- <result property="regCode" column="REG_CODE"/>
- <result property="compDate" column="COMP_DATE"/>
- <result property="centerXGd" column="CENTER_X_GD"/>
- <result property="centerYGd" column="CENTER_Y_GD"/>
- <result property="uptm" column="UPTM"/>
- <result property="edtrPesr" column="EDTR_PESR"/>
- <result property="hstInsp" column="HST_INSP"/>
- <result property="chkState" column="CHK_STATE"/>
- <result property="persId" column="PERS_ID"/>
- <result property="compDateStr" column="COMP_DATE_STR"/>
- <result property="displayLevel" column="DISPLAY_LEVEL"/>
- <result property="rsClass" column="RS_CLASS"/>
- <result property="impdDt" column="IMPD_DT"/>
- <result property="rnfcImpdDt" column="RNFC_IMPD_DT"/>
- <result property="desFlStag" column="DES_FL_STAG"/>
- <result property="flConTopStag" column="FL_CON_TOP_STAG"/>
- <result property="wiunWaoLegPers" column="WIUN_WAO_LEG_PERS"/>
- <result property="wiunWaoLegPersUnit" column="WIUN_WAO_LEG_PERS_UNIT"/>
- <result property="wiunWaoLegPersDuty" column="WIUN_WAO_LEG_PERS_DUTY"/>
- <result property="wiunWaoLegPersTel" column="WIUN_WAO_LEG_PERS_TEL"/>
- <result property="techPers" column="TECH_PERS"/>
- <result property="techPersUnit" column="TECH_PERS_UNIT"/>
- <result property="techPersDuty" column="TECH_PERS_DUTY"/>
- <result property="techPersTel" column="TECH_PERS_TEL"/>
- <result property="patrolPers" column="PATROL_PERS"/>
- <result property="patrolPersUnit" column="PATROL_PERS_UNIT"/>
- <result property="patrolPersDuty" column="PATROL_PERS_DUTY"/>
- <result property="patrolPersTel" column="PATROL_PERS_TEL"/>
- <result property="damType" column="DAM_TYPE"/>
- <result property="jxDuty" column="JX_DUTY"/>
- <result property="jxDutyPhone" column="JX_DUTY_PHONE"/>
- <result property="jxRsvrType" column="JX_RSVR_TYPE"/>
- <result property="jxRsvrStndLev" column="JX_RSVR_STND_LEV"/>
- <result property="buildStat" column="BUILD_STAT"/>
- <result property="normz" column="NORMZ"/>
- <result property="fsltdz" column="FSLTDZ"/>
- <result property="inspYear" column="INSP_YEAR"/>
- <result property="wcEvltOld" column="WC_EVLT_OLD"/>
- <result property="chkType" column="CHK_TYPE"/>
- <result property="isTrhbco" column="IS_TRHBCO"/>
- <result property="trhbcoInfo" column="TRHBCO_INFO"/>
- <result property="isTask" column="IS_TASK"/>
- <result property="inspType" column="INSP_TYPE"/>
- <result property="isAction" column="IS_ACTION"/>
- <result property="isSaf" column="IS_SAF"/>
- <result property="dutyDep" column="DUTY_DEP"/>
- <result property="admDivName" column="ADM_DIV_NAME"/>
- <result property="provincial" column="PROVINCIAL"/>
- <result property="regNo" column="REG_NO"/>
- </resultMap>
- <sql id="table_columns">
- CENTER_X_GD,CENTER_Y_GD,UPTM,EDTR_PESR,HST_INSP,COMP_DATE_STR,
- ENG_SCAL,
- NORMZ,
- FSLTDZ,
- LIM_STAG,
- TOT_CAP,
- RS_ADM_NAME,
- RS_ADM_CODE,
- RS_ADM_DEP,
- ADM_ATT_REL,
- RS_CODE,
- RS_NAME,
- LONGITUDE,
- LATITUDE,
- LOCATION,
- ADM_DIV,
- RS_TYPE,
- DAM_TYPE_MAT,
- DAM_TYPE_STR,
- DAM_SIZE_HIG,
- CENTER_X,
- CENTER_Y,RS_LOC,REG_CODE,COMP_DATE,CHK_STATE,PERS_ID,DISPLAY_LEVEL,
- RS_CLASS,
- IMPD_DT,
- RNFC_IMPD_DT,
- DES_FL_STAG,
- FL_CON_TOP_STAG,
- WIUN_WAO_LEG_PERS,
- WIUN_WAO_LEG_PERS_UNIT,
- WIUN_WAO_LEG_PERS_DUTY,
- WIUN_WAO_LEG_PERS_TEL,
- TECH_PERS,
- TECH_PERS_UNIT,
- TECH_PERS_DUTY,
- TECH_PERS_TEL,
- PATROL_PERS,
- PATROL_PERS_UNIT,
- PATROL_PERS_DUTY,
- PATROL_PERS_TEL,DAM_TYPE,
- JX_DUTY,
- JX_DUTY_PHONE,
- JX_RSVR_TYPE,
- JX_RSVR_STND_LEV,BUILD_STAT,
- INSP_YEAR,WC_EVLT_OLD,CHK_TYPE,IS_TRHBCO,
- TRHBCO_INFO,IS_TASK, INSP_TYPE, IS_ACTION, IS_SAF, DUTY_DEP,ADM_DIV_NAME,PROVINCIAL
- </sql>
- <sql id="entity_properties">
- #{centerXGd},#{centerYGd},#{uptm},#{edtrPesr},#{hstInsp},#{compDateStr},
- #{engScal},
- #{normz},
- #{fsltdz},
- #{limStag},
- #{totCap},
- #{rsAdmName},
- #{rsAdmCode},
- #{rsAdmDep},
- #{admAttRel},
- #{rsCode},
- #{rsName},
- #{longitude},
- #{latitude},
- #{location},
- #{admDiv},
- #{rsType},
- #{damTypeMat},
- #{damTypeStr},
- #{damSizeHig},
- #{centerX},
- #{centerY},#{rsLoc},#{regCode},#{compDate},#{chkState},#{persId},#{displayLevel},
- #{rsClass},
- #{impdDt},
- #{rnfcImpdDt},
- #{desFlStag},
- #{flConTopStag},
- #{wiunWaoLegPers},
- #{wiunWaoLegPersUnit},
- #{wiunWaoLegPersDuty},
- #{wiunWaoLegPersTel},
- #{techPers},
- #{techPersUnit},
- #{techPersDuty},
- #{techPersTel},
- #{patrolPers},
- #{patrolPersUnit},
- #{patrolPersDuty},
- #{patrolPersTel},
- #{damType},
- #{jxDuty},
- #{jxDutyPhone},
- #{jxRsvrType},
- #{jxRsvrStndLev},#{buildStat},
- #{inspYear},#{wcEvltOld},#{chkType},
- #{isTrhbco},#{trhbcoInfo},#{isTask},
- #{inspType},#{isAction},#{isSaf},#{dutyDep},#{admDivName},#{provincial}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="dutyDep != null and dutyDep != ''">and DUTY_DEP = #{dutyDep}</if>
- <if test="isAction != null and isAction != ''">and IS_ACTION = #{isAction}</if>
- <if test="isSaf != null and isSaf != ''">and IS_SAF = #{isSaf}</if>
- <if test="inspType != null and inspType != ''">and INSP_TYPE = #{inspType}</if>
- <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
- <if test="normz != null and normz != ''">and NORMZ = #{normz}</if>
- <if test="fsltdz != null and fsltdz != ''">and FSLTDZ = #{fsltdz}</if>
- <if test="limStag != null and limStag != ''">and LIM_STAG = #{limStag}</if>
- <if test="totCap != null and totCap != ''">and TOT_CAP = #{totCap}</if>
- <if test="rsAdmName != null and rsAdmName != ''">and RS_ADM_NAME like '%${rsAdmName}%'</if>
- <if test="rsAdmCode != null and rsAdmCode != ''">and RS_ADM_CODE = #{rsAdmCode}</if>
- <if test="rsAdmDep != null and rsAdmDep != ''">and RS_ADM_DEP = #{rsAdmDep}</if>
- <if test="admAttRel != null and admAttRel != ''">and ADM_ATT_REL = #{admAttRel}</if>
- <if test="rsCode != null and rsCode != ''">and RS_CODE = #{rsCode}</if>
- <if test="rsName != null and rsName != ''">and RS_NAME like '%${rsName}%'</if>
- <if test="longitude != null and longitude != ''">and LONGITUDE = #{longitude}</if>
- <if test="latitude != null and latitude != ''">and LATITUDE = #{latitude}</if>
- <if test="location != null and location != ''">and LOCATION like '${location}%'</if>
- <if test="admDiv != null and admDiv != ''">and ADM_DIV like '${admDiv}%'</if>
- <if test="rsType != null and rsType != ''">and RS_TYPE = #{rsType}</if>
- <if test="damTypeMat != null and damTypeMat != ''">and DAM_TYPE_MAT = #{damTypeMat}</if>
- <if test="damTypeStr != null and damTypeStr != ''">and DAM_TYPE_STR = #{damTypeStr}</if>
- <if test="damSizeHig != null and damSizeHig != ''">and DAM_SIZE_HIG = #{damSizeHig}</if>
- <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
- <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
- <if test="rsLoc != null and rsLoc != ''">and RS_LOC = #{rsLoc}</if>
- <if test="regCode != null and regCode != ''">and REG_CODE = #{regCode}</if>
- <if test="compDate != null">and COMP_DATE = #{compDate}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="edtrPesr != null and edtrPesr !=''">and EDTR_PESR = #{edtrPesr}</if>
- <if test="hstInsp != null and hstInsp !=''">and HST_INSP = #{hstInsp}</if>
- <if test="compDateStr != null">and COMP_DATE_STR = #{compDateStr}</if>
- <if test="admDivName != null and admDivName != ''">and ADM_DIV_NAME like '${admDivName}%'</if>
- <if test="rsClass != null">and RS_CLASS = #{rsClass}</if>
- <if test="impdDt != null">and IMPD_DT = #{impdDt}</if>
- <if test="rnfcImpdDt != null">and RNFC_IMPD_DT = #{rnfcImpdDt}</if>
- <if test="desFlStag != null and desFlStag != ''">and DES_FL_STAG = #{desFlStag}</if>
- <if test="flConTopStag != null and flConTopStag != ''">and FL_CON_TOP_STAG = #{flConTopStag}</if>
- <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">and WIUN_WAO_LEG_PERS = #{wiunWaoLegPers}</if>
- <if test="wiunWaoLegPersUnit != null and wiunWaoLegPersUnit != ''">and WIUN_WAO_LEG_PERS_UNIT =
- #{wiunWaoLegPersUnit}
- </if>
- <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">and WIUN_WAO_LEG_PERS_DUTY =
- #{wiunWaoLegPersDuty}
- </if>
- <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">and WIUN_WAO_LEG_PERS_TEL =
- #{wiunWaoLegPersTel}
- </if>
- <if test="techPers != null and techPers != ''">and TECH_PERS = #{techPers}</if>
- <if test="techPersUnit != null and techPersUnit != ''">and TECH_PERS_UNIT = #{techPersUnit}</if>
- <if test="techPersDuty != null and techPersDuty != ''">and TECH_PERS_DUTY = #{techPersDuty}</if>
- <if test="techPersTel != null and techPersTel != ''">and TECH_PERS_TEL = #{techPersTel}</if>
- <if test="patrolPers != null and patrolPers != ''">and PATROL_PERS = #{patrolPers}</if>
- <if test="patrolPersUnit != null and patrolPersUnit != ''">and PATROL_PERS_UNIT = #{patrolPersUnit}</if>
- <if test="patrolPersDuty != null and patrolPersDuty != ''">and PATROL_PERS_DUTY = #{patrolPersDuty}</if>
- <if test="patrolPersTel != null and patrolPersTel != ''">and PATROL_PERS_TEL = #{patrolPersTel}</if>
- <if test="damType != null and damType != ''">and DAM_TYPE = #{damType}</if>
- <if test="jxDuty != null and jxDuty != ''">and JX_DUTY = #{jxDuty}</if>
- <if test="jxDutyPhone != null and jxDutyPhone != ''">and JX_DUTY_PHONE = #{jxDutyPhone}</if>
- <if test="jxRsvrType != null and jxRsvrType != ''">and JX_RSVR_TYPE = #{jxRsvrType}</if>
- <if test="jxRsvrStndLev != null and jxRsvrStndLev != ''">and JX_RSVR_STND_LEV = #{jxRsvrStndLev}</if>
- <if test="inspYear != null and inspYear != ''">and INSP_YEAR = '${inspYear}%'</if>
- <if test="wcEvltOld != null and wcEvltOld != ''">and WC_EVLT_OLD = '${wcEvltOld}%'</if>
- <if test="chkType != null and chkType != ''">and CHK_TYPE = '${chkType}%'</if>
- <if test="isTrhbco != null and isTrhbco != ''">and IS_TRHBCO = '${isTrhbco}%'</if>
- <if test="trhbcoInfo != null and trhbcoInfo != ''">and TRHBCO_INFO = '${trhbcoInfo}%'</if>
- <if test="isTask != null and isTask != ''">and IS_TASK = '${isTask}%'</if>
- </trim>
- </sql>
- <select id="get" resultMap="attRsBaseResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from ATT_RS_BASE where RS_CODE = #{rsCode}
- </select>
- <select id="getBy" resultMap="attRsBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_RS_BASE
- <include refid="page_where"/>
- </select>
- <select id="findEqRsList" resultMap="attRsBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_RS_BASE b where 1=1
- <if test="rsName != null and rsName != ''">and b.RS_NAME = #{rsName}</if>
- <if test="admDivName != null and admDivName != ''">and b.ADM_DIV_NAME = #{admDivName}</if>
- </select>
- <select id="findRsList" resultMap="attRsBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_RS_BASE b where 1=1
- <if test="normz != null and normz != ''">and b.NORMZ = #{normz}</if>
- <if test="fsltdz != null and fsltdz != ''">and b.FSLTDZ = #{fsltdz}</if>
- <if test="limStag != null and limStag != ''">and b.LIM_STAG = #{limStag}</if>
- <if test="totCap != null and totCap != ''">and b.TOT_CAP = #{totCap}</if>
- <if test="rsAdmName != null and rsAdmName != ''">and b.RS_ADM_NAME like '%${rsAdmName}%'</if>
- <if test="rsAdmCode != null and rsAdmCode != ''">and b.RS_ADM_CODE = #{rsAdmCode}</if>
- <if test="admDivName != null and admDivName != ''">and b.ADM_DIV_NAME = #{admDivName}</if>
- <if test="rsAdmDep != null and rsAdmDep != ''">and b.RS_ADM_DEP = #{rsAdmDep}</if>
- <if test="admAttRel != null and admAttRel != ''">and b.ADM_ATT_REL = #{admAttRel}</if>
- <if test="rsName != null and rsName != ''">and b.RS_NAME like '%${rsName}%'</if>
- <if test="rsType != null and rsType != ''">and b.RS_TYPE in (${rsType})</if>
- <if test="engScal != null and engScal != ''">and b.ENG_SCAL in (${engScal})</if>
- <if test="admDiv != null and admDiv != ''">and b.ADM_DIV like #{admDiv}||'%'</if>
- <if test="addvcd != null and addvcd != ''">and b.ADM_DIV like #{addvcd}||'%'</if>
- <if test="dutyDep != null and dutyDep != ''">and DUTY_DEP = #{dutyDep}</if>
- <if test="edtrPesr != null and edtrPesr !=''">and b.EDTR_PESR = #{edtrPesr}</if>
- <if test="hstInsp != null and hstInsp !=''">and b.HST_INSP = #{hstInsp}</if>
- <if test="compDateStr != null">and b.COMP_DATE_STR = #{compDateStr}</if>
- <if test="location != null">and b.LOCATION like '%${location}%'</if>
- <if test="rsClass != null">and b.RS_CLASS = #{rsClass}</if>
- <if test="impdDt != null">and b.IMPD_DT = #{impdDt}</if>
- <if test="rnfcImpdDt != null">and b.RNFC_IMPD_DT = #{rnfcImpdDt}</if>
- <if test="desFlStag != null and desFlStag != ''">and b.DES_FL_STAG = #{desFlStag}</if>
- <if test="flConTopStag != null and flConTopStag != ''">and b.FL_CON_TOP_STAG = #{flConTopStag}</if>
- <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">and b.WIUN_WAO_LEG_PERS = #{wiunWaoLegPers}</if>
- <if test="wiunWaoLegPersUnit != null and wiunWaoLegPersUnit != ''">and b.WIUN_WAO_LEG_PERS_UNIT =
- #{wiunWaoLegPersUnit}
- </if>
- <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">and b.WIUN_WAO_LEG_PERS_DUTY =
- #{wiunWaoLegPersDuty}
- </if>
- <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">and b.WIUN_WAO_LEG_PERS_TEL =
- #{wiunWaoLegPersTel}
- </if>
- <if test="techPers != null and techPers != ''">and b.TECH_PERS = #{techPers}</if>
- <if test="techPersUnit != null and techPersUnit != ''">and b.TECH_PERS_UNIT = #{techPersUnit}</if>
- <if test="techPersDuty != null and techPersDuty != ''">and b.TECH_PERS_DUTY = #{techPersDuty}</if>
- <if test="techPersTel != null and techPersTel != ''">and b.TECH_PERS_TEL = #{techPersTel}</if>
- <if test="patrolPers != null and patrolPers != ''">and b.PATROL_PERS = #{patrolPers}</if>
- <if test="patrolPersUnit != null and patrolPersUnit != ''">and b.PATROL_PERS_UNIT = #{patrolPersUnit}</if>
- <if test="patrolPersDuty != null and patrolPersDuty != ''">and b.PATROL_PERS_DUTY = #{patrolPersDuty}</if>
- <if test="patrolPersTel != null and patrolPersTel != ''">and b.PATROL_PERS_TEL = #{patrolPersTel}</if>
- <if test="damType != null and damType != ''">and b.DAM_TYPE = #{damType}</if>
- <if test="inspYear != null and inspYear !=''">and b.INSP_YEAR = #{inspYear}</if>
- <if test="wcEvltOld != null and wcEvltOld !=''">and b.WC_EVLT_OLD = #{wcEvltOld}</if>
- <if test="chkType != null and chkType !=''">and b.CHK_TYPE = #{chkType}</if>
- <if test="isTrhbco != null and isTrhbco !=''">and b.IS_TRHBCO = #{isTrhbco}</if>
- <if test="trhbcoInfo != null and trhbcoInfo !=''">and b.TRHBCO_INFO = #{trhbcoInfo}</if>
- <if test="isTask != null and isTask !=''">and b.IS_TASK = #{isTask}</if>
- </select>
- <select id="findAll" resultMap="attRsBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_RS_BASE
- </select>
- <select id="findList" resultType="cn.com.goldenwater.dcproj.dto.AttRsBaseRgstrDto">
- select
- B.RS_CODE,B.RS_NAME,B.LONGITUDE,B.LATITUDE,B.LOCATION,B.ENG_SCAL,B.LIM_STAG,B.TOT_CAP,B.RS_ADM_NAME,B.RS_ADM_CODE,B.RS_ADM_DEP,
- B.ADM_ATT_REL,B.ADM_DIV,B.RS_TYPE,B.DAM_TYPE_MAT,B.DAM_TYPE_STR,B.DAM_SIZE_HIG,B.CENTER_X,B.CENTER_Y,B.SRC,B.DATA_QUALITY,
- B.INSP_TYPE, B.IS_ACTION, B.IS_SAF, B.DUTY_DEP,
- B.CENTER_X_GD,B.CENTER_Y_GD,B.RS_LOC,B.REG_CODE,B.COMP_DATE,B.INTM,B.REG_NO,B.HST_INSP,B.PERS_ID,B.UPTM,B.CHK_STATE,B.EDTR_PESR,
- B.SLPC_ADM_DIV,B.ADM_DIV_NAME,B.COMP_DATE_STR,B.DISPLAY_LEVEL,B.RS_CLASS,B.IMPD_DT,B.RNFC_IMPD_DT,B.DES_FL_STAG,B.FL_CON_TOP_STAG,
- B.WIUN_WAO_LEG_PERS_UNIT,B.TECH_PERS_UNIT,B.PATROL_PERS_UNIT,B.DAM_TYPE,r.rgstr_id,b.WIUN_WAO_LEG_PERS AS
- WIUN_WAO_LEG_PERS1,b.WIUN_WAO_LEG_PERS_TEL AS
- WIUN_WAO_LEG_PERS_TEL1,b.WIUN_WAO_LEG_PERS_DUTY AS WIUN_WAO_LEG_PERS_DUTY1,
- b.INSP_YEAR, b.WC_EVLT_OLD, b.CHK_TYPE, b.IS_TRHBCO,b.TRHBCO_INFO,b.IS_TASK,
- b.TECH_PERS AS TECH_PERS1,b.TECH_PERS_TEL AS TECH_PERS_TEL1,b.TECH_PERS_DUTY AS TECH_PERS_DUTY1,
- b.PATROL_PERS AS PATROL_PERS1,b.PATROL_PERS_TEL AS PATROL_PERS_TEL1,b.PATROL_PERS_DUTY AS PATROL_PERS_DUTY1,
- b.PROVINCIAL
- from ATT_RS_BASE b
- LEFT JOIN
- (SELECT a.*,ROW_NUMBER() OVER(PARTITION BY rs_code ORDER BY state desc,uptm DESC) rn
- FROM BIS_INSP_RSVR_RGSTR a
- ) r on b.rs_code = r.rs_code and r.rn=1
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="normz != null and normz != ''">and b.NORMZ = #{normz}</if>
- <if test="fsltdz != null and fsltdz != ''">and b.FSLTDZ = #{fsltdz}</if>
- <if test="limStag != null and limStag != ''">and b.LIM_STAG = #{limStag}</if>
- <if test="totCap != null and totCap != ''">and b.TOT_CAP = #{totCap}</if>
- <if test="rsAdmName != null and rsAdmName != ''">and b.RS_ADM_NAME like '%${rsAdmName}%'</if>
- <if test="rsAdmCode != null and rsAdmCode != ''">and b.RS_ADM_CODE = #{rsAdmCode}</if>
- <if test="admDivName != null and admDivName != ''">and b.ADM_DIV_NAME = #{admDivName}</if>
- <if test="rsAdmDep != null and rsAdmDep != ''">and b.RS_ADM_DEP = #{rsAdmDep}</if>
- <if test="admAttRel != null and admAttRel != ''">and b.ADM_ATT_REL = #{admAttRel}</if>
- <if test="rsName != null and rsName != ''">and b.RS_NAME like '%${rsName}%'</if>
- <if test="rsType != null and rsType != ''">and b.RS_TYPE in (${rsType})</if>
- <if test="engScal != null and engScal != ''">and b.ENG_SCAL in (${engScal})</if>
- <if test="admDiv != null and admDiv != ''">and b.ADM_DIV like #{admDiv}||'%'</if>
- <if test="edtrPesr != null and edtrPesr !=''">and b.EDTR_PESR = #{edtrPesr}</if>
- <if test="hstInsp != null and hstInsp !=''">and b.HST_INSP = #{hstInsp}</if>
- <if test="compDateStr != null">and b.COMP_DATE_STR = #{compDateStr}</if>
- <if test="location != null">and b.LOCATION like '%${location}%'</if>
- <if test="rsClass != null">and b.RS_CLASS = #{rsClass}</if>
- <if test="impdDt != null">and b.IMPD_DT = #{impdDt}</if>
- <if test="rnfcImpdDt != null">and b.RNFC_IMPD_DT = #{rnfcImpdDt}</if>
- <if test="desFlStag != null and desFlStag != ''">and b.DES_FL_STAG = #{desFlStag}</if>
- <if test="flConTopStag != null and flConTopStag != ''">and b.FL_CON_TOP_STAG = #{flConTopStag}</if>
- <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">and b.WIUN_WAO_LEG_PERS = #{wiunWaoLegPers}</if>
- <if test="wiunWaoLegPersUnit != null and wiunWaoLegPersUnit != ''">and b.WIUN_WAO_LEG_PERS_UNIT =
- #{wiunWaoLegPersUnit}
- </if>
- <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">and b.WIUN_WAO_LEG_PERS_DUTY =
- #{wiunWaoLegPersDuty}
- </if>
- <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">and b.WIUN_WAO_LEG_PERS_TEL =
- #{wiunWaoLegPersTel}
- </if>
- <if test="techPers != null and techPers != ''">and b.TECH_PERS = #{techPers}</if>
- <if test="techPersUnit != null and techPersUnit != ''">and b.TECH_PERS_UNIT = #{techPersUnit}</if>
- <if test="techPersDuty != null and techPersDuty != ''">and b.TECH_PERS_DUTY = #{techPersDuty}</if>
- <if test="techPersTel != null and techPersTel != ''">and b.TECH_PERS_TEL = #{techPersTel}</if>
- <if test="patrolPers != null and patrolPers != ''">and b.PATROL_PERS = #{patrolPers}</if>
- <if test="patrolPersUnit != null and patrolPersUnit != ''">and b.PATROL_PERS_UNIT = #{patrolPersUnit}</if>
- <if test="patrolPersDuty != null and patrolPersDuty != ''">and b.PATROL_PERS_DUTY = #{patrolPersDuty}</if>
- <if test="patrolPersTel != null and patrolPersTel != ''">and b.PATROL_PERS_TEL = #{patrolPersTel}</if>
- <if test="damType != null and damType != ''">and b.DAM_TYPE = #{damType}</if>
- <if test="province != null and province != ''">and b.RS_CODE LIKE '${province}%'</if>
- <if test="inspYear != null and inspYear !=''">and b.INSP_YEAR = #{inspYear}</if>
- <if test="wcEvltOld != null and wcEvltOld !=''">and b.WC_EVLT_OLD = #{wcEvltOld}</if>
- <if test="chkType != null and chkType !=''">and b.CHK_TYPE = #{chkType}</if>
- <if test="isTrhbco != null and isTrhbco !=''">and b.IS_TRHBCO = #{isTrhbco}</if>
- <if test="trhbcoInfo != null and trhbcoInfo !=''">and b.TRHBCO_INFO = #{trhbcoInfo}</if>
- <if test="isTask != null and isTask !=''">and b.IS_TASK = #{isTask}</if>
- <if test="provincial != null and provincial !=''">and b.PROVINCIAL = #{provincial}</if>
- </trim>
- ORDER BY b.RS_CODE ASC
- </select>
- <select id="selectCount" resultType="int">
- select count(rs_code) from ATT_RS_BASE
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttRsBase">
- insert into ATT_RS_BASE(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from ATT_RS_BASE where RS_CODE = #{rsCode}
- </delete>
- <select id="findMax" parameterType="String" resultType="String">
- select max(rs_code) as rs_code from ATT_RS_BASE where rs_code like '${location}%'
- </select>
- <select id="getObjId" resultType="cn.com.goldenwater.dcproj.model.AttRsBase">
- SELECT
- <include refid="table_columns"/>
- FROM ATT_RS_BASE
- WHERE RS_CODE = (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE OBJ_ID = #{objId})
- </select>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttRsBase">
- delete from ATT_RS_BASE
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_RS_BASE set flag_valid = 0 where RS_CODE = #{rsCode}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttRsBase">
- update ATT_RS_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
- <if test="dutyDep != null and dutyDep != ''">DUTY_DEP = #{dutyDep},</if>
- <if test="isAction != null and isAction != ''">IS_ACTION = #{isAction},</if>
- <if test="isSaf != null and isSaf != ''">IS_SAF = #{isSaf},</if>
- <if test="inspType != null and inspType != ''">INSP_TYPE = #{inspType},</if>
- <if test="normz != null and normz != ''">NORMZ = #{normz},</if>
- FSLTDZ = #{fsltdz},
- <if test="limStag != null and limStag != ''">LIM_STAG = #{limStag},</if>
- TOT_CAP = #{totCap},
- <if test="rsAdmName != null and rsAdmName != ''">RS_ADM_NAME = #{rsAdmName},</if>
- <if test="rsAdmCode != null and rsAdmCode != ''">RS_ADM_CODE = #{rsAdmCode},</if>
- <if test="rsAdmDep != null and rsAdmDep != ''">RS_ADM_DEP = #{rsAdmDep},</if>
- <if test="admAttRel != null and admAttRel != ''">ADM_ATT_REL = #{admAttRel},</if>
- <if test="rsName != null and rsName != ''">RS_NAME = #{rsName},</if>
- <if test="longitude != null and longitude != ''">LONGITUDE = #{longitude},</if>
- <if test="latitude != null and latitude != ''">LATITUDE = #{latitude},</if>
- <if test="location != null and location != ''">LOCATION = #{location},</if>
- <if test="admDiv != null and admDiv != ''">ADM_DIV = #{admDiv},</if>
- <if test="rsType != null and rsType != ''">RS_TYPE = #{rsType},</if>
- <if test="damTypeMat != null and damTypeMat != ''">DAM_TYPE_MAT = #{damTypeMat},</if>
- <if test="damTypeStr != null and damTypeStr != ''">DAM_TYPE_STR = #{damTypeStr},</if>
- <if test="damSizeHig != null and damSizeHig != ''">DAM_SIZE_HIG = #{damSizeHig},</if>
- <if test="centerX != null and centerX != ''">CENTER_X = to_number(#{centerX}),</if>
- <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
- <if test="centerXGd != null and centerXGd != ''">CENTER_X_GD = #{centerXGd},</if>
- <if test="centerYGd != null and centerYGd != ''">CENTER_Y_GD = #{centerYGd},</if>
- <if test="rsLoc != null and rsLoc != ''">RS_LOC = #{rsLoc},</if>
- <if test="regCode != null and regCode != ''">REG_CODE = #{regCode},</if>
- <if test="compDate != null ">COMP_DATE = #{compDate},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="edtrPesr != null and edtrPesr !=''">EDTR_PESR = #{edtrPesr},</if>
- <if test="hstInsp != null and hstInsp !=''">HST_INSP = #{hstInsp},</if>
- <if test="chkState != null and chkState !=''">CHK_STATE = #{chkState},</if>
- <if test="persId != null and persId !=''">PERS_ID = #{persId},</if>
- <if test="compDateStr != null">COMP_DATE_STR = #{compDateStr},</if>
- <if test="displayLevel != null and displayLevel != ''">DISPLAY_LEVEL = #{displayLevel},</if>
- <if test="rsClass != null">RS_CLASS = #{rsClass},</if>
- <if test="impdDt != null">IMPD_DT = #{impdDt},</if>
- <if test="rnfcImpdDt != null">RNFC_IMPD_DT = #{rnfcImpdDt},</if>
- <if test="desFlStag != null and desFlStag != ''">DES_FL_STAG = #{desFlStag},</if>
- <if test="flConTopStag != null and flConTopStag != ''">FL_CON_TOP_STAG = #{flConTopStag},</if>
- <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">WIUN_WAO_LEG_PERS = #{wiunWaoLegPers},</if>
- <if test="wiunWaoLegPersUnit != null and wiunWaoLegPersUnit != ''">WIUN_WAO_LEG_PERS_UNIT =
- #{wiunWaoLegPersUnit},
- </if>
- <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">WIUN_WAO_LEG_PERS_DUTY =
- #{wiunWaoLegPersDuty},
- </if>
- <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">WIUN_WAO_LEG_PERS_TEL =
- #{wiunWaoLegPersTel},
- </if>
- <if test="techPers != null and techPers != ''">TECH_PERS = #{techPers},</if>
- <if test="techPersUnit != null and techPersUnit != ''">TECH_PERS_UNIT = #{techPersUnit},</if>
- <if test="techPersDuty != null and techPersDuty != ''">TECH_PERS_DUTY = #{techPersDuty},</if>
- <if test="techPersTel != null and techPersTel != ''">TECH_PERS_TEL = #{techPersTel},</if>
- <if test="patrolPers != null and patrolPers != ''">PATROL_PERS = #{patrolPers},</if>
- <if test="patrolPersUnit != null and patrolPersUnit != ''">PATROL_PERS_UNIT = #{patrolPersUnit},</if>
- <if test="patrolPersDuty != null and patrolPersDuty != ''">PATROL_PERS_DUTY = #{patrolPersDuty},</if>
- <if test="patrolPersTel != null and patrolPersTel != ''">PATROL_PERS_TEL = #{patrolPersTel},</if>
- <if test="damType != null and damType != ''">DAM_TYPE = #{damType},</if>
- <if test="jxDuty != null and jxDuty != ''">JX_DUTY = #{jxDuty},</if>
- <if test="jxDutyPhone != null and jxDutyPhone != ''">JX_DUTY_PHONE = #{jxDutyPhone},</if>
- <if test="jxRsvrType != null and jxRsvrType != ''">JX_RSVR_TYPE = #{jxRsvrType},</if>
- <if test="jxRsvrStndLev != null and jxRsvrStndLev != ''">JX_RSVR_STND_LEV = #{jxRsvrStndLev},</if>
- <if test="inspYear != null and inspYear != ''">INSP_YEAR = #{inspYear},</if>
- <if test="wcEvltOld != null and wcEvltOld != ''">WC_EVLT_OLD = #{wcEvltOld},</if>
- <if test="chkType != null and chkType != ''">CHK_TYPE = #{chkType},</if>
- <if test="isTrhbco != null and isTrhbco != ''">IS_TRHBCO = #{isTrhbco},</if>
- <if test="trhbcoInfo != null and trhbcoInfo != ''">TRHBCO_INFO = #{trhbcoInfo},</if>
- <if test="isTask != null and isTask != ''">IS_TASK = #{isTask},</if>
- <if test="admDivName != null and admDivName != ''">ADM_DIV_NAME = #{admDivName},</if>
- <if test="provincial != null and provincial != ''">PROVINCIAL = #{provincial},</if>
- </trim>
- <where>RS_CODE = #{rsCode}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttRsBase">
- update ATT_RS_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
- <if test="dutyDep != null and dutyDep != ''">DUTY_DEP = #{dutyDep},</if>
- <if test="isAction != null and isAction != ''">IS_ACTION = #{isAction},</if>
- <if test="isSaf != null and isSaf != ''">IS_SAF = #{isSaf},</if>
- <if test="inspType != null and inspType != ''">INSP_TYPE = #{inspType},</if>
- <if test="normz != null and normz != ''">NORMZ = #{normz},</if>
- FSLTDZ = #{fsltdz},
- <if test="limStag != null and limStag != ''">LIM_STAG = #{limStag},</if>
- TOT_CAP = #{totCap},
- <if test="rsAdmName != null and rsAdmName != ''">RS_ADM_NAME = #{rsAdmName},</if>
- <if test="rsAdmCode != null and rsAdmCode != ''">RS_ADM_CODE = #{rsAdmCode},</if>
- <if test="rsAdmDep != null and rsAdmDep != ''">RS_ADM_DEP = #{rsAdmDep},</if>
- <if test="admAttRel != null and admAttRel != ''">ADM_ATT_REL = #{admAttRel},</if>
- <if test="rsCode != null and rsCode != ''">RS_CODE = #{rsCode},</if>
- <if test="rsName != null and rsName != ''">RS_NAME = #{rsName},</if>
- <if test="longitude != null and longitude != ''">LONGITUDE = #{longitude},</if>
- <if test="latitude != null and latitude != ''">LATITUDE = #{latitude},</if>
- <if test="location != null and location != ''">LOCATION = #{location},</if>
- <if test="admDiv != null and admDiv != ''">ADM_DIV = #{admDiv},</if>
- <if test="rsType != null and rsType != ''">RS_TYPE = #{rsType},</if>
- <if test="damTypeMat != null and damTypeMat != ''">DAM_TYPE_MAT = #{damTypeMat},</if>
- <if test="damTypeStr != null and damTypeStr != ''">DAM_TYPE_STR = #{damTypeStr},</if>
- <if test="damSizeHig != null and damSizeHig != ''">DAM_SIZE_HIG = #{damSizeHig},</if>
- <if test="centerX != null and centerX != ''">CENTER_X = to_number(#{centerX}),</if>
- <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
- <if test="rsLoc != null and rsLoc != ''">RS_LOC = #{rsLoc},</if>
- <if test="regCode != null and regCode != ''">REG_CODE = #{regCode},</if>
- <if test="centerXGd != null and centerXGd != ''">CENTER_X_GD = #{centerXGd},</if>
- <if test="centerYGd != null and centerYGd != ''">CENTER_Y_GD = #{centerYGd},</if>
- <if test="compDate != null">COMP_DATE = #{compDate},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="edtrPesr != null and edtrPesr !=''">EDTR_PESR = #{edtrPesr},</if>
- <if test="hstInsp != null and hstInsp !=''">HST_INSP = #{hstInsp},</if>
- <if test="compDateStr != null">COMP_DATE_STR = #{compDateStr},</if>
- <if test="displayLevel != null and displayLevel != ''">DISPLAY_LEVEL = #{displayLevel},</if>
- <if test="rsClass != null">RS_CLASS = #{rsClass},</if>
- <if test="impdDt != null">IMPD_DT = #{impdDt},</if>
- <if test="rnfcImpdDt != null">RNFC_IMPD_DT = #{rnfcImpdDt},</if>
- <if test="desFlStag != null and desFlStag != ''">DES_FL_STAG = #{desFlStag},</if>
- <if test="flConTopStag != null and flConTopStag != ''">FL_CON_TOP_STAG = #{flConTopStag},</if>
- <if test="wiunWaoLegPers != null and wiunWaoLegPers != ''">WIUN_WAO_LEG_PERS = #{wiunWaoLegPers},</if>
- <if test="wiunWaoLegPersUnit != null and wiunWaoLegPersUnit != ''">WIUN_WAO_LEG_PERS_UNIT =
- #{wiunWaoLegPersUnit},
- </if>
- <if test="wiunWaoLegPersDuty != null and wiunWaoLegPersDuty != ''">WIUN_WAO_LEG_PERS_DUTY =
- #{wiunWaoLegPersDuty},
- </if>
- <if test="wiunWaoLegPersTel != null and wiunWaoLegPersTel != ''">WIUN_WAO_LEG_PERS_TEL =
- #{wiunWaoLegPersTel},
- </if>
- <if test="techPers != null and techPers != ''">TECH_PERS = #{techPers},</if>
- <if test="techPersUnit != null and techPersUnit != ''">TECH_PERS_UNIT = #{techPersUnit},</if>
- <if test="techPersDuty != null and techPersDuty != ''">TECH_PERS_DUTY = #{techPersDuty},</if>
- <if test="techPersTel != null and techPersTel != ''">TECH_PERS_TEL = #{techPersTel},</if>
- <if test="patrolPers != null and patrolPers != ''">PATROL_PERS = #{patrolPers},</if>
- <if test="patrolPersUnit != null and patrolPersUnit != ''">PATROL_PERS_UNIT = #{patrolPersUnit},</if>
- <if test="patrolPersDuty != null and patrolPersDuty != ''">PATROL_PERS_DUTY = #{patrolPersDuty},</if>
- <if test="patrolPersTel != null and patrolPersTel != ''">PATROL_PERS_TEL = #{patrolPersTel},</if>
- <if test="damType != null and damType != ''">DAM_TYPE = #{damType},</if>
- <if test="jxDuty != null and jxDuty != ''">JX_DUTY = #{jxDuty},</if>
- <if test="jxDutyPhone != null and jxDutyPhone != ''">JX_DUTY_PHONE = #{jxDutyPhone},</if>
- <if test="jxRsvrType != null and jxRsvrType != ''">JX_RSVR_TYPE = #{jxRsvrType},</if>
- <if test="jxRsvrStndLev != null and jxRsvrStndLev != ''">JX_RSVR_STND_LEV = #{jxRsvrStndLev},</if>
- <if test="inspYear != null and inspYear != ''">INSP_YEAR = #{inspYear},</if>
- <if test="wcEvltOld != null and wcEvltOld != ''">WC_EVLT_OLD = #{wcEvltOld},</if>
- <if test="chkType != null and chkType != ''">CHK_TYPE = #{chkType},</if>
- <if test="isTrhbco != null and isTrhbco != ''">IS_TRHBCO = #{isTrhbco},</if>
- <if test="trhbcoInfo != null and trhbcoInfo != ''">TRHBCO_INFO = #{trhbcoInfo},</if>
- <if test="isTask != null and isTask != ''">IS_TASK = #{isTask},</if>
- <if test="admDivName != null and admDivName != ''">ADM_DIV_NAME = #{admDivName},</if>
- <if test="provincial != null and provincial != ''">PROVINCIAL = #{provincial},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- <!--根据督查组查询范围内的对象-->
- <select id="getListByInspGroupIdObjType" parameterType="cn.com.goldenwater.dcproj.param.PagePersObjParam"
- resultType="cn.com.goldenwater.dcproj.vo.AttRsBaseVo">
- SELECT
- T.*,C.ID,C.PNM,O.OBJ_ID
- FROM ATT_RS_BASE T
- JOIN BIS_INSP_ALL_OBJ O ON O.CODE = T.RS_CODE
- JOIN BIS_INSP_ALL C ON O.ID = C.ID
- where O.PTYPE = #{objType}
- <if test='isAll == "0"'>and o.ID = #{inspGroupId}</if>
- <if test='isAll == "1"'>and o.ID LIKE '${inspGroupId}%'</if>
- <if test="rsName != null and rsName != ''">and t.RS_NAME LIKE '%${rsName}%'</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>
- <if test="adCode != null and adCode != ''">and t.ADM_DIV LIKE '${adCode}%'</if>
- <choose>
- <when test="province !=null and province !=''">
- and o.ad_code like '${province}%'
- </when>
- <otherwise>
- and o.ad_code is null
- </otherwise>
- </choose>
- <!-- <if test="objType =='1'.toString()">-->
- <!-- AND t.ENG_SCAL in(4,5)-->
- <!-- </if>-->
- <!-- <if test="objType =='36'.toString()">-->
- <!-- AND t.ENG_SCAL in(1,2,3)-->
- <!-- </if>-->
- <if test="objType == '26'.toString()">
- and t.ENG_SCAL in (1,2,3)
- </if>
- order by t.rs_code
- </select>
- <!--查询不在范围内的对象-->
- <select id="getObjListNotInspGroupId" resultType="cn.com.goldenwater.dcproj.model.AttRsBase">
- select *
- from ATT_RS_BASE t
- where t.rs_code not in (
- select CODE from BIS_INSP_ALL_OBJ where id like concat(#{inspGroupId},'%'))
- <if test="rsName != null and rsName != ''">and t.RS_NAME LIKE '%${rsName}%'</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>
- <if test="province != null and province != ''">and t.ADM_DIV LIKE '${province}%'</if>
- <if test="objType =='1'.toString()">AND t.ENG_SCAL in(4,5)</if>
- <if test="objType =='36'.toString()">AND t.ENG_SCAL in(1,2,3)</if>
- <if test="objType =='26'.toString()">AND t.ENG_SCAL in(1,2,3)</if>
- </select>
- <select id="getObjByPersId" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam"
- resultType="cn.com.goldenwater.dcproj.model.AttPersRs">
- SELECT A.ENG_SCAL,R.RGSTR_ID,A.HST_INSP, A.INSP_TYPE, A.IS_ACTION, A.IS_SAF,A.DUTY_DEP,
- A.LIM_STAG,
- A.TOT_CAP,
- A.NORMZ,
- A.FSLTDZ,
- A.RS_ADM_NAME,
- A.RS_ADM_CODE,
- A.RS_ADM_DEP,
- A.ADM_ATT_REL,
- A.RS_CODE,
- A.RS_NAME,
- A.LONGITUDE,
- A.LATITUDE,
- A.LOCATION,
- 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.CENTER_X_GD,
- A.CENTER_Y_GD,
- A.RS_CLASS,
- A.IMPD_DT,
- A.RNFC_IMPD_DT,
- A.DES_FL_STAG,
- A.FL_CON_TOP_STAG,
- A.WIUN_WAO_LEG_PERS,
- A.WIUN_WAO_LEG_PERS_UNIT,
- A.WIUN_WAO_LEG_PERS_DUTY,
- A.WIUN_WAO_LEG_PERS_TEL,
- A.TECH_PERS,
- A.TECH_PERS_UNIT,
- A.TECH_PERS_DUTY,
- A.TECH_PERS_TEL,
- A.PATROL_PERS,
- A.PATROL_PERS_UNIT,
- A.PATROL_PERS_DUTY,
- A.PATROL_PERS_TEL,
- A.PROVINCIAL,
- B.ID,
- B.NM,
- B.PTYPE,
- B.LGTD,
- B.LTTD,AD.AD_NAME adName,
- B.INSP_YEAR,B.WC_EVLT_OLD,B.CHK_TYPE,B.IS_TRHBCO,B.TRHBCO_INFO,B.IS_TASK,
- B.OBJ_ID FROM ATT_RS_BASE A LEFT JOIN BIS_INSP_ALL_OBJ B ON A.RS_CODE = B.CODE
- LEFT JOIN BIS_INSP_RSVR_RGSTR R on B.Obj_Id=R.Obj_Id
- LEFT JOIN ATT_AD_BASE AD ON A.ADM_DIV = AD.AD_CODE
- WHERE B.PTYPE = #{objType}
- <choose>
- <when test="province !=null and province !=''">
- and B.AD_CODE=#{province}
- </when>
- <otherwise>
- and B.AD_CODE is null
- </otherwise>
- </choose>
- AND
- REGEXP_LIKE(
- B.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID =#{persGuid}
- <include refid="orgIdSql"/>
- )>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID =#{persGuid}
- <include refid="orgIdSql"/> GROUP BY PERSID
- )
- else (select 'non' from dual) end)
- ||')')
- and R.RGSTR_ID is not null
- <if test="rsName != null and rsName != ''">and A.RS_NAME LIKE '%${rsName}%'</if>
- <if test="adCode != null and adCode != ''">and A.ADM_DIV LIKE '${adCode}%'</if>
- <if test="objType =='1'.toString()">
- AND A.ENG_SCAL in(4,5)
- </if>
- <if test="objType =='36'.toString()">
- AND A.ENG_SCAL in(1,2,3)
- </if>
- ORDER BY A.RS_CODE
- </select>
- <sql id="orgIdSql">
- <choose>
- <when test="orgId !=null and orgId !=''">
- and ORG_ID=#{orgId}
- </when>
- <otherwise>
- and ORG_ID is null
- </otherwise>
- </choose>
- </sql>
- <select id="getRsCountByAdCode" resultType="Long">
- SELECT COUNT(RS_CODE) FROM ATT_RS_BASE WHERE ADM_DIV LIKE '${subAd}%'
- </select>
- <select id="getRsCountByGrad" resultType="cn.com.goldenwater.dcproj.dto.RsCountDto">
- SELECT AD.AD_CODE,AD.AD_NAME,AD.LGTD lgtd,AD.LTTD lttd,t1.rsCount FROM
- ATT_AD_X_BASE AD LEFT JOIN
- (SELECT SUBSTR(ADM_DIV,1,${sub}) subAd,count(RS_CODE) rsCount FROM ATT_RS_BASE t where 1=1
- <if test="objType =='1'.toString()">
- AND t.ENG_SCAL in(4,5)
- </if>
- <if test="objType =='36'.toString()">
- AND t.ENG_SCAL in(1,2,3)
- </if>
- GROUP BY SUBSTR(ADM_DIV,1,${sub})) t1
- ON CONCAT(t1.subAd,'${con}') = AD.AD_CODE
- WHERE AD.AD_GRAD = #{adGrad}
- <if test="adCode != null and adCode != ''">and AD.AD_CODE LIKE '${adCode}%'</if>
- ORDER BY AD.AD_CODE
- </select>
- <select id="getRsListByNodeIdsAndAdCodes" resultType="cn.com.goldenwater.dcproj.model.AttRsBase">
- select DISTINCT t.*
- from ATT_RS_BASE t
- left join BIS_INSP_ALL_OBJ o
- on o.code = t.rs_code
- where o.ptype = #{pType}
- AND
- REGEXP_LIKE(
- o.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID =#{persGuid}
- <include refid="orgIdSql"/>
- )>0 then
- (SELECT LISTAGG(id, '|') as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID =#{persGuid}
- <include refid="orgIdSql"/> GROUP BY PERSID
- )
- else (select 'non' from dual) end)
- ||')')
- <if test="nodes != null and nodes != ''">
- AND
- <foreach collection="nodes" index="index" item="item" separator="or">
- o.id like CONCAT(#{item},'%')
- </foreach>
- </if>
- <if test="ads != null and ads != ''">
- AND
- <foreach collection="ads" index="index" item="item1" separator="or">
- t.adm_div like #{item1}
- </foreach>
- </if>
- <if test="pType =='1'.toString()">
- AND t.ENG_SCAL in(4,5)
- </if>
- <if test="pType =='36'.toString()">
- AND t.ENG_SCAL in(1,2,3)
- </if>
- order by t.rs_code asc
- </select>
- <select id="findGdIsNull" resultType="cn.com.goldenwater.dcproj.model.AttRsBase">
- select * from ATT_RS_BASE WHERE center_x is not null and center_y is not null and center_x_gd is null and center_y_gd is null
- </select>
- <select id="getRsBaseList" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam"
- resultType="cn.com.goldenwater.dcproj.dto.BisInspObjDto">
- select * from (select t.rs_name as nm,t.rs_code as
- code,t.eng_scal,t.center_x,t.center_y,t.location,t.CENTER_X_GD gdX,t.CENTER_Y_GD gdY,
- case when b.state is null then '0' else b.state end as state,t.display_level,t.ADM_DIV as ad_code,
- t.INSP_YEAR,t.WC_EVLT_OLD,t.CHK_TYPE,t.IS_TRHBCO,t.TRHBCO_INFO,t.IS_TASK,t.PROVINCIAL
- from att_rs_base t
- left join
- (SELECT b.CODE,B.OBJ_ID,C.STATE,C.id as rgstr_id FROM BIS_INSP_ALL_OBJ B
- LEFT JOIN BIS_INSP_RSFCO_RGSTR C ON B.OBJ_ID = C.OBJ_ID
- where b.ptype = '26'
- ) b ON b.code = t.RS_CODE
- where t.eng_scal in ('1','2','3')) FOR_QUE WHERE 1=1
- <if test="state != null and state != ''">and FOR_QUE.STATE = #{state}</if>
- <if test="maxLgtd != null and maxLgtd != '' and minLgtd != null and minLgtd != ''">and FOR_QUE.CENTER_X BETWEEN
- #{minLgtd} AND #{maxLgtd}
- </if>
- <if test="maxLttd != null and maxLttd != '' and minLttd != null and minLttd != ''">and FOR_QUE.CENTER_Y BETWEEN
- #{minLttd} AND #{maxLttd}
- </if>
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and
- FOR_QUE.gdX BETWEEN #{mincenterXGd} AND #{maxcenterXGd}
- </if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and
- FOR_QUE.gdY BETWEEN #{mincenterYGd} AND #{maxcenterYGd}
- </if>
- <if test="engScal != null and engScal != ''">and FOR_QUE.ENG_SCAL = #{engScal}</if>
- <if test="rsName != null and rsName != ''">and FOR_QUE.NM like CONCAT('%',CONCAT(#{rsName}, '%'))</if>
- <if test="adCode != null and adCode != ''">and FOR_QUE.ad_code like CONCAT('%',CONCAT(#{adCode}, '%'))</if>
- <if test="displayLevel != null and displayLevel != ''">
- AND to_number(FOR_QUE.DISPLAY_LEVEL) <= to_number(#{displayLevel})
- </if>
- </select>
- <select id="getRssfdrBaseList" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam"
- resultType="cn.com.goldenwater.dcproj.dto.BisInspObjDto">
- select * from
- (
- select
- t.rs_name as nm,t.rs_code as code,t.eng_scal,t.center_x,t.center_y,
- t.location,t.CENTER_X_GD gdX,t.CENTER_Y_GD gdY,
- case when b.state is null then '0' else b.state end as state,
- t.display_level,t.ADM_DIV as ad_code, t.build_stat as type,
- t.provincial
- from att_rs_base t
- left join
- (SELECT B.CODE,B.OBJ_ID,C.STATE,C.ID AS RGSTR_ID FROM BIS_INSP_ALL_OBJ B
- LEFT JOIN BIS_INSP_RSSFDR_RGSTR C ON B.OBJ_ID = C.OBJ_ID
- WHERE B.PTYPE = '34'
- ) b ON b.code = t.RS_CODE
- where t.build_stat in ('1','2','3')) FOR_QUE WHERE 1=1
- <if test="state != null and state != ''">and FOR_QUE.STATE = #{state}</if>
- <if test="maxLgtd != null and maxLgtd != '' and minLgtd != null and minLgtd != ''">and FOR_QUE.CENTER_X BETWEEN
- #{minLgtd} AND #{maxLgtd}
- </if>
- <if test="maxLttd != null and maxLttd != '' and minLttd != null and minLttd != ''">and FOR_QUE.CENTER_Y BETWEEN
- #{minLttd} AND #{maxLttd}
- </if>
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and
- FOR_QUE.gdX BETWEEN #{mincenterXGd} AND #{maxcenterXGd}
- </if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and
- FOR_QUE.gdY BETWEEN #{mincenterYGd} AND #{maxcenterYGd}
- </if>
- <if test="engScal != null and engScal != ''">and FOR_QUE.ENG_SCAL = #{engScal}</if>
- <if test="rsName != null and rsName != ''">and FOR_QUE.NM like CONCAT('%',CONCAT(#{rsName}, '%'))</if>
- <if test="adCode != null and adCode != ''">and FOR_QUE.ad_code like CONCAT('%',CONCAT(#{adCode}, '%'))</if>
- <if test="displayLevel != null and displayLevel != ''">
- AND to_number(FOR_QUE.DISPLAY_LEVEL) <= to_number(#{displayLevel})
- </if>
- </select>
- <update id="updateList" parameterType="java.util.List">
- <foreach collection="list" index="index" item="item" open="begin" close=";end;" separator=";">
- UPDATE ATT_RS_BASE
- <set>
- build_stat = '2'
- </set>
- <where>
- RS_CODE = #{item.rsCode}
- </where>
- </foreach>
- </update>
- <select id="getRsMlList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
- SELECT * FROM ATT_RS_BASE_ML
- WHERE 1=1 and RS_CODE is null
- <if test="num != null and num != ''">and to_number(NUM) <=#{num}</if>
- <if test="proNm != null and proNm != ''">and PRO_NM like CONCAT('%',CONCAT(#{proNm}, '%'))</if>
- <if test="proCd != null and proCd != ''">and PRO_CD = #{proCd}</if>
- <if test="countyNm != null and countyNm != ''">and COUNTY_NM like CONCAT('%',CONCAT(#{countyNm}, '%'))</if>
- <if test="countyCd != null and countyCd != ''">and COUNTY_CD = #{countyCd}</if>
- <if test="rsName != null and rsName != ''">and RS_NAME like CONCAT('%',CONCAT(#{rsName}, '%'))</if>
- <if test="rsCode != null and rsCode != ''">and RS_CODE = #{rsCode}</if>
- order by to_number(num)
- </select>
- <update id="updateRsMl" parameterType="java.util.HashMap">
- update ATT_RS_BASE_ML
- <trim prefix="set" suffixOverrides=",">
- <if test="PRO_NM != null and PRO_NM != ''">PRO_NM = #{PRO_NM},</if>
- <if test="PRO_CD != null and PRO_CD != ''">PRO_CD = #{PRO_CD},</if>
- <if test="COUNTY_NM != null and COUNTY_NM != ''">COUNTY_NM = #{COUNTY_NM},</if>
- <if test="COUNTY_CD != null and COUNTY_CD != ''">COUNTY_CD = #{COUNTY_CD},</if>
- <if test="RS_NAME != null and RS_NAME != ''">RS_NAME = #{RS_NAME},</if>
- <if test="RS_CODE != null and RS_CODE != ''">RS_CODE = #{RS_CODE},</if>
- </trim>
- WHERE NUM = #{NUM}
- </update>
- <select id="findRsZbList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
- SELECT * FROM ATT_RS_BASE_ZB
- WHERE 1=1
- <if test="RS_NAME != null and RS_NAME != ''">and RS_NAME like '%${RS_NAME}%'</if>
- <if test="ADDVCD != null and ADDVCD != ''">and ADDVCD like #{ADDVCD}||'%'</if>
- <if test="ADDVNM4 != null and ADDVNM4 != ''">and ADDVNM4 like '%${ADDVNM4}%'</if>
- </select>
- <update id="updateBatchProvincial" parameterType="cn.com.goldenwater.dcproj.param.AttRsBaseParam">
- update ATT_RS_BASE set PROVINCIAL = #{provincial}
- where RS_CODE in
- <foreach item="rsCode" collection="rsCodes" open="(" separator="," close=")">
- #{rsCode}
- </foreach>
- </update>
- <update id="updateRegCodeByCode" parameterType="cn.com.goldenwater.dcproj.model.AttRsBase">
- update ATT_RS_BASE
- set REG_CODE = #{regCode} ,UPTM = #{uptm}
- where RS_CODE = #{rsCode}
- </update>
- </mapper>
|