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


    <sql id = "BaseSql">
    PPCB.PPCB_ID,
    PPCB.ROLL_LINE_NO,
    PPCB.MAX_TURN_LEN,
    PPCB.MIN_FOMR_PRESS_DOWN,
    PPCB.COOL_BOX_MAX_LEN,
    PPCB.SLAB_CUT_GAP,
    PPCB.MIN_THICK_FORM_MAS,
    PPCB.MIN_THICK_BROAD_MAS,
    PPCB.MIN_BROAD_RATIO_MAS,
    PPCB.MIN_P_THICK_EDGER,
    PPCB.MAX_P_THICK_EDGER,
    PPCB.MAX_P_WIDTH_EDGER,
    PPCB.MIN_P_WIDTH_EDGER,
    PPCB.MIN_S_THICK_EDGER,
    PPCB.MAX_S_THICK_EDGER,
    PPCB.MAX_S_WIDTH_EDGER,
    PPCB.MIN_S_WIDTH_EDGER,
    PPCB.MAX_THIN_P_THICK_NOEDGER,
    PPCB.SLAB_LEN_RS0_RS1,
    PPCB.HPM_MIN_P_LEN,
    PPCB.HPM_MAX_P_LEN,
    PPCB.HPM_MIN_P_WIDTH,
    PPCB.HPM_MAX_P_WIDTH,
    PPCB.TENANT_ID,
    PPCB.ATTRIBUTE1,
    PPCB.ATTRIBUTE2,
    PPCB.ATTRIBUTE3,
    PPCB.ATTRIBUTE4,
    PPCB.ATTRIBUTE5,
    PPCB.creation_date,    PPCB.created_by,    PPCB.last_updated_by,    PPCB.last_update_date,    PPCB.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmPdConstBt">
        select
        <include refid = "BaseSql"/>
        from PM_PD_CONST_BT PPCB
        <where>
            <if test="ppcbId !=null">
                and PPCB.PPCB_ID = #{ppcbId,jdbcType = INTEGER}
            </if>
            <if test="rollLineNo !=null">
                and PPCB.ROLL_LINE_NO = #{rollLineNo,jdbcType = VARCHAR}
            </if>
            <if test="maxTurnLen !=null">
                and PPCB.MAX_TURN_LEN = #{maxTurnLen,jdbcType = INTEGER}
            </if>
            <if test="minFomrPressDown !=null">
                and PPCB.MIN_FOMR_PRESS_DOWN = #{minFomrPressDown,jdbcType = INTEGER}
            </if>
            <if test="coolBoxMaxLen !=null">
                and PPCB.COOL_BOX_MAX_LEN = #{coolBoxMaxLen,jdbcType = INTEGER}
            </if>
            <if test="slabCutGap !=null">
                and PPCB.SLAB_CUT_GAP = #{slabCutGap,jdbcType = INTEGER}
            </if>
            <if test="minThickFormMas !=null">
                and PPCB.MIN_THICK_FORM_MAS = #{minThickFormMas,jdbcType = INTEGER}
            </if>
            <if test="minThickBroadMas !=null">
                and PPCB.MIN_THICK_BROAD_MAS = #{minThickBroadMas,jdbcType = INTEGER}
            </if>
            <if test="minBroadRatioMas !=null">
                and PPCB.MIN_BROAD_RATIO_MAS = #{minBroadRatioMas,jdbcType = INTEGER}
            </if>
            <if test="minPThickEdger !=null">
                and PPCB.MIN_P_THICK_EDGER = #{minPThickEdger,jdbcType = INTEGER}
            </if>
            <if test="maxPThickEdger !=null">
                and PPCB.MAX_P_THICK_EDGER = #{maxPThickEdger,jdbcType = INTEGER}
            </if>
            <if test="maxPWidthEdger !=null">
                and PPCB.MAX_P_WIDTH_EDGER = #{maxPWidthEdger,jdbcType = INTEGER}
            </if>
            <if test="minPWidthEdger !=null">
                and PPCB.MIN_P_WIDTH_EDGER = #{minPWidthEdger,jdbcType = INTEGER}
            </if>
            <if test="minSThickEdger !=null">
                and PPCB.MIN_S_THICK_EDGER = #{minSThickEdger,jdbcType = INTEGER}
            </if>
            <if test="maxSThickEdger !=null">
                and PPCB.MAX_S_THICK_EDGER = #{maxSThickEdger,jdbcType = INTEGER}
            </if>
            <if test="maxSWidthEdger !=null">
                and PPCB.MAX_S_WIDTH_EDGER = #{maxSWidthEdger,jdbcType = INTEGER}
            </if>
            <if test="minSWidthEdger !=null">
                and PPCB.MIN_S_WIDTH_EDGER = #{minSWidthEdger,jdbcType = INTEGER}
            </if>
            <if test="maxThinPThickNoedger !=null">
                and PPCB.MAX_THIN_P_THICK_NOEDGER = #{maxThinPThickNoedger,jdbcType = INTEGER}
            </if>
            <if test="slabLenRs0Rs1 !=null">
                and PPCB.SLAB_LEN_RS0_RS1 = #{slabLenRs0Rs1,jdbcType = INTEGER}
            </if>
            <if test="hpmMinPLen !=null">
                and PPCB.HPM_MIN_P_LEN = #{hpmMinPLen,jdbcType = INTEGER}
            </if>
            <if test="hpmMaxPLen !=null">
                and PPCB.HPM_MAX_P_LEN = #{hpmMaxPLen,jdbcType = INTEGER}
            </if>
            <if test="hpmMinPWidth !=null">
                and PPCB.HPM_MIN_P_WIDTH = #{hpmMinPWidth,jdbcType = INTEGER}
            </if>
            <if test="hpmMaxPWidth !=null">
                and PPCB.HPM_MAX_P_WIDTH = #{hpmMaxPWidth,jdbcType = INTEGER}
            </if>
            <if test="tenantId !=null">
                and PPCB.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PPCB.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PPCB.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PPCB.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PPCB.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PPCB.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

