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


    <sql id = "BaseSql">
    PPPI.PLATE_INFO_ID,
    PPPI.PLATE_NO,
    PPPI.SLAB_NO,
    PPPI.PONO,
    PPPI.WHOLE_BACKLOG_CODE,
    PPPI.WHOLE_BACKLOG_SEQ,
    PPPI.NEXT_WHOLE_BACKLOG_CODE,
    PPPI.NEXT_WHOLE_BACKLOG_SEQ,
    PPPI.WHOLE_BACKLOG_ACT,
    PPPI.OU_BACKLOG_SEQ,
    PPPI.OU_BACKLOG_CODE,
    PPPI.MAT_STATUS,
    PPPI.OU_STATUS_HP,
    PPPI.AUTO_MANUAL_FLAG,
    PPPI.OU_BEGIN_TIME,
    PPPI.OU_END_TIME,
    PPPI.OU_PROGRAM,
    PPPI.OU_RESP,
    PPPI.SG_STD,
    PPPI.SG_SIGN,
    PPPI.ST_NO,
    PPPI.PSC,
    PPPI.APN,
    PPPI.MSC,
    PPPI.MSC_LINE_NO,
    PPPI.OLD_PSC,
    PPPI.OLD_APN,
    PPPI.OLD_MSC,
    PPPI.OLD_MSC_LINE,
    PPPI.CAN_ASSIGN_FLAG,
    PPPI.REMAIN_CAUSE_CODE,
    PPPI.STOCK_NO,
    PPPI.MAT_ACT_THICK,
    PPPI.MAT_ACT_WIDTH,
    PPPI.MAT_ACT_LEN,
    PPPI.MAT_ACT_WT,
    PPPI.SHP_CODE,
    PPPI.THICK1,
    PPPI.THICK2,
    PPPI.THICK3,
    PPPI.LEN_1,
    PPPI.LEN_2,
    PPPI.LEN_3,
    PPPI.LEN_4,
    PPPI.LEN_5,
    PPPI.UOE_FLAG,
    PPPI.WITH_SIDE_FLAG,
    PPPI.BETTER_SURF_WARD_CODE,
    PPPI.AD_MODE_CODE,
    PPPI.CTRL_ROLL_CODE,
    PPPI.HEAT_TREAT_PLATE_FLAG,
    PPPI.ACT_CUT_MODE,
    PPPI.FUR_TYPE,
    PPPI.ROLL_DIRECT_CODE,
    PPPI.ACT_PRESS_RATE,
    PPPI.ACT_BROAD_RATIO,
    PPPI.REMAIN_MIN_THICK,
    PPPI.REMAIN_MAX_THICK,
    PPPI.OU_RESP_AUTO,
    PPPI.OU_TIME_AUTO,
    PPPI.OU_AUTO_FLAG,
    PPPI.TENANT_ID,
    PPPI.ATTRIBUTE1,
    PPPI.ATTRIBUTE2,
    PPPI.ATTRIBUTE3,
    PPPI.ATTRIBUTE4,
    PPPI.ATTRIBUTE5,
    PPPI.creation_date,    PPPI.created_by,    PPPI.last_updated_by,    PPPI.last_update_date,    PPPI.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmPdPlateInfo">
        select
        <include refid = "BaseSql"/>
        from PM_PD_PLATE_INFO PPPI
        <where>
            <if test="plateInfoId !=null">
                and PPPI.PLATE_INFO_ID = #{plateInfoId,jdbcType = INTEGER}
            </if>
            <if test="plateNo !=null">
                and PPPI.PLATE_NO = #{plateNo,jdbcType = VARCHAR}
            </if>
            <if test="slabNo !=null">
                and PPPI.SLAB_NO = #{slabNo,jdbcType = VARCHAR}
            </if>
            <if test="pono !=null">
                and PPPI.PONO = #{pono,jdbcType = VARCHAR}
            </if>
            <if test="wholeBacklogCode !=null">
                and PPPI.WHOLE_BACKLOG_CODE = #{wholeBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="wholeBacklogSeq !=null">
                and PPPI.WHOLE_BACKLOG_SEQ = #{wholeBacklogSeq,jdbcType = INTEGER}
            </if>
            <if test="nextWholeBacklogCode !=null">
                and PPPI.NEXT_WHOLE_BACKLOG_CODE = #{nextWholeBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="nextWholeBacklogSeq !=null">
                and PPPI.NEXT_WHOLE_BACKLOG_SEQ = #{nextWholeBacklogSeq,jdbcType = INTEGER}
            </if>
            <if test="wholeBacklogAct !=null">
                and PPPI.WHOLE_BACKLOG_ACT = #{wholeBacklogAct,jdbcType = VARCHAR}
            </if>
            <if test="ouBacklogSeq !=null">
                and PPPI.OU_BACKLOG_SEQ = #{ouBacklogSeq,jdbcType = INTEGER}
            </if>
            <if test="ouBacklogCode !=null">
                and PPPI.OU_BACKLOG_CODE = #{ouBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="matStatus !=null">
                and PPPI.MAT_STATUS = #{matStatus,jdbcType = VARCHAR}
            </if>
            <if test="ouStatusHp !=null">
                and PPPI.OU_STATUS_HP = #{ouStatusHp,jdbcType = VARCHAR}
            </if>
            <if test="autoManualFlag !=null">
                and PPPI.AUTO_MANUAL_FLAG = #{autoManualFlag,jdbcType = VARCHAR}
            </if>
            <if test="ouBeginTime !=null">
                and PPPI.OU_BEGIN_TIME = #{ouBeginTime,jdbcType = VARCHAR}
            </if>
            <if test="ouEndTime !=null">
                and PPPI.OU_END_TIME = #{ouEndTime,jdbcType = VARCHAR}
            </if>
            <if test="ouProgram !=null">
                and PPPI.OU_PROGRAM = #{ouProgram,jdbcType = VARCHAR}
            </if>
            <if test="ouResp !=null">
                and PPPI.OU_RESP = #{ouResp,jdbcType = VARCHAR}
            </if>
            <if test="sgStd !=null">
                and PPPI.SG_STD = #{sgStd,jdbcType = VARCHAR}
            </if>
            <if test="sgSign !=null">
                and PPPI.SG_SIGN = #{sgSign,jdbcType = VARCHAR}
            </if>
            <if test="stNo !=null">
                and PPPI.ST_NO = #{stNo,jdbcType = VARCHAR}
            </if>
            <if test="psc !=null">
                and PPPI.PSC = #{psc,jdbcType = VARCHAR}
            </if>
            <if test="apn !=null">
                and PPPI.APN = #{apn,jdbcType = VARCHAR}
            </if>
            <if test="msc !=null">
                and PPPI.MSC = #{msc,jdbcType = VARCHAR}
            </if>
            <if test="mscLineNo !=null">
                and PPPI.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="oldPsc !=null">
                and PPPI.OLD_PSC = #{oldPsc,jdbcType = VARCHAR}
            </if>
            <if test="oldApn !=null">
                and PPPI.OLD_APN = #{oldApn,jdbcType = VARCHAR}
            </if>
            <if test="oldMsc !=null">
                and PPPI.OLD_MSC = #{oldMsc,jdbcType = VARCHAR}
            </if>
            <if test="oldMscLine !=null">
                and PPPI.OLD_MSC_LINE = #{oldMscLine,jdbcType = VARCHAR}
            </if>
            <if test="canAssignFlag !=null">
                and PPPI.CAN_ASSIGN_FLAG = #{canAssignFlag,jdbcType = VARCHAR}
            </if>
            <if test="remainCauseCode !=null">
                and PPPI.REMAIN_CAUSE_CODE = #{remainCauseCode,jdbcType = VARCHAR}
            </if>
            <if test="stockNo !=null">
                and PPPI.STOCK_NO = #{stockNo,jdbcType = VARCHAR}
            </if>
            <if test="matActThick !=null">
                and PPPI.MAT_ACT_THICK = #{matActThick,jdbcType = INTEGER}
            </if>
            <if test="matActWidth !=null">
                and PPPI.MAT_ACT_WIDTH = #{matActWidth,jdbcType = INTEGER}
            </if>
            <if test="matActLen !=null">
                and PPPI.MAT_ACT_LEN = #{matActLen,jdbcType = INTEGER}
            </if>
            <if test="matActWt !=null">
                and PPPI.MAT_ACT_WT = #{matActWt,jdbcType = INTEGER}
            </if>
            <if test="shpCode !=null">
                and PPPI.SHP_CODE = #{shpCode,jdbcType = VARCHAR}
            </if>
            <if test="thick1 !=null">
                and PPPI.THICK1 = #{thick1,jdbcType = INTEGER}
            </if>
            <if test="thick2 !=null">
                and PPPI.THICK2 = #{thick2,jdbcType = INTEGER}
            </if>
            <if test="thick3 !=null">
                and PPPI.THICK3 = #{thick3,jdbcType = INTEGER}
            </if>
            <if test="len1 !=null">
                and PPPI.LEN_1 = #{len1,jdbcType = INTEGER}
            </if>
            <if test="len2 !=null">
                and PPPI.LEN_2 = #{len2,jdbcType = INTEGER}
            </if>
            <if test="len3 !=null">
                and PPPI.LEN_3 = #{len3,jdbcType = INTEGER}
            </if>
            <if test="len4 !=null">
                and PPPI.LEN_4 = #{len4,jdbcType = INTEGER}
            </if>
            <if test="len5 !=null">
                and PPPI.LEN_5 = #{len5,jdbcType = INTEGER}
            </if>
            <if test="uoeFlag !=null">
                and PPPI.UOE_FLAG = #{uoeFlag,jdbcType = VARCHAR}
            </if>
            <if test="withSideFlag !=null">
                and PPPI.WITH_SIDE_FLAG = #{withSideFlag,jdbcType = VARCHAR}
            </if>
            <if test="betterSurfWardCode !=null">
                and PPPI.BETTER_SURF_WARD_CODE = #{betterSurfWardCode,jdbcType = VARCHAR}
            </if>
            <if test="adModeCode !=null">
                and PPPI.AD_MODE_CODE = #{adModeCode,jdbcType = VARCHAR}
            </if>
            <if test="ctrlRollCode !=null">
                and PPPI.CTRL_ROLL_CODE = #{ctrlRollCode,jdbcType = VARCHAR}
            </if>
            <if test="heatTreatPlateFlag !=null">
                and PPPI.HEAT_TREAT_PLATE_FLAG = #{heatTreatPlateFlag,jdbcType = VARCHAR}
            </if>
            <if test="actCutMode !=null">
                and PPPI.ACT_CUT_MODE = #{actCutMode,jdbcType = VARCHAR}
            </if>
            <if test="furType !=null">
                and PPPI.FUR_TYPE = #{furType,jdbcType = VARCHAR}
            </if>
            <if test="rollDirectCode !=null">
                and PPPI.ROLL_DIRECT_CODE = #{rollDirectCode,jdbcType = VARCHAR}
            </if>
            <if test="actPressRate !=null">
                and PPPI.ACT_PRESS_RATE = #{actPressRate,jdbcType = INTEGER}
            </if>
            <if test="actBroadRatio !=null">
                and PPPI.ACT_BROAD_RATIO = #{actBroadRatio,jdbcType = INTEGER}
            </if>
            <if test="remainMinThick !=null">
                and PPPI.REMAIN_MIN_THICK = #{remainMinThick,jdbcType = INTEGER}
            </if>
            <if test="remainMaxThick !=null">
                and PPPI.REMAIN_MAX_THICK = #{remainMaxThick,jdbcType = INTEGER}
            </if>
            <if test="ouRespAuto !=null">
                and PPPI.OU_RESP_AUTO = #{ouRespAuto,jdbcType = VARCHAR}
            </if>
            <if test="ouTimeAuto !=null">
                and PPPI.OU_TIME_AUTO = #{ouTimeAuto,jdbcType = VARCHAR}
            </if>
            <if test="ouAutoFlag !=null">
                and PPPI.OU_AUTO_FLAG = #{ouAutoFlag,jdbcType = VARCHAR}
            </if>
            <if test="tenantId !=null">
                and PPPI.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PPPI.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PPPI.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PPPI.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PPPI.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PPPI.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>
