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


    <sql id = "BaseSql">
    PPWSG.PM_PONO_WT_STATIC_GD_ID,
    PPWSG.WHOLE_BACKLOG_CODE,
    PPWSG.ST_NO_1ST,
    PPWSG.CC_TYPE,
    PPWSG.INGOT_TYPE,
    PPWSG.INGOT_LEN,
    PPWSG.INGOT_WT,
    PPWSG.INGOT_HEAD_THICK,
    PPWSG.INGOT_HEAD_WIDTH,
    PPWSG.INGOT_BOTT_THICK,
    PPWSG.INGOT_BOTT_WIDTH,
    PPWSG.PONO_YIELD,
    PPWSG.STEEL_GRAVITY,
    PPWSG.MSC_LINE_NO,
    PPWSG.TENANT_ID,
    PPWSG.FURNACE_NUM,
    PPWSG.ATTRIBUTE1,
    PPWSG.ATTRIBUTE2,
    PPWSG.ATTRIBUTE3,
    PPWSG.ATTRIBUTE4,
    PPWSG.ATTRIBUTE5,
    PPWSG.creation_date,    PPWSG.created_by,    PPWSG.last_updated_by,    PPWSG.last_update_date,    PPWSG.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmPonoWtStaticGd">
        select
        <include refid = "BaseSql"/>
        from PM_PONO_WT_STATIC_GD PPWSG
        <where>
            <if test="pmPonoWtStaticGdId !=null">
                and PPWSG.PM_PONO_WT_STATIC_GD_ID = #{pmPonoWtStaticGdId,jdbcType = INTEGER}
            </if>
            <if test="wholeBacklogCode !=null">
                and PPWSG.WHOLE_BACKLOG_CODE = #{wholeBacklogCode,jdbcType = VARCHAR}
            </if>
            <if test="stNo1st !=null">
                and PPWSG.ST_NO_1ST = #{stNo1st,jdbcType = VARCHAR}
            </if>
            <if test="ccType !=null">
                and PPWSG.CC_TYPE = #{ccType,jdbcType = VARCHAR}
            </if>
            <if test="ingotType !=null">
                and PPWSG.INGOT_TYPE = #{ingotType,jdbcType = VARCHAR}
            </if>
            <if test="ingotLen !=null">
                and PPWSG.INGOT_LEN = #{ingotLen,jdbcType = INTEGER}
            </if>
            <if test="ingotWt !=null">
                and PPWSG.INGOT_WT = #{ingotWt,jdbcType = INTEGER}
            </if>
            <if test="ingotHeadThick !=null">
                and PPWSG.INGOT_HEAD_THICK = #{ingotHeadThick,jdbcType = INTEGER}
            </if>
            <if test="ingotHeadWidth !=null">
                and PPWSG.INGOT_HEAD_WIDTH = #{ingotHeadWidth,jdbcType = INTEGER}
            </if>
            <if test="ingotBottThick !=null">
                and PPWSG.INGOT_BOTT_THICK = #{ingotBottThick,jdbcType = INTEGER}
            </if>
            <if test="ingotBottWidth !=null">
                and PPWSG.INGOT_BOTT_WIDTH = #{ingotBottWidth,jdbcType = INTEGER}
            </if>
            <if test="ponoYield !=null">
                and PPWSG.PONO_YIELD = #{ponoYield,jdbcType = INTEGER}
            </if>
            <if test="steelGravity !=null">
                and PPWSG.STEEL_GRAVITY = #{steelGravity,jdbcType = INTEGER}
            </if>
            <if test="mscLineNo !=null">
                and PPWSG.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="tenantId !=null">
                and PPWSG.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="furnaceNum !=null">
                and PPWSG.FURNACE_NUM = #{furnaceNum,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PPWSG.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PPWSG.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PPWSG.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PPWSG.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PPWSG.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
        </where>
    </select>
</mapper>

