| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235 |
- <?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.BisInspHystpDutyDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspHystpDuty" id="bisInspHystpDutyResultMap">
- <result property="id" column="ID"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="isMakDuty" column="IS_MAK_DUTY"/>
- <result property="makDutyName" column="MAK_DUTY_NAME"/>
- <result property="makDutyTel" column="MAK_DUTY_TEL"/>
- <result property="isDutyPub" column="IS_DUTY_PUB"/>
- <result property="isDutyNote" column="IS_DUTY_NOTE"/>
- <result property="isRglDuty" column="IS_RGL_DUTY"/>
- <result property="rglDutyDep" column="RGL_DUTY_DEP"/>
- <result property="rglDutyName" column="RGL_DUTY_NAME"/>
- <result property="rglDutyTel" column="RGL_DUTY_TEL"/>
- <result property="isRglPub" column="IS_RGL_PUB"/>
- <result property="isRglNote" column="IS_RGL_NOTE"/>
- <result property="isAdmDuty" column="IS_ADM_DUTY"/>
- <result property="admDutyDep" column="ADM_DUTY_DEP"/>
- <result property="admDutyName" column="ADM_DUTY_NAME"/>
- <result property="admDutyPost" column="ADM_DUTY_POST"/>
- <result property="rglDutyPost" column="RGL_DUTY_POST"/>
- <result property="admDutyTel" column="ADM_DUTY_TEL"/>
- <result property="isAdmPub" column="IS_ADM_PUB"/>
- <result property="isAdmNote" column="IS_ADM_NOTE"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="note" column="NOTE"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="state" column="STATE"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- RGSTR_ID,
- IS_MAK_DUTY,
- MAK_DUTY_NAME,
- MAK_DUTY_TEL,
- IS_DUTY_PUB,
- IS_DUTY_NOTE,
- IS_RGL_DUTY,
- RGL_DUTY_DEP,
- RGL_DUTY_NAME,
- RGL_DUTY_TEL,
- IS_RGL_PUB,
- IS_RGL_NOTE,
- IS_ADM_DUTY,
- ADM_DUTY_DEP,
- ADM_DUTY_NAME,
- ADM_DUTY_POST,
- RGL_DUTY_POST,
- ADM_DUTY_TEL,
- IS_ADM_PUB,
- IS_ADM_NOTE,
- PERS_ID,
- INTM,
- UPTM,
- NOTE,
- DATA_STAT,
- STATE
- </sql>
- <sql id="entity_properties">
- #{id},
- #{rgstrId},
- #{isMakDuty},
- #{makDutyName},
- #{makDutyTel},
- #{isDutyPub},
- #{isDutyNote},
- #{isRglDuty},
- #{rglDutyDep},
- #{rglDutyName},
- #{rglDutyTel},
- #{isRglPub},
- #{isRglNote},
- #{isAdmDuty},
- #{admDutyDep},
- #{admDutyName},
- #{admDutyPost},
- #{rglDutyPost},
- #{admDutyTel},
- #{isAdmPub},
- #{isAdmNote},
- #{persId},
- #{intm},
- #{uptm},
- #{note},
- #{dataStat},
- #{state}
- </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="isMakDuty != null and isMakDuty != ''">and IS_MAK_DUTY = #{isMakDuty}</if>
- <if test="makDutyName != null and makDutyName != ''">and MAK_DUTY_NAME = #{makDutyName}</if>
- <if test="makDutyTel != null and makDutyTel != ''">and MAK_DUTY_TEL = #{makDutyTel}</if>
- <if test="isDutyPub != null and isDutyPub != ''">and IS_DUTY_PUB = #{isDutyPub}</if>
- <if test="isDutyNote != null and isDutyNote != ''">and IS_DUTY_NOTE = #{isDutyNote}</if>
- <if test="isRglDuty != null and isRglDuty != ''">and IS_RGL_DUTY = #{isRglDuty}</if>
- <if test="rglDutyDep != null and rglDutyDep != ''">and RGL_DUTY_DEP = #{rglDutyDep}</if>
- <if test="rglDutyName != null and rglDutyName != ''">and RGL_DUTY_NAME = #{rglDutyName}</if>
- <if test="rglDutyPost != null and rglDutyPost != ''">and RGL_DUTY_POST = #{rglDutyPost}</if>
- <if test="rglDutyTel != null and rglDutyTel != ''">and RGL_DUTY_TEL = #{rglDutyTel}</if>
- <if test="isRglPub != null and isRglPub != ''">and IS_RGL_PUB = #{isRglPub}</if>
- <if test="isRglNote != null and isRglNote != ''">and IS_RGL_NOTE = #{isRglNote}</if>
- <if test="isAdmDuty != null and isAdmDuty != ''">and IS_ADM_DUTY = #{isAdmDuty}</if>
- <if test="admDutyDep != null and admDutyDep != ''">and ADM_DUTY_DEP = #{admDutyDep}</if>
- <if test="admDutyName != null and admDutyName != ''">and ADM_DUTY_NAME = #{admDutyName}</if>
- <if test="admDutyPost != null and admDutyPost != ''">and ADM_DUTY_POST = #{admDutyPost}</if>
- <if test="admDutyTel != null and admDutyTel != ''">and ADM_DUTY_TEL = #{admDutyTel}</if>
- <if test="isAdmPub != null and isAdmPub != ''">and IS_ADM_PUB = #{isAdmPub}</if>
- <if test="isAdmNote != null and isAdmNote != ''">and IS_ADM_NOTE = #{isAdmNote}</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>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="state != null and state != ''">and STATE = #{state}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspHystpDutyResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_HYSTP_DUTY where RGSTR_ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspHystpDutyResultMap">
- select <include refid="table_columns" /> from BIS_INSP_HYSTP_DUTY <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspHystpDutyResultMap">
- select <include refid="table_columns" /> from BIS_INSP_HYSTP_DUTY
- </select>
- <select id="findList" resultMap="bisInspHystpDutyResultMap">
- select <include refid="table_columns" /> from BIS_INSP_HYSTP_DUTY <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_HYSTP_DUTY <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspHystpDuty">
- insert into BIS_INSP_HYSTP_DUTY( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_HYSTP_DUTY set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspHystpDuty">
- delete from BIS_INSP_HYSTP_DUTY <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_HYSTP_DUTY set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspHystpDuty">
- update BIS_INSP_HYSTP_DUTY
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="isMakDuty != null and isMakDuty != ''">IS_MAK_DUTY = #{isMakDuty},</if>
- <if test="makDutyName != null and makDutyName != ''">MAK_DUTY_NAME = #{makDutyName},</if>
- <if test="makDutyTel != null and makDutyTel != ''">MAK_DUTY_TEL = #{makDutyTel},</if>
- <if test="isDutyPub != null and isDutyPub != ''">IS_DUTY_PUB = #{isDutyPub},</if>
- <if test="isDutyNote != null and isDutyNote != ''">IS_DUTY_NOTE = #{isDutyNote},</if>
- <if test="isRglDuty != null and isRglDuty != ''">IS_RGL_DUTY = #{isRglDuty},</if>
- <if test="rglDutyDep != null and rglDutyDep != ''">RGL_DUTY_DEP = #{rglDutyDep},</if>
- <if test="rglDutyName != null and rglDutyName != ''">RGL_DUTY_NAME = #{rglDutyName},</if>
- <if test="rglDutyPost != null and rglDutyPost != ''">RGL_DUTY_POST = #{rglDutyPost},</if>
- <if test="rglDutyTel != null and rglDutyTel != ''">RGL_DUTY_TEL = #{rglDutyTel},</if>
- <if test="isRglPub != null and isRglPub != ''">IS_RGL_PUB = #{isRglPub},</if>
- <if test="isRglNote != null and isRglNote != ''">IS_RGL_NOTE = #{isRglNote},</if>
- <if test="isAdmDuty != null and isAdmDuty != ''">IS_ADM_DUTY = #{isAdmDuty},</if>
- <if test="admDutyDep != null and admDutyDep != ''">ADM_DUTY_DEP = #{admDutyDep},</if>
- <if test="admDutyName != null and admDutyName != ''">ADM_DUTY_NAME = #{admDutyName},</if>
- <if test="admDutyPost != null and admDutyPost != ''">ADM_DUTY_POST = #{admDutyPost},</if>
- <if test="admDutyTel != null and admDutyTel != ''">ADM_DUTY_TEL = #{admDutyTel},</if>
- <if test="isAdmPub != null and isAdmPub != ''">IS_ADM_PUB = #{isAdmPub},</if>
- <if test="isAdmNote != null and isAdmNote != ''">IS_ADM_NOTE = #{isAdmNote},</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>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="state != null and state != ''">STATE = #{state},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspHystpDuty">
- update BIS_INSP_HYSTP_DUTY
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="isMakDuty != null and isMakDuty != ''">IS_MAK_DUTY = #{isMakDuty},</if>
- <if test="makDutyName != null and makDutyName != ''">MAK_DUTY_NAME = #{makDutyName},</if>
- <if test="makDutyTel != null and makDutyTel != ''">MAK_DUTY_TEL = #{makDutyTel},</if>
- <if test="isDutyPub != null and isDutyPub != ''">IS_DUTY_PUB = #{isDutyPub},</if>
- <if test="isDutyNote != null and isDutyNote != ''">IS_DUTY_NOTE = #{isDutyNote},</if>
- <if test="isRglDuty != null and isRglDuty != ''">IS_RGL_DUTY = #{isRglDuty},</if>
- <if test="rglDutyDep != null and rglDutyDep != ''">RGL_DUTY_DEP = #{rglDutyDep},</if>
- <if test="rglDutyName != null and rglDutyName != ''">RGL_DUTY_NAME = #{rglDutyName},</if>
- <if test="rglDutyPost != null and rglDutyPost != ''">RGL_DUTY_POST = #{rglDutyPost},</if>
- <if test="rglDutyTel != null and rglDutyTel != ''">RGL_DUTY_TEL = #{rglDutyTel},</if>
- <if test="isRglPub != null and isRglPub != ''">IS_RGL_PUB = #{isRglPub},</if>
- <if test="isRglNote != null and isRglNote != ''">IS_RGL_NOTE = #{isRglNote},</if>
- <if test="isAdmDuty != null and isAdmDuty != ''">IS_ADM_DUTY = #{isAdmDuty},</if>
- <if test="admDutyDep != null and admDutyDep != ''">ADM_DUTY_DEP = #{admDutyDep},</if>
- <if test="admDutyName != null and admDutyName != ''">ADM_DUTY_NAME = #{admDutyName},</if>
- <if test="admDutyPost != null and admDutyPost != ''">ADM_DUTY_POST = #{admDutyPost},</if>
- <if test="admDutyTel != null and admDutyTel != ''">ADM_DUTY_TEL = #{admDutyTel},</if>
- <if test="isAdmPub != null and isAdmPub != ''">IS_ADM_PUB = #{isAdmPub},</if>
- <if test="isAdmNote != null and isAdmNote != ''">IS_ADM_NOTE = #{isAdmNote},</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>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="state != null and state != ''">STATE = #{state},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|