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


    <sql id = "BaseSql">
    PPWST.TRA_ID,
    PPWST.OPERATION_TYPE,
    PPWST.OPERATION_USER,
    PPWST.OPERATION_TIME,
    PPWST.PM_PONO_WT_STATIC_ID,
    PPWST.WHOLE_BACKLOG_CODE,
    PPWST.ST_NO_1ST,
    PPWST.CC_TYPE,
    PPWST.SLAB_THICK_FROM,
    PPWST.SLAB_THICK_TO,
    PPWST.SLAB_WIDTH_FROM,
    PPWST.SLAB_WIDTH_TO,
    PPWST.PONO_YIELD,
    PPWST.STEEL_GRAVITY,
    PPWST.MSC_LINE_NO,
    PPWST.TENANT_ID,
    PPWST.ATTRIBUTE1,
    PPWST.ATTRIBUTE2,
    PPWST.ATTRIBUTE3,
    PPWST.ATTRIBUTE4,
    PPWST.ATTRIBUTE5,
    PPWST.creation_date,    PPWST.created_by,    PPWST.last_updated_by,    PPWST.last_update_date,    PPWST.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmPonoWtStaticTra">
        select
        <include refid = "BaseSql"/>
        from PM_PONO_WT_STATIC_TRA PPWST
        <where>
            <if test="traId !=null">
                and PPWST.TRA_ID = #{traId,jdbcType = INTEGER}
            </if>
            <if test="operationType !=null">
                and PPWST.OPERATION_TYPE = #{operationType,jdbcType = VARCHAR}
            </if>
            <if test="operationUser !=null">
                and PPWST.OPERATION_USER = #{operationUser,jdbcType = VARCHAR}
            </if>
            <if test="operationTime !=null">
                and PPWST.OPERATION_TIME = #{operationTime,jdbcType = OTHER}
            </if>
            <if test="pmPonoWtStaticId !=null">
                and PPWST.PM_PONO_WT_STATIC_ID = #{pmPonoWtStaticId,jdbcType = INTEGER}
            </if>
            <if test="wholeBacklogCode !=null">
                and PPWST.WHOLE_BACKLOG_CODE = #{wholeBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="stNo1st !=null">
                and PPWST.ST_NO_1ST = #{stNo1st,jdbcType = VARCHAR}
            </if>
            <if test="ccType !=null">
                and PPWST.CC_TYPE = #{ccType,jdbcType = VARCHAR}
            </if>
            <if test="slabThickFrom !=null">
                and PPWST.SLAB_THICK_FROM = #{slabThickFrom,jdbcType = INTEGER}
            </if>
            <if test="slabThickTo !=null">
                and PPWST.SLAB_THICK_TO = #{slabThickTo,jdbcType = INTEGER}
            </if>
            <if test="slabWidthFrom !=null">
                and PPWST.SLAB_WIDTH_FROM = #{slabWidthFrom,jdbcType = INTEGER}
            </if>
            <if test="slabWidthTo !=null">
                and PPWST.SLAB_WIDTH_TO = #{slabWidthTo,jdbcType = INTEGER}
            </if>
            <if test="ponoYield !=null">
                and PPWST.PONO_YIELD = #{ponoYield,jdbcType = INTEGER}
            </if>
            <if test="steelGravity !=null">
                and PPWST.STEEL_GRAVITY = #{steelGravity,jdbcType = INTEGER}
            </if>
            <if test="mscLineNo !=null">
                and PPWST.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="tenantId !=null">
                and PPWST.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PPWST.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PPWST.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PPWST.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PPWST.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PPWST.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

