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


    <sql id = "BaseSql">
    PSCF.STEEL_CAST_FLOW_ID,
    PSCF.MAIN_BACKLOG_CODE,
    PSCF.PONO,
    PSCF.HEAT_SLAB_NUM,
    PSCF.SLAB_THICK,
    PSCF.SLAB_WIDTH,
    PSCF.ADJUST_WIDTH_NUM,
    PSCF.UNAPP_SLAB_LEN,
    PSCF.UNAPP_SLAB_LEN_MAX,
    PSCF.UNAPP_SLAB_LEN_MIN,
    PSCF.TENANT_ID,
    PSCF.ATTRIBUTE1,
    PSCF.ATTRIBUTE2,
    PSCF.ATTRIBUTE3,
    PSCF.ATTRIBUTE4,
    PSCF.ATTRIBUTE5,
    PSCF.STRAND_NO,
    PSCF.creation_date,    PSCF.created_by,    PSCF.last_updated_by,    PSCF.last_update_date,    PSCF.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmSteelCastFlow">
        select
        <include refid = "BaseSql"/>
        from PM_STEEL_CAST_FLOW PSCF
        <where>
            <if test="steelCastFlowId !=null">
                and PSCF.STEEL_CAST_FLOW_ID = #{steelCastFlowId,jdbcType = INTEGER}
            </if>
            <if test="mainBacklogCode !=null">
                and PSCF.MAIN_BACKLOG_CODE = #{mainBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="pono !=null">
                and PSCF.PONO = #{pono,jdbcType = VARCHAR}
            </if>
            <if test="heatSlabNum !=null">
                and PSCF.HEAT_SLAB_NUM = #{heatSlabNum,jdbcType = INTEGER}
            </if>
            <if test="slabThick !=null">
                and PSCF.SLAB_THICK = #{slabThick,jdbcType = INTEGER}
            </if>
            <if test="slabWidth !=null">
                and PSCF.SLAB_WIDTH = #{slabWidth,jdbcType = INTEGER}
            </if>
            <if test="adjustWidthNum !=null">
                and PSCF.ADJUST_WIDTH_NUM = #{adjustWidthNum,jdbcType = INTEGER}
            </if>
            <if test="unappSlabLen !=null">
                and PSCF.UNAPP_SLAB_LEN = #{unappSlabLen,jdbcType = INTEGER}
            </if>
            <if test="unappSlabLenMax !=null">
                and PSCF.UNAPP_SLAB_LEN_MAX = #{unappSlabLenMax,jdbcType = INTEGER}
            </if>
            <if test="unappSlabLenMin !=null">
                and PSCF.UNAPP_SLAB_LEN_MIN = #{unappSlabLenMin,jdbcType = INTEGER}
            </if>
            <if test="tenantId !=null">
                and PSCF.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PSCF.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PSCF.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PSCF.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PSCF.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PSCF.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
            <if test="strandNo !=null">
                and PSCF.STRAND_NO = #{strandNo,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

