| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386 |
- <?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.BisInspMtprgDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspMtprg" id="bisInspMtprgResultMap">
- <result property="id" column="ID"/>
- <result property="unitName" column="UNIT_NAME"/>
- <result property="year" column="YEAR"/>
- <result property="mnth" column="MNTH"/>
- <result property="month" column="MONTH"/>
- <result property="matter" column="MATTER"/>
- <result property="mainWork" column="MAIN_WORK"/>
- <result property="spcChkSize" column="SPC_CHK_SIZE"/>
- <result property="inspSize" column="INSP_SIZE"/>
- <result property="inspPersSize" column="INSP_PERS_SIZE"/>
- <result property="chkPrjSize" column="CHK_PRJ_SIZE"/>
- <result property="findPblmSize" column="FIND_PBLM_SIZE"/>
- <result property="accnUnitSize" column="ACCN_UNIT_SIZE"/>
- <result property="accnPersSize" column="ACCN_PERS_SIZE"/>
- <result property="pblmMendSize" column="PBLM_MEND_SIZE"/>
- <result property="pubRptSize" column="PUB_RPT_SIZE"/>
- <result property="chkSysNote" column="CHK_SYS_NOTE"/>
- <result property="leadChkSize" column="LEAD_CHK_SIZE"/>
- <result property="leadChkNote" column="LEAD_CHK_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="adCode" column="AD_CODE"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- UNIT_NAME,
- YEAR,
- MNTH,
- MONTH,
- MATTER,
- MAIN_WORK,
- SPC_CHK_SIZE,
- INSP_SIZE,
- INSP_PERS_SIZE,
- CHK_PRJ_SIZE,
- FIND_PBLM_SIZE,
- ACCN_UNIT_SIZE,
- ACCN_PERS_SIZE,
- PBLM_MEND_SIZE,
- PUB_RPT_SIZE,
- CHK_SYS_NOTE,
- LEAD_CHK_SIZE,
- LEAD_CHK_NOTE,
- PERS_ID,
- INTM,
- UPTM,
- DATA_STAT,
- AD_CODE
- </sql>
- <sql id="entity_properties">
- #{id},
- #{unitName},
- #{year},
- #{mnth},
- #{month},
- #{matter},
- #{mainWork},
- #{spcChkSize},
- #{inspSize},
- #{inspPersSize},
- #{chkPrjSize},
- #{findPblmSize},
- #{accnUnitSize},
- #{accnPersSize},
- #{pblmMendSize},
- #{pubRptSize},
- #{chkSysNote},
- #{leadChkSize},
- #{leadChkNote},
- #{persId},
- #{intm},
- #{uptm},
- #{dataStat},
- #{adCode}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="unitName != null and unitName != ''">
- and UNIT_NAME = #{unitName}
- </if>
- <if test="year != null and year != ''">
- and YEAR = #{year}
- </if>
- <if test="mnth != null and mnth != ''">
- and MNTH = #{mnth}
- </if>
- <if test="month != null and month != ''">
- <choose>
- <when test="month.indexOf('-') > -1">
- <foreach item="item" collection="month.split('-')" index="index">
- <if test="index == 0">
- and cast(MONTH as unsigned) <![CDATA[>=]]> cast(#{item} as unsigned)
- </if>
- <if test="index == 1">
- and cast(MONTH as unsigned) <![CDATA[<=]]> cast(#{item} as unsigned)
- </if>
- </foreach>
- </when>
- <otherwise>
- and to_number(MONTH) = to_number(#{month})
- </otherwise>
- </choose>
- </if>
- <if test="matter != null and matter != ''">
- and MATTER = #{matter}
- </if>
- <if test="mainWork != null and mainWork != ''">
- and MAIN_WORK = #{mainWork}
- </if>
- <if test="spcChkSize != null and spcChkSize != ''">
- and SPC_CHK_SIZE = #{spcChkSize}
- </if>
- <if test="inspSize != null and inspSize != ''">
- and INSP_SIZE = #{inspSize}
- </if>
- <if test="inspPersSize != null and inspPersSize != ''">
- and INSP_PERS_SIZE = #{inspPersSize}
- </if>
- <if test="chkPrjSize != null and chkPrjSize != ''">
- and CHK_PRJ_SIZE = #{chkPrjSize}
- </if>
- <if test="findPblmSize != null and findPblmSize != ''">
- and FIND_PBLM_SIZE = #{findPblmSize}
- </if>
- <if test="accnUnitSize != null and accnUnitSize != ''">
- and ACCN_UNIT_SIZE = #{accnUnitSize}
- </if>
- <if test="accnPersSize != null and accnPersSize != ''">
- and ACCN_PERS_SIZE = #{accnPersSize}
- </if>
- <if test="pblmMendSize != null and pblmMendSize != ''">
- and PBLM_MEND_SIZE = #{pblmMendSize}
- </if>
- <if test="pubRptSize != null and pubRptSize != ''">
- and PUB_RPT_SIZE = #{pubRptSize}
- </if>
- <if test="chkSysNote != null and chkSysNote != ''">
- and CHK_SYS_NOTE = #{chkSysNote}
- </if>
- <if test="leadChkSize != null and leadChkSize != ''">
- and LEAD_CHK_SIZE = #{leadChkSize}
- </if>
- <if test="leadChkNote != null and leadChkNote != ''">
- and LEAD_CHK_NOTE = #{leadChkNote}
- </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="adCode != null and adCode != ''">
- and AD_CODE like '${adCode}%'
- </if>
- and DATA_STAT='0'
- </trim>
- </sql>
- <select id="get" resultMap="bisInspMtprgResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from BIS_INSP_MTPRG where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspMtprgResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_MTPRG
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspMtprgResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_MTPRG
- </select>
- <select id="findList" resultMap="bisInspMtprgResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_MTPRG
- <include refid="page_where"/>
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from BIS_INSP_MTPRG
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspMtprg">
- insert into BIS_INSP_MTPRG(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_MTPRG set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspMtprg">
- update BIS_INSP_MTPRG set DATA_STAT='9'
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_MTPRG set DATA_STAT = '9' where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspMtprg">
- update BIS_INSP_MTPRG
- <trim prefix="set" suffixOverrides=",">
- <if test="unitName != null and unitName != ''">UNIT_NAME
- = #{unitName},
- </if>
- <if test="year != null and year != ''">YEAR
- = #{year},
- </if>
- <if test="mnth != null and mnth != ''">MNTH
- = #{mnth},
- </if>
- <if test="month != null and month != ''">MONTH
- = #{month},
- </if>
- <if test="matter != null and matter != ''">MATTER
- = #{matter},
- </if>
- <if test="mainWork != null and mainWork != ''">MAIN_WORK
- = #{mainWork},
- </if>
- <if test="spcChkSize != null and spcChkSize != ''">SPC_CHK_SIZE
- = #{spcChkSize},
- </if>
- <if test="inspSize != null and inspSize != ''">INSP_SIZE
- = #{inspSize},
- </if>
- <if test="inspPersSize != null and inspPersSize != ''">INSP_PERS_SIZE
- = #{inspPersSize},
- </if>
- <if test="chkPrjSize != null and chkPrjSize != ''">CHK_PRJ_SIZE
- = #{chkPrjSize},
- </if>
- <if test="findPblmSize != null and findPblmSize != ''">FIND_PBLM_SIZE
- = #{findPblmSize},
- </if>
- <if test="accnUnitSize != null and accnUnitSize != ''">ACCN_UNIT_SIZE
- = #{accnUnitSize},
- </if>
- <if test="accnPersSize != null and accnPersSize != ''">ACCN_PERS_SIZE
- = #{accnPersSize},
- </if>
- <if test="pblmMendSize != null and pblmMendSize != ''">PBLM_MEND_SIZE
- = #{pblmMendSize},
- </if>
- <if test="pubRptSize != null and pubRptSize != ''">PUB_RPT_SIZE
- = #{pubRptSize},
- </if>
- <if test="chkSysNote != null and chkSysNote != ''">CHK_SYS_NOTE
- = #{chkSysNote},
- </if>
- <if test="leadChkSize != null and leadChkSize != ''">LEAD_CHK_SIZE
- = #{leadChkSize},
- </if>
- <if test="leadChkNote != null and leadChkNote != ''">LEAD_CHK_NOTE
- = #{leadChkNote},
- </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="adCode != null and adCode != ''">AD_CODE
- = #{adCode},
- </if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspMtprg">
- update BIS_INSP_MTPRG
- <trim prefix="set" suffixOverrides=",">
- <if test="unitName != null and unitName != ''">UNIT_NAME
- = #{unitName},
- </if>
- <if test="year != null and year != ''">YEAR
- = #{year},
- </if>
- <if test="mnth != null and mnth != ''">MNTH
- = #{mnth},
- </if>
- <if test="month != null and month != ''">MONTH
- = #{month},
- </if>
- <if test="matter != null and matter != ''">MATTER
- = #{matter},
- </if>
- <if test="mainWork != null and mainWork != ''">MAIN_WORK
- = #{mainWork},
- </if>
- <if test="spcChkSize != null and spcChkSize != ''">SPC_CHK_SIZE
- = #{spcChkSize},
- </if>
- <if test="inspSize != null and inspSize != ''">INSP_SIZE
- = #{inspSize},
- </if>
- <if test="inspPersSize != null and inspPersSize != ''">INSP_PERS_SIZE
- = #{inspPersSize},
- </if>
- <if test="chkPrjSize != null and chkPrjSize != ''">CHK_PRJ_SIZE
- = #{chkPrjSize},
- </if>
- <if test="findPblmSize != null and findPblmSize != ''">FIND_PBLM_SIZE
- = #{findPblmSize},
- </if>
- <if test="accnUnitSize != null and accnUnitSize != ''">ACCN_UNIT_SIZE
- = #{accnUnitSize},
- </if>
- <if test="accnPersSize != null and accnPersSize != ''">ACCN_PERS_SIZE
- = #{accnPersSize},
- </if>
- <if test="pblmMendSize != null and pblmMendSize != ''">PBLM_MEND_SIZE
- = #{pblmMendSize},
- </if>
- <if test="pubRptSize != null and pubRptSize != ''">PUB_RPT_SIZE
- = #{pubRptSize},
- </if>
- <if test="chkSysNote != null and chkSysNote != ''">CHK_SYS_NOTE
- = #{chkSysNote},
- </if>
- <if test="leadChkSize != null and leadChkSize != ''">LEAD_CHK_SIZE
- = #{leadChkSize},
- </if>
- <if test="leadChkNote != null and leadChkNote != ''">LEAD_CHK_NOTE
- = #{leadChkNote},
- </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="adCode != null and adCode != ''">AD_CODE
- = #{adCode},
- </if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|