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


    <sql id = "BaseSql">
        PCST.TRA_ID,
        PCST.OPERATION_TYPE,
        PCST.OPERATION_USER,
        PCST.OPERATION_TIME,
        PCST.PM_CMD_SLAB_ID,
        PCST.PONO_SLAB_NO,
        PCST.TMP_SLAB_NO,
        PCST.PD_BACKLOG_SEQ,
        PCST.PD_BACKLOG_CODE,
        PCST.SLAB_NO,
        PCST.VIRTUAL_SLAB_NO,
        PCST.PD_STATUS_HP,
        PCST.SHORT_SLAB_NUM_IN_LONG,
        PCST.BIG_PLATE_NUM,
        PCST.SLAB_DIV_NO,
        PCST.ORDER_NUM_IN_PLATE,
        PCST.ORDER_NO_AXIS,
        PCST.ORDER_REMAIN_DIV,
        PCST.MAT_DESIGN_KIND,
        PCST.PROD_CODE_HP,
        PCST.SG_SIGN,
        PCST.ST_NO,
        PCST.SLAB_HT_FLAG,
        PCST.PRE_CLEAN_SLAB_THICK,
        PCST.PRE_CLEAN_SLAB_WIDTH,
        PCST.PRE_CLEAN_SLAB_LEN,
        PCST.PRE_CLEAN_SLAB_MAX_LEN,
        PCST.PRE_CLEAN_SLAB_MIN_LEN,
        PCST.PRE_CLEAN_SLAB_WT,
        PCST.PRE_CLEAN_SLAB_MAX_WT,
        PCST.PRE_CLEAN_SLAB_MIN_WT,
        PCST.MOLD_THICK,
        PCST.MOLD_WID,
        PCST.INFUR_SLAB_THICK,
        PCST.INFUR_SLAB_WID,
        PCST.INFUR_SLAB_LEN,
        PCST.INFUR_SLAB_MAX_LEN,
        PCST.INFUR_SLAB_MIN_LEN,
        PCST.INFUR_SLAB_WT,
        PCST.INFUR_SLAB_MAX_WT,
        PCST.INFUR_SLAB_MIN_WT,
        PCST.NEED_SLAB_LEN,
        PCST.NEED_SLAB_WT,
        PCST.FIX_SLAB_LEN_FLAG,
        PCST.FIX_SLAB_LEN,
        PCST.ROLL_MAX_PRE_CLEAN_SLAB_LEN,
        PCST.ROLL_MAX_PRE_CLEAN_SLAB_WT,
        PCST.SLAB_PLACE_CODE,
        PCST.HP_FLAME_CLEAN_DIV,
        PCST.SLAB_FINISH_CODE,
        PCST.SLAB_CLEAN_WT_LOSS_RATE_ST,
        PCST.SLAB_CLEAN_WT_LOSS_RATE_FR,
        PCST.COOL_CODE,
        PCST.LAST_SLAB_FLAG,
        PCST.ADD_SLAB_FLAG,
        PCST.SLAB_PRE_PROC1,
        PCST.SLAB_PRE_PROC2,
        PCST.SLAB_PRE_PROC3,
        PCST.SLAB_PRE_PROC4,
        PCST.SLAB_PRE_PROC5,
        PCST.SLAB_PRE_PROC6,
        PCST.SLAB_PRE_PROC7,
        PCST.SLAB_PRE_PROC8,
        PCST.SLAB_PRE_PROC9,
        PCST.SLAB_PRE_PROC10,
        PCST.SLAB_PRE_PROC11,
        PCST.SLAB_PRE_PROC12,
        PCST.SLAB_PRE_PROC13,
        PCST.SLAB_PRE_PROC14,
        PCST.SLAB_PRE_PROC15,
        PCST.SLAB_STACK_INDICATE,
        PCST.HOT_SEND_DIV,
        PCST.FUR_TYPE,
        PCST.TRANS_FLAG,
        PCST.HOT_CHARGE_FLAG,
        PCST.ROLL_PLAN_NO,
        PCST.NEW_TEST_NO,
        PCST.FORM_PLATE_TIME,
        PCST.SHP_CODE,
        PCST.PONO,
        PCST.IG_MAT_DESIGN_KIND,
        PCST.INGOT_TYPE,
        PCST.MSC_LINE_NO,
        PCST.TENANT_ID,
        PCST.ATTRIBUTE1,
        PCST.ATTRIBUTE2,
        PCST.ATTRIBUTE3,
        PCST.ATTRIBUTE4,
        PCST.ATTRIBUTE5,
        PCST.IS_MERGE,
        PCST.creation_date,        PCST.created_by,        PCST.last_updated_by,        PCST.last_update_date,        PCST.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmCmdSlabTra">
        select
        <include refid = "BaseSql"/>
        from PM_CMD_SLAB_TRA PCST
        <where>
            <if test="traId !=null">
                and PCST.TRA_ID = #{traId,jdbcType = INTEGER}
            </if>
            <if test="operationType !=null">
                and PCST.OPERATION_TYPE = #{operationType,jdbcType = VARCHAR}
            </if>
            <if test="operationUser !=null">
                and PCST.OPERATION_USER = #{operationUser,jdbcType = VARCHAR}
            </if>
            <if test="operationTime !=null">
                and PCST.OPERATION_TIME = #{operationTime,jdbcType = OTHER}
            </if>
            <if test="pmCmdSlabId !=null">
                and PCST.PM_CMD_SLAB_ID = #{pmCmdSlabId,jdbcType = INTEGER}
            </if>
            <if test="ponoSlabNo !=null">
                and PCST.PONO_SLAB_NO = #{ponoSlabNo,jdbcType = VARCHAR}
            </if>
            <if test="tmpSlabNo !=null">
                and PCST.TMP_SLAB_NO = #{tmpSlabNo,jdbcType = VARCHAR}
            </if>
            <if test="pdBacklogSeq !=null">
                and PCST.PD_BACKLOG_SEQ = #{pdBacklogSeq,jdbcType = INTEGER}
            </if>
            <if test="pdBacklogCode !=null">
                and PCST.PD_BACKLOG_CODE = #{pdBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="slabNo !=null">
                and PCST.SLAB_NO = #{slabNo,jdbcType = VARCHAR}
            </if>
            <if test="virtualSlabNo !=null">
                and PCST.VIRTUAL_SLAB_NO = #{virtualSlabNo,jdbcType = VARCHAR}
            </if>
            <if test="pdStatusHp !=null">
                and PCST.PD_STATUS_HP = #{pdStatusHp,jdbcType = VARCHAR}
            </if>
            <if test="shortSlabNumInLong !=null">
                and PCST.SHORT_SLAB_NUM_IN_LONG = #{shortSlabNumInLong,jdbcType = INTEGER}
            </if>
            <if test="bigPlateNum !=null">
                and PCST.BIG_PLATE_NUM = #{bigPlateNum,jdbcType = INTEGER}
            </if>
            <if test="slabDivNo !=null">
                and PCST.SLAB_DIV_NO = #{slabDivNo,jdbcType = INTEGER}
            </if>
            <if test="orderNumInPlate !=null">
                and PCST.ORDER_NUM_IN_PLATE = #{orderNumInPlate,jdbcType = INTEGER}
            </if>
            <if test="orderNoAxis !=null">
                and PCST.ORDER_NO_AXIS = #{orderNoAxis,jdbcType = VARCHAR}
            </if>
            <if test="orderRemainDiv !=null">
                and PCST.ORDER_REMAIN_DIV = #{orderRemainDiv,jdbcType = VARCHAR}
            </if>
            <if test="matDesignKind !=null">
                and PCST.MAT_DESIGN_KIND = #{matDesignKind,jdbcType = VARCHAR}
            </if>
            <if test="prodCodeHp !=null">
                and PCST.PROD_CODE_HP = #{prodCodeHp,jdbcType = VARCHAR}
            </if>
            <if test="sgSign !=null">
                and PCST.SG_SIGN = #{sgSign,jdbcType = VARCHAR}
            </if>
            <if test="stNo !=null">
                and PCST.ST_NO = #{stNo,jdbcType = VARCHAR}
            </if>
            <if test="slabHtFlag !=null">
                and PCST.SLAB_HT_FLAG = #{slabHtFlag,jdbcType = VARCHAR}
            </if>
            <if test="preCleanSlabThick !=null">
                and PCST.PRE_CLEAN_SLAB_THICK = #{preCleanSlabThick,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabWidth !=null">
                and PCST.PRE_CLEAN_SLAB_WIDTH = #{preCleanSlabWidth,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabLen !=null">
                and PCST.PRE_CLEAN_SLAB_LEN = #{preCleanSlabLen,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabMaxLen !=null">
                and PCST.PRE_CLEAN_SLAB_MAX_LEN = #{preCleanSlabMaxLen,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabMinLen !=null">
                and PCST.PRE_CLEAN_SLAB_MIN_LEN = #{preCleanSlabMinLen,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabWt !=null">
                and PCST.PRE_CLEAN_SLAB_WT = #{preCleanSlabWt,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabMaxWt !=null">
                and PCST.PRE_CLEAN_SLAB_MAX_WT = #{preCleanSlabMaxWt,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabMinWt !=null">
                and PCST.PRE_CLEAN_SLAB_MIN_WT = #{preCleanSlabMinWt,jdbcType = INTEGER}
            </if>
            <if test="moldThick !=null">
                and PCST.MOLD_THICK = #{moldThick,jdbcType = INTEGER}
            </if>
            <if test="moldWid !=null">
                and PCST.MOLD_WID = #{moldWid,jdbcType = INTEGER}
            </if>
            <if test="infurSlabThick !=null">
                and PCST.INFUR_SLAB_THICK = #{infurSlabThick,jdbcType = INTEGER}
            </if>
            <if test="infurSlabWid !=null">
                and PCST.INFUR_SLAB_WID = #{infurSlabWid,jdbcType = INTEGER}
            </if>
            <if test="infurSlabLen !=null">
                and PCST.INFUR_SLAB_LEN = #{infurSlabLen,jdbcType = INTEGER}
            </if>
            <if test="infurSlabMaxLen !=null">
                and PCST.INFUR_SLAB_MAX_LEN = #{infurSlabMaxLen,jdbcType = INTEGER}
            </if>
            <if test="infurSlabMinLen !=null">
                and PCST.INFUR_SLAB_MIN_LEN = #{infurSlabMinLen,jdbcType = INTEGER}
            </if>
            <if test="infurSlabWt !=null">
                and PCST.INFUR_SLAB_WT = #{infurSlabWt,jdbcType = INTEGER}
            </if>
            <if test="infurSlabMaxWt !=null">
                and PCST.INFUR_SLAB_MAX_WT = #{infurSlabMaxWt,jdbcType = INTEGER}
            </if>
            <if test="infurSlabMinWt !=null">
                and PCST.INFUR_SLAB_MIN_WT = #{infurSlabMinWt,jdbcType = INTEGER}
            </if>
            <if test="needSlabLen !=null">
                and PCST.NEED_SLAB_LEN = #{needSlabLen,jdbcType = INTEGER}
            </if>
            <if test="needSlabWt !=null">
                and PCST.NEED_SLAB_WT = #{needSlabWt,jdbcType = INTEGER}
            </if>
            <if test="fixSlabLenFlag !=null">
                and PCST.FIX_SLAB_LEN_FLAG = #{fixSlabLenFlag,jdbcType = VARCHAR}
            </if>
            <if test="fixSlabLen !=null">
                and PCST.FIX_SLAB_LEN = #{fixSlabLen,jdbcType = INTEGER}
            </if>
            <if test="rollMaxPreCleanSlabLen !=null">
                and PCST.ROLL_MAX_PRE_CLEAN_SLAB_LEN = #{rollMaxPreCleanSlabLen,jdbcType = INTEGER}
            </if>
            <if test="rollMaxPreCleanSlabWt !=null">
                and PCST.ROLL_MAX_PRE_CLEAN_SLAB_WT = #{rollMaxPreCleanSlabWt,jdbcType = INTEGER}
            </if>
            <if test="slabPlaceCode !=null">
                and PCST.SLAB_PLACE_CODE = #{slabPlaceCode,jdbcType = VARCHAR}
            </if>
            <if test="hpFlameCleanDiv !=null">
                and PCST.HP_FLAME_CLEAN_DIV = #{hpFlameCleanDiv,jdbcType = VARCHAR}
            </if>
            <if test="slabFinishCode !=null">
                and PCST.SLAB_FINISH_CODE = #{slabFinishCode,jdbcType = VARCHAR}
            </if>
            <if test="slabCleanWtLossRateSt !=null">
                and PCST.SLAB_CLEAN_WT_LOSS_RATE_ST = #{slabCleanWtLossRateSt,jdbcType = INTEGER}
            </if>
            <if test="slabCleanWtLossRateFr !=null">
                and PCST.SLAB_CLEAN_WT_LOSS_RATE_FR = #{slabCleanWtLossRateFr,jdbcType = INTEGER}
            </if>
            <if test="coolCode !=null">
                and PCST.COOL_CODE = #{coolCode,jdbcType = VARCHAR}
            </if>
            <if test="lastSlabFlag !=null">
                and PCST.LAST_SLAB_FLAG = #{lastSlabFlag,jdbcType = VARCHAR}
            </if>
            <if test="addSlabFlag !=null">
                and PCST.ADD_SLAB_FLAG = #{addSlabFlag,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc1 !=null">
                and PCST.SLAB_PRE_PROC1 = #{slabPreProc1,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc2 !=null">
                and PCST.SLAB_PRE_PROC2 = #{slabPreProc2,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc3 !=null">
                and PCST.SLAB_PRE_PROC3 = #{slabPreProc3,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc4 !=null">
                and PCST.SLAB_PRE_PROC4 = #{slabPreProc4,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc5 !=null">
                and PCST.SLAB_PRE_PROC5 = #{slabPreProc5,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc6 !=null">
                and PCST.SLAB_PRE_PROC6 = #{slabPreProc6,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc7 !=null">
                and PCST.SLAB_PRE_PROC7 = #{slabPreProc7,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc8 !=null">
                and PCST.SLAB_PRE_PROC8 = #{slabPreProc8,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc9 !=null">
                and PCST.SLAB_PRE_PROC9 = #{slabPreProc9,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc10 !=null">
                and PCST.SLAB_PRE_PROC10 = #{slabPreProc10,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc11 !=null">
                and PCST.SLAB_PRE_PROC11 = #{slabPreProc11,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc12 !=null">
                and PCST.SLAB_PRE_PROC12 = #{slabPreProc12,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc13 !=null">
                and PCST.SLAB_PRE_PROC13 = #{slabPreProc13,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc14 !=null">
                and PCST.SLAB_PRE_PROC14 = #{slabPreProc14,jdbcType = VARCHAR}
            </if>
            <if test="slabPreProc15 !=null">
                and PCST.SLAB_PRE_PROC15 = #{slabPreProc15,jdbcType = VARCHAR}
            </if>
            <if test="slabStackIndicate !=null">
                and PCST.SLAB_STACK_INDICATE = #{slabStackIndicate,jdbcType = VARCHAR}
            </if>
            <if test="hotSendDiv !=null">
                and PCST.HOT_SEND_DIV = #{hotSendDiv,jdbcType = VARCHAR}
            </if>
            <if test="furType !=null">
                and PCST.FUR_TYPE = #{furType,jdbcType = VARCHAR}
            </if>
            <if test="transFlag !=null">
                and PCST.TRANS_FLAG = #{transFlag,jdbcType = VARCHAR}
            </if>
            <if test="hotChargeFlag !=null">
                and PCST.HOT_CHARGE_FLAG = #{hotChargeFlag,jdbcType = VARCHAR}
            </if>
            <if test="rollPlanNo !=null">
                and PCST.ROLL_PLAN_NO = #{rollPlanNo,jdbcType = VARCHAR}
            </if>
            <if test="newTestNo !=null">
                and PCST.NEW_TEST_NO = #{newTestNo,jdbcType = VARCHAR}
            </if>
            <if test="formPlateTime !=null">
                and PCST.FORM_PLATE_TIME = #{formPlateTime,jdbcType = OTHER}
            </if>
            <if test="shpCode !=null">
                and PCST.SHP_CODE = #{shpCode,jdbcType = VARCHAR}
            </if>
            <if test="pono !=null">
                and PCST.PONO = #{pono,jdbcType = VARCHAR}
            </if>
            <if test="igMatDesignKind !=null">
                and PCST.IG_MAT_DESIGN_KIND = #{igMatDesignKind,jdbcType = VARCHAR}
            </if>
            <if test="ingotType !=null">
                and PCST.INGOT_TYPE = #{ingotType,jdbcType = VARCHAR}
            </if>
            <if test="mscLineNo !=null">
                and PCST.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="tenantId !=null">
                and PCST.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PCST.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PCST.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PCST.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PCST.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PCST.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

