| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 |
- <?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.AttEngCwsDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.AttEngCws" id="attEngCwsResultMap">
- <result property="projGuid" column="PROJ_GUID"/>
- <result property="stat" column="STAT"/>
- <result property="cwsCode" column="CWS_CODE"/>
- <result property="cenLong" column="CEN_LONG"/>
- <result property="cenLat" column="CEN_LAT"/>
- <result property="cwsLoc" column="CWS_LOC"/>
- <result property="adGuid" column="AD_GUID"/>
- <result property="engType" column="ENG_TYPE"/>
- <result property="wintWsType" column="WINT_WS_TYPE"/>
- <result property="wasuType" column="WASU_TYPE"/>
- <result property="desWasuScal" column="DES_WASU_SCAL"/>
- <result property="desWasuPop" column="DES_WASU_POP"/>
- <result property="engScal" column="ENG_SCAL"/>
- <result property="watePuri" column="WATE_PURI"/>
- <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"/>
- </resultMap>
- <sql id="table_columns">
- PROJ_GUID,
- STAT,
- CWS_CODE,
- CEN_LONG,
- CEN_LAT,
- CWS_LOC,
- AD_GUID,
- ENG_TYPE,
- WINT_WS_TYPE,
- WASU_TYPE,
- DES_WASU_SCAL,
- DES_WASU_POP,
- ENG_SCAL,
- WATE_PURI,
- 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
- </sql>
- <sql id="entity_properties">
- #{projGuid},
- #{stat},
- #{cwsCode},
- #{cenLong},
- #{cenLat},
- #{cwsLoc},
- #{adGuid},
- #{engType},
- #{wintWsType},
- #{wasuType},
- #{desWasuScal},
- #{desWasuPop},
- #{engScal},
- #{watePuri},
- #{note},
- #{collTime},
- #{updTime},
- #{recPers},
- #{engReinForceGuid},
- #{guid},
- #{pGuid},
- #{engName},
- #{engGuid},
- #{impoGrad},
- #{apprBudg},
- #{startDate},
- #{compDate},
- #{engStat},
- #{orgGuid},
- #{oflpCode},
- #{ifReinForce}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="stat != null and stat != ''">and STAT = #{stat}</if>
- <if test="cwsCode != null and cwsCode != ''">and CWS_CODE = #{cwsCode}</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="cwsLoc != null and cwsLoc != ''">and CWS_LOC = #{cwsLoc}</if>
- <if test="adGuid != null and adGuid != ''">and AD_GUID = #{adGuid}</if>
- <if test="engType != null and engType != ''">and ENG_TYPE = #{engType}</if>
- <if test="wintWsType != null and wintWsType != ''">and WINT_WS_TYPE = #{wintWsType}</if>
- <if test="wasuType != null and wasuType != ''">and WASU_TYPE = #{wasuType}</if>
- <if test="desWasuScal != null and desWasuScal != ''">and DES_WASU_SCAL = #{desWasuScal}</if>
- <if test="desWasuPop != null and desWasuPop != ''">and DES_WASU_POP = #{desWasuPop}</if>
- <if test="engScal != null and engScal != ''">and ENG_SCAL = #{engScal}</if>
- <if test="watePuri != null and watePuri != ''">and WATE_PURI = #{watePuri}</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="projGuid != null and projGuid != ''">and PROJ_GUID = #{projGuid}</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>
- </trim>
- </sql>
- <select id="get" resultMap="attEngCwsResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from att_eng_cws where GUID = #{id}
- </select>
- <select id="getBy" resultMap="attEngCwsResultMap">
- select
- <include refid="table_columns"/>
- from att_eng_cws
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="attEngCwsResultMap">
- select
- <include refid="table_columns"/>
- from att_eng_cws
- </select>
- <select id="findList" resultMap="attEngCwsResultMap">
- select
- <include refid="table_columns"/>
- from att_eng_cws
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(GUID) from att_eng_cws
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.AttEngCws">
- insert into att_eng_cws(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from att_eng_cws where GUID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.AttEngCws">
- delete from att_eng_cws
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update att_eng_cws set flag_valid = 0 where GUID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.AttEngCws">
- update att_eng_cws
- <trim prefix="set" suffixOverrides=",">
- <if test="stat != null and stat != ''">STAT = #{stat},</if>
- <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
- <if test="cenLong != null and cenLong != ''">CEN_LONG = #{cenLong},</if>
- <if test="cenLat != null and cenLat != ''">CEN_LAT = #{cenLat},</if>
- <if test="cwsLoc != null and cwsLoc != ''">CWS_LOC = #{cwsLoc},</if>
- <if test="adGuid != null and adGuid != ''">AD_GUID = #{adGuid},</if>
- <if test="engType != null and engType != ''">ENG_TYPE = #{engType},</if>
- <if test="wintWsType != null and wintWsType != ''">WINT_WS_TYPE = #{wintWsType},</if>
- <if test="wasuType != null and wasuType != ''">WASU_TYPE = #{wasuType},</if>
- <if test="desWasuScal != null and desWasuScal != ''">DES_WASU_SCAL = #{desWasuScal},</if>
- <if test="desWasuPop != null and desWasuPop != ''">DES_WASU_POP = #{desWasuPop},</if>
- <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
- <if test="watePuri != null and watePuri != ''">WATE_PURI = #{watePuri},</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="projGuid != null and projGuid != ''">PROJ_GUID = #{projGuid},</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>
- </trim>
- <where>GUID = #{guid}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.AttEngCws">
- update att_eng_cws
- <trim prefix="set" suffixOverrides=",">
- <if test="stat != null and stat != ''">STAT = #{stat},</if>
- <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
- <if test="cenLong != null and cenLong != ''">CEN_LONG = #{cenLong},</if>
- <if test="cenLat != null and cenLat != ''">CEN_LAT = #{cenLat},</if>
- <if test="cwsLoc != null and cwsLoc != ''">CWS_LOC = #{cwsLoc},</if>
- <if test="adGuid != null and adGuid != ''">AD_GUID = #{adGuid},</if>
- <if test="engType != null and engType != ''">ENG_TYPE = #{engType},</if>
- <if test="wintWsType != null and wintWsType != ''">WINT_WS_TYPE = #{wintWsType},</if>
- <if test="wasuType != null and wasuType != ''">WASU_TYPE = #{wasuType},</if>
- <if test="desWasuScal != null and desWasuScal != ''">DES_WASU_SCAL = #{desWasuScal},</if>
- <if test="desWasuPop != null and desWasuPop != ''">DES_WASU_POP = #{desWasuPop},</if>
- <if test="engScal != null and engScal != ''">ENG_SCAL = #{engScal},</if>
- <if test="watePuri != null and watePuri != ''">WATE_PURI = #{watePuri},</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="projGuid != null and projGuid != ''">PROJ_GUID = #{projGuid},</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>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|