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


    <sql id = "BaseSql">
    PPCS.VIRTUAL_SLAB_ID,
    PPCS.VIRTUAL_SLAB_NO,
    PPCS.MAT_DESIGN_KIND,
    PPCS.PD_STATUS_HP,
    PPCS.PD_RESP,
    PPCS.FUR_TYPE,
    PPCS.AUTO_MANUAL_FLAG,
    PPCS.FIX_SLAB_LEN_FLAG,
    PPCS.FIX_SLAB_LEN,
    PPCS.MOLD_THICK,
    PPCS.MOLD_WID,
    PPCS.SLAB_CLEAN_WT_LOSS_RATE_ST,
    PPCS.SLAB_CLEAN_WT_LOSS_RATE_FR,
    PPCS.SLAB_PLACE_CODE,
    PPCS.TWO_ROLL_INTERIM_FLAG,
    PPCS.RF_PATH,
    PPCS.CC_TYPE,
    PPCS.IG_MAT_DESIGN_KIND,
    PPCS.INGOT_TYPE,
    PPCS.ORDER_REMAIN_DIV,
    PPCS.CAN_DEL_FLAG,
    PPCS.MSC_LINE_NO,
    PPCS.URG_ORDER_FLAG,
    PPCS.OU_BACKLOG_SEQ,
    PPCS.OU_BACKLOG_CODE,
    PPCS.SG_SIGN,
    PPCS.ST_NO,
    PPCS.ST_NO1,
    PPCS.ST_NO2,
    PPCS.ST_NO3,
    PPCS.ST_NO4,
    PPCS.ST_NO5,
    PPCS.ST_NO6,
    PPCS.ST_NO7,
    PPCS.ST_NO8,
    PPCS.ST_NO9,
    PPCS.OUT_SG_NO,
    PPCS.HP_FLAME_CLEAN_DIV,
    PPCS.SLAB_FINISH_CODE,
    PPCS.PROD_DENSITY,
    PPCS.TRANS_FLAG,
    PPCS.PRE_CLEAN_SLAB_THICK,
    PPCS.PRE_CLEAN_SLAB_WIDTH,
    PPCS.PRE_CLEAN_SLAB_LEN,
    PPCS.PRE_CLEAN_SLAB_MAX_LEN,
    PPCS.PRE_CLEAN_SLAB_MIN_LEN,
    PPCS.PRE_CLEAN_SLAB_WT,
    PPCS.PRE_CLEAN_SLAB_MAX_WT,
    PPCS.PRE_CLEAN_SLAB_MIN_WT,
    PPCS.INFUR_SLAB_THICK,
    PPCS.INFUR_SLAB_WID,
    PPCS.INFUR_SLAB_LEN,
    PPCS.INFUR_SLAB_MAX_LEN,
    PPCS.INFUR_SLAB_MIN_LEN,
    PPCS.INFUR_SLAB_WT,
    PPCS.INFUR_SLAB_MAX_WT,
    PPCS.INFUR_SLAB_MIN_WT,
    PPCS.NEED_SLAB_LEN,
    PPCS.NEED_SLAB_WT,
    PPCS.COMMAND_YIELD,
    PPCS.ROLL_YIELD,
    PPCS.STEEL_PLAN_DATE,
    PPCS.STEEL_LATEST_DATE,
    PPCS.TMP_SLAB_NO,
    PPCS.PREC_PONO,
    PPCS.PREC_CAST_LOT_NO,
    PPCS.SG_DECIDE_TIME,
    PPCS.MANUAL_OM,
    PPCS.HP_OM_TIME,
    PPCS.HOT_SEND_FLAG,
    PPCS.HOT_CHARGE_FLAG,
    PPCS.AD_TYPE_CODE,
    PPCS.AD_MODE_CODE,
    PPCS.CHECK_METHOD_CODE,
    PPCS.CTRL_ROLL_CODE,
    PPCS.WITH_SIDE_FLAG,
    PPCS.CUT_MODE_CODE,
    PPCS.G_FLAG,
    PPCS.CS_FLAG,
    PPCS.DSS_FLAG,
    PPCS.SS_FLAG,
    PPCS.DS_FLAG,
    PPCS.STEEL_GROUP,
    PPCS.PROD_CODE_HP,
    PPCS.AXIS_ORDER_THICK,
    PPCS.AXIS_ORDER_WIDTH,
    PPCS.PICK_MODE_LEN_DIR,
    PPCS.PICK_MODE_WID_DIR,
    PPCS.TOT_SMALL_PLATE_NUM,
    PPCS.COMBINE_PLATE_WIDTH,
    PPCS.COMBINE_PLATE_LEN,
    PPCS.SAMPLE_LEN_HEAD,
    PPCS.SAMPLE_LEN_TAIL,
    PPCS.SAMPLE_LEN_MID,
    PPCS.FORM_PLATE_MODE,
    PPCS.ORDER_NUM_IN_PLATE,
    PPCS.ROLL_DIRECT_CODE,
    PPCS.SHP_CODE,
    PPCS.ULT_CODE,
    PPCS.COOL_CODE,
    PPCS.ULT_DETECT_METHOD_CODE,
    PPCS.ROLL_WT_HP,
    PPCS.ROLL_THICK_TOL_MAX,
    PPCS.ROLL_THICK_TOL_MIN,
    PPCS.HEAD_CUT,
    PPCS.TAIL_CUT,
    PPCS.ROLL_AIM_THICK,
    PPCS.ROLL_AIM_WIDTH,
    PPCS.ROLL_AIM_LEN,
    PPCS.NORM_YIELD,
    PPCS.EDGER_USE_FLAG,
    PPCS.BROAD_MAS_USE_FLAG,
    PPCS.FORM_MAS_USE_FLAG,
    PPCS.RS_CODE,
    PPCS.BROAD_FLAG,
    PPCS.ORDER_NO_AXIS,
    PPCS.TAPER_ROLL_THICK1,
    PPCS.TAPER_ROLL_THICK_MAX1,
    PPCS.TAPER_ROLL_THICK_MIN1,
    PPCS.TAPER_ROLL_THICK2,
    PPCS.TAPER_ROLL_THICK_MAX2,
    PPCS.TAPER_ROLL_THICK_MIN2,
    PPCS.TAPER_ROLL_THICK3,
    PPCS.TAPER_ROLL_THICK_MAX3,
    PPCS.TAPER_ROLL_THICK_MIN3,
    PPCS.TAPER_ROLL_THICK4,
    PPCS.TAPER_ROLL_THICK_MAX4,
    PPCS.TAPER_ROLL_THICK_MIN4,
    PPCS.TAPER_ROLL_THICK5,
    PPCS.TAPER_ROLL_THICK_MAX5,
    PPCS.TAPER_ROLL_THICK_MIN5,
    PPCS.TAPER_ROLL_THICK6,
    PPCS.TAPER_ROLL_THICK_MAX6,
    PPCS.TAPER_ROLL_THICK_MIN6,
    PPCS.TAPER_ROLL_THICK7,
    PPCS.TAPER_ROLL_THICK_MAX7,
    PPCS.TAPER_ROLL_THICK_MIN7,
    PPCS.TAPER_ROLL_WIDTH,
    PPCS.TAPER_ROLL_LEN1,
    PPCS.TAPER_ROLL_LEN2,
    PPCS.TAPER_ROLL_LEN3,
    PPCS.TAPER_ROLL_LEN4,
    PPCS.TAPER_ROLL_LEN5,
    PPCS.TAPER_ROLL_LEN6,
    PPCS.TAPER_ROLL_LEN7,
    PPCS.TENANT_ID,
    PPCS.ATTRIBUTE1,
    PPCS.ATTRIBUTE2,
    PPCS.ATTRIBUTE3,
    PPCS.ATTRIBUTE4,
    PPCS.ATTRIBUTE5,
    PPCS.WITNESS_POINT_STATUS,
    PPCS.creation_date,    PPCS.created_by,    PPCS.last_updated_by,    PPCS.last_update_date,    PPCS.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmPdCcSlab">
        select
        <include refid = "BaseSql"/>
        from PM_PD_CC_SLAB PPCS
        <where>
            <if test="virtualSlabId !=null">
                and PPCS.VIRTUAL_SLAB_ID = #{virtualSlabId,jdbcType = INTEGER}
            </if>
            <if test="virtualSlabNo !=null">
                and PPCS.VIRTUAL_SLAB_NO = #{virtualSlabNo,jdbcType = VARCHAR}
            </if>
            <if test="matDesignKind !=null">
                and PPCS.MAT_DESIGN_KIND = #{matDesignKind,jdbcType = VARCHAR}
            </if>
            <if test="pdStatusHp !=null">
                and PPCS.PD_STATUS_HP = #{pdStatusHp,jdbcType = VARCHAR}
            </if>
            <if test="pdResp !=null">
                and PPCS.PD_RESP = #{pdResp,jdbcType = VARCHAR}
            </if>
            <if test="furType !=null">
                and PPCS.FUR_TYPE = #{furType,jdbcType = VARCHAR}
            </if>
            <if test="autoManualFlag !=null">
                and PPCS.AUTO_MANUAL_FLAG = #{autoManualFlag,jdbcType = VARCHAR}
            </if>
            <if test="fixSlabLenFlag !=null">
                and PPCS.FIX_SLAB_LEN_FLAG = #{fixSlabLenFlag,jdbcType = INTEGER}
            </if>
            <if test="fixSlabLen !=null">
                and PPCS.FIX_SLAB_LEN = #{fixSlabLen,jdbcType = INTEGER}
            </if>
            <if test="moldThick !=null">
                and PPCS.MOLD_THICK = #{moldThick,jdbcType = INTEGER}
            </if>
            <if test="moldWid !=null">
                and PPCS.MOLD_WID = #{moldWid,jdbcType = INTEGER}
            </if>
            <if test="slabCleanWtLossRateSt !=null">
                and PPCS.SLAB_CLEAN_WT_LOSS_RATE_ST = #{slabCleanWtLossRateSt,jdbcType = INTEGER}
            </if>
            <if test="slabCleanWtLossRateFr !=null">
                and PPCS.SLAB_CLEAN_WT_LOSS_RATE_FR = #{slabCleanWtLossRateFr,jdbcType = INTEGER}
            </if>
            <if test="slabPlaceCode !=null">
                and PPCS.SLAB_PLACE_CODE = #{slabPlaceCode,jdbcType = VARCHAR}
            </if>
            <if test="twoRollInterimFlag !=null">
                and PPCS.TWO_ROLL_INTERIM_FLAG = #{twoRollInterimFlag,jdbcType = INTEGER}
            </if>
            <if test="rfPath !=null">
                and PPCS.RF_PATH = #{rfPath,jdbcType = VARCHAR}
            </if>
            <if test="ccType !=null">
                and PPCS.CC_TYPE = #{ccType,jdbcType = VARCHAR}
            </if>
            <if test="igMatDesignKind !=null">
                and PPCS.IG_MAT_DESIGN_KIND = #{igMatDesignKind,jdbcType = VARCHAR}
            </if>
            <if test="ingotType !=null">
                and PPCS.INGOT_TYPE = #{ingotType,jdbcType = VARCHAR}
            </if>
            <if test="orderRemainDiv !=null">
                and PPCS.ORDER_REMAIN_DIV = #{orderRemainDiv,jdbcType = VARCHAR}
            </if>
            <if test="canDelFlag !=null">
                and PPCS.CAN_DEL_FLAG = #{canDelFlag,jdbcType = VARCHAR}
            </if>
            <if test="mscLineNo !=null">
                and PPCS.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="urgOrderFlag !=null">
                and PPCS.URG_ORDER_FLAG = #{urgOrderFlag,jdbcType = VARCHAR}
            </if>
            <if test="ouBacklogSeq !=null">
                and PPCS.OU_BACKLOG_SEQ = #{ouBacklogSeq,jdbcType = INTEGER}
            </if>
            <if test="ouBacklogCode !=null">
                and PPCS.OU_BACKLOG_CODE = #{ouBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="sgSign !=null">
                and PPCS.SG_SIGN = #{sgSign,jdbcType = VARCHAR}
            </if>
            <if test="stNo !=null">
                and PPCS.ST_NO = #{stNo,jdbcType = VARCHAR}
            </if>
            <if test="stNo1 !=null">
                and PPCS.ST_NO1 = #{stNo1,jdbcType = VARCHAR}
            </if>
            <if test="stNo2 !=null">
                and PPCS.ST_NO2 = #{stNo2,jdbcType = VARCHAR}
            </if>
            <if test="stNo3 !=null">
                and PPCS.ST_NO3 = #{stNo3,jdbcType = VARCHAR}
            </if>
            <if test="stNo4 !=null">
                and PPCS.ST_NO4 = #{stNo4,jdbcType = VARCHAR}
            </if>
            <if test="stNo5 !=null">
                and PPCS.ST_NO5 = #{stNo5,jdbcType = VARCHAR}
            </if>
            <if test="stNo6 !=null">
                and PPCS.ST_NO6 = #{stNo6,jdbcType = VARCHAR}
            </if>
            <if test="stNo7 !=null">
                and PPCS.ST_NO7 = #{stNo7,jdbcType = VARCHAR}
            </if>
            <if test="stNo8 !=null">
                and PPCS.ST_NO8 = #{stNo8,jdbcType = VARCHAR}
            </if>
            <if test="stNo9 !=null">
                and PPCS.ST_NO9 = #{stNo9,jdbcType = VARCHAR}
            </if>
            <if test="outSgNo !=null">
                and PPCS.OUT_SG_NO = #{outSgNo,jdbcType = VARCHAR}
            </if>
            <if test="hpFlameCleanDiv !=null">
                and PPCS.HP_FLAME_CLEAN_DIV = #{hpFlameCleanDiv,jdbcType = VARCHAR}
            </if>
            <if test="slabFinishCode !=null">
                and PPCS.SLAB_FINISH_CODE = #{slabFinishCode,jdbcType = VARCHAR}
            </if>
            <if test="prodDensity !=null">
                and PPCS.PROD_DENSITY = #{prodDensity,jdbcType = INTEGER}
            </if>
            <if test="transFlag !=null">
                and PPCS.TRANS_FLAG = #{transFlag,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabThick !=null">
                and PPCS.PRE_CLEAN_SLAB_THICK = #{preCleanSlabThick,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabWidth !=null">
                and PPCS.PRE_CLEAN_SLAB_WIDTH = #{preCleanSlabWidth,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabLen !=null">
                and PPCS.PRE_CLEAN_SLAB_LEN = #{preCleanSlabLen,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabMaxLen !=null">
                and PPCS.PRE_CLEAN_SLAB_MAX_LEN = #{preCleanSlabMaxLen,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabMinLen !=null">
                and PPCS.PRE_CLEAN_SLAB_MIN_LEN = #{preCleanSlabMinLen,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabWt !=null">
                and PPCS.PRE_CLEAN_SLAB_WT = #{preCleanSlabWt,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabMaxWt !=null">
                and PPCS.PRE_CLEAN_SLAB_MAX_WT = #{preCleanSlabMaxWt,jdbcType = INTEGER}
            </if>
            <if test="preCleanSlabMinWt !=null">
                and PPCS.PRE_CLEAN_SLAB_MIN_WT = #{preCleanSlabMinWt,jdbcType = INTEGER}
            </if>
            <if test="infurSlabThick !=null">
                and PPCS.INFUR_SLAB_THICK = #{infurSlabThick,jdbcType = INTEGER}
            </if>
            <if test="infurSlabWid !=null">
                and PPCS.INFUR_SLAB_WID = #{infurSlabWid,jdbcType = INTEGER}
            </if>
            <if test="infurSlabLen !=null">
                and PPCS.INFUR_SLAB_LEN = #{infurSlabLen,jdbcType = INTEGER}
            </if>
            <if test="infurSlabMaxLen !=null">
                and PPCS.INFUR_SLAB_MAX_LEN = #{infurSlabMaxLen,jdbcType = INTEGER}
            </if>
            <if test="infurSlabMinLen !=null">
                and PPCS.INFUR_SLAB_MIN_LEN = #{infurSlabMinLen,jdbcType = INTEGER}
            </if>
            <if test="infurSlabWt !=null">
                and PPCS.INFUR_SLAB_WT = #{infurSlabWt,jdbcType = INTEGER}
            </if>
            <if test="infurSlabMaxWt !=null">
                and PPCS.INFUR_SLAB_MAX_WT = #{infurSlabMaxWt,jdbcType = INTEGER}
            </if>
            <if test="infurSlabMinWt !=null">
                and PPCS.INFUR_SLAB_MIN_WT = #{infurSlabMinWt,jdbcType = INTEGER}
            </if>
            <if test="needSlabLen !=null">
                and PPCS.NEED_SLAB_LEN = #{needSlabLen,jdbcType = INTEGER}
            </if>
            <if test="needSlabWt !=null">
                and PPCS.NEED_SLAB_WT = #{needSlabWt,jdbcType = INTEGER}
            </if>
            <if test="commandYield !=null">
                and PPCS.COMMAND_YIELD = #{commandYield,jdbcType = INTEGER}
            </if>
            <if test="rollYield !=null">
                and PPCS.ROLL_YIELD = #{rollYield,jdbcType = INTEGER}
            </if>
            <if test="steelPlanDate !=null">
                and PPCS.STEEL_PLAN_DATE = #{steelPlanDate,jdbcType = OTHER}
            </if>
            <if test="steelLatestDate !=null">
                and PPCS.STEEL_LATEST_DATE = #{steelLatestDate,jdbcType = OTHER}
            </if>
            <if test="tmpSlabNo !=null">
                and PPCS.TMP_SLAB_NO = #{tmpSlabNo,jdbcType = VARCHAR}
            </if>
            <if test="precPono !=null">
                and PPCS.PREC_PONO = #{precPono,jdbcType = VARCHAR}
            </if>
            <if test="precCastLotNo !=null">
                and PPCS.PREC_CAST_LOT_NO = #{precCastLotNo,jdbcType = VARCHAR}
            </if>
            <if test="sgDecideTime !=null">
                and PPCS.SG_DECIDE_TIME = #{sgDecideTime,jdbcType = OTHER}
            </if>
            <if test="manualOm !=null">
                and PPCS.MANUAL_OM = #{manualOm,jdbcType = VARCHAR}
            </if>
            <if test="hpOmTime !=null">
                and PPCS.HP_OM_TIME = #{hpOmTime,jdbcType = OTHER}
            </if>
            <if test="hotSendFlag !=null">
                and PPCS.HOT_SEND_FLAG = #{hotSendFlag,jdbcType = INTEGER}
            </if>
            <if test="hotChargeFlag !=null">
                and PPCS.HOT_CHARGE_FLAG = #{hotChargeFlag,jdbcType = INTEGER}
            </if>
            <if test="adTypeCode !=null">
                and PPCS.AD_TYPE_CODE = #{adTypeCode,jdbcType = VARCHAR}
            </if>
            <if test="adModeCode !=null">
                and PPCS.AD_MODE_CODE = #{adModeCode,jdbcType = VARCHAR}
            </if>
            <if test="checkMethodCode !=null">
                and PPCS.CHECK_METHOD_CODE = #{checkMethodCode,jdbcType = VARCHAR}
            </if>
            <if test="ctrlRollCode !=null">
                and PPCS.CTRL_ROLL_CODE = #{ctrlRollCode,jdbcType = VARCHAR}
            </if>
            <if test="withSideFlag !=null">
                and PPCS.WITH_SIDE_FLAG = #{withSideFlag,jdbcType = VARCHAR}
            </if>
            <if test="cutModeCode !=null">
                and PPCS.CUT_MODE_CODE = #{cutModeCode,jdbcType = VARCHAR}
            </if>
            <if test="gFlag !=null">
                and PPCS.G_FLAG = #{gFlag,jdbcType = VARCHAR}
            </if>
            <if test="csFlag !=null">
                and PPCS.CS_FLAG = #{csFlag,jdbcType = VARCHAR}
            </if>
            <if test="dssFlag !=null">
                and PPCS.DSS_FLAG = #{dssFlag,jdbcType = VARCHAR}
            </if>
            <if test="ssFlag !=null">
                and PPCS.SS_FLAG = #{ssFlag,jdbcType = VARCHAR}
            </if>
            <if test="dsFlag !=null">
                and PPCS.DS_FLAG = #{dsFlag,jdbcType = VARCHAR}
            </if>
            <if test="steelGroup !=null">
                and PPCS.STEEL_GROUP = #{steelGroup,jdbcType = VARCHAR}
            </if>
            <if test="prodCodeHp !=null">
                and PPCS.PROD_CODE_HP = #{prodCodeHp,jdbcType = VARCHAR}
            </if>
            <if test="axisOrderThick !=null">
                and PPCS.AXIS_ORDER_THICK = #{axisOrderThick,jdbcType = INTEGER}
            </if>
            <if test="axisOrderWidth !=null">
                and PPCS.AXIS_ORDER_WIDTH = #{axisOrderWidth,jdbcType = INTEGER}
            </if>
            <if test="pickModeLenDir !=null">
                and PPCS.PICK_MODE_LEN_DIR = #{pickModeLenDir,jdbcType = INTEGER}
            </if>
            <if test="pickModeWidDir !=null">
                and PPCS.PICK_MODE_WID_DIR = #{pickModeWidDir,jdbcType = INTEGER}
            </if>
            <if test="totSmallPlateNum !=null">
                and PPCS.TOT_SMALL_PLATE_NUM = #{totSmallPlateNum,jdbcType = INTEGER}
            </if>
            <if test="combinePlateWidth !=null">
                and PPCS.COMBINE_PLATE_WIDTH = #{combinePlateWidth,jdbcType = INTEGER}
            </if>
            <if test="combinePlateLen !=null">
                and PPCS.COMBINE_PLATE_LEN = #{combinePlateLen,jdbcType = INTEGER}
            </if>
            <if test="sampleLenHead !=null">
                and PPCS.SAMPLE_LEN_HEAD = #{sampleLenHead,jdbcType = INTEGER}
            </if>
            <if test="sampleLenTail !=null">
                and PPCS.SAMPLE_LEN_TAIL = #{sampleLenTail,jdbcType = INTEGER}
            </if>
            <if test="sampleLenMid !=null">
                and PPCS.SAMPLE_LEN_MID = #{sampleLenMid,jdbcType = INTEGER}
            </if>
            <if test="formPlateMode !=null">
                and PPCS.FORM_PLATE_MODE = #{formPlateMode,jdbcType = VARCHAR}
            </if>
            <if test="orderNumInPlate !=null">
                and PPCS.ORDER_NUM_IN_PLATE = #{orderNumInPlate,jdbcType = INTEGER}
            </if>
            <if test="rollDirectCode !=null">
                and PPCS.ROLL_DIRECT_CODE = #{rollDirectCode,jdbcType = VARCHAR}
            </if>
            <if test="shpCode !=null">
                and PPCS.SHP_CODE = #{shpCode,jdbcType = VARCHAR}
            </if>
            <if test="ultCode !=null">
                and PPCS.ULT_CODE = #{ultCode,jdbcType = VARCHAR}
            </if>
            <if test="coolCode !=null">
                and PPCS.COOL_CODE = #{coolCode,jdbcType = VARCHAR}
            </if>
            <if test="ultDetectMethodCode !=null">
                and PPCS.ULT_DETECT_METHOD_CODE = #{ultDetectMethodCode,jdbcType = VARCHAR}
            </if>
            <if test="rollWtHp !=null">
                and PPCS.ROLL_WT_HP = #{rollWtHp,jdbcType = INTEGER}
            </if>
            <if test="rollThickTolMax !=null">
                and PPCS.ROLL_THICK_TOL_MAX = #{rollThickTolMax,jdbcType = INTEGER}
            </if>
            <if test="rollThickTolMin !=null">
                and PPCS.ROLL_THICK_TOL_MIN = #{rollThickTolMin,jdbcType = INTEGER}
            </if>
            <if test="headCut !=null">
                and PPCS.HEAD_CUT = #{headCut,jdbcType = INTEGER}
            </if>
            <if test="tailCut !=null">
                and PPCS.TAIL_CUT = #{tailCut,jdbcType = INTEGER}
            </if>
            <if test="rollAimThick !=null">
                and PPCS.ROLL_AIM_THICK = #{rollAimThick,jdbcType = INTEGER}
            </if>
            <if test="rollAimWidth !=null">
                and PPCS.ROLL_AIM_WIDTH = #{rollAimWidth,jdbcType = INTEGER}
            </if>
            <if test="rollAimLen !=null">
                and PPCS.ROLL_AIM_LEN = #{rollAimLen,jdbcType = INTEGER}
            </if>
            <if test="normYield !=null">
                and PPCS.NORM_YIELD = #{normYield,jdbcType = INTEGER}
            </if>
            <if test="edgerUseFlag !=null">
                and PPCS.EDGER_USE_FLAG = #{edgerUseFlag,jdbcType = VARCHAR}
            </if>
            <if test="broadMasUseFlag !=null">
                and PPCS.BROAD_MAS_USE_FLAG = #{broadMasUseFlag,jdbcType = VARCHAR}
            </if>
            <if test="formMasUseFlag !=null">
                and PPCS.FORM_MAS_USE_FLAG = #{formMasUseFlag,jdbcType = VARCHAR}
            </if>
            <if test="rsCode !=null">
                and PPCS.RS_CODE = #{rsCode,jdbcType = VARCHAR}
            </if>
            <if test="broadFlag !=null">
                and PPCS.BROAD_FLAG = #{broadFlag,jdbcType = VARCHAR}
            </if>
            <if test="orderNoAxis !=null">
                and PPCS.ORDER_NO_AXIS = #{orderNoAxis,jdbcType = VARCHAR}
            </if>
            <if test="taperRollThick1 !=null">
                and PPCS.TAPER_ROLL_THICK1 = #{taperRollThick1,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMax1 !=null">
                and PPCS.TAPER_ROLL_THICK_MAX1 = #{taperRollThickMax1,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMin1 !=null">
                and PPCS.TAPER_ROLL_THICK_MIN1 = #{taperRollThickMin1,jdbcType = INTEGER}
            </if>
            <if test="taperRollThick2 !=null">
                and PPCS.TAPER_ROLL_THICK2 = #{taperRollThick2,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMax2 !=null">
                and PPCS.TAPER_ROLL_THICK_MAX2 = #{taperRollThickMax2,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMin2 !=null">
                and PPCS.TAPER_ROLL_THICK_MIN2 = #{taperRollThickMin2,jdbcType = INTEGER}
            </if>
            <if test="taperRollThick3 !=null">
                and PPCS.TAPER_ROLL_THICK3 = #{taperRollThick3,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMax3 !=null">
                and PPCS.TAPER_ROLL_THICK_MAX3 = #{taperRollThickMax3,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMin3 !=null">
                and PPCS.TAPER_ROLL_THICK_MIN3 = #{taperRollThickMin3,jdbcType = INTEGER}
            </if>
            <if test="taperRollThick4 !=null">
                and PPCS.TAPER_ROLL_THICK4 = #{taperRollThick4,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMax4 !=null">
                and PPCS.TAPER_ROLL_THICK_MAX4 = #{taperRollThickMax4,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMin4 !=null">
                and PPCS.TAPER_ROLL_THICK_MIN4 = #{taperRollThickMin4,jdbcType = INTEGER}
            </if>
            <if test="taperRollThick5 !=null">
                and PPCS.TAPER_ROLL_THICK5 = #{taperRollThick5,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMax5 !=null">
                and PPCS.TAPER_ROLL_THICK_MAX5 = #{taperRollThickMax5,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMin5 !=null">
                and PPCS.TAPER_ROLL_THICK_MIN5 = #{taperRollThickMin5,jdbcType = INTEGER}
            </if>
            <if test="taperRollThick6 !=null">
                and PPCS.TAPER_ROLL_THICK6 = #{taperRollThick6,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMax6 !=null">
                and PPCS.TAPER_ROLL_THICK_MAX6 = #{taperRollThickMax6,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMin6 !=null">
                and PPCS.TAPER_ROLL_THICK_MIN6 = #{taperRollThickMin6,jdbcType = INTEGER}
            </if>
            <if test="taperRollThick7 !=null">
                and PPCS.TAPER_ROLL_THICK7 = #{taperRollThick7,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMax7 !=null">
                and PPCS.TAPER_ROLL_THICK_MAX7 = #{taperRollThickMax7,jdbcType = INTEGER}
            </if>
            <if test="taperRollThickMin7 !=null">
                and PPCS.TAPER_ROLL_THICK_MIN7 = #{taperRollThickMin7,jdbcType = INTEGER}
            </if>
            <if test="taperRollWidth !=null">
                and PPCS.TAPER_ROLL_WIDTH = #{taperRollWidth,jdbcType = INTEGER}
            </if>
            <if test="taperRollLen1 !=null">
                and PPCS.TAPER_ROLL_LEN1 = #{taperRollLen1,jdbcType = INTEGER}
            </if>
            <if test="taperRollLen2 !=null">
                and PPCS.TAPER_ROLL_LEN2 = #{taperRollLen2,jdbcType = INTEGER}
            </if>
            <if test="taperRollLen3 !=null">
                and PPCS.TAPER_ROLL_LEN3 = #{taperRollLen3,jdbcType = INTEGER}
            </if>
            <if test="taperRollLen4 !=null">
                and PPCS.TAPER_ROLL_LEN4 = #{taperRollLen4,jdbcType = INTEGER}
            </if>
            <if test="taperRollLen5 !=null">
                and PPCS.TAPER_ROLL_LEN5 = #{taperRollLen5,jdbcType = INTEGER}
            </if>
            <if test="taperRollLen6 !=null">
                and PPCS.TAPER_ROLL_LEN6 = #{taperRollLen6,jdbcType = INTEGER}
            </if>
            <if test="taperRollLen7 !=null">
                and PPCS.TAPER_ROLL_LEN7 = #{taperRollLen7,jdbcType = INTEGER}
            </if>
            <if test="tenantId !=null">
                and PPCS.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PPCS.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PPCS.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PPCS.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PPCS.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PPCS.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
            <if test="witnessPointStatus !=null">
                and PPCS.WITNESS_POINT_STATUS = #{witnessPointStatus,jdbcType = VARCHAR}
            </if>
        </where>
    </select>

    <select id="selectStoveList" resultType="com.xisc.pm.api.dto.PmPdCcSlabStoveResDTO">
        SELECT
            ppcs.VIRTUAL_SLAB_NO,
            substr( NVL( ppcs.VIRTUAL_SLAB_NO, ' ' ), 0, 1 ) AS dzFlag,
            ppcs.ORDER_NO_AXIS AS orderNo,
            ppcs.STEEL_LATEST_DATE,
            ppcs.PRE_CLEAN_SLAB_WT,
            ppcs.MSC_LINE_NO,
            ppcs.ULT_CODE,
            ppcs.ST_NO as outSgNo,
            ppcs.RF_PATH,
            ppcs.PRE_CLEAN_SLAB_THICK,
            ppcs.PRE_CLEAN_SLAB_WIDTH,
            ppcs.PRE_CLEAN_SLAB_LEN,
            ppcs.PRE_CLEAN_SLAB_MAX_LEN,
            ppcs.PRE_CLEAN_SLAB_MIN_LEN,
            ppcs.PRE_CLEAN_SLAB_MAX_WT,
            ppcs.PRE_CLEAN_SLAB_MIN_WT,
            ppcs.INFUR_SLAB_THICK,
            ppcs.INFUR_SLAB_WID,
            ppcs.INFUR_SLAB_LEN,
            ppcs.INFUR_SLAB_MAX_LEN,
            ppcs.INFUR_SLAB_MIN_LEN,
            ppcs.INFUR_SLAB_WT,
            ppcs.INFUR_SLAB_MAX_WT,
            ppcs.INFUR_SLAB_MIN_WT,
            ppcs.STEEL_PLAN_DATE,
            ppcs.URG_ORDER_FLAG,
            ppcs.HOT_CHARGE_FLAG,
            ppcs.HOT_SEND_FLAG AS hotSendDiv,
            ppcs.PD_STATUS_HP,
            ppcs.ROLL_AIM_THICK,
            ppcs.ROLL_AIM_WIDTH,
            ppcs.ROLL_THICK_TOL_MIN,
            ppcs.ROLL_THICK_TOL_MAX,
            CASE
                WHEN NVL( ppcs.ROLL_THICK_TOL_MAX, 0 ) = 0
                    OR NVL( ppcs.ROLL_THICK_TOL_MIN, 0 ) = 0 THEN
                    0 ELSE ppcs.ROLL_THICK_TOL_MAX - ppcs.ROLL_THICK_TOL_MIN
                END AS thickDir,
            ppcs.TWO_ROLL_INTERIM_FLAG,
            ppcs.CC_TYPE,
            ppcs.creation_date,
            ppcpa.ORDER_NO_ERP,
            ppcpa.HULL_SECTION_NO,
            ppcpa.SECTION_MANAGE,
            ppcpa.NEED_LECQUERING,
            ppcpa.ORDER_THICK,
            ppcpa.ORDER_WIDTH,
            ppcpa.SG_CODE,
            ppcpa.GIVE_SAMPLE_CODE as giveSampleFlag,
            ppcpa.SAMPLE_LEN_GIVE,
            ppcpa.CONSIGN_CUST_CNAME,
            ppcpa.DELIVY_PLACE_NAME,
            pcmt.HEAT_TREAT_MODE AS hotTreatMethodCode,
            pcmt.SLAB_DEST
        FROM
            PM_PD_CC_SLAB ppcs
                JOIN PM_PRO_CONT_PROD_ATTR ppcpa ON ppcs.ORDER_NO_AXIS = ppcpa.ORDER_NO
                JOIN PM_CONT_MSC_TECH pcmt ON ppcs.ORDER_NO_AXIS = pcmt.ORDER_NO
                AND ppcs.MSC_LINE_NO = pcmt.MSC_LINE_NO
        <where>
            ppcs.PD_STATUS_HP = '12'
            <if test="tenantId !=null">
                and ppcs.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="dto.steelLatestDateFrom !=null">
                and ppcpa.DELIVY_DATE <![CDATA[ >= ]]> #{dto.steelLatestDateFrom}
            </if>
            <if test="dto.steelLatestDateTo !=null">
                and ppcpa.DELIVY_DATE <![CDATA[ <= ]]> #{dto.steelLatestDateTo}
            </if>
            <if test="dto.hotChargeFlag !=null">
                and ppcs.HOT_CHARGE_FLAG = #{dto.hotChargeFlag}
            </if>
            <if test="dto.preCleanSlabThick !=null">
                and ppcs.PRE_CLEAN_SLAB_THICK = #{dto.preCleanSlabThick}
            </if>
            <if test="dto.preCleanSlabWidthFrom !=null">
                and ppcs.PRE_CLEAN_SLAB_WIDTH <![CDATA[ >= ]]> #{dto.preCleanSlabWidthFrom}
            </if>
            <if test="dto.preCleanSlabWidthTo !=null">
                and ppcs.PRE_CLEAN_SLAB_WIDTH <![CDATA[ <= ]]> #{dto.preCleanSlabWidthTo}
            </if>
            <if test="dto.preCleanSlabLenFrom !=null">
                and ppcs.PRE_CLEAN_SLAB_LEN <![CDATA[ >= ]]> #{dto.preCleanSlabLenFrom}
            </if>
            <if test="dto.preCleanSlabLenTo !=null">
                and ppcs.PRE_CLEAN_SLAB_LEN <![CDATA[ <= ]]> #{dto.preCleanSlabLenTo}
            </if>
            <if test="dto.urgOrderFlag !=null">
                and ppcs.URG_ORDER_FLAG = #{dto.urgOrderFlag}
            </if>
            <if test="dto.hotSendFlag !=null">
                and ppcs.HOT_SEND_FLAG = #{dto.hotSendFlag}
            </if>
            <if test="dto.orderNo !=null">
                <bind name="orderNoLike" value="'%' + dto.orderNo + '%'"/>
                and ppcs.ORDER_NO_AXIS like #{orderNoLike}
            </if>
            <if test="outSgNoList != null and outSgNoList.size() != 0">
                and ppcs.ST_NO in
                <foreach collection="outSgNoList" index="index" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>
            </if>
            <if test="dto.mscLineNo !=null">
                <bind name="mscLineNoLike" value="dto.mscLineNo + '%'"/>
                and ppcs.MSC_LINE_NO like #{mscLineNoLike}
            </if>
            <if test="dto.ccType !=null">
                and ppcs.CC_TYPE = #{dto.ccType}
            </if>
            <if test="dto.consignCustCname !=null">
                <bind name="consignCustCnameLike" value="'%' + dto.consignCustCname + '%'"/>
                and ppcpa.CONSIGN_CUST_CNAME like #{consignCustCnameLike}
            </if>
            <if test="dto.hullSectionNoFrom !=null">
                and ppcpa.HULL_SECTION_NO <![CDATA[ >= ]]> #{dto.hullSectionNoFrom}
            </if>
            <if test="dto.hullSectionNoTo !=null">
                and ppcpa.HULL_SECTION_NO <![CDATA[ <= ]]> #{dto.hullSectionNoTo}
            </if>
            <if test="dto.orderNoErp !=null">
                <bind name="orderNoErpLike" value="'%' + dto.orderNoErp + '%'"/>
                and ppcpa.ORDER_NO_ERP like #{orderNoErpLike}
            </if>
            <if test="dto.slabDest !=null">
                and pcmt.SLAB_DEST = #{dto.slabDest}
            </if>
        </where>
    </select>
</mapper>

