| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244 |
- <?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.AttRdwpgdBaseDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttRdwpgdBase" id="attRdwpgdBaseResultMap">
- <result property="id" column="ID"/>
- <result property="prjName" column="PRJ_NAME"/>
- <result property="prjType" column="PRJ_TYPE"/>
- <result property="adCode" column="AD_CODE"/>
- <result property="adName" column="AD_NAME"/>
- <result property="siteOfPrj" column="SITE_OF_PRJ"/>
- <result property="waterScale" column="WATER_SCALE"/>
- <result property="waterYield" column="WATER_YIELD"/>
- <result property="desWsp" column="DES_WSP"/>
- <result property="actWsp" column="ACT_WSP"/>
- <result property="wtType" column="WT_TYPE"/>
- <result property="wtName" column="WT_NAME"/>
- <result property="purificationWay" column="PURIFICATION_WAY"/>
- <result property="disinfectionWay" column="DISINFECTION_WAY"/>
- <result property="prjUnitName" column="PRJ_UNIT_NAME"/>
- <result property="waterUnitPhone" column="WATER_UNIT_PHONE"/>
- <result property="prjUnitNature" column="PRJ_UNIT_NATURE"/>
- <result property="waterUnitLeaderName" column="WATER_UNIT_LEADER_NAME"/>
- <result property="waterUnitLeaderPhone" column="WATER_UNIT_LEADER_PHONE"/>
- <result property="maintainPhone" column="MAINTAIN_PHONE"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="centerX" column="CENTER_X"/>
- <result property="centerY" column="CENTER_Y"/>
- <result property="gdX" column="GD_X"/>
- <result property="gdY" column="GD_Y"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- PRJ_NAME,
- PRJ_TYPE,
- AD_CODE,
- AD_NAME,
- SITE_OF_PRJ,
- WATER_SCALE,
- WATER_YIELD,
- DES_WSP,
- ACT_WSP,
- WT_TYPE,
- WT_NAME,
- PURIFICATION_WAY,
- DISINFECTION_WAY,
- PRJ_UNIT_NAME,
- WATER_UNIT_PHONE,
- PRJ_UNIT_NATURE,
- WATER_UNIT_LEADER_NAME,
- WATER_UNIT_LEADER_PHONE,
- MAINTAIN_PHONE,
- INTM,
- UPTM,
- DATA_STAT,
- CENTER_X,
- CENTER_Y,
- GD_X,
- GD_Y
- </sql>
- <sql id="entity_properties">
- #{id},
- #{prjName},
- #{prjType},
- #{adCode},
- #{adName},
- #{siteOfPrj},
- #{waterScale},
- #{waterYield},
- #{desWsp},
- #{actWsp},
- #{wtType},
- #{wtName},
- #{purificationWay},
- #{disinfectionWay},
- #{prjUnitName},
- #{waterUnitPhone},
- #{prjUnitNature},
- #{waterUnitLeaderName},
- #{waterUnitLeaderPhone},
- #{maintainPhone},
- #{intm},
- #{uptm},
- #{dataStat},
- #{centerX},
- #{centerY},
- #{gdX},
- #{gdY}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="prjName != null and prjName != ''">and PRJ_NAME = #{prjName}</if>
- <if test="prjType != null and prjType != ''">and PRJ_TYPE = #{prjType}</if>
- <if test="adCode != null and adCode != ''">and AD_CODE = #{adCode}</if>
- <if test="adName != null and adName != ''">and AD_NAME = #{adName}</if>
- <if test="siteOfPrj != null and siteOfPrj != ''">and SITE_OF_PRJ = #{siteOfPrj}</if>
- <if test="waterScale != null and waterScale != ''">and WATER_SCALE = #{waterScale}</if>
- <if test="waterYield != null and waterYield != ''">and WATER_YIELD = #{waterYield}</if>
- <if test="desWsp != null and desWsp != ''">and DES_WSP = #{desWsp}</if>
- <if test="actWsp != null and actWsp != ''">and ACT_WSP = #{actWsp}</if>
- <if test="wtType != null and wtType != ''">and WT_TYPE = #{wtType}</if>
- <if test="wtName != null and wtName != ''">and WT_NAME = #{wtName}</if>
- <if test="purificationWay != null and purificationWay != ''">and PURIFICATION_WAY = #{purificationWay}</if>
- <if test="disinfectionWay != null and disinfectionWay != ''">and DISINFECTION_WAY = #{disinfectionWay}</if>
- <if test="prjUnitName != null and prjUnitName != ''">and PRJ_UNIT_NAME = #{prjUnitName}</if>
- <if test="waterUnitPhone != null and waterUnitPhone != ''">and WATER_UNIT_PHONE = #{waterUnitPhone}</if>
- <if test="prjUnitNature != null and prjUnitNature != ''">and PRJ_UNIT_NATURE = #{prjUnitNature}</if>
- <if test="waterUnitLeaderName != null and waterUnitLeaderName != ''">and WATER_UNIT_LEADER_NAME = #{waterUnitLeaderName}</if>
- <if test="waterUnitLeaderPhone != null and waterUnitLeaderPhone != ''">and WATER_UNIT_LEADER_PHONE = #{waterUnitLeaderPhone}</if>
- <if test="maintainPhone != null and maintainPhone != ''">and MAINTAIN_PHONE = #{maintainPhone}</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="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>
- and DATA_STAT='0'
- </trim>
- </sql>
- <select id="get" resultMap="attRdwpgdBaseResultMap" parameterType="String" >
- select <include refid="table_columns" /> from ATT_RDWPGD_BASE where ID = #{id}
- </select>
- <select id="getBy" resultMap="attRdwpgdBaseResultMap">
- select <include refid="table_columns" /> from ATT_RDWPGD_BASE <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="attRdwpgdBaseResultMap">
- select <include refid="table_columns" /> from ATT_RDWPGD_BASE
- </select>
- <select id="findList" resultMap="attRdwpgdBaseResultMap">
- select <include refid="table_columns" /> from ATT_RDWPGD_BASE <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from ATT_RDWPGD_BASE <include refid="page_where" />
- </select>
- <select id="getObjId" resultType="cn.com.goldenwater.dcproj.model.AttRdwpgdBase">
- SELECT
- <include refid="table_columns"/>
- FROM ATT_RDWPGD_BASE
- WHERE ID = (SELECT CODE FROM BIS_INSP_ALL_OBJ WHERE OBJ_ID = #{objId})
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttRdwpgdBase">
- insert into ATT_RDWPGD_BASE( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update ATT_RDWPGD_BASE set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttRdwpgdBase">
- update ATT_RDWPGD_BASE set DATA_STAT='9' <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update ATT_RDWPGD_BASE set DATA_STAT = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttRdwpgdBase">
- update ATT_RDWPGD_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="prjName != null and prjName != ''">PRJ_NAME = #{prjName},</if>
- <if test="prjType != null and prjType != ''">PRJ_TYPE = #{prjType},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="siteOfPrj != null and siteOfPrj != ''">SITE_OF_PRJ = #{siteOfPrj},</if>
- <if test="waterScale != null and waterScale != ''">WATER_SCALE = #{waterScale},</if>
- <if test="waterYield != null and waterYield != ''">WATER_YIELD = #{waterYield},</if>
- <if test="desWsp != null and desWsp != ''">DES_WSP = #{desWsp},</if>
- <if test="actWsp != null and actWsp != ''">ACT_WSP = #{actWsp},</if>
- <if test="wtType != null and wtType != ''">WT_TYPE = #{wtType},</if>
- <if test="wtName != null and wtName != ''">WT_NAME = #{wtName},</if>
- <if test="purificationWay != null and purificationWay != ''">PURIFICATION_WAY = #{purificationWay},</if>
- <if test="disinfectionWay != null and disinfectionWay != ''">DISINFECTION_WAY = #{disinfectionWay},</if>
- <if test="prjUnitName != null and prjUnitName != ''">PRJ_UNIT_NAME = #{prjUnitName},</if>
- <if test="waterUnitPhone != null and waterUnitPhone != ''">WATER_UNIT_PHONE = #{waterUnitPhone},</if>
- <if test="prjUnitNature != null and prjUnitNature != ''">PRJ_UNIT_NATURE = #{prjUnitNature},</if>
- <if test="waterUnitLeaderName != null and waterUnitLeaderName != ''">WATER_UNIT_LEADER_NAME = #{waterUnitLeaderName},</if>
- <if test="waterUnitLeaderPhone != null and waterUnitLeaderPhone != ''">WATER_UNIT_LEADER_PHONE = #{waterUnitLeaderPhone},</if>
- <if test="maintainPhone != null and maintainPhone != ''">MAINTAIN_PHONE = #{maintainPhone},</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="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>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttRdwpgdBase">
- update ATT_RDWPGD_BASE
- <trim prefix="set" suffixOverrides=",">
- <if test="prjName != null and prjName != ''">PRJ_NAME = #{prjName},</if>
- <if test="prjType != null and prjType != ''">PRJ_TYPE = #{prjType},</if>
- <if test="adCode != null and adCode != ''">AD_CODE = #{adCode},</if>
- <if test="adName != null and adName != ''">AD_NAME = #{adName},</if>
- <if test="siteOfPrj != null and siteOfPrj != ''">SITE_OF_PRJ = #{siteOfPrj},</if>
- <if test="waterScale != null and waterScale != ''">WATER_SCALE = #{waterScale},</if>
- <if test="waterYield != null and waterYield != ''">WATER_YIELD = #{waterYield},</if>
- <if test="desWsp != null and desWsp != ''">DES_WSP = #{desWsp},</if>
- <if test="actWsp != null and actWsp != ''">ACT_WSP = #{actWsp},</if>
- <if test="wtType != null and wtType != ''">WT_TYPE = #{wtType},</if>
- <if test="wtName != null and wtName != ''">WT_NAME = #{wtName},</if>
- <if test="purificationWay != null and purificationWay != ''">PURIFICATION_WAY = #{purificationWay},</if>
- <if test="disinfectionWay != null and disinfectionWay != ''">DISINFECTION_WAY = #{disinfectionWay},</if>
- <if test="prjUnitName != null and prjUnitName != ''">PRJ_UNIT_NAME = #{prjUnitName},</if>
- <if test="waterUnitPhone != null and waterUnitPhone != ''">WATER_UNIT_PHONE = #{waterUnitPhone},</if>
- <if test="prjUnitNature != null and prjUnitNature != ''">PRJ_UNIT_NATURE = #{prjUnitNature},</if>
- <if test="waterUnitLeaderName != null and waterUnitLeaderName != ''">WATER_UNIT_LEADER_NAME = #{waterUnitLeaderName},</if>
- <if test="waterUnitLeaderPhone != null and waterUnitLeaderPhone != ''">WATER_UNIT_LEADER_PHONE = #{waterUnitLeaderPhone},</if>
- <if test="maintainPhone != null and maintainPhone != ''">MAINTAIN_PHONE = #{maintainPhone},</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="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>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|