| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- <?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.AttWainBaseDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttWainBase" id="attWainBaseResultMap">
- <result property="admName" column="ADM_NAME"/>
- <result property="centerX" column="CENTER_X"/>
- <result property="centerY" column="CENTER_Y"/>
- <result property="ditrName" column="DITR_NAME"/>
- <result property="exaDep" column="EXA_DEP"/>
- <result property="gateName" column="GATE_NAME"/>
- <result property="ifInt" column="IF_INT"/>
- <result property="ifTakeLic" column="IF_TAKE_LIC"/>
- <result property="ifWsSur" column="IF_WS_SUR"/>
- <result property="lakeName" column="LAKE_NAME"/>
- <result property="permAdmOrg" column="PERM_ADM_ORG"/>
- <result property="adName" column="AD_NAME"/>
- <result property="rvName" column="RV_NAME"/>
- <result property="takeLicCode" column="TAKE_LIC_CODE"/>
- <result property="tra" column="TRA"/>
- <result property="wintFlow" column="WINT_FLOW"/>
- <result property="wintMode" column="WINT_MODE"/>
- <result property="wintName" column="WINT_NAME"/>
- <result property="wintPos" column="WINT_POS"/>
- <result property="wintType" column="WINT_TYPE"/>
- <result property="wsName" column="WS_NAME"/>
- <result property="wsType" column="WS_TYPE"/>
- <result property="lgtd" column="LGTD"/>
- <result property="lttd" column="LTTD"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="objCode" column="OBJ_CODE"/>
- <result property="displayLevel" column="DISPLAY_LEVEL"/>
- </resultMap>
- <sql id="table_columns">
- ADM_NAME,
- CENTER_X,
- CENTER_Y,
- DITR_NAME,
- EXA_DEP,
- GATE_NAME,
- IF_INT,
- IF_TAKE_LIC,
- IF_WS_SUR,
- LAKE_NAME,
- PERM_ADM_ORG,
- AD_NAME,
- RV_NAME,
- TAKE_LIC_CODE,
- TRA,
- WINT_FLOW,
- WINT_MODE,
- WINT_NAME,
- WINT_POS,
- WINT_TYPE,
- WS_NAME,
- WS_TYPE,
- LGTD,
- LTTD,
- AD_CODE,
- OBJ_CODE,
- DISPLAY_LEVEL
- </sql>
- <sql id="entity_properties">
- #{admName},
- #{centerX},
- #{centerY},
- #{ditrName},
- #{exaDep},
- #{gateName},
- #{ifInt},
- #{ifTakeLic},
- #{ifWsSur},
- #{lakeName},
- #{permAdmOrg},
- #{adName},
- #{rvName},
- #{takeLicCode},
- #{tra},
- #{wintFlow},
- #{wintMode},
- #{wintName},
- #{wintPos},
- #{wintType},
- #{wsName},
- #{wsType},
- #{lgtd},
- #{lttd},
- #{adCode},
- #{objCode},
- #{displayLevel}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="centerX != null and centerX != ''">and CENTER_X = #{centerX}</if>
- <if test="centerY != null and centerY != ''">and CENTER_Y = #{centerY}</if>
- <if test="ditrName != null and ditrName != ''">and DITR_NAME = #{ditrName}</if>
- <if test="exaDep != null and exaDep != ''">and EXA_DEP = #{exaDep}</if>
- <if test="gateName != null and gateName != ''">and GATE_NAME = #{gateName}</if>
- <if test="ifInt != null">and IF_INT = #{ifInt}</if>
- <if test="ifTakeLic != null">and IF_TAKE_LIC = #{ifTakeLic}</if>
- <if test="ifWsSur != null">and IF_WS_SUR = #{ifWsSur}</if>
- <if test="lakeName != null and lakeName != ''">and LAKE_NAME = #{lakeName}</if>
- <if test="permAdmOrg != null and permAdmOrg != ''">and PERM_ADM_ORG = #{permAdmOrg}</if>
- <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
- <if test="rvName != null and rvName != ''">and RV_NAME = #{rvName}</if>
- <if test="takeLicCode != null and takeLicCode != ''">and TAKE_LIC_CODE = #{takeLicCode}</if>
- <if test="tra != null and tra != ''">and TRA = #{tra}</if>
- <if test="wintFlow != null and wintFlow != ''">and WINT_FLOW = #{wintFlow}</if>
- <if test="wintMode != null and wintMode != ''">and WINT_MODE = #{wintMode}</if>
- <if test="wintName != null and wintName != ''">and WINT_NAME = #{wintName}</if>
- <if test="wintPos != null and wintPos != ''">and WINT_POS = #{wintPos}</if>
- <if test="wintType != null">and WINT_TYPE = #{wintType}</if>
- <if test="wsName != null and wsName != ''">and WS_NAME = #{wsName}</if>
- <if test="wsType != null">and WS_TYPE = #{wsType}</if>
- <if test="lgtd != null and lgtd != ''">and LGTD = #{lgtd}</if>
- <if test="lttd != null and lttd != ''">and LTTD = #{lttd}</if>
- <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
- <if test="objCode != null and objCode != ''">and OBJ_CODE = #{objCode}</if>
- <if test="displayLevel != null and displayLevel != ''">and DISPLAY_LEVEL = #{displayLevel}</if>
- </trim>
- </sql>
- <select id="get" resultMap="attWainBaseResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from ATT_WAIN_BASE where OBJ_CODE = #{id}
- </select>
- <select id="getBy" resultMap="attWainBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_WAIN_BASE
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="attWainBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_WAIN_BASE
- </select>
- <select id="findList" resultMap="attWainBaseResultMap">
- select
- <include refid="table_columns"/>
- from ATT_WAIN_BASE
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from ATT_WAIN_BASE
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttWainBase">
- insert into ATT_WAIN_BASE(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from ATT_WAIN_BASE where OBJ_CODE = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttWainBase">
- delete from ATT_WAIN_BASE
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_WAIN_BASE set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttWainBase">
- update ATT_WAIN_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
- <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
- <if test="ditrName != null and ditrName != ''">DITR_NAME = #{ditrName},</if>
- <if test="exaDep != null and exaDep != ''">EXA_DEP = #{exaDep},</if>
- <if test="gateName != null and gateName != ''">GATE_NAME = #{gateName},</if>
- <if test="ifInt != null">IF_INT = #{ifInt},</if>
- <if test="ifTakeLic != null">IF_TAKE_LIC = #{ifTakeLic},</if>
- <if test="ifWsSur != null">IF_WS_SUR = #{ifWsSur},</if>
- <if test="lakeName != null and lakeName != ''">LAKE_NAME = #{lakeName},</if>
- <if test="permAdmOrg != null and permAdmOrg != ''">PERM_ADM_ORG = #{permAdmOrg},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="rvName != null and rvName != ''">RV_NAME = #{rvName},</if>
- <if test="takeLicCode != null and takeLicCode != ''">TAKE_LIC_CODE = #{takeLicCode},</if>
- <if test="tra != null and tra != ''">TRA = #{tra},</if>
- <if test="wintFlow != null and wintFlow != ''">WINT_FLOW = #{wintFlow},</if>
- <if test="wintMode != null and wintMode != ''">WINT_MODE = #{wintMode},</if>
- <if test="wintName != null and wintName != ''">WINT_NAME = #{wintName},</if>
- <if test="wintPos != null and wintPos != ''">WINT_POS = #{wintPos},</if>
- <if test="wintType != null">WINT_TYPE = #{wintType},</if>
- <if test="wsName != null and wsName != ''">WS_NAME = #{wsName},</if>
- <if test="wsType != null">WS_TYPE = #{wsType},</if>
- <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
- <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="displayLevel != null and displayLevel != ''">DISPLAY_LEVEL = #{displayLevel},</if>
- </trim>
- <where>OBJ_CODE = #{objCode}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttWainBase">
- update ATT_WAIN_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="centerX != null and centerX != ''">CENTER_X = #{centerX},</if>
- <if test="centerY != null and centerY != ''">CENTER_Y = #{centerY},</if>
- <if test="ditrName != null and ditrName != ''">DITR_NAME = #{ditrName},</if>
- <if test="exaDep != null and exaDep != ''">EXA_DEP = #{exaDep},</if>
- <if test="gateName != null and gateName != ''">GATE_NAME = #{gateName},</if>
- <if test="ifInt != null">IF_INT = #{ifInt},</if>
- <if test="ifTakeLic != null">IF_TAKE_LIC = #{ifTakeLic},</if>
- <if test="ifWsSur != null">IF_WS_SUR = #{ifWsSur},</if>
- <if test="lakeName != null and lakeName != ''">LAKE_NAME = #{lakeName},</if>
- <if test="permAdmOrg != null and permAdmOrg != ''">PERM_ADM_ORG = #{permAdmOrg},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="rvName != null and rvName != ''">RV_NAME = #{rvName},</if>
- <if test="takeLicCode != null and takeLicCode != ''">TAKE_LIC_CODE = #{takeLicCode},</if>
- <if test="tra != null and tra != ''">TRA = #{tra},</if>
- <if test="wintFlow != null and wintFlow != ''">WINT_FLOW = #{wintFlow},</if>
- <if test="wintMode != null and wintMode != ''">WINT_MODE = #{wintMode},</if>
- <if test="wintName != null and wintName != ''">WINT_NAME = #{wintName},</if>
- <if test="wintPos != null and wintPos != ''">WINT_POS = #{wintPos},</if>
- <if test="wintType != null">WINT_TYPE = #{wintType},</if>
- <if test="wsName != null and wsName != ''">WS_NAME = #{wsName},</if>
- <if test="wsType != null">WS_TYPE = #{wsType},</if>
- <if test="lgtd != null and lgtd != ''">LGTD = #{lgtd},</if>
- <if test="lttd != null and lttd != ''">LTTD = #{lttd},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
- <if test="displayLevel != null and displayLevel != ''">DISPLAY_LEVEL = #{displayLevel},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- <select id="findListByPersId" parameterType="cn.com.goldenwater.dcproj.param.PersObjParam"
- resultType="cn.com.goldenwater.dcproj.model.AttWainBase">
- SELECT A.OBJ_CODE,
- A.ADM_NAME,
- A.CENTER_X,
- A.CENTER_Y,
- A.DITR_NAME,
- A.EXA_DEP,
- A.GATE_NAME,
- A.IF_INT,
- A.IF_TAKE_LIC,
- A.IF_WS_SUR,
- A.LAKE_NAME,
- A.PERM_ADM_ORG,
- A.RV_NAME,
- A.TAKE_LIC_CODE,
- A.TRA,
- A.WINT_FLOW,
- A.WINT_MODE,
- A.WINT_NAME,
- A.WINT_POS,
- A.WINT_TYPE,
- A.WS_NAME,
- A.WS_TYPE,
- A.AD_CODE,
- A.AD_NAME,
- A.LGTD,
- A.LTTD,A.DISPLAY_LEVEL FROM att_wain_base A WHERE 1 = 1
- <if test="adCode != null and adCode != ''">and A.AD_CODE LIKE '${adCode}%'</if>
- <if test="rsName != null and rsName != ''">and A.WINT_NAME LIKE '%${rsName}%'</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="wintFlow != null and wintFlow != ''">and A.WINT_Flow >= #{wintFlow}</if>
- <if test="displayLevel != null and displayLevel != ''">and cast(A.DISPLAY_LEVEL as signed) <=
- cast(#{displayLevel} as signed)
- </if>
- </select>
- </mapper>
|