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


    <sql id = "BaseSql">
    PWWB.ID,
    PWWB.WHOLE_BACKLOG_CODE,
    PWWB.SLAB_WIDTH_FROM,
    PWWB.SLAB_WIDTH_TO,
    PWWB.SLAB_THICK_FROM,
    PWWB.SLAB_THICK_TO,
    PWWB.CC_TYPE,
    PWWB.FILL_SLAB_LEN_MAX,
    PWWB.FILL_SLAB_LEN_MIN,
    PWWB.UNAPP_SLAB_LEN,
    PWWB.UNAPP_SLAB_LEN_MAX,
    PWWB.UNAPP_SLAB_LEN_MIN,
    PWWB.CAST_HEAD_LEN_MAX,
    PWWB.CAST_HEAD_LEN_MIN,
    PWWB.CAST_TAIL_LEN_MAX,
    PWWB.CAST_TAIL_LEN_MIN,
    PWWB.CAST_HEAD_SLAB_NUM,
    PWWB.CAST_TAIL_SLAB_NUM,
    PWWB.MSC_LINE_NO,
    PWWB.TENANT_ID,
    PWWB.ATTRIBUTE1,
    PWWB.ATTRIBUTE2,
    PWWB.ATTRIBUTE3,
    PWWB.ATTRIBUTE4,
    PWWB.ATTRIBUTE5,
    PWWB.creation_date,    PWWB.created_by,    PWWB.last_updated_by,    PWWB.last_update_date,    PWWB.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmWmWwBt">
        select
        <include refid = "BaseSql"/>
        from PM_WM_WW_BT PWWB
        <where>
            <if test="id !=null">
                and PWWB.ID = #{id,jdbcType = INTEGER}
            </if>
            <if test="wholeBacklogCode !=null">
                and PWWB.WHOLE_BACKLOG_CODE = #{wholeBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="slabWidthFrom !=null">
                and PWWB.SLAB_WIDTH_FROM = #{slabWidthFrom,jdbcType = INTEGER}
            </if>
            <if test="slabWidthTo !=null">
                and PWWB.SLAB_WIDTH_TO = #{slabWidthTo,jdbcType = INTEGER}
            </if>
            <if test="slabThickFrom !=null">
                and PWWB.SLAB_THICK_FROM = #{slabThickFrom,jdbcType = INTEGER}
            </if>
            <if test="slabThickTo !=null">
                and PWWB.SLAB_THICK_TO = #{slabThickTo,jdbcType = INTEGER}
            </if>
            <if test="ccType !=null">
                and PWWB.CC_TYPE = #{ccType,jdbcType = VARCHAR}
            </if>
            <if test="fillSlabLenMax !=null">
                and PWWB.FILL_SLAB_LEN_MAX = #{fillSlabLenMax,jdbcType = INTEGER}
            </if>
            <if test="fillSlabLenMin !=null">
                and PWWB.FILL_SLAB_LEN_MIN = #{fillSlabLenMin,jdbcType = INTEGER}
            </if>
            <if test="unappSlabLen !=null">
                and PWWB.UNAPP_SLAB_LEN = #{unappSlabLen,jdbcType = INTEGER}
            </if>
            <if test="unappSlabLenMax !=null">
                and PWWB.UNAPP_SLAB_LEN_MAX = #{unappSlabLenMax,jdbcType = INTEGER}
            </if>
            <if test="unappSlabLenMin !=null">
                and PWWB.UNAPP_SLAB_LEN_MIN = #{unappSlabLenMin,jdbcType = INTEGER}
            </if>
            <if test="castHeadLenMax !=null">
                and PWWB.CAST_HEAD_LEN_MAX = #{castHeadLenMax,jdbcType = INTEGER}
            </if>
            <if test="castHeadLenMin !=null">
                and PWWB.CAST_HEAD_LEN_MIN = #{castHeadLenMin,jdbcType = INTEGER}
            </if>
            <if test="castTailLenMax !=null">
                and PWWB.CAST_TAIL_LEN_MAX = #{castTailLenMax,jdbcType = INTEGER}
            </if>
            <if test="castTailLenMin !=null">
                and PWWB.CAST_TAIL_LEN_MIN = #{castTailLenMin,jdbcType = INTEGER}
            </if>
            <if test="castHeadSlabNum !=null">
                and PWWB.CAST_HEAD_SLAB_NUM = #{castHeadSlabNum,jdbcType = INTEGER}
            </if>
            <if test="castTailSlabNum !=null">
                and PWWB.CAST_TAIL_SLAB_NUM = #{castTailSlabNum,jdbcType = INTEGER}
            </if>
            <if test="mscLineNo !=null">
                and PWWB.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="tenantId !=null">
                and PWWB.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PWWB.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PWWB.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PWWB.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PWWB.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PWWB.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

