| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211 |
- <?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.BisInspHystpSafDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspHystpSaf" id="bisInspHystpSafResultMap">
- <result property="id" column="ID"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="isPlanMak" column="IS_PLAN_MAK"/>
- <result property="isPlanApp" column="IS_PLAN_APP"/>
- <result property="isPlanDemo" column="IS_PLAN_DEMO"/>
- <result property="isSafChk" column="IS_SAF_CHK"/>
- <result property="isBuldBook" column="IS_BULD_BOOK"/>
- <result property="isDamFlv" column="IS_DAM_FLV"/>
- <result property="isDamTel" column="IS_DAM_TEL"/>
- <result property="isTwoOrdr" column="IS_TWO_ORDR"/>
- <result property="isThreeSys" column="IS_THREE_SYS"/>
- <result property="isFireStnd" column="IS_FIRE_STND"/>
- <result property="isGoodReq" column="IS_GOOD_REQ"/>
- <result property="isGasStore" column="IS_GAS_STORE"/>
- <result property="isSafReq" column="IS_SAF_REQ"/>
- <result property="isWarnReq" column="IS_WARN_REQ"/>
- <result property="isWarnSaf" column="IS_WARN_SAF"/>
- <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_PLAN_MAK,
- IS_PLAN_APP,
- IS_PLAN_DEMO,
- IS_SAF_CHK,
- IS_BULD_BOOK,
- IS_DAM_FLV,
- IS_DAM_TEL,
- IS_TWO_ORDR,
- IS_THREE_SYS,
- IS_FIRE_STND,
- IS_GOOD_REQ,
- IS_GAS_STORE,
- IS_SAF_REQ,
- IS_WARN_REQ,
- IS_WARN_SAF,
- PERS_ID,
- INTM,
- UPTM,
- NOTE,
- DATA_STAT,
- STATE
- </sql>
- <sql id="entity_properties">
- #{id},
- #{rgstrId},
- #{isPlanMak},
- #{isPlanApp},
- #{isPlanDemo},
- #{isSafChk},
- #{isBuldBook},
- #{isDamFlv},
- #{isDamTel},
- #{isTwoOrdr},
- #{isThreeSys},
- #{isFireStnd},
- #{isGoodReq},
- #{isGasStore},
- #{isSafReq},
- #{isWarnReq},
- #{isWarnSaf},
- #{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="isPlanMak != null and isPlanMak != ''">and IS_PLAN_MAK = #{isPlanMak}</if>
- <if test="isPlanApp != null and isPlanApp != ''">and IS_PLAN_APP = #{isPlanApp}</if>
- <if test="isPlanDemo != null and isPlanDemo != ''">and IS_PLAN_DEMO = #{isPlanDemo}</if>
- <if test="isSafChk != null and isSafChk != ''">and IS_SAF_CHK = #{isSafChk}</if>
- <if test="isBuldBook != null and isBuldBook != ''">and IS_BULD_BOOK = #{isBuldBook}</if>
- <if test="isDamFlv != null and isDamFlv != ''">and IS_DAM_FLV = #{isDamFlv}</if>
- <if test="isDamTel != null and isDamTel != ''">and IS_DAM_TEL = #{isDamTel}</if>
- <if test="isTwoOrdr != null and isTwoOrdr != ''">and IS_TWO_ORDR = #{isTwoOrdr}</if>
- <if test="isThreeSys != null and isThreeSys != ''">and IS_THREE_SYS = #{isThreeSys}</if>
- <if test="isFireStnd != null and isFireStnd != ''">and IS_FIRE_STND = #{isFireStnd}</if>
- <if test="isGoodReq != null and isGoodReq != ''">and IS_GOOD_REQ = #{isGoodReq}</if>
- <if test="isGasStore != null and isGasStore != ''">and IS_GAS_STORE = #{isGasStore}</if>
- <if test="isSafReq != null and isSafReq != ''">and IS_SAF_REQ = #{isSafReq}</if>
- <if test="isWarnReq != null and isWarnReq != ''">and IS_WARN_REQ = #{isWarnReq}</if>
- <if test="isWarnSaf != null and isWarnSaf != ''">and IS_WARN_SAF = #{isWarnSaf}</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="bisInspHystpSafResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_HYSTP_SAF where RGSTR_ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspHystpSafResultMap">
- select <include refid="table_columns" /> from BIS_INSP_HYSTP_SAF <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspHystpSafResultMap">
- select <include refid="table_columns" /> from BIS_INSP_HYSTP_SAF
- </select>
- <select id="findList" resultMap="bisInspHystpSafResultMap">
- select <include refid="table_columns" /> from BIS_INSP_HYSTP_SAF <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_HYSTP_SAF <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspHystpSaf">
- insert into BIS_INSP_HYSTP_SAF( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_HYSTP_SAF set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspHystpSaf">
- delete from BIS_INSP_HYSTP_SAF <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_HYSTP_SAF set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspHystpSaf">
- update BIS_INSP_HYSTP_SAF
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="isPlanMak != null and isPlanMak != ''">IS_PLAN_MAK = #{isPlanMak},</if>
- <if test="isPlanApp != null and isPlanApp != ''">IS_PLAN_APP = #{isPlanApp},</if>
- <if test="isPlanDemo != null and isPlanDemo != ''">IS_PLAN_DEMO = #{isPlanDemo},</if>
- <if test="isSafChk != null and isSafChk != ''">IS_SAF_CHK = #{isSafChk},</if>
- <if test="isBuldBook != null and isBuldBook != ''">IS_BULD_BOOK = #{isBuldBook},</if>
- <if test="isDamFlv != null and isDamFlv != ''">IS_DAM_FLV = #{isDamFlv},</if>
- <if test="isDamTel != null and isDamTel != ''">IS_DAM_TEL = #{isDamTel},</if>
- <if test="isTwoOrdr != null and isTwoOrdr != ''">IS_TWO_ORDR = #{isTwoOrdr},</if>
- <if test="isThreeSys != null and isThreeSys != ''">IS_THREE_SYS = #{isThreeSys},</if>
- <if test="isFireStnd != null and isFireStnd != ''">IS_FIRE_STND = #{isFireStnd},</if>
- <if test="isGoodReq != null and isGoodReq != ''">IS_GOOD_REQ = #{isGoodReq},</if>
- <if test="isGasStore != null and isGasStore != ''">IS_GAS_STORE = #{isGasStore},</if>
- <if test="isSafReq != null and isSafReq != ''">IS_SAF_REQ = #{isSafReq},</if>
- <if test="isWarnReq != null and isWarnReq != ''">IS_WARN_REQ = #{isWarnReq},</if>
- <if test="isWarnSaf != null and isWarnSaf != ''">IS_WARN_SAF = #{isWarnSaf},</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.BisInspHystpSaf">
- update BIS_INSP_HYSTP_SAF
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="isPlanMak != null and isPlanMak != ''">IS_PLAN_MAK = #{isPlanMak},</if>
- <if test="isPlanApp != null and isPlanApp != ''">IS_PLAN_APP = #{isPlanApp},</if>
- <if test="isPlanDemo != null and isPlanDemo != ''">IS_PLAN_DEMO = #{isPlanDemo},</if>
- <if test="isSafChk != null and isSafChk != ''">IS_SAF_CHK = #{isSafChk},</if>
- <if test="isBuldBook != null and isBuldBook != ''">IS_BULD_BOOK = #{isBuldBook},</if>
- <if test="isDamFlv != null and isDamFlv != ''">IS_DAM_FLV = #{isDamFlv},</if>
- <if test="isDamTel != null and isDamTel != ''">IS_DAM_TEL = #{isDamTel},</if>
- <if test="isTwoOrdr != null and isTwoOrdr != ''">IS_TWO_ORDR = #{isTwoOrdr},</if>
- <if test="isThreeSys != null and isThreeSys != ''">IS_THREE_SYS = #{isThreeSys},</if>
- <if test="isFireStnd != null and isFireStnd != ''">IS_FIRE_STND = #{isFireStnd},</if>
- <if test="isGoodReq != null and isGoodReq != ''">IS_GOOD_REQ = #{isGoodReq},</if>
- <if test="isGasStore != null and isGasStore != ''">IS_GAS_STORE = #{isGasStore},</if>
- <if test="isSafReq != null and isSafReq != ''">IS_SAF_REQ = #{isSafReq},</if>
- <if test="isWarnReq != null and isWarnReq != ''">IS_WARN_REQ = #{isWarnReq},</if>
- <if test="isWarnSaf != null and isWarnSaf != ''">IS_WARN_SAF = #{isWarnSaf},</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>
|