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


    <sql id = "BaseSql">
    PHCT.TRA_ID,
    PHCT.OPERATION_TYPE,
    PHCT.OPERATION_USER,
    PHCT.OPERATION_TIME,
    PHCT.ID,
    PHCT.HEAT_TREAT_MODE,
    PHCT.DEFAULT_DEST,
    PHCT.TENANT_ID,
    PHCT.ATTRIBUTE1,
    PHCT.ATTRIBUTE2,
    PHCT.ATTRIBUTE3,
    PHCT.ATTRIBUTE4,
    PHCT.ATTRIBUTE5,
    PHCT.PLATE_THICK_FROM,
    PHCT.PLATE_THICK_TO,
    PHCT.PLATE_WID_FROM,
    PHCT.PLATE_WID_TO,
    PHCT.PLATE_LEN_FROM,
    PHCT.PLATE_LEN_TO,
    PHCT.MSC_LINE_NO,
    PHCT.creation_date,    PHCT.created_by,    PHCT.last_updated_by,    PHCT.last_update_date,    PHCT.object_version_number
    </sql>

    <select id = "selectList" resultType = "com.xisc.pm.domain.entity.PmHotConfigTra">
        select
        <include refid = "BaseSql"/>
        from PM_HOT_CONFIG_TRA PHCT
        <where>
            <if test="traId !=null">
                and PHCT.TRA_ID = #{traId,jdbcType = INTEGER}
            </if>
            <if test="operationType !=null">
                and PHCT.OPERATION_TYPE = #{operationType,jdbcType = VARCHAR}
            </if>
            <if test="operationUser !=null">
                and PHCT.OPERATION_USER = #{operationUser,jdbcType = VARCHAR}
            </if>
            <if test="operationTime !=null">
                and PHCT.OPERATION_TIME = #{operationTime,jdbcType = OTHER}
            </if>
            <if test="id !=null">
                and PHCT.ID = #{id,jdbcType = INTEGER}
            </if>
            <if test="mscLineNo !=null">
                and PHCT.MSC_LINE_NO = #{mscLineNo,jdbcType = VARCHAR}
            </if>
            <if test="heatTreatMode !=null">
                and PHCT.HEAT_TREAT_MODE = #{heatTreatMode,jdbcType = VARCHAR}
            </if>
            <if test="defaultDest !=null">
                and PHCT.DEFAULT_DEST = #{defaultDest,jdbcType = VARCHAR}
            </if>
            <if test="tenantId !=null">
                and PHCT.TENANT_ID = #{tenantId,jdbcType = INTEGER}
            </if>
            <if test="attribute1 !=null">
                and PHCT.ATTRIBUTE1 = #{attribute1,jdbcType = VARCHAR}
            </if>
            <if test="attribute2 !=null">
                and PHCT.ATTRIBUTE2 = #{attribute2,jdbcType = VARCHAR}
            </if>
            <if test="attribute3 !=null">
                and PHCT.ATTRIBUTE3 = #{attribute3,jdbcType = VARCHAR}
            </if>
            <if test="attribute4 !=null">
                and PHCT.ATTRIBUTE4 = #{attribute4,jdbcType = VARCHAR}
            </if>
            <if test="attribute5 !=null">
                and PHCT.ATTRIBUTE5 = #{attribute5,jdbcType = VARCHAR}
            </if>
            <if test="plateThickFrom !=null">
                and PHCT.PLATE_THICK_FROM = #{plateThickFrom,jdbcType = INTEGER}
            </if>
            <if test="plateThickTo !=null">
                and PHCT.PLATE_THICK_TO = #{plateThickTo,jdbcType = INTEGER}
            </if>
            <if test="plateWidFrom !=null">
                and PHCT.PLATE_WID_FROM = #{plateWidFrom,jdbcType = INTEGER}
            </if>
            <if test="plateWidTo !=null">
                and PHCT.PLATE_WID_TO = #{plateWidTo,jdbcType = INTEGER}
            </if>
            <if test="plateLenFrom !=null">
                and PHCT.PLATE_LEN_FROM = #{plateLenFrom,jdbcType = INTEGER}
            </if>
            <if test="plateLenTo !=null">
                and PHCT.PLATE_LEN_TO = #{plateLenTo,jdbcType = INTEGER}
            </if>
        </where>
    </select>
</mapper>

