| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339 |
- <?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.BisInspIrrTownsDsuDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspIrrTownsDsu" id="bisInspIrrTownsDsuResultMap">
- <result property="curBulDep" column="CUR_BUL_DEP"/>
- <result property="curRunDep" column="CUR_RUN_DEP"/>
- <result property="inBulMoney" column="IN_BUL_MONEY"/>
- <result property="inRunMoney" column="IN_RUN_MONEY"/>
- <result property="othrStnMoney" column="OTHR_STN_MONEY"/>
- <result property="collectStnMoney" column="COLLECT_STN_MONEY"/>
- <result property="wtrpPblm" column="WTRP_PBLM"/>
- <result property="comments" column="COMMENTS"/>
- <result property="invsrName" column="INVSR_NAME"/>
- <result property="invsrPhone" column="INVSR_PHONE"/>
- <result property="cunCntcName" column="CUN_CNTC_NAME"/>
- <result property="cunCntcPhone" column="CUN_CNTC_PHONE"/>
- <result property="rsrchTm" column="RSRCH_TM"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="state" column="STATE"/>
- <result property="id" column="ID"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="objId" column="OBJ_ID"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="adName" column="AD_NAME"/>
- <result property="rurPop" column="RUR_POP"/>
- <result property="effIrrArea" column="EFF_IRR_AREA"/>
- <result property="lndfrm" column="LNDFRM"/>
- <result property="prjPbmArea" column="PRJ_PBM_AREA"/>
- <result property="townsOrgNm" column="TOWNS_ORG_NM"/>
- <result property="townsOrgType" column="TOWNS_ORG_TYPE"/>
- <result property="townsOrgWork" column="TOWNS_ORG_WORK"/>
- <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="townsOrgTypeNote" column="TOWNS_ORG_TYPE_NOTE"/>
- <result property="curBulDepNote" column="CUR_BUL_DEP_NOTE"/>
- <result property="curRunDepNote" column="CUR_RUN_DEP_NOTE"/>
- </resultMap>
- <sql id="table_columns">
- TOWNS_ORG_TYPE_NOTE,
- CUR_BUL_DEP_NOTE,
- CUR_RUN_DEP_NOTE,
- CENTER_X,
- CENTER_Y,
- GD_X,
- GD_Y,
- CUR_BUL_DEP,
- CUR_RUN_DEP,
- IN_BUL_MONEY,
- IN_RUN_MONEY,
- OTHR_STN_MONEY,
- COLLECT_STN_MONEY,
- WTRP_PBLM,
- COMMENTS,
- INVSR_NAME,
- INVSR_PHONE,
- CUN_CNTC_NAME,
- CUN_CNTC_PHONE,
- RSRCH_TM,
- PERS_ID,
- INTM,
- UPTM,
- DATA_STAT,
- STATE,
- ID,
- RGSTR_ID,
- OBJ_ID,
- AD_CODE,
- AD_NAME,
- RUR_POP,
- EFF_IRR_AREA,
- LNDFRM,
- PRJ_PBM_AREA,
- TOWNS_ORG_NM,
- TOWNS_ORG_TYPE,
- TOWNS_ORG_WORK
- </sql>
- <sql id="entity_properties">
- #{townsOrgTypeNote},
- #{curBulDepNote},
- #{curRunDepNote},
- #{centerX},
- #{centerY},
- #{gdX},
- #{gdY},
- #{curBulDep},
- #{curRunDep},
- #{inBulMoney},
- #{inRunMoney},
- #{othrStnMoney},
- #{collectStnMoney},
- #{wtrpPblm},
- #{comments},
- #{invsrName},
- #{invsrPhone},
- #{cunCntcName},
- #{cunCntcPhone},
- #{rsrchTm},
- #{persId},
- #{intm},
- #{uptm},
- #{dataStat},
- #{state},
- #{id},
- #{rgstrId},
- #{objId},
- #{adCode},
- #{adName},
- #{rurPop},
- #{effIrrArea},
- #{lndfrm},
- #{prjPbmArea},
- #{townsOrgNm},
- #{townsOrgType},
- #{townsOrgWork}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="townsOrgTypeNote != null and townsOrgTypeNote != ''">and TOWNS_ORG_TYPE_NOTE = #{townsOrgTypeNote}</if>
- <if test="curBulDepNote != null and curBulDepNote != ''">and CUR_BUL_DEP_NOTE = #{curBulDepNote}</if>
- <if test="curRunDepNote != null and curRunDepNote != ''">and CUR_RUN_DEP_NOTE = #{curRunDepNote}</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="curRunDep != null and curRunDep != ''">and CUR_RUN_DEP = #{curRunDep}</if>
- <if test="inBulMoney != null and inBulMoney != ''">and IN_BUL_MONEY = #{inBulMoney}</if>
- <if test="inRunMoney != null and inRunMoney != ''">and IN_RUN_MONEY = #{inRunMoney}</if>
- <if test="othrStnMoney != null and othrStnMoney != ''">and OTHR_STN_MONEY = #{othrStnMoney}</if>
- <if test="collectStnMoney != null and collectStnMoney != ''">and COLLECT_STN_MONEY = #{collectStnMoney}</if>
- <if test="wtrpPblm != null and wtrpPblm != ''">and WTRP_PBLM = #{wtrpPblm}</if>
- <if test="comments != null and comments != ''">and COMMENTS = #{comments}</if>
- <if test="invsrName != null and invsrName != ''">and INVSR_NAME = #{invsrName}</if>
- <if test="invsrPhone != null and invsrPhone != ''">and INVSR_PHONE = #{invsrPhone}</if>
- <if test="cunCntcName != null and cunCntcName != ''">and CUN_CNTC_NAME = #{cunCntcName}</if>
- <if test="cunCntcPhone != null and cunCntcPhone != ''">and CUN_CNTC_PHONE = #{cunCntcPhone}</if>
- <if test="rsrchTm != null">and RSRCH_TM = #{rsrchTm}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="state != null and state != ''">and STATE = #{state}</if>
- <if test="id != null and id != ''">and ID = #{id}</if>
- <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
- <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
- <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
- <if test="adName != null and adName != ''">and AD_NAME like concat('%',concat(#{adName},'%'))</if>
- <if test="rurPop != null and rurPop != ''">and RUR_POP = #{rurPop}</if>
- <if test="effIrrArea != null and effIrrArea != ''">and EFF_IRR_AREA = #{effIrrArea}</if>
- <if test="lndfrm != null and lndfrm != ''">and LNDFRM = #{lndfrm}</if>
- <if test="prjPbmArea != null and prjPbmArea != ''">and PRJ_PBM_AREA = #{prjPbmArea}</if>
- <if test="townsOrgNm != null and townsOrgNm != ''">and TOWNS_ORG_NM = #{townsOrgNm}</if>
- <if test="townsOrgType != null and townsOrgType != ''">and TOWNS_ORG_TYPE = #{townsOrgType}</if>
- <if test="townsOrgWork != null and townsOrgWork != ''">and TOWNS_ORG_WORK = #{townsOrgWork}</if>
- and DATA_STAT='0'
- </trim>
- </sql>
- <select id="get" resultMap="bisInspIrrTownsDsuResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_IRR_TOWNS_DSU where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspIrrTownsDsuResultMap">
- select <include refid="table_columns" /> from BIS_INSP_IRR_TOWNS_DSU <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspIrrTownsDsuResultMap">
- select <include refid="table_columns" /> from BIS_INSP_IRR_TOWNS_DSU
- </select>
- <select id="findList" resultMap="bisInspIrrTownsDsuResultMap">
- select <include refid="table_columns" /> from BIS_INSP_IRR_TOWNS_DSU <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_IRR_TOWNS_DSU <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspIrrTownsDsu">
- insert into BIS_INSP_IRR_TOWNS_DSU( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_IRR_TOWNS_DSU set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspIrrTownsDsu">
- update BIS_INSP_IRR_TOWNS_DSU set DATA_STAT='9' <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_IRR_TOWNS_DSU set DATA_STAT = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspIrrTownsDsu">
- update BIS_INSP_IRR_TOWNS_DSU
- <trim prefix="set" suffixOverrides=",">
- <if test="townsOrgTypeNote != null and townsOrgTypeNote != ''">TOWNS_ORG_TYPE_NOTE = #{townsOrgTypeNote},</if>
- <if test="curBulDepNote != null and curBulDepNote != ''">CUR_BUL_DEP_NOTE = #{curBulDepNote},</if>
- <if test="curRunDepNote != null and curRunDepNote != ''">CUR_RUN_DEP_NOTE = #{curRunDepNote},</if>
- <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</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="curRunDep != null and curRunDep != ''">CUR_RUN_DEP = #{curRunDep},</if>
- <if test="inBulMoney != null and inBulMoney != ''">IN_BUL_MONEY = #{inBulMoney},</if>
- <if test="inRunMoney != null and inRunMoney != ''">IN_RUN_MONEY = #{inRunMoney},</if>
- <if test="othrStnMoney != null and othrStnMoney != ''">OTHR_STN_MONEY = #{othrStnMoney},</if>
- <if test="collectStnMoney != null and collectStnMoney != ''">COLLECT_STN_MONEY = #{collectStnMoney},</if>
- <if test="wtrpPblm != null and wtrpPblm != ''">WTRP_PBLM = #{wtrpPblm},</if>
- <if test="comments != null and comments != ''">COMMENTS = #{comments},</if>
- <if test="invsrName != null and invsrName != ''">INVSR_NAME = #{invsrName},</if>
- <if test="invsrPhone != null and invsrPhone != ''">INVSR_PHONE = #{invsrPhone},</if>
- <if test="cunCntcName != null and cunCntcName != ''">CUN_CNTC_NAME = #{cunCntcName},</if>
- <if test="cunCntcPhone != null and cunCntcPhone != ''">CUN_CNTC_PHONE = #{cunCntcPhone},</if>
- <if test="rsrchTm != null">RSRCH_TM = #{rsrchTm},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="state != null and state != ''">STATE = #{state},</if>
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="rurPop != null and rurPop != ''">RUR_POP = #{rurPop},</if>
- <if test="effIrrArea != null and effIrrArea != ''">EFF_IRR_AREA = #{effIrrArea},</if>
- <if test="lndfrm != null and lndfrm != ''">LNDFRM = #{lndfrm},</if>
- <if test="prjPbmArea != null and prjPbmArea != ''">PRJ_PBM_AREA = #{prjPbmArea},</if>
- <if test="townsOrgNm != null and townsOrgNm != ''">TOWNS_ORG_NM = #{townsOrgNm},</if>
- <if test="townsOrgType != null and townsOrgType != ''">TOWNS_ORG_TYPE = #{townsOrgType},</if>
- <if test="townsOrgWork != null and townsOrgWork != ''">TOWNS_ORG_WORK = #{townsOrgWork},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspIrrTownsDsu">
- update BIS_INSP_IRR_TOWNS_DSU
- <trim prefix="set" suffixOverrides=",">
- <if test="townsOrgTypeNote != null and townsOrgTypeNote != ''">TOWNS_ORG_TYPE_NOTE = #{townsOrgTypeNote},</if>
- <if test="curBulDepNote != null and curBulDepNote != ''">CUR_BUL_DEP_NOTE = #{curBulDepNote},</if>
- <if test="curRunDepNote != null and curRunDepNote != ''">CUR_RUN_DEP_NOTE = #{curRunDepNote},</if>
- <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</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="curRunDep != null and curRunDep != ''">CUR_RUN_DEP = #{curRunDep},</if>
- <if test="inBulMoney != null and inBulMoney != ''">IN_BUL_MONEY = #{inBulMoney},</if>
- <if test="inRunMoney != null and inRunMoney != ''">IN_RUN_MONEY = #{inRunMoney},</if>
- <if test="othrStnMoney != null and othrStnMoney != ''">OTHR_STN_MONEY = #{othrStnMoney},</if>
- <if test="collectStnMoney != null and collectStnMoney != ''">COLLECT_STN_MONEY = #{collectStnMoney},</if>
- <if test="wtrpPblm != null and wtrpPblm != ''">WTRP_PBLM = #{wtrpPblm},</if>
- <if test="comments != null and comments != ''">COMMENTS = #{comments},</if>
- <if test="invsrName != null and invsrName != ''">INVSR_NAME = #{invsrName},</if>
- <if test="invsrPhone != null and invsrPhone != ''">INVSR_PHONE = #{invsrPhone},</if>
- <if test="cunCntcName != null and cunCntcName != ''">CUN_CNTC_NAME = #{cunCntcName},</if>
- <if test="cunCntcPhone != null and cunCntcPhone != ''">CUN_CNTC_PHONE = #{cunCntcPhone},</if>
- <if test="rsrchTm != null">RSRCH_TM = #{rsrchTm},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="state != null and state != ''">STATE = #{state},</if>
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="rurPop != null and rurPop != ''">RUR_POP = #{rurPop},</if>
- <if test="effIrrArea != null and effIrrArea != ''">EFF_IRR_AREA = #{effIrrArea},</if>
- <if test="lndfrm != null and lndfrm != ''">LNDFRM = #{lndfrm},</if>
- <if test="prjPbmArea != null and prjPbmArea != ''">PRJ_PBM_AREA = #{prjPbmArea},</if>
- <if test="townsOrgNm != null and townsOrgNm != ''">TOWNS_ORG_NM = #{townsOrgNm},</if>
- <if test="townsOrgType != null and townsOrgType != ''">TOWNS_ORG_TYPE = #{townsOrgType},</if>
- <if test="townsOrgWork != null and townsOrgWork != ''">TOWNS_ORG_WORK = #{townsOrgWork},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- <select id="findTownList" parameterType="cn.com.goldenwater.dcproj.param.BisInspIrrTownsDsuParam" resultType="cn.com.goldenwater.dcproj.dto.TreeDto">
- select t.ad_code,t.ad_name,t.id from BIS_INSP_IRR_TOWNS_DSU t where
- t.data_stat = '0'
- and t.ad_code is not null and substr(t.ad_code,10)='000' and t.data_stat = '0'
- <if test="rgstrId != null and rgstrId != ''">
- AND t.rgstr_id = #{rgstrId}
- </if>
- <if test="adCode != null and adCode != ''">
- and t.ad_code like '${adCode}%'
- </if>
- </select>
- <select id="findTownDsuList" parameterType="cn.com.goldenwater.dcproj.param.BisInspIrrTownsDsuParam" resultType="cn.com.goldenwater.dcproj.model.BisInspIrrTownsDsu">
- select * from BIS_INSP_IRR_TOWNS_DSU t where
- t.data_stat = '0'
- and t.ad_code is not null and t.data_stat = '0' and substr(t.ad_code,10)='000'
- <if test="rgstrId != null and rgstrId != ''">
- AND t.rgstr_id = #{rgstrId}
- </if>
- <if test="adCode != null and adCode != ''">
- and t.ad_code like '${adCode}%'
- </if>
- </select>
- <select id="findVillList" parameterType="cn.com.goldenwater.dcproj.param.BisInspIrrTownsDsuParam" resultType="cn.com.goldenwater.dcproj.model.BisInspIrrTownsDsu">
- select * from BIS_INSP_IRR_TOWNS_DSU t where
- t.data_stat = '0'
- and t.ad_code is not null and t.data_stat = '0' and substr(t.ad_code,10)!='000'
- <if test="rgstrId != null and rgstrId != ''">
- AND t.rgstr_id = #{rgstrId}
- </if>
- <if test="adCode != null and adCode != ''">
- and t.ad_code like '${adCode}%'
- </if>
- </select>
- <select id="findProjectList" parameterType="cn.com.goldenwater.dcproj.param.BisInspIrrTownsDsuParam" resultType="cn.com.goldenwater.dcproj.dto.BisInspTownsDsuDto">
- select * from VIEW_IRR_LIST t
- where t.rgstr_id = #{rgstrId}
- <if test="type != null and type != ''">
- and t.type in (${type})
- </if>
- <if test="adCode != null and adCode != ''">
- and t.ad_code = #{adCode}
- </if>
- </select>
- </mapper>
|