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


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

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmPonoWtStatic">
        select
        <include refid = "BaseSql"/>
        from PM_PONO_WT_STATIC PPWS
        <where>
            <if test="pmPonoWtStaticId !=null">
                and PPWS.PM_PONO_WT_STATIC_ID = #{pmPonoWtStaticId,jdbcType = INTEGER}
            </if>
            <if test="wholeBacklogCode !=null">
                and PPWS.WHOLE_BACKLOG_CODE = #{wholeBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="stNo1st !=null">
                and PPWS.ST_NO_1ST = #{stNo1st,jdbcType = VARCHAR}
            </if>
            <if test="ccType !=null">
                and PPWS.CC_TYPE = #{ccType,jdbcType = VARCHAR}
            </if>
            <if test="slabThickFrom !=null">
                and PPWS.SLAB_THICK_FROM <![CDATA[ >= ]]> #{slabThickFrom,jdbcType = INTEGER}
            </if>
            <if test="slabThickTo !=null">
                and PPWS.SLAB_THICK_TO <![CDATA[ <= ]]> #{slabThickTo,jdbcType = INTEGER}
            </if>
            <if test="slabWidthFrom !=null">
                and PPWS.SLAB_WIDTH_FROM <![CDATA[ >= ]]> #{slabWidthFrom,jdbcType = INTEGER}
            </if>
            <if test="slabWidthTo !=null">
                and PPWS.SLAB_WIDTH_TO <![CDATA[ <= ]]> #{slabWidthTo,jdbcType = INTEGER}
            </if>
            <if test="ponoYield !=null">
                and PPWS.PONO_YIELD = #{ponoYield,jdbcType = INTEGER}
            </if>
            <if test="steelGravity !=null">
                and PPWS.STEEL_GRAVITY = #{steelGravity,jdbcType = INTEGER}
            </if>
            <if test="mscLineNo !=null">
                and PPWS.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="tenantId !=null">
                and PPWS.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PPWS.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PPWS.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PPWS.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PPWS.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PPWS.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

