| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- <?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.BisInspRectProvinceDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspRectProvince" id="bisInspRectProvinceResultMap">
- <result property="id" column="ID"/>
- <result property="sndType" column="SND_TYPE"/>
- <result property="sndTitle" column="SND_TITLE"/>
- <result property="sndNub" column="SND_NUB"/>
- <result property="crrtTm" column="CRRT_TM"/>
- <result property="sndOrgId" column="SND_ORG_ID"/>
- <result property="sndOrgName" column="SND_ORG_NAME"/>
- <result property="rectOrgId" column="RECT_ORG_ID"/>
- <result property="rectOrgName" column="RECT_ORG_NAME"/>
- <result property="pjctSize" column="PJCT_SIZE"/>
- <result property="pblmSize" column="PBLM_SIZE"/>
- <result property="fileId" column="FILE_ID"/>
- <result property="fileName" column="FILE_NAME"/>
- <result property="filePath" column="FILE_PATH"/>
- <result property="rectTm" column="RECT_TM"/>
- <result property="rectPersId" column="RECT_PERS_ID"/>
- <result property="rectPersName" column="RECT_PERS_NAME"/>
- <result property="state" column="STATE"/>
- <result property="note" column="NOTE"/>
- <result property="persId" column="PERS_ID"/>
- <result property="persName" column="PERS_NAME"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="sndTypeNm" column="SND_TYPE_NM"/>
- <result property="province" column="PROVINCE"/>
- <result property="isOvertime" column="isOvertime"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- SND_TYPE,
- SND_TITLE,
- SND_NUB,
- CRRT_TM,
- SND_ORG_ID,
- SND_ORG_NAME,
- RECT_ORG_ID,
- RECT_ORG_NAME,
- PJCT_SIZE,
- PBLM_SIZE,
- FILE_ID,
- FILE_NAME,
- FILE_PATH,
- RECT_TM,
- RECT_PERS_ID,
- RECT_PERS_NAME,
- STATE,
- NOTE,
- PERS_ID,
- PERS_NAME,
- INTM,
- UPTM,
- DATA_STAT,
- SND_TYPE_NM,
- PROVINCE
- </sql>
- <sql id="entity_properties">
- #{id},
- #{sndType},
- #{sndTitle},
- #{sndNub},
- #{crrtTm},
- #{sndOrgId},
- #{sndOrgName},
- #{rectOrgId},
- #{rectOrgName},
- #{pjctSize},
- #{pblmSize},
- #{fileId},
- #{fileName},
- #{filePath},
- #{rectTm},
- #{rectPersId},
- #{rectPersName},
- #{state},
- #{note},
- #{persId},
- #{persName},
- #{intm},
- #{uptm},
- #{dataStat},
- #{sndTypeNm},
- #{province}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="sndType != null and sndType != ''">and SND_TYPE = #{sndType}</if>
- <if test="sndTitle != null and sndTitle != ''">and SND_TITLE like concat('%',#{sndTitle},'%')</if>
- <if test="sndNub != null and sndNub != ''">and SND_NUB = #{sndNub}</if>
- <if test="crrtTm != null">and CRRT_TM = #{crrtTm}</if>
- <if test="sndOrgId != null and sndOrgId != ''">and SND_ORG_ID = #{sndOrgId}</if>
- <if test="sndOrgName != null and sndOrgName != ''">and SND_ORG_NAME = #{sndOrgName}</if>
- <if test="rectOrgId != null and rectOrgId != ''">and RECT_ORG_ID = #{rectOrgId}</if>
- <if test="rectOrgName != null and rectOrgName != ''">and RECT_ORG_NAME = #{rectOrgName}</if>
- <if test="pjctSize != null and pjctSize != ''">and PJCT_SIZE = #{pjctSize}</if>
- <if test="pblmSize != null and pblmSize != ''">and PBLM_SIZE = #{pblmSize}</if>
- <if test="fileId != null and fileId != ''">and FILE_ID = #{fileId}</if>
- <if test="fileName != null and fileName != ''">and FILE_NAME = #{fileName}</if>
- <if test="filePath != null and filePath != ''">and FILE_PATH = #{filePath}</if>
- <if test="rectTm != null">and RECT_TM = #{rectTm}</if>
- <if test="rectPersId != null and rectPersId != ''">and RECT_PERS_ID = #{rectPersId}</if>
- <if test="rectPersName != null and rectPersName != ''">and RECT_PERS_NAME = #{rectPersName}</if>
- <if test="state != null and state != ''">and STATE in (${state})</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="persName != null and persName != ''">and PERS_NAME = #{persName}</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="year != null and year != ''">and to_char(intm,'yyyy') = #{year}</if>
- <if test="sndTypeNm != null and sndTypeNm != ''">and SND_TYPE_NM = #{sndTypeNm}</if>
- <if test="province != null and province != ''">and province like '${province}%'</if>
- and DATA_STAT='0'
- </trim>
- </sql>
- <select id="get" resultMap="bisInspRectProvinceResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from BIS_INSP_RECT_PROVINCE where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspRectProvinceResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_RECT_PROVINCE
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspRectProvinceResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_RECT_PROVINCE
- </select>
- <select id="findList" resultMap="bisInspRectProvinceResultMap">
- select
- <include refid="table_columns"/>,(case when crrt_tm < sysdate then '0' else '1' end)isOvertime
- from BIS_INSP_RECT_PROVINCE
- <include refid="page_where"/>
- order by UPTM desc
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from BIS_INSP_RECT_PROVINCE
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectProvince">
- insert into BIS_INSP_RECT_PROVINCE(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_RECT_PROVINCE set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectProvince">
- update BIS_INSP_RECT_PROVINCE set DATA_STAT='9'
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_RECT_PROVINCE set DATA_STAT = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectProvince">
- update BIS_INSP_RECT_PROVINCE
- <trim prefix="set" suffixOverrides=",">
- <if test="sndType != null and sndType != ''">SND_TYPE = #{sndType},</if>
- <if test="sndTitle != null and sndTitle != ''">SND_TITLE = #{sndTitle},</if>
- <if test="sndNub != null and sndNub != ''">SND_NUB = #{sndNub},</if>
- <if test="crrtTm != null">CRRT_TM = #{crrtTm},</if>
- <if test="sndOrgId != null and sndOrgId != ''">SND_ORG_ID = #{sndOrgId},</if>
- <if test="sndOrgName != null and sndOrgName != ''">SND_ORG_NAME = #{sndOrgName},</if>
- <if test="rectOrgId != null and rectOrgId != ''">RECT_ORG_ID = #{rectOrgId},</if>
- <if test="rectOrgName != null and rectOrgName != ''">RECT_ORG_NAME = #{rectOrgName},</if>
- <if test="pjctSize != null and pjctSize != ''">PJCT_SIZE = #{pjctSize},</if>
- <if test="pblmSize != null and pblmSize != ''">PBLM_SIZE = #{pblmSize},</if>
- <if test="fileId != null and fileId != ''">FILE_ID = #{fileId},</if>
- <if test="fileName != null and fileName != ''">FILE_NAME = #{fileName},</if>
- <if test="filePath != null and filePath != ''">FILE_PATH = #{filePath},</if>
- <if test="rectTm != null">RECT_TM = #{rectTm},</if>
- <if test="rectPersId != null and rectPersId != ''">RECT_PERS_ID = #{rectPersId},</if>
- <if test="rectPersName != null and rectPersName != ''">RECT_PERS_NAME = #{rectPersName},</if>
- <if test="state != null and state != ''">STATE = #{state},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="persName != null and persName != ''">PERS_NAME = #{persName},</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="sndTypeNm != null and sndTypeNm != ''">SND_TYPE_NM = #{sndTypeNm},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspRectProvince">
- update BIS_INSP_RECT_PROVINCE
- <trim prefix="set" suffixOverrides=",">
- <if test="sndType != null and sndType != ''">SND_TYPE = #{sndType},</if>
- <if test="sndTitle != null and sndTitle != ''">SND_TITLE = #{sndTitle},</if>
- <if test="sndNub != null and sndNub != ''">SND_NUB = #{sndNub},</if>
- <if test="crrtTm != null">CRRT_TM = #{crrtTm},</if>
- <if test="sndOrgId != null and sndOrgId != ''">SND_ORG_ID = #{sndOrgId},</if>
- <if test="sndOrgName != null and sndOrgName != ''">SND_ORG_NAME = #{sndOrgName},</if>
- <if test="rectOrgId != null and rectOrgId != ''">RECT_ORG_ID = #{rectOrgId},</if>
- <if test="rectOrgName != null and rectOrgName != ''">RECT_ORG_NAME = #{rectOrgName},</if>
- <if test="pjctSize != null and pjctSize != ''">PJCT_SIZE = #{pjctSize},</if>
- <if test="pblmSize != null and pblmSize != ''">PBLM_SIZE = #{pblmSize},</if>
- <if test="fileId != null and fileId != ''">FILE_ID = #{fileId},</if>
- <if test="fileName != null and fileName != ''">FILE_NAME = #{fileName},</if>
- <if test="filePath != null and filePath != ''">FILE_PATH = #{filePath},</if>
- <if test="rectTm != null">RECT_TM = #{rectTm},</if>
- <if test="rectPersId != null and rectPersId != ''">RECT_PERS_ID = #{rectPersId},</if>
- <if test="rectPersName != null and rectPersName != ''">RECT_PERS_NAME = #{rectPersName},</if>
- <if test="state != null and state != ''">STATE = #{state},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="persName != null and persName != ''">PERS_NAME = #{persName},</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="sndTypeNm != null and sndTypeNm != ''">SND_TYPE_NM = #{sndTypeNm},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- <update id="setFileNull" parameterType="java.lang.String">
- update BIS_INSP_RECT_PROVINCE set FILE_ID =NULL,FILE_NAME=NULL,FILE_PATH=NULL where ID = #{id}
- </update>
- </mapper>
|