| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- <?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.TacPblmRectPblmDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.TacPblmRectPblm" id="tacPblmRectPblmResultMap">
- <result property="rectId" column="RECT_ID"/>
- <result property="rectOrgId" column="RECT_ORG_ID"/>
- <result property="year" column="YEAR"/>
- <result property="batch" column="BATCH"/>
- <result property="note" column="NOTE"/>
- <result property="orgId" column="ORG_ID"/>
- <result property="orgNm" column="ORG_NM"/>
- <result property="id" column="ID"/>
- <result property="objId" column="OBJ_ID"/>
- <result property="rgstrId" column="RGSTR_ID"/>
- <result property="name" column="NAME"/>
- <result property="pblmId" column="PBLM_ID"/>
- <result property="pblmNm" column="PBLM_NM"/>
- <result property="pblmPasi" column="PBLM_PASI"/>
- <result property="ifCasePblm" column="IF_CASE_PBLM"/>
- <result property="pblmDesc" column="PBLM_DESC"/>
- <result property="pblmReason" column="PBLM_REASON"/>
- <result property="rectState" column="RECT_STATE"/>
- <result property="rectPersId" column="RECT_PERS_ID"/>
- <result property="rectPersName" column="RECT_PERS_NAME"/>
- <result property="rectExplain" column="RECT_EXPLAIN"/>
- <result property="rectDept" column="RECT_DEPT"/>
- <result property="rectBlame" column="RECT_BLAME"/>
- <result property="rectSps" column="RECT_SPS"/>
- <result property="rectCompTm" column="RECT_COMP_TM"/>
- <result property="state" column="STATE"/>
- <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="listType" column="LIST_TYPE"/>
- <result property="pblmstdId" column="PBLMSTD_ID"/>
- </resultMap>
- <sql id="table_columns">
- RECT_ID,
- RECT_ORG_ID,
- YEAR,
- BATCH,
- NOTE,
- ORG_ID,
- ORG_NM,
- ID,
- OBJ_ID,
- RGSTR_ID,
- NAME,
- PBLM_ID,
- PBLM_NM,
- PBLM_PASI,
- IF_CASE_PBLM,
- PBLM_DESC,
- PBLM_REASON,
- RECT_STATE,
- RECT_PERS_ID,
- RECT_PERS_NAME,
- RECT_EXPLAIN,
- RECT_DEPT,
- RECT_BLAME,
- RECT_SPS,
- RECT_COMP_TM,
- STATE,
- PERS_ID,
- PERS_NAME,
- INTM,
- UPTM,
- DATA_STAT,
- LIST_TYPE,
- PBLMSTD_ID
- </sql>
- <sql id="entity_properties">
- #{rectId},
- #{rectOrgId},
- #{year},
- #{batch},
- #{note},
- #{orgId},
- #{orgNm},
- #{id},
- #{objId},
- #{rgstrId},
- #{name},
- #{pblmId},
- #{pblmNm},
- #{pblmPasi},
- #{ifCasePblm},
- #{pblmDesc},
- #{pblmReason},
- #{rectState},
- #{rectPersId},
- #{rectPersName},
- #{rectExplain},
- #{rectDept},
- #{rectBlame},
- #{rectSps},
- #{rectCompTm},
- #{state},
- #{persId},
- #{persName},
- #{intm},
- #{uptm},
- #{dataStat},
- #{listType},
- #{pblmstdId}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="rectOrgId != null and rectOrgId != ''">and RECT_ORG_ID = #{rectOrgId}</if>
- <if test="year != null and year != ''">and YEAR = #{year}</if>
- <if test="batch != null and batch != ''">and BATCH = #{batch}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
- <if test="orgNm != null and orgNm != ''">and ORG_NM = #{orgNm}</if>
- <if test="id != null and id != ''">and ID = #{id}</if>
- <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
- <if test="rgstrId != null and rgstrId != ''">and RGSTR_ID = #{rgstrId}</if>
- <if test="name != null and name != ''">and NAME like '${name}%'</if>
- <if test="pblmId != null and pblmId != ''">and PBLM_ID = #{pblmId}</if>
- <if test="pblmNm != null and pblmNm != ''">and PBLM_NM like '${pblmNm}%'</if>
- <if test="pblmPasi != null and pblmPasi != ''">and PBLM_PASI = #{pblmPasi}</if>
- <if test="ifCasePblm != null and ifCasePblm != ''">and IF_CASE_PBLM = #{ifCasePblm}</if>
- <if test="pblmDesc != null and pblmDesc != ''">and PBLM_DESC = #{pblmDesc}</if>
- <if test="pblmReason != null and pblmReason != ''">and PBLM_REASON = #{pblmReason}</if>
- <if test="rectState != null and rectState != ''">and RECT_STATE = #{rectState}</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="rectExplain != null and rectExplain != ''">and RECT_EXPLAIN = #{rectExplain}</if>
- <if test="rectDept != null and rectDept != ''">and RECT_DEPT = #{rectDept}</if>
- <if test="rectBlame != null and rectBlame != ''">and RECT_BLAME = #{rectBlame}</if>
- <if test="rectSps != null and rectSps != ''">and RECT_SPS = #{rectSps}</if>
- <if test="rectCompTm != null">and RECT_COMP_TM = #{rectCompTm}</if>
- <if test="state != null and state != ''">and STATE in (${state})</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="listType != null and listType != ''">and LIST_TYPE = #{listType}</if>
- <if test="pblmstdId != null and pblmstdId != ''">and PBLMSTD_ID = #{pblmstdId}</if>
- and DATA_STAT='0'
- </trim>
- </sql>
- <select id="get" resultMap="tacPblmRectPblmResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from TAC_PBLM_RECT_PBLM where ID = #{id}
- </select>
- <select id="getBy" resultMap="tacPblmRectPblmResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PBLM_RECT_PBLM
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="tacPblmRectPblmResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PBLM_RECT_PBLM
- </select>
- <select id="findList" resultMap="tacPblmRectPblmResultMap">
- select
- <include refid="table_columns"/>
- from TAC_PBLM_RECT_PBLM
- <include refid="page_where"/>
- ORDER BY YEAR,BATCH,intm
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from TAC_PBLM_RECT_PBLM
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.TacPblmRectPblm">
- insert into TAC_PBLM_RECT_PBLM(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update TAC_PBLM_RECT_PBLM set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.TacPblmRectPblm">
- update TAC_PBLM_RECT_PBLM set DATA_STAT='9'
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update TAC_PBLM_RECT_PBLM set flag_valid = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.TacPblmRectPblm">
- update TAC_PBLM_RECT_PBLM
- <trim prefix="set" suffixOverrides=",">
- <if test="pblmstdId != null and pblmstdId != ''">PBLMSTD_ID = #{pblmstdId},</if>
- <if test="rectOrgId != null and rectOrgId != ''">RECT_ORG_ID = #{rectOrgId},</if>
- <if test="year != null and year != ''">YEAR = #{year},</if>
- <if test="batch != null and batch != ''">BATCH = #{batch},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- <if test="orgNm != null and orgNm != ''">ORG_NM = #{orgNm},</if>
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="name != null and name != ''">NAME = #{name},</if>
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="pblmNm != null and pblmNm != ''">PBLM_NM = #{pblmNm},</if>
- <if test="pblmPasi != null and pblmPasi != ''">PBLM_PASI = #{pblmPasi},</if>
- <if test="ifCasePblm != null and ifCasePblm != ''">IF_CASE_PBLM = #{ifCasePblm},</if>
- <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC = #{pblmDesc},</if>
- <if test="pblmReason != null and pblmReason != ''">PBLM_REASON = #{pblmReason},</if>
- <if test="rectState != null and rectState != ''">RECT_STATE = #{rectState},</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="rectExplain != null and rectExplain != ''">RECT_EXPLAIN = #{rectExplain},</if>
- <if test="rectDept != null and rectDept != ''">RECT_DEPT = #{rectDept},</if>
- <if test="rectBlame != null and rectBlame != ''">RECT_BLAME = #{rectBlame},</if>
- <if test="rectSps != null and rectSps != ''">RECT_SPS = #{rectSps},</if>
- <if test="rectCompTm != null">RECT_COMP_TM = #{rectCompTm},</if>
- <if test="state != null and state != ''">STATE = #{state},</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="listType != null and listType != ''">LIST_TYPE = #{listType},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.TacPblmRectPblm">
- update TAC_PBLM_RECT_PBLM
- <trim prefix="set" suffixOverrides=",">
- <if test="pblmstdId != null and pblmstdId != ''">PBLMSTD_ID = #{pblmstdId},</if>
- <if test="rectOrgId != null and rectOrgId != ''">RECT_ORG_ID = #{rectOrgId},</if>
- <if test="year != null and year != ''">YEAR = #{year},</if>
- <if test="batch != null and batch != ''">BATCH = #{batch},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- <if test="orgNm != null and orgNm != ''">ORG_NM = #{orgNm},</if>
- <if test="id != null and id != ''">ID = #{id},</if>
- <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
- <if test="rgstrId != null and rgstrId != ''">RGSTR_ID = #{rgstrId},</if>
- <if test="name != null and name != ''">NAME = #{name},</if>
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="pblmNm != null and pblmNm != ''">PBLM_NM = #{pblmNm},</if>
- <if test="pblmPasi != null and pblmPasi != ''">PBLM_PASI = #{pblmPasi},</if>
- <if test="ifCasePblm != null and ifCasePblm != ''">IF_CASE_PBLM = #{ifCasePblm},</if>
- <if test="pblmDesc != null and pblmDesc != ''">PBLM_DESC = #{pblmDesc},</if>
- <if test="pblmReason != null and pblmReason != ''">PBLM_REASON = #{pblmReason},</if>
- <if test="rectState != null and rectState != ''">RECT_STATE = #{rectState},</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="rectExplain != null and rectExplain != ''">RECT_EXPLAIN = #{rectExplain},</if>
- <if test="rectDept != null and rectDept != ''">RECT_DEPT = #{rectDept},</if>
- <if test="rectBlame != null and rectBlame != ''">RECT_BLAME = #{rectBlame},</if>
- <if test="rectSps != null and rectSps != ''">RECT_SPS = #{rectSps},</if>
- <if test="rectCompTm != null">RECT_COMP_TM = #{rectCompTm},</if>
- <if test="state != null and state != ''">STATE = #{state},</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="listType != null and listType != ''">LIST_TYPE = #{listType},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|