| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349 |
- <?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.AttEngIrrDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttEngIrr" id="attEngIrrResultMap">
- <result property="desIrrArea" column="DES_IRR_AREA"/>
- <result property="chanHignLeve" column="CHAN_HIGN_LEVE"/>
- <result property="chanNum" column="CHAN_NUM"/>
- <result property="chanLenTot" column="CHAN_LEN_TOT"/>
- <result property="chanDesFlow" column="CHAN_DES_FLOW"/>
- <result property="chsyGateNum" column="CHSY_GATE_NUM"/>
- <result property="chsyAquNum" column="CHSY_AQU_NUM"/>
- <result property="chsyDropNum" column="CHSY_DROP_NUM"/>
- <result property="chsyInvSiphNum" column="CHSY_INV_SIPH_NUM"/>
- <result property="chsyTunNum" column="CHSY_TUN_NUM"/>
- <result property="chsyCulNum" column="CHSY_CUL_NUM"/>
- <result property="chsyFarmBriNum" column="CHSY_FARM_BRI_NUM"/>
- <result property="chsyMeaNum" column="CHSY_MEA_NUM"/>
- <result property="chsyDitPustStNum" column="CHSY_DIT_PUST_ST_NUM"/>
- <result property="note" column="NOTE"/>
- <result property="collTime" column="COLL_TIME"/>
- <result property="updTime" column="UPD_TIME"/>
- <result property="recPers" column="REC_PERS"/>
- <result property="engReinForceGuid" column="ENG_REIN_FORCE_GUID"/>
- <result property="guid" column="GUID"/>
- <result property="pGuid" column="P_GUID"/>
- <result property="engName" column="ENG_NAME"/>
- <result property="engGuid" column="ENG_GUID"/>
- <result property="impoGrad" column="IMPO_GRAD"/>
- <result property="apprBudg" column="APPR_BUDG"/>
- <result property="startDate" column="START_DATE"/>
- <result property="compDate" column="COMP_DATE"/>
- <result property="engStat" column="ENG_STAT"/>
- <result property="orgGuid" column="ORG_GUID"/>
- <result property="oflpCode" column="OFLP_CODE"/>
- <result property="ifReinForce" column="IF_REIN_FORCE"/>
- <result property="projGuid" column="PROJ_GUID"/>
- <result property="stat" column="STAT"/>
- <result property="irrCode" column="IRR_CODE"/>
- <result property="cenLong" column="CEN_LONG"/>
- <result property="cenLat" column="CEN_LAT"/>
- <result property="irrLoc" column="IRR_LOC"/>
- <result property="adGuid" column="AD_GUID"/>
- <result property="rvGuid" column="RV_GUID"/>
- <result property="engScal" column="ENG_SCAL"/>
- <result property="totIrrArea" column="TOT_IRR_AREA"/>
- <result property="effIrrArea" column="EFF_IRR_AREA"/>
- </resultMap>
- <sql id="table_columns">
- DES_IRR_AREA,
- CHAN_HIGN_LEVE,
- CHAN_NUM,
- CHAN_LEN_TOT,
- CHAN_DES_FLOW,
- CHSY_GATE_NUM,
- CHSY_AQU_NUM,
- CHSY_DROP_NUM,
- CHSY_INV_SIPH_NUM,
- CHSY_TUN_NUM,
- CHSY_CUL_NUM,
- CHSY_FARM_BRI_NUM,
- CHSY_MEA_NUM,
- CHSY_DIT_PUST_ST_NUM,
- NOTE,
- COLL_TIME,
- UPD_TIME,
- REC_PERS,
- ENG_REIN_FORCE_GUID,
- GUID,
- P_GUID,
- ENG_NAME,
- ENG_GUID,
- IMPO_GRAD,
- APPR_BUDG,
- START_DATE,
- COMP_DATE,
- ENG_STAT,
- ORG_GUID,
- OFLP_CODE,
- IF_REIN_FORCE,
- PROJ_GUID,
- STAT,
- IRR_CODE,
- CEN_LONG,
- CEN_LAT,
- IRR_LOC,
- AD_GUID,
- RV_GUID,
- ENG_SCAL,
- TOT_IRR_AREA,
- EFF_IRR_AREA
- </sql>
- <sql id="entity_properties">
- #{desIrrArea},
- #{chanHignLeve},
- #{chanNum},
- #{chanLenTot},
- #{chanDesFlow},
- #{chsyGateNum},
- #{chsyAquNum},
- #{chsyDropNum},
- #{chsyInvSiphNum},
- #{chsyTunNum},
- #{chsyCulNum},
- #{chsyFarmBriNum},
- #{chsyMeaNum},
- #{chsyDitPustStNum},
- #{note},
- #{collTime},
- #{updTime},
- #{recPers},
- #{engReinForceGuid},
- #{guid},
- #{pGuid},
- #{engName},
- #{engGuid},
- #{impoGrad},
- #{apprBudg},
- #{startDate},
- #{compDate},
- #{engStat},
- #{orgGuid},
- #{oflpCode},
- #{ifReinForce},
- #{projGuid},
- #{stat},
- #{irrCode},
- #{cenLong},
- #{cenLat},
- #{irrLoc},
- #{adGuid},
- #{rvGuid},
- #{engScal},
- #{totIrrArea},
- #{effIrrArea}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="chanHignLeve != null and chanHignLeve != ''">and CHAN_HIGN_LEVE = #{chanHignLeve}</if>
- <if test="chanNum != null and chanNum != ''">and CHAN_NUM = #{chanNum}</if>
- <if test="chanLenTot != null and chanLenTot != ''">and CHAN_LEN_TOT = #{chanLenTot}</if>
- <if test="chanDesFlow != null and chanDesFlow != ''">and CHAN_DES_FLOW = #{chanDesFlow}</if>
- <if test="chsyGateNum != null and chsyGateNum != ''">and CHSY_GATE_NUM = #{chsyGateNum}</if>
- <if test="chsyAquNum != null and chsyAquNum != ''">and CHSY_AQU_NUM = #{chsyAquNum}</if>
- <if test="chsyDropNum != null and chsyDropNum != ''">and CHSY_DROP_NUM = #{chsyDropNum}</if>
- <if test="chsyInvSiphNum != null and chsyInvSiphNum != ''">and CHSY_INV_SIPH_NUM = #{chsyInvSiphNum}</if>
- <if test="chsyTunNum != null and chsyTunNum != ''">and CHSY_TUN_NUM = #{chsyTunNum}</if>
- <if test="chsyCulNum != null and chsyCulNum != ''">and CHSY_CUL_NUM = #{chsyCulNum}</if>
- <if test="chsyFarmBriNum != null and chsyFarmBriNum != ''">and CHSY_FARM_BRI_NUM = #{chsyFarmBriNum}</if>
- <if test="chsyMeaNum != null and chsyMeaNum != ''">and CHSY_MEA_NUM = #{chsyMeaNum}</if>
- <if test="chsyDitPustStNum != null and chsyDitPustStNum != ''">and CHSY_DIT_PUST_ST_NUM =
- #{chsyDitPustStNum}
- </if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="collTime != null">and COLL_TIME = #{collTime}</if>
- <if test="updTime != null">and UPD_TIME = #{updTime}</if>
- <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
- <if test="engReinForceGuid != null and engReinForceGuid != ''">and ENG_REIN_FORCE_GUID =
- #{engReinForceGuid}
- </if>
- <if test="desIrrArea != null and desIrrArea != ''">and DES_IRR_AREA = #{desIrrArea}</if>
- <if test="pGuid != null and pGuid != ''">and P_GUID = #{pGuid}</if>
- <if test="engName != null and engName != ''">and ENG_NAME = #{engName}</if>
- <if test="engGuid != null and engGuid != ''">and ENG_GUID = #{engGuid}</if>
- <if test="impoGrad != null and impoGrad != ''">and IMPO_GRAD = #{impoGrad}</if>
- <if test="apprBudg != null and apprBudg != ''">and APPR_BUDG = #{apprBudg}</if>
- <if test="startDate != null">and START_DATE = #{startDate}</if>
- <if test="compDate != null">and COMP_DATE = #{compDate}</if>
- <if test="engStat != null and engStat != ''">and ENG_STAT = #{engStat}</if>
- <if test="orgGuid != null and orgGuid != ''">and ORG_GUID = #{orgGuid}</if>
- <if test="oflpCode != null and oflpCode != ''">and OFLP_CODE = #{oflpCode}</if>
- <if test="ifReinForce != null and ifReinForce != ''">and IF_REIN_FORCE = #{ifReinForce}</if>
- <if test="projGuid != null and projGuid != ''">and PROJ_GUID = #{projGuid}</if>
- <if test="stat != null and stat != ''">and STAT = #{stat}</if>
- <if test="irrCode != null and irrCode != ''">and IRR_CODE = #{irrCode}</if>
- <if test="cenLong != null and cenLong != ''">and CEN_LONG = #{cenLong}</if>
- <if test="cenLat != null and cenLat != ''">and CEN_LAT = #{cenLat}</if>
- <if test="irrLoc != null and irrLoc != ''">and IRR_LOC = #{irrLoc}</if>
- <if test="adGuid != null and adGuid != ''">and AD_GUID = #{adGuid}</if>
- <if test="rvGuid != null and rvGuid != ''">and RV_GUID = #{rvGuid}</if>
- <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
- <if test="totIrrArea != null and totIrrArea != ''">and TOT_IRR_AREA = #{totIrrArea}</if>
- <if test="effIrrArea != null and effIrrArea != ''">and EFF_IRR_AREA = #{effIrrArea}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attEngIrrResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from att_eng_irr where GUID = #{id}
- </select>
- <select id="getBy" resultMap="attEngIrrResultMap">
- select
- <include refid="table_columns"/>
- from att_eng_irr
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="attEngIrrResultMap">
- select
- <include refid="table_columns"/>
- from att_eng_irr
- </select>
- <select id="findList" resultMap="attEngIrrResultMap">
- select
- <include refid="table_columns"/>
- from att_eng_irr
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(GUID) from att_eng_irr
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttEngIrr">
- insert into att_eng_irr(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from att_eng_irr where GUID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttEngIrr">
- delete from att_eng_irr
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update att_eng_irr set flag_valid = 0 where GUID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttEngIrr">
- update att_eng_irr
- <trim prefix="set" suffixOverrides=",">
- <if test="chanHignLeve != null and chanHignLeve != ''">CHAN_HIGN_LEVE = #{chanHignLeve},</if>
- <if test="chanNum != null and chanNum != ''">CHAN_NUM = #{chanNum},</if>
- <if test="chanLenTot != null and chanLenTot != ''">CHAN_LEN_TOT = #{chanLenTot},</if>
- <if test="chanDesFlow != null and chanDesFlow != ''">CHAN_DES_FLOW = #{chanDesFlow},</if>
- <if test="chsyGateNum != null and chsyGateNum != ''">CHSY_GATE_NUM = #{chsyGateNum},</if>
- <if test="chsyAquNum != null and chsyAquNum != ''">CHSY_AQU_NUM = #{chsyAquNum},</if>
- <if test="chsyDropNum != null and chsyDropNum != ''">CHSY_DROP_NUM = #{chsyDropNum},</if>
- <if test="chsyInvSiphNum != null and chsyInvSiphNum != ''">CHSY_INV_SIPH_NUM = #{chsyInvSiphNum},</if>
- <if test="chsyTunNum != null and chsyTunNum != ''">CHSY_TUN_NUM = #{chsyTunNum},</if>
- <if test="chsyCulNum != null and chsyCulNum != ''">CHSY_CUL_NUM = #{chsyCulNum},</if>
- <if test="chsyFarmBriNum != null and chsyFarmBriNum != ''">CHSY_FARM_BRI_NUM = #{chsyFarmBriNum},</if>
- <if test="chsyMeaNum != null and chsyMeaNum != ''">CHSY_MEA_NUM = #{chsyMeaNum},</if>
- <if test="chsyDitPustStNum != null and chsyDitPustStNum != ''">CHSY_DIT_PUST_ST_NUM = #{chsyDitPustStNum},
- </if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="updTime != null">UPD_TIME = #{updTime},</if>
- <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
- <if test="engReinForceGuid != null and engReinForceGuid != ''">ENG_REIN_FORCE_GUID = #{engReinForceGuid},
- </if>
- <if test="desIrrArea != null and desIrrArea != ''">DES_IRR_AREA = #{desIrrArea},</if>
- <if test="pGuid != null and pGuid != ''">P_GUID = #{pGuid},</if>
- <if test="engName != null and engName != ''">ENG_NAME = #{engName},</if>
- <if test="engGuid != null and engGuid != ''">ENG_GUID = #{engGuid},</if>
- <if test="impoGrad != null and impoGrad != ''">IMPO_GRAD = #{impoGrad},</if>
- <if test="apprBudg != null and apprBudg != ''">APPR_BUDG = #{apprBudg},</if>
- <if test="startDate != null">START_DATE = #{startDate},</if>
- <if test="compDate != null">COMP_DATE = #{compDate},</if>
- <if test="engStat != null and engStat != ''">ENG_STAT = #{engStat},</if>
- <if test="orgGuid != null and orgGuid != ''">ORG_GUID = #{orgGuid},</if>
- <if test="oflpCode != null and oflpCode != ''">OFLP_CODE = #{oflpCode},</if>
- <if test="ifReinForce != null and ifReinForce != ''">IF_REIN_FORCE = #{ifReinForce},</if>
- <if test="projGuid != null and projGuid != ''">PROJ_GUID = #{projGuid},</if>
- <if test="stat != null and stat != ''">STAT = #{stat},</if>
- <if test="irrCode != null and irrCode != ''">IRR_CODE = #{irrCode},</if>
- <if test="cenLong != null and cenLong != ''">CEN_LONG = #{cenLong},</if>
- <if test="cenLat != null and cenLat != ''">CEN_LAT = #{cenLat},</if>
- <if test="irrLoc != null and irrLoc != ''">IRR_LOC = #{irrLoc},</if>
- <if test="adGuid != null and adGuid != ''">AD_GUID = #{adGuid},</if>
- <if test="rvGuid != null and rvGuid != ''">RV_GUID = #{rvGuid},</if>
- <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
- <if test="totIrrArea != null and totIrrArea != ''">TOT_IRR_AREA = #{totIrrArea},</if>
- <if test="effIrrArea != null and effIrrArea != ''">EFF_IRR_AREA = #{effIrrArea},</if>
- </trim>
- <where>GUID = #{guid}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttEngIrr">
- update att_eng_irr
- <trim prefix="set" suffixOverrides=",">
- <if test="chanHignLeve != null and chanHignLeve != ''">CHAN_HIGN_LEVE = #{chanHignLeve},</if>
- <if test="chanNum != null and chanNum != ''">CHAN_NUM = #{chanNum},</if>
- <if test="chanLenTot != null and chanLenTot != ''">CHAN_LEN_TOT = #{chanLenTot},</if>
- <if test="chanDesFlow != null and chanDesFlow != ''">CHAN_DES_FLOW = #{chanDesFlow},</if>
- <if test="chsyGateNum != null and chsyGateNum != ''">CHSY_GATE_NUM = #{chsyGateNum},</if>
- <if test="chsyAquNum != null and chsyAquNum != ''">CHSY_AQU_NUM = #{chsyAquNum},</if>
- <if test="chsyDropNum != null and chsyDropNum != ''">CHSY_DROP_NUM = #{chsyDropNum},</if>
- <if test="chsyInvSiphNum != null and chsyInvSiphNum != ''">CHSY_INV_SIPH_NUM = #{chsyInvSiphNum},</if>
- <if test="chsyTunNum != null and chsyTunNum != ''">CHSY_TUN_NUM = #{chsyTunNum},</if>
- <if test="chsyCulNum != null and chsyCulNum != ''">CHSY_CUL_NUM = #{chsyCulNum},</if>
- <if test="chsyFarmBriNum != null and chsyFarmBriNum != ''">CHSY_FARM_BRI_NUM = #{chsyFarmBriNum},</if>
- <if test="chsyMeaNum != null and chsyMeaNum != ''">CHSY_MEA_NUM = #{chsyMeaNum},</if>
- <if test="chsyDitPustStNum != null and chsyDitPustStNum != ''">CHSY_DIT_PUST_ST_NUM = #{chsyDitPustStNum},
- </if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="updTime != null">UPD_TIME = #{updTime},</if>
- <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
- <if test="engReinForceGuid != null and engReinForceGuid != ''">ENG_REIN_FORCE_GUID = #{engReinForceGuid},
- </if>
- <if test="desIrrArea != null and desIrrArea != ''">DES_IRR_AREA = #{desIrrArea},</if>
- <if test="pGuid != null and pGuid != ''">P_GUID = #{pGuid},</if>
- <if test="engName != null and engName != ''">ENG_NAME = #{engName},</if>
- <if test="engGuid != null and engGuid != ''">ENG_GUID = #{engGuid},</if>
- <if test="impoGrad != null and impoGrad != ''">IMPO_GRAD = #{impoGrad},</if>
- <if test="apprBudg != null and apprBudg != ''">APPR_BUDG = #{apprBudg},</if>
- <if test="startDate != null">START_DATE = #{startDate},</if>
- <if test="compDate != null">COMP_DATE = #{compDate},</if>
- <if test="engStat != null and engStat != ''">ENG_STAT = #{engStat},</if>
- <if test="orgGuid != null and orgGuid != ''">ORG_GUID = #{orgGuid},</if>
- <if test="oflpCode != null and oflpCode != ''">OFLP_CODE = #{oflpCode},</if>
- <if test="ifReinForce != null and ifReinForce != ''">IF_REIN_FORCE = #{ifReinForce},</if>
- <if test="projGuid != null and projGuid != ''">PROJ_GUID = #{projGuid},</if>
- <if test="stat != null and stat != ''">STAT = #{stat},</if>
- <if test="irrCode != null and irrCode != ''">IRR_CODE = #{irrCode},</if>
- <if test="cenLong != null and cenLong != ''">CEN_LONG = #{cenLong},</if>
- <if test="cenLat != null and cenLat != ''">CEN_LAT = #{cenLat},</if>
- <if test="irrLoc != null and irrLoc != ''">IRR_LOC = #{irrLoc},</if>
- <if test="adGuid != null and adGuid != ''">AD_GUID = #{adGuid},</if>
- <if test="rvGuid != null and rvGuid != ''">RV_GUID = #{rvGuid},</if>
- <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
- <if test="totIrrArea != null and totIrrArea != ''">TOT_IRR_AREA = #{totIrrArea},</if>
- <if test="effIrrArea != null and effIrrArea != ''">EFF_IRR_AREA = #{effIrrArea},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|