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


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

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

