| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656 |
- <?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.AttWagaBaseDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttWagaBase" id="attWagaBaseResultMap">
- <result property="gateAdmOrg" column="GATE_ADM_ORG"/>
- <result property="staTimeYear" column="STA_TIME_YEAR"/>
- <result property="staTimeMon" column="STA_TIME_MON"/>
- <result property="engGrad" column="ENG_GRAD"/>
- <result property="mainConGrad" column="MAIN_CON_GRAD"/>
- <result property="holeNum" column="HOLE_NUM"/>
- <result property="holeWid" column="HOLE_WID"/>
- <result property="subGateNum" column="SUB_GATE_NUM"/>
- <result property="subGateWid" column="SUB_GATE_WID"/>
- <result property="locationXiang" column="LOCATION_XIANG"/>
- <result property="locationCun" column="LOCATION_CUN"/>
- <result property="gateAdmName" column="GATE_ADM_NAME"/>
- <result property="gateAdmDep" column="GATE_ADM_DEP"/>
- <result property="ifDem" column="IF_DEM"/>
- <result property="ifAffRi" column="IF_AFF_RI"/>
- <result property="admAttRel" column="ADM_ATT_REL"/>
- <result property="centerX" column="CENTER_X"/>
- <result property="centerY" column="CENTER_Y"/>
- <result property="gdX" column="GD_X"/>
- <result property="gdY" column="GD_Y"/>
- <result property="objCode" column="OBJ_CODE"/>
- <result property="gateName" column="GATE_NAME"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="locRvName" column="LOC_RV_NAME"/>
- <result property="gateType" column="GATE_TYPE"/>
- <result property="gateFlow" column="GATE_FLOW"/>
- <result property="engScal" column="ENG_SCAL"/>
- <result property="flGateFlow" column="FL_GATE_FLOW"/>
- <result property="desFlSta" column="DES_FL_STA"/>
- <result property="cheFlSta" column="CHE_FL_STA"/>
- <result property="cheGateFlow" column="CHE_GATE_FLOW"/>
- <result property="cheDesFlSta" column="CHE_DES_FL_STA"/>
- <result property="cheCheFlSta" column="CHE_CHE_FL_STA"/>
- <result property="draGateFlow" column="DRA_GATE_FLOW"/>
- <result property="draDesFlSta" column="DRA_DES_FL_STA"/>
- <result property="draCheFlSta" column="DRA_CHE_FL_STA"/>
- <result property="ifDraDou" column="IF_DRA_DOU"/>
- <result property="intGateFlow" column="INT_GATE_FLOW"/>
- <result property="intDesFlSta" column="INT_DES_FL_STA"/>
- <result property="intCheFlSta" column="INT_CHE_FL_STA"/>
- <result property="intDivAb" column="INT_DIV_AB"/>
- <result property="intUse" column="INT_USE"/>
- <result property="intUseIrrName" column="INT_USE_IRR_NAME"/>
- <result property="ifIntDou" column="IF_INT_DOU"/>
- <result property="tideGateFlow" column="TIDE_GATE_FLOW"/>
- <result property="tideDesSta" column="TIDE_DES_STA"/>
- <result property="tideCheSta" column="TIDE_CHE_STA"/>
- <result property="ifGate" column="IF_GATE"/>
- <result property="ifDouDile" column="IF_DOU_DILE"/>
- <result property="engSta" column="ENG_STA"/>
- <result property="buidTimeYear" column="BUID_TIME_YEAR"/>
- <result property="buidTimeMon" column="BUID_TIME_MON"/>
- <result property="persId" column="PERS_ID"/>
- <result property="displayLevel" column="DISPLAY_LEVEL"/>
- <result property="provincial" column="PROVINCIAL"/>
- </resultMap>
- <sql id="table_columns">
- GATE_ADM_ORG,PERS_ID,
- STA_TIME_YEAR,
- STA_TIME_MON,
- ENG_GRAD,
- MAIN_CON_GRAD,
- HOLE_NUM,
- HOLE_WID,
- SUB_GATE_NUM,
- SUB_GATE_WID,
- LOCATION_XIANG,
- LOCATION_CUN,
- GATE_ADM_NAME,
- GATE_ADM_DEP,
- IF_DEM,
- IF_AFF_RI,
- ADM_ATT_REL,
- CENTER_X,
- CENTER_Y,
- GD_X,
- GD_Y,
- OBJ_CODE,
- GATE_NAME,
- AD_CODE,
- LOC_RV_NAME,
- GATE_TYPE,
- GATE_FLOW,
- ENG_SCAL,
- FL_GATE_FLOW,
- DES_FL_STA,
- CHE_FL_STA,
- CHE_GATE_FLOW,
- CHE_DES_FL_STA,
- CHE_CHE_FL_STA,
- DRA_GATE_FLOW,
- DRA_DES_FL_STA,
- DRA_CHE_FL_STA,
- IF_DRA_DOU,
- INT_GATE_FLOW,
- INT_DES_FL_STA,
- INT_CHE_FL_STA,
- INT_DIV_AB,
- INT_USE,
- INT_USE_IRR_NAME,
- IF_INT_DOU,
- TIDE_GATE_FLOW,
- TIDE_DES_STA,
- TIDE_CHE_STA,
- IF_GATE,
- IF_DOU_DILE,
- ENG_STA,
- BUID_TIME_YEAR,
- BUID_TIME_MON,
- DISPLAY_LEVEL,
- PROVINCIAL
- </sql>
- <sql id="entity_properties">
- #{gateAdmOrg},#{persId},
- #{staTimeYear},
- #{staTimeMon},
- #{engGrad},
- #{mainConGrad},
- #{holeNum},
- #{holeWid},
- #{subGateNum},
- #{subGateWid},
- #{locationXiang},
- #{locationCun},
- #{gateAdmName},
- #{gateAdmDep},
- #{ifDem},
- #{ifAffRi},
- #{admAttRel},
- #{centerX},
- #{centerY},
- #{gdX},
- #{gdY},
- #{objCode},
- #{gateName},
- #{adCode},
- #{locRvName},
- #{gateType},
- #{gateFlow},
- #{engScal},
- #{flGateFlow},
- #{desFlSta},
- #{cheFlSta},
- #{cheGateFlow},
- #{cheDesFlSta},
- #{cheCheFlSta},
- #{draGateFlow},
- #{draDesFlSta},
- #{draCheFlSta},
- #{ifDraDou},
- #{intGateFlow},
- #{intDesFlSta},
- #{intCheFlSta},
- #{intDivAb},
- #{intUse},
- #{intUseIrrName},
- #{ifIntDou},
- #{tideGateFlow},
- #{tideDesSta},
- #{tideCheSta},
- #{ifGate},
- #{ifDouDile},
- #{engSta},
- #{buidTimeYear},
- #{buidTimeMon},
- #{displayLevel},
- #{provincial}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="staTimeYear != null and staTimeYear != ''">and STA_TIME_YEAR = #{staTimeYear}</if>
- <if test="staTimeMon != null and staTimeMon != ''">and STA_TIME_MON = #{staTimeMon}</if>
- <if test="engGrad != null and engGrad != ''">and ENG_GRAD = #{engGrad}</if>
- <if test="mainConGrad != null and mainConGrad != ''">and MAIN_CON_GRAD = #{mainConGrad}</if>
- <if test="holeNum != null and holeNum != ''">and HOLE_NUM = #{holeNum}</if>
- <if test="holeWid != null and holeWid != ''">and HOLE_WID = #{holeWid}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="subGateNum != null and subGateNum != ''">and SUB_GATE_NUM = #{subGateNum}</if>
- <if test="subGateWid != null and subGateWid != ''">and SUB_GATE_WID = #{subGateWid}</if>
- <if test="locationXiang != null and locationXiang != ''">and LOCATION_XIANG = #{locationXiang}</if>
- <if test="locationCun != null and locationCun != ''">and LOCATION_CUN = #{locationCun}</if>
- <if test="gateAdmName != null and gateAdmName != ''">and GATE_ADM_NAME = #{gateAdmName}</if>
- <if test="gateAdmDep != null and gateAdmDep != ''">and GATE_ADM_DEP = #{gateAdmDep}</if>
- <if test="ifDem != null and ifDem != ''">and IF_DEM = #{ifDem}</if>
- <if test="ifAffRi != null and ifAffRi != ''">and IF_AFF_RI = #{ifAffRi}</if>
- <if test="admAttRel != null and admAttRel != ''">and ADM_ATT_REL = #{admAttRel}</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="gdX != null and gdX != ''">and GD_X = #{gdX}</if>
- <if test="gdY != null and gdY != ''">and GD_Y = #{gdY}</if>
- <if test="objCode != null and objCode != ''">and OBJ_CODE = #{objCode}</if>
- <if test="gateName != null and gateName != ''">and GATE_NAME = #{gateName}</if>
- <if test="adCode != null and adCode != ''">and AD_CODE like '${adCode}%'</if>
- <if test="locRvName != null and locRvName != ''">and LOC_RV_NAME = #{locRvName}</if>
- <if test="gateType != null and gateType != ''">and GATE_TYPE = #{gateType}</if>
- <if test="gateFlow != null and gateFlow != ''">and GATE_FLOW = #{gateFlow}</if>
- <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
- <if test="flGateFlow != null and flGateFlow != ''">and FL_GATE_FLOW = #{flGateFlow}</if>
- <if test="desFlSta != null and desFlSta != ''">and DES_FL_STA = #{desFlSta}</if>
- <if test="cheFlSta != null and cheFlSta != ''">and CHE_FL_STA = #{cheFlSta}</if>
- <if test="cheGateFlow != null and cheGateFlow != ''">and CHE_GATE_FLOW = #{cheGateFlow}</if>
- <if test="cheDesFlSta != null and cheDesFlSta != ''">and CHE_DES_FL_STA = #{cheDesFlSta}</if>
- <if test="cheCheFlSta != null and cheCheFlSta != ''">and CHE_CHE_FL_STA = #{cheCheFlSta}</if>
- <if test="draGateFlow != null and draGateFlow != ''">and DRA_GATE_FLOW = #{draGateFlow}</if>
- <if test="draDesFlSta != null and draDesFlSta != ''">and DRA_DES_FL_STA = #{draDesFlSta}</if>
- <if test="draCheFlSta != null and draCheFlSta != ''">and DRA_CHE_FL_STA = #{draCheFlSta}</if>
- <if test="ifDraDou != null and ifDraDou != ''">and IF_DRA_DOU = #{ifDraDou}</if>
- <if test="intGateFlow != null and intGateFlow != ''">and INT_GATE_FLOW = #{intGateFlow}</if>
- <if test="intDesFlSta != null and intDesFlSta != ''">and INT_DES_FL_STA = #{intDesFlSta}</if>
- <if test="intCheFlSta != null and intCheFlSta != ''">and INT_CHE_FL_STA = #{intCheFlSta}</if>
- <if test="intDivAb != null and intDivAb != ''">and INT_DIV_AB = #{intDivAb}</if>
- <if test="intUse != null and intUse != ''">and INT_USE = #{intUse}</if>
- <if test="intUseIrrName != null and intUseIrrName != ''">and INT_USE_IRR_NAME = #{intUseIrrName}</if>
- <if test="ifIntDou != null and ifIntDou != ''">and IF_INT_DOU = #{ifIntDou}</if>
- <if test="tideGateFlow != null and tideGateFlow != ''">and TIDE_GATE_FLOW = #{tideGateFlow}</if>
- <if test="tideDesSta != null and tideDesSta != ''">and TIDE_DES_STA = #{tideDesSta}</if>
- <if test="tideCheSta != null and tideCheSta != ''">and TIDE_CHE_STA = #{tideCheSta}</if>
- <if test="ifGate != null and ifGate != ''">and IF_GATE = #{ifGate}</if>
- <if test="ifDouDile != null and ifDouDile != ''">and IF_DOU_DILE = #{ifDouDile}</if>
- <if test="engSta != null and engSta != ''">and ENG_STA = #{engSta}</if>
- <if test="buidTimeYear != null and buidTimeYear != ''">and BUID_TIME_YEAR = #{buidTimeYear}</if>
- <if test="buidTimeMon != null and buidTimeMon != ''">and BUID_TIME_MON = #{buidTimeMon}</if>
- <if test="provincial != null and provincial != ''">and PROVINCIAL = #{provincial}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attWagaBaseResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from ATT_WAGA_BASE where OBJ_CODE = #{id}
- </select>
- <select id="getBy" resultMap="attWagaBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_WAGA_BASE
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="attWagaBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_WAGA_BASE
- </select>
- <select id="findList" resultMap="attWagaBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_WAGA_BASE
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from ATT_WAGA_BASE
- <include refid="page_where"/>
- </select>
- <select id="getMax" resultType="java.lang.String" parameterType="java.lang.String">
- select max(obj_code) as objCode from att_waga_base e where e.ad_code like '${adCode}%'
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWagaBase">
- insert into ATT_WAGA_BASE(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from ATT_WAGA_BASE where OBJ_CODE = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWagaBase">
- delete from ATT_WAGA_BASE
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_WAGA_BASE set flag_valid = 0 where objCode = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWagaBase">
- update ATT_WAGA_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="staTimeYear != null and staTimeYear != ''">STA_TIME_YEAR = #{staTimeYear},</if>
- <if test="staTimeMon != null and staTimeMon != ''">STA_TIME_MON = #{staTimeMon},</if>
- <if test="engGrad != null and engGrad != ''">ENG_GRAD = #{engGrad},</if>
- <if test="mainConGrad != null and mainConGrad != ''">MAIN_CON_GRAD = #{mainConGrad},</if>
- <if test="holeNum != null and holeNum != ''">HOLE_NUM = #{holeNum},</if>
- <if test="holeWid != null and holeWid != ''">HOLE_WID = #{holeWid},</if>
- <if test="subGateNum != null and subGateNum != ''">SUB_GATE_NUM = #{subGateNum},</if>
- <if test="subGateWid != null and subGateWid != ''">SUB_GATE_WID = #{subGateWid},</if>
- <if test="locationXiang != null and locationXiang != ''">LOCATION_XIANG = #{locationXiang},</if>
- <if test="locationCun != null and locationCun != ''">LOCATION_CUN = #{locationCun},</if>
- <if test="gateAdmName != null and gateAdmName != ''">GATE_ADM_NAME = #{gateAdmName},</if>
- <if test="gateAdmDep != null and gateAdmDep != ''">GATE_ADM_DEP = #{gateAdmDep},</if>
- <if test="ifDem != null and ifDem != ''">IF_DEM = #{ifDem},</if>
- <if test="ifAffRi != null and ifAffRi != ''">IF_AFF_RI = #{ifAffRi},</if>
- <if test="admAttRel != null and admAttRel != ''">ADM_ATT_REL = #{admAttRel},</if>
- <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
- <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
- <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
- <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
- <if test="gateName != null and gateName != ''">GATE_NAME = #{gateName},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="locRvName != null and locRvName != ''">LOC_RV_NAME = #{locRvName},</if>
- <if test="gateType != null and gateType != ''">GATE_TYPE = #{gateType},</if>
- <if test="gateFlow != null and gateFlow != ''">GATE_FLOW = #{gateFlow},</if>
- <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
- <if test="flGateFlow != null and flGateFlow != ''">FL_GATE_FLOW = #{flGateFlow},</if>
- <if test="desFlSta != null and desFlSta != ''">DES_FL_STA = #{desFlSta},</if>
- <if test="cheFlSta != null and cheFlSta != ''">CHE_FL_STA = #{cheFlSta},</if>
- <if test="cheGateFlow != null and cheGateFlow != ''">CHE_GATE_FLOW = #{cheGateFlow},</if>
- <if test="cheDesFlSta != null and cheDesFlSta != ''">CHE_DES_FL_STA = #{cheDesFlSta},</if>
- <if test="cheCheFlSta != null and cheCheFlSta != ''">CHE_CHE_FL_STA = #{cheCheFlSta},</if>
- <if test="draGateFlow != null and draGateFlow != ''">DRA_GATE_FLOW = #{draGateFlow},</if>
- <if test="draDesFlSta != null and draDesFlSta != ''">DRA_DES_FL_STA = #{draDesFlSta},</if>
- <if test="draCheFlSta != null and draCheFlSta != ''">DRA_CHE_FL_STA = #{draCheFlSta},</if>
- <if test="ifDraDou != null and ifDraDou != ''">IF_DRA_DOU = #{ifDraDou},</if>
- <if test="intGateFlow != null and intGateFlow != ''">INT_GATE_FLOW = #{intGateFlow},</if>
- <if test="intDesFlSta != null and intDesFlSta != ''">INT_DES_FL_STA = #{intDesFlSta},</if>
- <if test="intCheFlSta != null and intCheFlSta != ''">INT_CHE_FL_STA = #{intCheFlSta},</if>
- <if test="intDivAb != null and intDivAb != ''">INT_DIV_AB = #{intDivAb},</if>
- <if test="intUse != null and intUse != ''">INT_USE = #{intUse},</if>
- <if test="intUseIrrName != null and intUseIrrName != ''">INT_USE_IRR_NAME = #{intUseIrrName},</if>
- <if test="ifIntDou != null and ifIntDou != ''">IF_INT_DOU = #{ifIntDou},</if>
- <if test="tideGateFlow != null and tideGateFlow != ''">TIDE_GATE_FLOW = #{tideGateFlow},</if>
- <if test="tideDesSta != null and tideDesSta != ''">TIDE_DES_STA = #{tideDesSta},</if>
- <if test="tideCheSta != null and tideCheSta != ''">TIDE_CHE_STA = #{tideCheSta},</if>
- <if test="ifGate != null and ifGate != ''">IF_GATE = #{ifGate},</if>
- <if test="ifDouDile != null and ifDouDile != ''">IF_DOU_DILE = #{ifDouDile},</if>
- <if test="engSta != null and engSta != ''">ENG_STA = #{engSta},</if>
- <if test="buidTimeYear != null and buidTimeYear != ''">BUID_TIME_YEAR = #{buidTimeYear},</if>
- <if test="buidTimeMon != null and buidTimeMon != ''">BUID_TIME_MON = #{buidTimeMon},</if>
- <if test="displayLevel != null and displayLevel != ''">DISPLAY_LEVEL = #{displayLevel},</if>
- <if test="provincial != null and provincial != ''">PROVINCIAL = #{provincial},</if>
- </trim>
- <where>OBJ_CODE = #{objCode}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWagaBase">
- update ATT_WAGA_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="staTimeYear != null and staTimeYear != ''">STA_TIME_YEAR = #{staTimeYear},</if>
- <if test="staTimeMon != null and staTimeMon != ''">STA_TIME_MON = #{staTimeMon},</if>
- <if test="engGrad != null and engGrad != ''">ENG_GRAD = #{engGrad},</if>
- <if test="mainConGrad != null and mainConGrad != ''">MAIN_CON_GRAD = #{mainConGrad},</if>
- <if test="holeNum != null and holeNum != ''">HOLE_NUM = #{holeNum},</if>
- <if test="holeWid != null and holeWid != ''">HOLE_WID = #{holeWid},</if>
- <if test="subGateNum != null and subGateNum != ''">SUB_GATE_NUM = #{subGateNum},</if>
- <if test="subGateWid != null and subGateWid != ''">SUB_GATE_WID = #{subGateWid},</if>
- <if test="locationXiang != null and locationXiang != ''">LOCATION_XIANG = #{locationXiang},</if>
- <if test="locationCun != null and locationCun != ''">LOCATION_CUN = #{locationCun},</if>
- <if test="gateAdmName != null and gateAdmName != ''">GATE_ADM_NAME = #{gateAdmName},</if>
- <if test="gateAdmDep != null and gateAdmDep != ''">GATE_ADM_DEP = #{gateAdmDep},</if>
- <if test="ifDem != null and ifDem != ''">IF_DEM = #{ifDem},</if>
- <if test="ifAffRi != null and ifAffRi != ''">IF_AFF_RI = #{ifAffRi},</if>
- <if test="admAttRel != null and admAttRel != ''">ADM_ATT_REL = #{admAttRel},</if>
- <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
- <if test="gdX != null and gdX != ''">GD_X = #{gdX},</if>
- <if test="gdY != null and gdY != ''">GD_Y = #{gdY},</if>
- <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
- <if test="gateName != null and gateName != ''">GATE_NAME = #{gateName},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="locRvName != null and locRvName != ''">LOC_RV_NAME = #{locRvName},</if>
- <if test="gateType != null and gateType != ''">GATE_TYPE = #{gateType},</if>
- <if test="gateFlow != null and gateFlow != ''">GATE_FLOW = #{gateFlow},</if>
- <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
- <if test="flGateFlow != null and flGateFlow != ''">FL_GATE_FLOW = #{flGateFlow},</if>
- <if test="desFlSta != null and desFlSta != ''">DES_FL_STA = #{desFlSta},</if>
- <if test="cheFlSta != null and cheFlSta != ''">CHE_FL_STA = #{cheFlSta},</if>
- <if test="cheGateFlow != null and cheGateFlow != ''">CHE_GATE_FLOW = #{cheGateFlow},</if>
- <if test="cheDesFlSta != null and cheDesFlSta != ''">CHE_DES_FL_STA = #{cheDesFlSta},</if>
- <if test="cheCheFlSta != null and cheCheFlSta != ''">CHE_CHE_FL_STA = #{cheCheFlSta},</if>
- <if test="draGateFlow != null and draGateFlow != ''">DRA_GATE_FLOW = #{draGateFlow},</if>
- <if test="draDesFlSta != null and draDesFlSta != ''">DRA_DES_FL_STA = #{draDesFlSta},</if>
- <if test="draCheFlSta != null and draCheFlSta != ''">DRA_CHE_FL_STA = #{draCheFlSta},</if>
- <if test="ifDraDou != null and ifDraDou != ''">IF_DRA_DOU = #{ifDraDou},</if>
- <if test="intGateFlow != null and intGateFlow != ''">INT_GATE_FLOW = #{intGateFlow},</if>
- <if test="intDesFlSta != null and intDesFlSta != ''">INT_DES_FL_STA = #{intDesFlSta},</if>
- <if test="intCheFlSta != null and intCheFlSta != ''">INT_CHE_FL_STA = #{intCheFlSta},</if>
- <if test="intDivAb != null and intDivAb != ''">INT_DIV_AB = #{intDivAb},</if>
- <if test="intUse != null and intUse != ''">INT_USE = #{intUse},</if>
- <if test="intUseIrrName != null and intUseIrrName != ''">INT_USE_IRR_NAME = #{intUseIrrName},</if>
- <if test="ifIntDou != null and ifIntDou != ''">IF_INT_DOU = #{ifIntDou},</if>
- <if test="tideGateFlow != null and tideGateFlow != ''">TIDE_GATE_FLOW = #{tideGateFlow},</if>
- <if test="tideDesSta != null and tideDesSta != ''">TIDE_DES_STA = #{tideDesSta},</if>
- <if test="tideCheSta != null and tideCheSta != ''">TIDE_CHE_STA = #{tideCheSta},</if>
- <if test="ifGate != null and ifGate != ''">IF_GATE = #{ifGate},</if>
- <if test="ifDouDile != null and ifDouDile != ''">IF_DOU_DILE = #{ifDouDile},</if>
- <if test="engSta != null and engSta != ''">ENG_STA = #{engSta},</if>
- <if test="buidTimeYear != null and buidTimeYear != ''">BUID_TIME_YEAR = #{buidTimeYear},</if>
- <if test="buidTimeMon != null and buidTimeMon != ''">BUID_TIME_MON = #{buidTimeMon},</if>
- <if test="displayLevel != null and displayLevel != ''">DISPLAY_LEVEL = #{displayLevel},</if>
- <if test="provincial != null and provincial != ''">PROVINCIAL = #{provincial},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <sql id="orgIdSql">
- <choose>
- <when test="orgId !=null and orgId !=''">
- and ORG_ID=#{orgId}
- </when>
- <otherwise>
- and ORG_ID is null
- </otherwise>
- </choose>
- </sql>
- <!-- 其他自定义SQL -->
- <select id="getObjByPersId" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam"
- resultType="cn.com.goldenwater.dcproj.model.AttWagaBase">
- SELECT A.OBJ_CODE,
- A.GATE_NAME,
- A.AD_CODE,
- A.LOC_RV_NAME,
- A.GATE_TYPE,
- A.GATE_FLOW,
- A.ENG_SCAL,
- A.FL_GATE_FLOW,
- A.DES_FL_STA,
- A.CHE_FL_STA,
- A.CHE_GATE_FLOW,
- A.CHE_DES_FL_STA,
- A.CHE_CHE_FL_STA,
- A.DRA_GATE_FLOW,
- A.DRA_DES_FL_STA,
- A.DRA_CHE_FL_STA,
- A.IF_DRA_DOU,
- A.INT_GATE_FLOW,
- A.INT_DES_FL_STA,
- A.INT_CHE_FL_STA,
- A.INT_DIV_AB,
- A.INT_USE,
- A.INT_USE_IRR_NAME,
- A.IF_INT_DOU,
- A.TIDE_GATE_FLOW,
- A.TIDE_DES_STA,
- A.TIDE_CHE_STA,
- A.IF_GATE,
- A.IF_DOU_DILE,
- A.ENG_STA,
- A.BUID_TIME_YEAR,
- A.BUID_TIME_MON,
- A.STA_TIME_YEAR,
- A.STA_TIME_MON,
- A.ENG_GRAD,
- A.MAIN_CON_GRAD,
- A.HOLE_NUM,
- A.HOLE_WID,
- A.SUB_GATE_NUM,
- A.SUB_GATE_WID,
- A.LOCATION_XIANG,
- A.LOCATION_CUN,
- A.GATE_ADM_NAME,
- A.GATE_ADM_DEP,
- A.IF_DEM,
- A.IF_AFF_RI,
- A.ADM_ATT_REL,
- A.CENTER_X,
- A.CENTER_Y,
- A.GD_X,B.OBJ_ID,B.ID groupId,C.ID rgstrId,
- A.GD_Y,A.PROVINCIAL FROM ATT_WAGA_BASE A LEFT JOIN BIS_INSP_ALL_OBJ B ON A.OBJ_CODE = B.CODE
- LEFT JOIN ATT_WAGA_RGSTR C ON B.OBJ_ID = C.OBJ_ID
- WHERE B.PTYPE = #{objType}
- <choose>
- <when test="province !=null and province !=''">
- and B.AD_CODE like '${province}%'
- </when>
- <otherwise>
- and B.AD_CODE is null
- </otherwise>
- </choose>
- AND REGEXP_LIKE(
- B.Id,concat('^(',
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID =#{persGuid}
- <choose>
- <when test="province !=null and province !=''">
- and B.AD_CODE like '${province}%'
- </when>
- <otherwise>
- and B.AD_CODE is null
- </otherwise>
- </choose>
- )>0 then
- (SELECT group_concat(id separator '|')as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID =#{persGuid}
- <include refid="orgIdSql"/>
- GROUP BY PERSID
- )
- else (select 'non' from dual) end)
- ,')'))
- <if test="adName != null and adName != ''">and A.GATE_NAME LIKE '%${adName}%'</if>
- <if test="adCode != null and adCode != ''">and A.AD_CODE LIKE '${adCode}%'</if>
- <if test="maxLgtd != null and maxLgtd != '' and minLgtd != null and minLgtd != ''">and A.CENTER_X BETWEEN
- #{minLgtd} AND #{maxLgtd}
- </if>
- <if test="maxLttd != null and maxLttd != '' and minLttd != null and minLttd != ''">and A.CENTER_Y BETWEEN
- #{minLttd} AND #{maxLttd}
- </if>
- <if test="maxcenterXGd != null and maxcenterXGd != '' and mincenterXGd != null and mincenterXGd != ''">and
- A.GD_X BETWEEN #{mincenterXGd} AND #{maxcenterXGd}
- </if>
- <if test="maxcenterYGd != null and maxcenterYGd != '' and mincenterYGd != null and mincenterYGd != ''">and
- A.GD_Y BETWEEN #{mincenterYGd} AND #{maxcenterYGd}
- </if>
- <if test="gateFlow != null and gateFlow != ''">and A.GATE_Flow >= #{gateFlow}</if>
- <if test="displayLevel != null and displayLevel != ''">
- AND cast(A.DISPLAY_LEVEL as signed) <= cast(#{displayLevel} as signed)
- </if>
- </select>
- <select id="getWagaList" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam"
- resultType="cn.com.goldenwater.dcproj.model.AttWagaBase">
- SELECT A.OBJ_CODE,
- A.GATE_NAME,
- A.AD_CODE,
- A.LOC_RV_NAME,
- A.GATE_TYPE,
- A.GATE_FLOW,
- A.ENG_SCAL,
- A.FL_GATE_FLOW,
- A.DES_FL_STA,
- A.CHE_FL_STA,
- A.CHE_GATE_FLOW,
- A.CHE_DES_FL_STA,
- A.CHE_CHE_FL_STA,
- A.DRA_GATE_FLOW,
- A.DRA_DES_FL_STA,
- A.DRA_CHE_FL_STA,
- A.IF_DRA_DOU,
- A.INT_GATE_FLOW,
- A.INT_DES_FL_STA,
- A.INT_CHE_FL_STA,
- A.INT_DIV_AB,
- A.INT_USE,
- A.INT_USE_IRR_NAME,
- A.IF_INT_DOU,
- A.TIDE_GATE_FLOW,
- A.TIDE_DES_STA,
- A.TIDE_CHE_STA,
- A.IF_GATE,
- A.IF_DOU_DILE,
- A.ENG_STA,
- A.BUID_TIME_YEAR,
- A.BUID_TIME_MON,
- A.STA_TIME_YEAR,
- A.STA_TIME_MON,
- A.ENG_GRAD,
- A.MAIN_CON_GRAD,
- A.HOLE_NUM,
- A.HOLE_WID,
- A.SUB_GATE_NUM,
- A.SUB_GATE_WID,
- A.LOCATION_XIANG,
- A.LOCATION_CUN,
- A.GATE_ADM_NAME,
- A.GATE_ADM_DEP,
- A.IF_DEM,
- A.IF_AFF_RI,
- A.ADM_ATT_REL,
- A.CENTER_X,
- A.CENTER_Y,
- A.GD_X,
- A.GD_Y,
- A.GATE_ADM_ORG,C.ID,
- A.PERS_ID,
- A.DISPLAY_LEVEL,
- C.STATE,
- C.ID rgstrId,
- C.OBJ_ID,
- C.GROUP_ID,
- A.PROVINCIAL FROM ATT_WAGA_BASE A
- LEFT JOIN (select a.obj_id,a.OBJ_CODE,a.ID,a.state,a.group_id from ATT_WAGA_RGSTR a join ( select OBJ_CODE,max(intm) intm from ATT_WAGA_RGSTR GROUP BY obj_code ) b on a.OBJ_CODE = b.OBJ_CODE where a.intm = b.intm
- ) C ON A.OBJ_CODE = C.OBJ_CODE
- WHERE 1 = 1
- <if test="adCode != null and adCode != ''">and A.AD_CODE LIKE '${adCode}%'</if>
- <if test="province != null and province != ''">
- and A.ad_code like '${province}%'
- </if>
- <if test="maxLgtd != null and maxLgtd != '' and minLgtd != null and minLgtd != ''">and A.CENTER_X BETWEEN
- #{minLgtd} AND #{maxLgtd}
- </if>
- <if test="maxLttd != null and maxLttd != '' and minLttd != null and minLttd != ''">and A.CENTER_Y BETWEEN
- #{minLttd} AND #{maxLttd}
- </if>
- <if test="gateFlow != null and gateFlow != ''">and A.GATE_Flow >= #{gateFlow}</if>
- <if test="stnm != null and stnm != ''">and A.GATE_NAME LIKE '%${stnm}%'</if>
- <if test="engScal != null and engScal != ''">and A.ENG_SCAL = #{engScal}</if>
- <if test="displayLevel != null and displayLevel != ''">and cast(A.DISPLAY_LEVEL as signed) <= cast(#{displayLevel} as signed) </if>
- </select>
- <select id="getWagaBaseList" parameterType="cn.com.goldenwater.dcproj.param.AttWagaBaseParam"
- resultType="cn.com.goldenwater.dcproj.model.AttWagaBase">
- select
- <include refid="table_columns"/>
- from ATT_WAGA_BASE A
- <where>
- <if test="adCode != null and adCode != ''">and A.AD_CODE LIKE '${adCode}%'</if>
- <if test="gateName != null and gateName != ''">and A.GATE_NAME LIKE '%${gateName}%'</if>
- <if test="engScal != null and engScal != ''">and A.ENG_SCAL = #{engScal}</if>
- <if test="gateType != null and gateType != ''">and A.GATE_TYPE = #{gateType}</if>
- <if test="province != null and province != ''">and A.ad_code LIKE '${province}%'</if>
- </where>
- ORDER BY OBJ_CODE ASC
- </select>
- <select id="getListByInspGroupIdObjType" parameterType="cn.com.goldenwater.dcproj.param.PagePersObjParam"
- resultType="cn.com.goldenwater.dcproj.model.BisInspWagaRgstrDto">
- select t.*,C.id groupId,C.PNM groupName,o.obj_id
- from ATT_WAGA_BASE t
- join BIS_INSP_ALL_OBJ o on o.CODE = t.obj_code
- LEFT JOIN BIS_INSP_ALL C ON o.ID = C.ID
- and o.ptype = #{objType}
- where 1 = 1
- <if test='isAll == "0"'>and o.ID = #{inspGroupId}</if>
- <if test='isAll == "1"'>and o.ID LIKE '${inspGroupId}%'</if>
- <if test="rsName != null and rsName != ''">and t.GATE_NAME LIKE '%${rsName}%'</if>
- <if test="engScal != null and engScal != ''">and t.ENG_SCAL = #{engScal}</if>
- <if test="rsAdmDep != null and rsAdmDep != ''">and t.LOCATION_XIANG = #{rsAdmDep}</if>
- <if test="adCode != null and adCode != ''">and t.AD_CODE LIKE '${adCode}%'</if>
- <choose>
- <when test="province !=null and province !=''">
- and o.ad_code like '${province}%'
- </when>
- <otherwise>
- and o.ad_code is null
- </otherwise>
- </choose>
- </select>
- <update id="updateBatchProvincial" parameterType="cn.com.goldenwater.dcproj.param.AttWagaBaseParam">
- update ATT_WAGA_BASE set PROVINCIAL = #{provincial}
- where OBJ_CODE in
- <foreach item="objCode" collection="objCodes" open="(" separator="," close=")">
- #{objCode}
- </foreach>
- </update>
- </mapper>
|