| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420 |
- <?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.BisInspStstnSafDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspStstnSaf" id="bisInspStstnSafResultMap">
- <result property="id" column="ID"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="siteSaf" column="SITE_SAF"/>
- <result property="isHolePrct" column="IS_HOLE_PRCT"/>
- <result property="holePrctNum" column="HOLE_PRCT_NUM"/>
- <result property="isStarsPrct" column="IS_STARS_PRCT"/>
- <result property="starsPrctNum" column="STARS_PRCT_NUM"/>
- <result property="isTunnelPrct" column="IS_TUNNEL_PRCT"/>
- <result property="tunnelPrctNum" column="TUNNEL_PRCT_NUM"/>
- <result property="siteSysNum" column="SITE_SYS_NUM"/>
- <result property="siteFullNum" column="SITE_FULL_NUM"/>
- <result property="buldRuleNum" column="BULD_RULE_NUM"/>
- <result property="regSysNum" column="REG_SYS_NUM"/>
- <result property="isBimBuld" column="IS_BIM_BULD"/>
- <result property="bimBuldNum" column="BIM_BULD_NUM"/>
- <result property="isCommunistPartyRoom" column="IS_COMMUNIST_PARTY_ROOM"/>
- <result property="communistPartyRoomNum" column="COMMUNIST_PARTY_ROOM_NUM"/>
- <result property="isPartyBranch" column="IS_COMMUNIST_PARTY_ROOM"/>
- <result property="partyBranchNum" column="PARTY_BRANCH_NUM"/>
- <result property="isPartyActivity" column="IS_PARTY_ACTICITY"/>
- <result property="partyActivityNum" column="PARTY_ACTICITY_NUM"/>
- <result property="note" column="NOTE"/>
- <result property="persId" column="PERS_ID"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="total" column="TOTAL"/>
- <result property="actualScore" column="ACTUAL_SCORE"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- RGSTR_ID,
- SITE_SAF,
- IS_HOLE_PRCT,
- HOLE_PRCT_NUM,
- IS_STARS_PRCT,
- STARS_PRCT_NUM,
- IS_TUNNEL_PRCT,
- TUNNEL_PRCT_NUM,
- SITE_SYS_NUM,
- SITE_FULL_NUM,
- BULD_RULE_NUM,
- REG_SYS_NUM,
- IS_BIM_BULD,
- BIM_BULD_NUM,
- IS_COMMUNIST_PARTY_ROOM,
- COMMUNIST_PARTY_ROOM_NUM,
- IS_PARTY_BRANCH,
- PARTY_BRANCH_NUM,
- PARTY_ACTICITY_NUM,
- IS_PARTY_ACTICITY,
- NOTE,
- PERS_ID,
- INTM,
- UPTM,
- DATA_STAT,
- TOTAL,
- ACTUAL_SCORE
- </sql>
- <sql id="entity_properties">
- #{id},
- #{rgstrId},
- #{siteSaf},
- #{isHolePrct},
- #{holePrctNum},
- #{isStarsPrct},
- #{starsPrctNum},
- #{isTunnelPrct},
- #{tunnelPrctNum},
- #{siteSysNum},
- #{siteFullNum},
- #{buldRuleNum},
- #{regSysNum},
- #{isBimBuld},
- #{bimBuldNum},
- #{isCommunistPartyRoom},
- #{communistPartyRoomNum},
- #{isPartyBranch},
- #{partyBranchNum},
- #{partyActivityNum},
- #{isPartyActivity},
- #{note},
- #{persId},
- #{intm},
- #{uptm},
- #{dataStat},
- #{total},
- #{actualScore}
- </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="siteSaf != null and siteSaf != ''">
- and SITE_SAF = #{siteSaf}
- </if>
- <if test="isHolePrct != null and isHolePrct != ''">
- and IS_HOLE_PRCT = #{isHolePrct}
- </if>
- <if test="holePrctNum != null ">
- and HOLE_PRCT_NUM = #{holePrctNum}
- </if>
- <if test="isStarsPrct != null and isStarsPrct != ''">
- and IS_STARS_PRCT = #{isStarsPrct}
- </if>
- <if test="starsPrctNum != null ">
- and STARS_PRCT_NUM = #{starsPrctNum}
- </if>
- <if test="isTunnelPrct != null and isTunnelPrct != ''">
- and IS_TUNNEL_PRCT = #{isTunnelPrct}
- </if>
- <if test="tunnelPrctNum != null ">
- and TUNNEL_PRCT_NUM = #{tunnelPrctNum}
- </if>
- <if test="siteSysNum != null ">
- and SITE_SYS_NUM = #{siteSysNum}
- </if>
- <if test="siteFullNum != null ">
- and SITE_FULL_NUM = #{siteFullNum}
- </if>
- <if test="buldRuleNum != null ">
- and BULD_RULE_NUM = #{buldRuleNum}
- </if>
- <if test="regSysNum != null ">
- and REG_SYS_NUM = #{regSysNum}
- </if>
- <if test="isBimBuld != null and isBimBuld != ''">
- and IS_BIM_BULD = #{isBimBuld}
- </if>
- <if test="bimBuldNum != null ">
- and BIM_BULD_NUM = #{bimBuldNum}
- </if>
- <if test="isCommunistPartyRoom != null and isCommunistPartyRoom != ''">
- and IS_COMMUNIST_PARTY_ROOM = #{isCommunistPartyRoom}
- </if>
- <if test="communistPartyRoomNum != null ">
- and COMMUNIST_PARTY_ROOM_NUM = #{communistPartyRoomNum}
- </if>
- <if test="isPartyBranch != null and isPartyBranch != ''">
- and IS_PARTY_BRANCH = #{isPartyBranch}
- </if>
- <if test="partyBranchNum != null ">
- and PARTY_BRANCH_NUM = #{partyBranchNum}
- </if>
- <if test="partyActivityNum != null ">
- and PARTY_ACTICITY_NUM = #{partyActivityNum}
- </if>
- <if test="isPartyActivity != null and isPartyActivity !=''">
- and IS_PARTY_ACTICITY = #{isPartyActivity}
- </if>
- <if test="note != null and note != ''">
- and NOTE = #{note}
- </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="dataStat != null and dataStat != ''">
- and DATA_STAT = #{dataStat}
- </if>
- <if test="total != null and total != ''">
- and TOTAL = #{total}
- </if>
- <if test="actualScore != null and actualScore != ''">
- and ACTUAL_SCORE = #{actualScore}
- </if>
- and DATA_STAT='0'
- </trim>
- </sql>
- <select id="get" resultMap="bisInspStstnSafResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from BIS_INSP_STSTN_SAF where RGSTR_ID = #{rgstrId}
- </select>
- <select id="getBy" resultMap="bisInspStstnSafResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_STSTN_SAF
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspStstnSafResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_STSTN_SAF
- </select>
- <select id="findList" resultMap="bisInspStstnSafResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_STSTN_SAF
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from BIS_INSP_STSTN_SAF
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnSaf">
- insert into BIS_INSP_STSTN_SAF(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_STSTN_SAF set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnSaf">
- update BIS_INSP_STSTN_SAF set DATA_STAT='9'
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_STSTN_SAF set DATA_STAT = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnSaf">
- update BIS_INSP_STSTN_SAF
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
- = #{rgstrId},
- </if>
- <if test="siteSaf != null">SITE_SAF
- = #{siteSaf},
- </if>
- <if test="isHolePrct != null and isHolePrct != ''">IS_HOLE_PRCT
- = #{isHolePrct},
- </if>
- <if test="holePrctNum != null">HOLE_PRCT_NUM
- = #{holePrctNum},
- </if>
- <if test="isStarsPrct != null and isStarsPrct != ''">IS_STARS_PRCT
- = #{isStarsPrct},
- </if>
- <if test="starsPrctNum != null">STARS_PRCT_NUM
- = #{starsPrctNum},
- </if>
- <if test="isTunnelPrct != null and isTunnelPrct != ''">IS_TUNNEL_PRCT
- = #{isTunnelPrct},
- </if>
- <if test="tunnelPrctNum != null">TUNNEL_PRCT_NUM
- = #{tunnelPrctNum},
- </if>
- <if test="siteSysNum != null">SITE_SYS_NUM
- = #{siteSysNum},
- </if>
- <if test="siteFullNum != null">SITE_FULL_NUM
- = #{siteFullNum},
- </if>
- <if test="buldRuleNum != null">BULD_RULE_NUM
- = #{buldRuleNum},
- </if>
- <if test="regSysNum != null">REG_SYS_NUM
- = #{regSysNum},
- </if>
- <if test="isBimBuld != null and isBimBuld != ''">IS_BIM_BULD
- = #{isBimBuld},
- </if>
- <if test="bimBuldNum != null">BIM_BULD_NUM
- = #{bimBuldNum},
- </if>
- <if test="isCommunistPartyRoom != null and isCommunistPartyRoom != ''">IS_COMMUNIST_PARTY_ROOM
- = #{isCommunistPartyRoom},
- </if>
- <if test="communistPartyRoomNum != null ">COMMUNIST_PARTY_ROOM_NUM
- = #{communistPartyRoomNum},
- </if>
- <if test="isPartyBranch != null and isPartyBranch != ''">IS_PARTY_BRANCH
- = #{isPartyBranch},
- </if>
- <if test="partyBranchNum != null ">PARTY_BRANCH_NUM
- = #{partyBranchNum},
- </if>
- <if test="isPartyActivity != null and isPartyActivity !=''">IS_PARTY_ACTICITY
- = #{isPartyActivity},
- </if>
- <if test="partyActivityNum != null">PARTY_ACTICITY_NUM
- = #{partyActivityNum},
- </if>
- <if test="note != null and note != ''">NOTE
- = #{note},
- </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="dataStat != null and dataStat != ''">DATA_STAT
- = #{dataStat},
- </if>
- <if test="total != null">TOTAL
- = #{total},
- </if>
- <if test="actualScore != null">ACTUAL_SCORE
- = #{actualScore},
- </if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspStstnSaf">
- update BIS_INSP_STSTN_SAF
- <trim prefix="set" suffixOverrides=",">
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID
- = #{rgstrId},
- </if>
- <if test="siteSaf != null and siteSaf != ''">SITE_SAF
- = #{siteSaf},
- </if>
- <if test="isHolePrct != null and isHolePrct != ''">IS_HOLE_PRCT
- = #{isHolePrct},
- </if>
- <if test="holePrctNum != null ">HOLE_PRCT_NUM
- = #{holePrctNum},
- </if>
- <if test="isStarsPrct != null and isStarsPrct != ''">IS_STARS_PRCT
- = #{isStarsPrct},
- </if>
- <if test="starsPrctNum != null ">STARS_PRCT_NUM
- = #{starsPrctNum},
- </if>
- <if test="isTunnelPrct != null and isTunnelPrct != ''">IS_TUNNEL_PRCT
- = #{isTunnelPrct},
- </if>
- <if test="tunnelPrctNum != null ">TUNNEL_PRCT_NUM
- = #{tunnelPrctNum},
- </if>
- <if test="siteSysNum != null ">SITE_SYS_NUM
- = #{siteSysNum},
- </if>
- <if test="siteFullNum != null ">SITE_FULL_NUM
- = #{siteFullNum},
- </if>
- <if test="buldRuleNum != null ">BULD_RULE_NUM
- = #{buldRuleNum},
- </if>
- <if test="regSysNum != null ">REG_SYS_NUM
- = #{regSysNum},
- </if>
- <if test="isBimBuld != null and isBimBuld != ''">IS_BIM_BULD
- = #{isBimBuld},
- </if>
- <if test="bimBuldNum != null ">BIM_BULD_NUM
- = #{bimBuldNum},
- </if>
- <if test="isCommunistPartyRoom != null and isCommunistPartyRoom != ''">IS_COMMUNIST_PARTY_ROOM
- = #{isCommunistPartyRoom},
- </if>
- <if test="communistPartyRoomNum != null ">COMMUNIST_PARTY_ROOM_NUM
- = #{communistPartyRoomNum},
- </if>
- <if test="isPartyBranch != null and isPartyBranch != ''">IS_PARTY_BRANCH
- = #{isPartyBranch},
- </if>
- <if test="partyBranchNum != null ">PARTY_BRANCH_NUM
- = #{partyBranchNum},
- </if>
- <if test="isPartyActivity != null and isPartyActivity !=''">IS_PARTY_ACTICITY
- = #{isPartyActivity},
- </if>
- <if test="partyActivityNum != null ">PARTY_ACTICITY_NUM
- = #{partyActivityNum},
- </if>
- <if test="note != null and note != ''">NOTE
- = #{note},
- </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="dataStat != null and dataStat != ''">DATA_STAT
- = #{dataStat},
- </if>
- <if test="total != null and total != ''">TOTAL
- = #{total},
- </if>
- <if test="actualScore != null and actualScore != ''">ACTUAL_SCORE
- = #{actualScore},
- </if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|