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


    <sql id = "BaseSql">
        PPPIT.TRA_ID,
        PPPIT.OPERATION_TYPE,
        PPPIT.OPERATION_USER,
        PPPIT.OPERATION_TIME,
        PPPIT.PM_PD_PLATE_INFO_ID,
        PPPIT.PLATE_NO,
        PPPIT.SLAB_NO,
        PPPIT.PONO,
        PPPIT.WHOLE_BACKLOG_CODE,
        PPPIT.WHOLE_BACKLOG_SEQ,
        PPPIT.NEXT_WHOLE_BACKLOG_CODE,
        PPPIT.NEXT_WHOLE_BACKLOG_SEQ,
        PPPIT.WHOLE_BACKLOG_ACT,
        PPPIT.OU_BACKLOG_SEQ,
        PPPIT.OU_BACKLOG_CODE,
        PPPIT.MAT_STATUS,
        PPPIT.PD_STATUS_HP,
        PPPIT.AUTO_MANUAL_FLAG,
        PPPIT.PD_BEGIN_TIME,
        PPPIT.PD_END_TIME,
        PPPIT.PD_PROGRAM,
        PPPIT.PD_RESP,
        PPPIT.SG_STD,
        PPPIT.SG_SIGN,
        PPPIT.ST_NO,
        PPPIT.PSC,
        PPPIT.APN,
        PPPIT.MSC,
        PPPIT.MSC_LINE_NO,
        PPPIT.OLD_PSC,
        PPPIT.OLD_APN,
        PPPIT.OLD_MSC,
        PPPIT.OLD_MSC_LINE,
        PPPIT.CAN_ASSIGN_FLAG,
        PPPIT.REMAIN_CAUSE_CODE,
        PPPIT.STOCK_NO,
        PPPIT.MAT_ACT_THICK,
        PPPIT.MAT_ACT_WIDTH,
        PPPIT.MAT_ACT_LEN,
        PPPIT.MAT_ACT_WT,
        PPPIT.SHP_CODE,
        PPPIT.THICK1,
        PPPIT.THICK2,
        PPPIT.THICK3,
        PPPIT.LEN1,
        PPPIT.LEN2,
        PPPIT.LEN3,
        PPPIT.LEN4,
        PPPIT.LEN5,
        PPPIT.UOE_FLAG,
        PPPIT.WITH_SIDE_FLAG,
        PPPIT.BETTER_SURF_WARD_CODE,
        PPPIT.AD_MODE_CODE,
        PPPIT.CTRL_ROLL_CODE,
        PPPIT.HEAT_TREAT_PLATE_FLAG,
        PPPIT.ACT_CUT_MODE,
        PPPIT.FUR_TYPE,
        PPPIT.ROLL_DIRECT_CODE,
        PPPIT.ACT_PRESS_RATE,
        PPPIT.ACT_BROAD_RATIO,
        PPPIT.REMAIN_MIN_THICK,
        PPPIT.REMAIN_MAX_THICK,
        PPPIT.PD_RESP_AUTO,
        PPPIT.PD_TIME_AUTO,
        PPPIT.PD_AUTO_FLAG,
        PPPIT.TENANT_ID,
        PPPIT.ATTRIBUTE1,
        PPPIT.ATTRIBUTE2,
        PPPIT.ATTRIBUTE3,
        PPPIT.ATTRIBUTE4,
        PPPIT.ATTRIBUTE5,
        PPPIT.creation_date,        PPPIT.created_by,        PPPIT.last_updated_by,        PPPIT.last_update_date,        PPPIT.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmPdPlateInfoTra">
        select
        <include refid = "BaseSql"/>
        from PM_PD_PLATE_INFO_TRA PPPIT
        <where>
            <if test="traId !=null">
                and PPPIT.TRA_ID = #{traId,jdbcType = INTEGER}
            </if>
            <if test="operationType !=null">
                and PPPIT.OPERATION_TYPE = #{operationType,jdbcType = VARCHAR}
            </if>
            <if test="operationUser !=null">
                and PPPIT.OPERATION_USER = #{operationUser,jdbcType = VARCHAR}
            </if>
            <if test="operationTime !=null">
                and PPPIT.OPERATION_TIME = #{operationTime,jdbcType = OTHER}
            </if>
            <if test="pmPdPlateInfoId !=null">
                and PPPIT.PM_PD_PLATE_INFO_ID = #{pmPdPlateInfoId,jdbcType = INTEGER}
            </if>
            <if test="plateNo !=null">
                and PPPIT.PLATE_NO = #{plateNo,jdbcType = VARCHAR}
            </if>
            <if test="slabNo !=null">
                and PPPIT.SLAB_NO = #{slabNo,jdbcType = VARCHAR}
            </if>
            <if test="pono !=null">
                and PPPIT.PONO = #{pono,jdbcType = VARCHAR}
            </if>
            <if test="wholeBacklogCode !=null">
                and PPPIT.WHOLE_BACKLOG_CODE = #{wholeBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="wholeBacklogSeq !=null">
                and PPPIT.WHOLE_BACKLOG_SEQ = #{wholeBacklogSeq,jdbcType = INTEGER}
            </if>
            <if test="nextWholeBacklogCode !=null">
                and PPPIT.NEXT_WHOLE_BACKLOG_CODE = #{nextWholeBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="nextWholeBacklogSeq !=null">
                and PPPIT.NEXT_WHOLE_BACKLOG_SEQ = #{nextWholeBacklogSeq,jdbcType = INTEGER}
            </if>
            <if test="wholeBacklogAct !=null">
                and PPPIT.WHOLE_BACKLOG_ACT = #{wholeBacklogAct,jdbcType = VARCHAR}
            </if>
            <if test="ouBacklogSeq !=null">
                and PPPIT.OU_BACKLOG_SEQ = #{ouBacklogSeq,jdbcType = INTEGER}
            </if>
            <if test="ouBacklogCode !=null">
                and PPPIT.OU_BACKLOG_CODE = #{ouBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="matStatus !=null">
                and PPPIT.MAT_STATUS = #{matStatus,jdbcType = VARCHAR}
            </if>
            <if test="pdStatusHp !=null">
                and PPPIT.PD_STATUS_HP = #{pdStatusHp,jdbcType = VARCHAR}
            </if>
            <if test="autoManualFlag !=null">
                and PPPIT.AUTO_MANUAL_FLAG = #{autoManualFlag,jdbcType = VARCHAR}
            </if>
            <if test="pdBeginTime !=null">
                and PPPIT.PD_BEGIN_TIME = #{pdBeginTime,jdbcType = OTHER}
            </if>
            <if test="pdEndTime !=null">
                and PPPIT.PD_END_TIME = #{pdEndTime,jdbcType = OTHER}
            </if>
            <if test="pdProgram !=null">
                and PPPIT.PD_PROGRAM = #{pdProgram,jdbcType = VARCHAR}
            </if>
            <if test="pdResp !=null">
                and PPPIT.PD_RESP = #{pdResp,jdbcType = VARCHAR}
            </if>
            <if test="sgStd !=null">
                and PPPIT.SG_STD = #{sgStd,jdbcType = VARCHAR}
            </if>
            <if test="sgSign !=null">
                and PPPIT.SG_SIGN = #{sgSign,jdbcType = VARCHAR}
            </if>
            <if test="stNo !=null">
                and PPPIT.ST_NO = #{stNo,jdbcType = VARCHAR}
            </if>
            <if test="psc !=null">
                and PPPIT.PSC = #{psc,jdbcType = VARCHAR}
            </if>
            <if test="apn !=null">
                and PPPIT.APN = #{apn,jdbcType = VARCHAR}
            </if>
            <if test="msc !=null">
                and PPPIT.MSC = #{msc,jdbcType = VARCHAR}
            </if>
            <if test="mscLineNo !=null">
                and PPPIT.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="oldPsc !=null">
                and PPPIT.OLD_PSC = #{oldPsc,jdbcType = VARCHAR}
            </if>
            <if test="oldApn !=null">
                and PPPIT.OLD_APN = #{oldApn,jdbcType = VARCHAR}
            </if>
            <if test="oldMsc !=null">
                and PPPIT.OLD_MSC = #{oldMsc,jdbcType = VARCHAR}
            </if>
            <if test="oldMscLine !=null">
                and PPPIT.OLD_MSC_LINE = #{oldMscLine,jdbcType = VARCHAR}
            </if>
            <if test="canAssignFlag !=null">
                and PPPIT.CAN_ASSIGN_FLAG = #{canAssignFlag,jdbcType = VARCHAR}
            </if>
            <if test="remainCauseCode !=null">
                and PPPIT.REMAIN_CAUSE_CODE = #{remainCauseCode,jdbcType = VARCHAR}
            </if>
            <if test="stockNo !=null">
                and PPPIT.STOCK_NO = #{stockNo,jdbcType = VARCHAR}
            </if>
            <if test="matActThick !=null">
                and PPPIT.MAT_ACT_THICK = #{matActThick,jdbcType = INTEGER}
            </if>
            <if test="matActWidth !=null">
                and PPPIT.MAT_ACT_WIDTH = #{matActWidth,jdbcType = INTEGER}
            </if>
            <if test="matActLen !=null">
                and PPPIT.MAT_ACT_LEN = #{matActLen,jdbcType = INTEGER}
            </if>
            <if test="matActWt !=null">
                and PPPIT.MAT_ACT_WT = #{matActWt,jdbcType = INTEGER}
            </if>
            <if test="shpCode !=null">
                and PPPIT.SHP_CODE = #{shpCode,jdbcType = VARCHAR}
            </if>
            <if test="thick1 !=null">
                and PPPIT.THICK1 = #{thick1,jdbcType = INTEGER}
            </if>
            <if test="thick2 !=null">
                and PPPIT.THICK2 = #{thick2,jdbcType = INTEGER}
            </if>
            <if test="thick3 !=null">
                and PPPIT.THICK3 = #{thick3,jdbcType = INTEGER}
            </if>
            <if test="len1 !=null">
                and PPPIT.LEN1 = #{len1,jdbcType = INTEGER}
            </if>
            <if test="len2 !=null">
                and PPPIT.LEN2 = #{len2,jdbcType = INTEGER}
            </if>
            <if test="len3 !=null">
                and PPPIT.LEN3 = #{len3,jdbcType = INTEGER}
            </if>
            <if test="len4 !=null">
                and PPPIT.LEN4 = #{len4,jdbcType = INTEGER}
            </if>
            <if test="len5 !=null">
                and PPPIT.LEN5 = #{len5,jdbcType = INTEGER}
            </if>
            <if test="uoeFlag !=null">
                and PPPIT.UOE_FLAG = #{uoeFlag,jdbcType = VARCHAR}
            </if>
            <if test="withSideFlag !=null">
                and PPPIT.WITH_SIDE_FLAG = #{withSideFlag,jdbcType = VARCHAR}
            </if>
            <if test="betterSurfWardCode !=null">
                and PPPIT.BETTER_SURF_WARD_CODE = #{betterSurfWardCode,jdbcType = VARCHAR}
            </if>
            <if test="adModeCode !=null">
                and PPPIT.AD_MODE_CODE = #{adModeCode,jdbcType = VARCHAR}
            </if>
            <if test="ctrlRollCode !=null">
                and PPPIT.CTRL_ROLL_CODE = #{ctrlRollCode,jdbcType = VARCHAR}
            </if>
            <if test="heatTreatPlateFlag !=null">
                and PPPIT.HEAT_TREAT_PLATE_FLAG = #{heatTreatPlateFlag,jdbcType = VARCHAR}
            </if>
            <if test="actCutMode !=null">
                and PPPIT.ACT_CUT_MODE = #{actCutMode,jdbcType = VARCHAR}
            </if>
            <if test="furType !=null">
                and PPPIT.FUR_TYPE = #{furType,jdbcType = VARCHAR}
            </if>
            <if test="rollDirectCode !=null">
                and PPPIT.ROLL_DIRECT_CODE = #{rollDirectCode,jdbcType = VARCHAR}
            </if>
            <if test="actPressRate !=null">
                and PPPIT.ACT_PRESS_RATE = #{actPressRate,jdbcType = INTEGER}
            </if>
            <if test="actBroadRatio !=null">
                and PPPIT.ACT_BROAD_RATIO = #{actBroadRatio,jdbcType = INTEGER}
            </if>
            <if test="remainMinThick !=null">
                and PPPIT.REMAIN_MIN_THICK = #{remainMinThick,jdbcType = INTEGER}
            </if>
            <if test="remainMaxThick !=null">
                and PPPIT.REMAIN_MAX_THICK = #{remainMaxThick,jdbcType = INTEGER}
            </if>
            <if test="pdRespAuto !=null">
                and PPPIT.PD_RESP_AUTO = #{pdRespAuto,jdbcType = VARCHAR}
            </if>
            <if test="pdTimeAuto !=null">
                and PPPIT.PD_TIME_AUTO = #{pdTimeAuto,jdbcType = OTHER}
            </if>
            <if test="pdAutoFlag !=null">
                and PPPIT.PD_AUTO_FLAG = #{pdAutoFlag,jdbcType = VARCHAR}
            </if>
            <if test="tenantId !=null">
                and PPPIT.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PPPIT.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PPPIT.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PPPIT.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PPPIT.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PPPIT.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

