| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271 |
- <?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.BisInspRsvrSdBldnDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRsvrSdBldn" id="bisInspRsvrSdBldnResultMap">
- <result property="id" column="ID"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="isDamLeak" column="IS_DAM_LEAK"/>
- <result property="isDamHole" column="IS_DAM_HOLE"/>
- <result property="isDamOut" column="IS_DAM_OUT"/>
- <result property="isDamRise" column="IS_DAM_RISE"/>
- <result property="isDamDrain" column="IS_DAM_DRAIN"/>
- <result property="isDamVug" column="IS_DAM_VUG"/>
- <result property="isDamStbl" column="IS_DAM_STBL"/>
- <result property="isDamDrn" column="IS_DAM_DRN"/>
- <result property="isFld" column="IS_FLD"/>
- <result property="isFldAsk" column="IS_FLD_ASK"/>
- <result property="isFldRun" column="IS_FLD_RUN"/>
- <result property="isFldOut" column="IS_FLD_OUT"/>
- <result property="isFldRisk" column="IS_FLD_RISK"/>
- <result property="isFldBank" column="IS_FLD_BANK"/>
- <result property="isFldScr" column="IS_FLD_SCR"/>
- <result property="isFldLeak" column="IS_FLD_LEAK"/>
- <result property="isFldDrn" column="IS_FLD_DRN"/>
- <result property="isBldRun" column="IS_BLD_RUN"/>
- <result property="isBldOut" column="IS_BLD_OUT"/>
- <result property="isBldRise" column="IS_BLD_RISE"/>
- <result property="isBldLeak" column="IS_BLD_LEAK"/>
- <result property="isBldHole" column="IS_BLD_HOLE"/>
- <result property="isBldMog" column="IS_BLD_MOG"/>
- <result property="isOthrRisk" column="IS_OTHR_RISK"/>
- <result property="isOthrLeak" column="IS_OTHR_LEAK"/>
- <result property="isOthrOthr" column="IS_OTHR_OTHR"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="note" column="NOTE"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- RGSTR_ID,
- IS_DAM_LEAK,
- IS_DAM_HOLE,
- IS_DAM_OUT,
- IS_DAM_RISE,
- IS_DAM_DRAIN,
- IS_DAM_VUG,
- IS_DAM_STBL,
- IS_DAM_DRN,
- IS_FLD,
- IS_FLD_ASK,
- IS_FLD_RUN,
- IS_FLD_OUT,
- IS_FLD_RISK,
- IS_FLD_BANK,
- IS_FLD_SCR,
- IS_FLD_LEAK,
- IS_FLD_DRN,
- IS_BLD_RUN,
- IS_BLD_OUT,
- IS_BLD_RISE,
- IS_BLD_LEAK,
- IS_BLD_HOLE,
- IS_BLD_MOG,
- IS_OTHR_RISK,
- IS_OTHR_LEAK,
- IS_OTHR_OTHR,
- DATA_STAT,
- PERS_ID,
- INTM,
- UPTM,
- NOTE
- </sql>
- <sql id="entity_properties">
- #{id},
- #{rgstrId},
- #{isDamLeak},
- #{isDamHole},
- #{isDamOut},
- #{isDamRise},
- #{isDamDrain},
- #{isDamVug},
- #{isDamStbl},
- #{isDamDrn},
- #{isFld},
- #{isFldAsk},
- #{isFldRun},
- #{isFldOut},
- #{isFldRisk},
- #{isFldBank},
- #{isFldScr},
- #{isFldLeak},
- #{isFldDrn},
- #{isBldRun},
- #{isBldOut},
- #{isBldRise},
- #{isBldLeak},
- #{isBldHole},
- #{isBldMog},
- #{isOthrRisk},
- #{isOthrLeak},
- #{isOthrOthr},
- #{dataStat},
- #{persId},
- #{intm},
- #{uptm},
- #{note}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
- <if test="isDamLeak != null and isDamLeak != ''">and IS_DAM_LEAK = #{isDamLeak}</if>
- <if test="isDamHole != null and isDamHole != ''">and IS_DAM_HOLE = #{isDamHole}</if>
- <if test="isDamOut != null and isDamOut != ''">and IS_DAM_OUT = #{isDamOut}</if>
- <if test="isDamRise != null and isDamRise != ''">and IS_DAM_RISE = #{isDamRise}</if>
- <if test="isDamDrain != null and isDamDrain != ''">and IS_DAM_DRAIN = #{isDamDrain}</if>
- <if test="isDamVug != null and isDamVug != ''">and IS_DAM_VUG = #{isDamVug}</if>
- <if test="isDamStbl != null and isDamStbl != ''">and IS_DAM_STBL = #{isDamStbl}</if>
- <if test="isDamDrn != null and isDamDrn != ''">and IS_DAM_DRN = #{isDamDrn}</if>
- <if test="isFld != null and isFld != ''">and IS_FLD = #{isFld}</if>
- <if test="isFldAsk != null and isFldAsk != ''">and IS_FLD_ASK = #{isFldAsk}</if>
- <if test="isFldRun != null and isFldRun != ''">and IS_FLD_RUN = #{isFldRun}</if>
- <if test="isFldOut != null and isFldOut != ''">and IS_FLD_OUT = #{isFldOut}</if>
- <if test="isFldRisk != null and isFldRisk != ''">and IS_FLD_RISK = #{isFldRisk}</if>
- <if test="isFldBank != null and isFldBank != ''">and IS_FLD_BANK = #{isFldBank}</if>
- <if test="isFldScr != null and isFldScr != ''">and IS_FLD_SCR = #{isFldScr}</if>
- <if test="isFldLeak != null and isFldLeak != ''">and IS_FLD_LEAK = #{isFldLeak}</if>
- <if test="isFldDrn != null and isFldDrn != ''">and IS_FLD_DRN = #{isFldDrn}</if>
- <if test="isBldRun != null and isBldRun != ''">and IS_BLD_RUN = #{isBldRun}</if>
- <if test="isBldOut != null and isBldOut != ''">and IS_BLD_OUT = #{isBldOut}</if>
- <if test="isBldRise != null and isBldRise != ''">and IS_BLD_RISE = #{isBldRise}</if>
- <if test="isBldLeak != null and isBldLeak != ''">and IS_BLD_LEAK = #{isBldLeak}</if>
- <if test="isBldHole != null and isBldHole != ''">and IS_BLD_HOLE = #{isBldHole}</if>
- <if test="isBldMog != null and isBldMog != ''">and IS_BLD_MOG = #{isBldMog}</if>
- <if test="isOthrRisk != null and isOthrRisk != ''">and IS_OTHR_RISK = #{isOthrRisk}</if>
- <if test="isOthrLeak != null and isOthrLeak != ''">and IS_OTHR_LEAK = #{isOthrLeak}</if>
- <if test="isOthrOthr != null and isOthrOthr != ''">and IS_OTHR_OTHR = #{isOthrOthr}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</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="note != null and note != ''">and NOTE = #{note}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspRsvrSdBldnResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_BLDN where RGSTR_ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspRsvrSdBldnResultMap">
- select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_BLDN <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspRsvrSdBldnResultMap">
- select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_BLDN
- </select>
- <select id="findList" resultMap="bisInspRsvrSdBldnResultMap">
- select <include refid="table_columns" /> from BIS_INSP_RSVR_SD_BLDN <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_RSVR_SD_BLDN <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdBldn">
- insert into BIS_INSP_RSVR_SD_BLDN( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_RSVR_SD_BLDN set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdBldn">
- delete from BIS_INSP_RSVR_SD_BLDN <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_RSVR_SD_BLDN set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdBldn">
- update BIS_INSP_RSVR_SD_BLDN
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="isDamLeak != null and isDamLeak != ''">IS_DAM_LEAK = #{isDamLeak},</if>
- <if test="isDamHole != null and isDamHole != ''">IS_DAM_HOLE = #{isDamHole},</if>
- <if test="isDamOut != null and isDamOut != ''">IS_DAM_OUT = #{isDamOut},</if>
- <if test="isDamRise != null and isDamRise != ''">IS_DAM_RISE = #{isDamRise},</if>
- <if test="isDamDrain != null and isDamDrain != ''">IS_DAM_DRAIN = #{isDamDrain},</if>
- <if test="isDamVug != null and isDamVug != ''">IS_DAM_VUG = #{isDamVug},</if>
- <if test="isDamStbl != null and isDamStbl != ''">IS_DAM_STBL = #{isDamStbl},</if>
- <if test="isDamDrn != null and isDamDrn != ''">IS_DAM_DRN = #{isDamDrn},</if>
- <if test="isFld != null and isFld != ''">IS_FLD = #{isFld},</if>
- <if test="isFldAsk != null and isFldAsk != ''">IS_FLD_ASK = #{isFldAsk},</if>
- <if test="isFldRun != null and isFldRun != ''">IS_FLD_RUN = #{isFldRun},</if>
- <if test="isFldOut != null and isFldOut != ''">IS_FLD_OUT = #{isFldOut},</if>
- <if test="isFldRisk != null and isFldRisk != ''">IS_FLD_RISK = #{isFldRisk},</if>
- <if test="isFldBank != null and isFldBank != ''">IS_FLD_BANK = #{isFldBank},</if>
- <if test="isFldScr != null and isFldScr != ''">IS_FLD_SCR = #{isFldScr},</if>
- <if test="isFldLeak != null and isFldLeak != ''">IS_FLD_LEAK = #{isFldLeak},</if>
- <if test="isFldDrn != null and isFldDrn != ''">IS_FLD_DRN = #{isFldDrn},</if>
- <if test="isBldRun != null and isBldRun != ''">IS_BLD_RUN = #{isBldRun},</if>
- <if test="isBldOut != null and isBldOut != ''">IS_BLD_OUT = #{isBldOut},</if>
- <if test="isBldRise != null and isBldRise != ''">IS_BLD_RISE = #{isBldRise},</if>
- <if test="isBldLeak != null and isBldLeak != ''">IS_BLD_LEAK = #{isBldLeak},</if>
- <if test="isBldHole != null and isBldHole != ''">IS_BLD_HOLE = #{isBldHole},</if>
- <if test="isBldMog != null and isBldMog != ''">IS_BLD_MOG = #{isBldMog},</if>
- <if test="isOthrRisk != null and isOthrRisk != ''">IS_OTHR_RISK = #{isOthrRisk},</if>
- <if test="isOthrLeak != null and isOthrLeak != ''">IS_OTHR_LEAK = #{isOthrLeak},</if>
- <if test="isOthrOthr != null and isOthrOthr != ''">IS_OTHR_OTHR = #{isOthrOthr},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</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="note != null and note != ''">NOTE = #{note},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRsvrSdBldn">
- update BIS_INSP_RSVR_SD_BLDN
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="isDamLeak != null and isDamLeak != ''">IS_DAM_LEAK = #{isDamLeak},</if>
- <if test="isDamHole != null and isDamHole != ''">IS_DAM_HOLE = #{isDamHole},</if>
- <if test="isDamOut != null and isDamOut != ''">IS_DAM_OUT = #{isDamOut},</if>
- <if test="isDamRise != null and isDamRise != ''">IS_DAM_RISE = #{isDamRise},</if>
- <if test="isDamDrain != null and isDamDrain != ''">IS_DAM_DRAIN = #{isDamDrain},</if>
- <if test="isDamVug != null and isDamVug != ''">IS_DAM_VUG = #{isDamVug},</if>
- <if test="isDamStbl != null and isDamStbl != ''">IS_DAM_STBL = #{isDamStbl},</if>
- <if test="isDamDrn != null and isDamDrn != ''">IS_DAM_DRN = #{isDamDrn},</if>
- <if test="isFld != null and isFld != ''">IS_FLD = #{isFld},</if>
- <if test="isFldAsk != null and isFldAsk != ''">IS_FLD_ASK = #{isFldAsk},</if>
- <if test="isFldRun != null and isFldRun != ''">IS_FLD_RUN = #{isFldRun},</if>
- <if test="isFldOut != null and isFldOut != ''">IS_FLD_OUT = #{isFldOut},</if>
- <if test="isFldRisk != null and isFldRisk != ''">IS_FLD_RISK = #{isFldRisk},</if>
- <if test="isFldBank != null and isFldBank != ''">IS_FLD_BANK = #{isFldBank},</if>
- <if test="isFldScr != null and isFldScr != ''">IS_FLD_SCR = #{isFldScr},</if>
- <if test="isFldLeak != null and isFldLeak != ''">IS_FLD_LEAK = #{isFldLeak},</if>
- <if test="isFldDrn != null and isFldDrn != ''">IS_FLD_DRN = #{isFldDrn},</if>
- <if test="isBldRun != null and isBldRun != ''">IS_BLD_RUN = #{isBldRun},</if>
- <if test="isBldOut != null and isBldOut != ''">IS_BLD_OUT = #{isBldOut},</if>
- <if test="isBldRise != null and isBldRise != ''">IS_BLD_RISE = #{isBldRise},</if>
- <if test="isBldLeak != null and isBldLeak != ''">IS_BLD_LEAK = #{isBldLeak},</if>
- <if test="isBldHole != null and isBldHole != ''">IS_BLD_HOLE = #{isBldHole},</if>
- <if test="isBldMog != null and isBldMog != ''">IS_BLD_MOG = #{isBldMog},</if>
- <if test="isOthrRisk != null and isOthrRisk != ''">IS_OTHR_RISK = #{isOthrRisk},</if>
- <if test="isOthrLeak != null and isOthrLeak != ''">IS_OTHR_LEAK = #{isOthrLeak},</if>
- <if test="isOthrOthr != null and isOthrOthr != ''">IS_OTHR_OTHR = #{isOthrOthr},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</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="note != null and note != ''">NOTE = #{note},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|