<?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.PmPdPlateTraMapper">


    <sql id = "BaseSql">
        PPPT.TRA_ID,
        PPPT.OPERATION_TYPE,
        PPPT.OPERATION_USER,
        PPPT.OPERATION_TIME,
        PPPT.PM_PD_PLATE_ID,
        PPPT.TMP_SLAB_NO,
        PPPT.PD_BACKLOG_SEQ,
        PPPT.PD_BACKLOG_CODE,
        PPPT.PLATE_NO,
        PPPT.SLAB_NO,
        PPPT.MAT_DESIGN_KIND,
        PPPT.PROD_CODE_HP,
        PPPT.PD_STATUS_HP,
        PPPT.PD_RESP,
        PPPT.FORM_PLATE_MODE,
        PPPT.PICK_MODE_LEN_DIR,
        PPPT.PICK_MODE_WID_DIR,
        PPPT.AUTO_MANUAL_FLAG,
        PPPT.ORDER_NUM_IN_PLATE,
        PPPT.TOT_SMALL_PLATE_NUM,
        PPPT.AD_TYPE_CODE,
        PPPT.AD_MODE_CODE,
        PPPT.UOE_FLAG,
        PPPT.ULT_CODE,
        PPPT.COOL_CODE,
        PPPT.CTRL_ROLL_CODE,
        PPPT.WITH_SIDE_FLAG,
        PPPT.CUT_MODE_CODE,
        PPPT.HEAD_CUT,
        PPPT.TAIL_CUT,
        PPPT.SG_SIGN,
        PPPT.ST_NO,
        PPPT.TWO_ROLL_INTERIM_FLAG,
        PPPT.ROLL_AIM_THICK,
        PPPT.ROLL_AIM_WIDTH,
        PPPT.ROLL_AIM_LEN,
        PPPT.COMBINE_PLATE_WIDTH,
        PPPT.COMBINE_PLATE_LEN,
        PPPT.ROLL_WT_HP,
        PPPT.ROLL_THICK_TOL_MAX,
        PPPT.ROLL_THICK_TOL_MIN,
        PPPT.COMMAND_YIELD,
        PPPT.ROLL_DIRECT_CODE,
        PPPT.SAMPLE_LEN_HEAD,
        PPPT.SAMPLE_LEN_TAIL,
        PPPT.SAMPLE_LEN_MID,
        PPPT.G_FLAG,
        PPPT.CS_FLAG,
        PPPT.DSS_FLAG,
        PPPT.SS_FLAG,
        PPPT.DS_FLAG,
        PPPT.OTHER_PLATE_NO1,
        PPPT.OTHER_PLATE_NO2,
        PPPT.FORM_PLATE_TIME,
        PPPT.REC_DEL_TIME,
        PPPT.SHP_CODE,
        PPPT.TAPER_ROLL_THICK4,
        PPPT.TAPER_ROLL_THICK_MAX4,
        PPPT.TAPER_ROLL_THICK_MIN4,
        PPPT.TAPER_ROLL_THICK5,
        PPPT.TAPER_ROLL_THICK_MAX5,
        PPPT.TAPER_ROLL_THICK_MIN5,
        PPPT.TAPER_ROLL_THICK6,
        PPPT.TAPER_ROLL_THICK_MAX6,
        PPPT.TAPER_ROLL_THICK_MIN6,
        PPPT.TAPER_ROLL_THICK7,
        PPPT.TAPER_ROLL_THICK_MAX7,
        PPPT.TAPER_ROLL_THICK_MIN7,
        PPPT.TAPER_ROLL_LEN6,
        PPPT.TAPER_ROLL_LEN7,
        PPPT.TENANT_ID,
        PPPT.ATTRIBUTE1,
        PPPT.ATTRIBUTE2,
        PPPT.ATTRIBUTE3,
        PPPT.ATTRIBUTE4,
        PPPT.ATTRIBUTE5,
        PPPT.creation_date,        PPPT.created_by,        PPPT.last_updated_by,        PPPT.last_update_date,        PPPT.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmPdPlateTra">
        select
        <include refid = "BaseSql"/>
        from PM_PD_PLATE_TRA PPPT
        <where>
            <if test="traId !=null">
                and PPPT.TRA_ID = #{traId,jdbcType = INTEGER}
            </if>
            <if test="operationType !=null">
                and PPPT.OPERATION_TYPE = #{operationType,jdbcType = VARCHAR}
            </if>
            <if test="operationUser !=null">
                and PPPT.OPERATION_USER = #{operationUser,jdbcType = VARCHAR}
            </if>
            <if test="operationTime !=null">
                and PPPT.OPERATION_TIME = #{operationTime,jdbcType = OTHER}
            </if>
            <if test="pmPdPlateId !=null">
                and PPPT.PM_PD_PLATE_ID = #{pmPdPlateId,jdbcType = INTEGER}
            </if>
            <if test="tmpSlabNo !=null">
                and PPPT.TMP_SLAB_NO = #{tmpSlabNo,jdbcType = VARCHAR}
            </if>
            <if test="pdBacklogSeq !=null">
                and PPPT.PD_BACKLOG_SEQ = #{pdBacklogSeq,jdbcType = INTEGER}
            </if>
            <if test="pdBacklogCode !=null">
                and PPPT.PD_BACKLOG_CODE = #{pdBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="plateNo !=null">
                and PPPT.PLATE_NO = #{plateNo,jdbcType = VARCHAR}
            </if>
            <if test="slabNo !=null">
                and PPPT.SLAB_NO = #{slabNo,jdbcType = VARCHAR}
            </if>
            <if test="matDesignKind !=null">
                and PPPT.MAT_DESIGN_KIND = #{matDesignKind,jdbcType = VARCHAR}
            </if>
            <if test="prodCodeHp !=null">
                and PPPT.PROD_CODE_HP = #{prodCodeHp,jdbcType = VARCHAR}
            </if>
            <if test="pdStatusHp !=null">
                and PPPT.PD_STATUS_HP = #{pdStatusHp,jdbcType = VARCHAR}
            </if>
            <if test="pdResp !=null">
                and PPPT.PD_RESP = #{pdResp,jdbcType = VARCHAR}
            </if>
            <if test="formPlateMode !=null">
                and PPPT.FORM_PLATE_MODE = #{formPlateMode,jdbcType = VARCHAR}
            </if>
            <if test="pickModeLenDir !=null">
                and PPPT.PICK_MODE_LEN_DIR = #{pickModeLenDir,jdbcType = INTEGER}
            </if>
            <if test="pickModeWidDir !=null">
                and PPPT.PICK_MODE_WID_DIR = #{pickModeWidDir,jdbcType = INTEGER}
            </if>
            <if test="autoManualFlag !=null">
                and PPPT.AUTO_MANUAL_FLAG = #{autoManualFlag,jdbcType = VARCHAR}
            </if>
            <if test="orderNumInPlate !=null">
                and PPPT.ORDER_NUM_IN_PLATE = #{orderNumInPlate,jdbcType = INTEGER}
            </if>
            <if test="totSmallPlateNum !=null">
                and PPPT.TOT_SMALL_PLATE_NUM = #{totSmallPlateNum,jdbcType = INTEGER}
            </if>
            <if test="adTypeCode !=null">
                and PPPT.AD_TYPE_CODE = #{adTypeCode,jdbcType = VARCHAR}
            </if>
            <if test="adModeCode !=null">
                and PPPT.AD_MODE_CODE = #{adModeCode,jdbcType = VARCHAR}
            </if>
            <if test="uoeFlag !=null">
                and PPPT.UOE_FLAG = #{uoeFlag,jdbcType = VARCHAR}
            </if>
            <if test="ultCode !=null">
                and PPPT.ULT_CODE = #{ultCode,jdbcType = VARCHAR}
            </if>
            <if test="coolCode !=null">
                and PPPT.COOL_CODE = #{coolCode,jdbcType = VARCHAR}
            </if>
            <if test="ctrlRollCode !=null">
                and PPPT.CTRL_ROLL_CODE = #{ctrlRollCode,jdbcType = VARCHAR}
            </if>
            <if test="withSideFlag !=null">
                and PPPT.WITH_SIDE_FLAG = #{withSideFlag,jdbcType = VARCHAR}
            </if>
            <if test="cutModeCode !=null">
                and PPPT.CUT_MODE_CODE = #{cutModeCode,jdbcType = VARCHAR}
            </if>
            <if test="headCut !=null">
                and PPPT.HEAD_CUT = #{headCut,jdbcType = INTEGER}
            </if>
            <if test="tailCut !=null">
                and PPPT.TAIL_CUT = #{tailCut,jdbcType = INTEGER}
            </if>
            <if test="sgSign !=null">
                and PPPT.SG_SIGN = #{sgSign,jdbcType = VARCHAR}
            </if>
            <if test="stNo !=null">
                and PPPT.ST_NO = #{stNo,jdbcType = VARCHAR}
            </if>
            <if test="twoRollInterimFlag !=null">
                and PPPT.TWO_ROLL_INTERIM_FLAG = #{twoRollInterimFlag,jdbcType = VARCHAR}
            </if>
            <if test="rollAimThick !=null">
                and PPPT.ROLL_AIM_THICK = #{rollAimThick,jdbcType = INTEGER}
            </if>
            <if test="rollAimWidth !=null">
                and PPPT.ROLL_AIM_WIDTH = #{rollAimWidth,jdbcType = INTEGER}
            </if>
            <if test="rollAimLen !=null">
                and PPPT.ROLL_AIM_LEN = #{rollAimLen,jdbcType = INTEGER}
            </if>
            <if test="combinePlateWidth !=null">
                and PPPT.COMBINE_PLATE_WIDTH = #{combinePlateWidth,jdbcType = INTEGER}
            </if>
            <if test="combinePlateLen !=null">
                and PPPT.COMBINE_PLATE_LEN = #{combinePlateLen,jdbcType = INTEGER}
            </if>
            <if test="rollWtHp !=null">
                and PPPT.ROLL_WT_HP = #{rollWtHp,jdbcType = INTEGER}
            </if>
            <if test="rollThickTolMax !=null">
                and PPPT.ROLL_THICK_TOL_MAX = #{rollThickTolMax,jdbcType = INTEGER}
            </if>
            <if test="rollThickTolMin !=null">
                and PPPT.ROLL_THICK_TOL_MIN = #{rollThickTolMin,jdbcType = INTEGER}
            </if>
            <if test="commandYield !=null">
                and PPPT.COMMAND_YIELD = #{commandYield,jdbcType = INTEGER}
            </if>
            <if test="rollDirectCode !=null">
                and PPPT.ROLL_DIRECT_CODE = #{rollDirectCode,jdbcType = VARCHAR}
            </if>
            <if test="sampleLenHead !=null">
                and PPPT.SAMPLE_LEN_HEAD = #{sampleLenHead,jdbcType = INTEGER}
            </if>
            <if test="sampleLenTail !=null">
                and PPPT.SAMPLE_LEN_TAIL = #{sampleLenTail,jdbcType = INTEGER}
            </if>
            <if test="sampleLenMid !=null">
                and PPPT.SAMPLE_LEN_MID = #{sampleLenMid,jdbcType = INTEGER}
            </if>
            <if test="gFlag !=null">
                and PPPT.G_FLAG = #{gFlag,jdbcType = VARCHAR}
            </if>
            <if test="csFlag !=null">
                and PPPT.CS_FLAG = #{csFlag,jdbcType = VARCHAR}
            </if>
            <if test="dssFlag !=null">
                and PPPT.DSS_FLAG = #{dssFlag,jdbcType = VARCHAR}
            </if>
            <if test="ssFlag !=null">
                and PPPT.SS_FLAG = #{ssFlag,jdbcType = VARCHAR}
            </if>
            <if test="dsFlag !=null">
                and PPPT.DS_FLAG = #{dsFlag,jdbcType = VARCHAR}
            </if>
            <if test="otherPlateNo1 !=null">
                and PPPT.OTHER_PLATE_NO1 = #{otherPlateNo1,jdbcType = VARCHAR}
            </if>
            <if test="otherPlateNo2 !=null">
                and PPPT.OTHER_PLATE_NO2 = #{otherPlateNo2,jdbcType = VARCHAR}
            </if>
            <if test="formPlateTime !=null">
                and PPPT.FORM_PLATE_TIME = #{formPlateTime,jdbcType = OTHER}
            </if>
            <if test="recDelTime !=null">
                and PPPT.REC_DEL_TIME = #{recDelTime,jdbcType = OTHER}
            </if>
            <if test="shpCode !=null">
                and PPPT.SHP_CODE = #{shpCode,jdbcType = VARCHAR}
            </if>
            <if test="taperRollThick4 !=null">
                and PPPT.TAPER_ROLL_THICK4 = #{taperRollThick4,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMax4 !=null">
                and PPPT.TAPER_ROLL_THICK_MAX4 = #{taperRollThickMax4,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMin4 !=null">
                and PPPT.TAPER_ROLL_THICK_MIN4 = #{taperRollThickMin4,jdbcType = INTEGER}
            </if>
            <if test="taperRollThick5 !=null">
                and PPPT.TAPER_ROLL_THICK5 = #{taperRollThick5,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMax5 !=null">
                and PPPT.TAPER_ROLL_THICK_MAX5 = #{taperRollThickMax5,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMin5 !=null">
                and PPPT.TAPER_ROLL_THICK_MIN5 = #{taperRollThickMin5,jdbcType = INTEGER}
            </if>
            <if test="taperRollThick6 !=null">
                and PPPT.TAPER_ROLL_THICK6 = #{taperRollThick6,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMax6 !=null">
                and PPPT.TAPER_ROLL_THICK_MAX6 = #{taperRollThickMax6,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMin6 !=null">
                and PPPT.TAPER_ROLL_THICK_MIN6 = #{taperRollThickMin6,jdbcType = INTEGER}
            </if>
            <if test="taperRollThick7 !=null">
                and PPPT.TAPER_ROLL_THICK7 = #{taperRollThick7,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMax7 !=null">
                and PPPT.TAPER_ROLL_THICK_MAX7 = #{taperRollThickMax7,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMin7 !=null">
                and PPPT.TAPER_ROLL_THICK_MIN7 = #{taperRollThickMin7,jdbcType = INTEGER}
            </if>
            <if test="taperRollLen6 !=null">
                and PPPT.TAPER_ROLL_LEN6 = #{taperRollLen6,jdbcType = INTEGER}
            </if>
            <if test="taperRollLen7 !=null">
                and PPPT.TAPER_ROLL_LEN7 = #{taperRollLen7,jdbcType = INTEGER}
            </if>
            <if test="tenantId !=null">
                and PPPT.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PPPT.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PPPT.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PPPT.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PPPT.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PPPT.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

