<?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="com.xisc.pm.infra.mapper.PmPlateSpecBtTraMapper">


    <sql id = "BaseSql">
    PPSBT.TRA_ID,
    PPSBT.OPERATION_TYPE,
    PPSBT.OPERATION_USER,
    PPSBT.OPERATION_TIME,
    PPSBT.PPTAB_ID,
    PPSBT.ST_CODE,
    PPSBT.FORM_PLATE_MODE,
    PPSBT.AD_TYPE_MODE,
    PPSBT.ROLL_MODE,
    PPSBT.WHOLE_HEAT_TREATMENT_TYPE,
    PPSBT.ROLL_LINE_NO,
    PPSBT.PLATE_THICK_FROM,
    PPSBT.PLATE_THICK_TO,
    PPSBT.COMBINE_PLATE_WIDTH_FROM,
    PPSBT.COMBINE_PLATE_WIDTH_TO,
    PPSBT.COMBINE_PLATE_LEN_MAX,
    PPSBT.REMARK,
    PPSBT.TENANT_ID,
    PPSBT.ATTRIBUTE1,
    PPSBT.ATTRIBUTE2,
    PPSBT.ATTRIBUTE3,
    PPSBT.ATTRIBUTE4,
    PPSBT.ATTRIBUTE5,
    PPSBT.creation_date,    PPSBT.created_by,    PPSBT.last_updated_by,    PPSBT.last_update_date,    PPSBT.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmPlateSpecBtTra">
        select
        <include refid = "BaseSql"/>
        from PM_PLATE_SPEC_BT_TRA PPSBT
        <where>
            <if test="traId !=null">
                and PPSBT.TRA_ID = #{traId,jdbcType = INTEGER}
            </if>
            <if test="operationType !=null">
                and PPSBT.OPERATION_TYPE = #{operationType,jdbcType = VARCHAR}
            </if>
            <if test="operationUser !=null">
                and PPSBT.OPERATION_USER = #{operationUser,jdbcType = VARCHAR}
            </if>
            <if test="operationTime !=null">
                and PPSBT.OPERATION_TIME = #{operationTime,jdbcType = OTHER}
            </if>
            <if test="pptabId !=null">
                and PPSBT.PPTAB_ID = #{pptabId,jdbcType = INTEGER}
            </if>
            <if test="stCode !=null">
                and PPSBT.ST_CODE = #{stCode,jdbcType = VARCHAR}
            </if>
            <if test="formPlateMode !=null">
                and PPSBT.FORM_PLATE_MODE = #{formPlateMode,jdbcType = VARCHAR}
            </if>
            <if test="adTypeMode !=null">
                and PPSBT.AD_TYPE_MODE = #{adTypeMode,jdbcType = VARCHAR}
            </if>
            <if test="rollMode !=null">
                and PPSBT.ROLL_MODE = #{rollMode,jdbcType = VARCHAR}
            </if>
            <if test="wholeHeatTreatmentType !=null">
                and PPSBT.WHOLE_HEAT_TREATMENT_TYPE = #{wholeHeatTreatmentType,jdbcType = VARCHAR}
            </if>
            <if test="rollLineNo !=null">
                and PPSBT.ROLL_LINE_NO = #{rollLineNo,jdbcType = VARCHAR}
            </if>
            <if test="plateThickFrom !=null">
                and PPSBT.PLATE_THICK_FROM = #{plateThickFrom,jdbcType = INTEGER}
            </if>
            <if test="plateThickTo !=null">
                and PPSBT.PLATE_THICK_TO = #{plateThickTo,jdbcType = INTEGER}
            </if>
            <if test="combinePlateWidthFrom !=null">
                and PPSBT.COMBINE_PLATE_WIDTH_FROM = #{combinePlateWidthFrom,jdbcType = INTEGER}
            </if>
            <if test="combinePlateWidthTo !=null">
                and PPSBT.COMBINE_PLATE_WIDTH_TO = #{combinePlateWidthTo,jdbcType = INTEGER}
            </if>
            <if test="combinePlateLenMax !=null">
                and PPSBT.COMBINE_PLATE_LEN_MAX = #{combinePlateLenMax,jdbcType = INTEGER}
            </if>
            <if test="remark !=null">
                and PPSBT.REMARK = #{remark,jdbcType = VARCHAR}
            </if>
            <if test="tenantId !=null">
                and PPSBT.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PPSBT.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PPSBT.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PPSBT.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PPSBT.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PPSBT.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>
