<?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.ruoyi.project.monitor.mapper.TPfdMapper">
    
    <resultMap type="TPfd" id="TPfdResult">
        <result property="id"    column="id"    />
        <result property="code"    column="code"    />
        <result property="h2o"    column="h2o"    />
        <result property="hydrogen"    column="hydrogen"    />
        <result property="co"    column="co"    />
        <result property="methane"    column="methane"    />
        <result property="acetyln"    column="acetyln"    />
        <result property="ethylene"    column="ethylene"    />
        <result property="ethane"    column="ethane"    />
        <result property="macetyln"    column="macetyln"    />
        <result property="propdien"    column="propdien"    />
        <result property="propylen"    column="propylen"    />
        <result property="propane"    column="propane"    />
        <result property="butd13"    column="butd13"    />
        <result property="butene1"    column="butene1"    />
        <result property="ibte"    column="ibte"    />
        <result property="c2butene"    column="c2butene"    />
        <result property="t2butene"    column="t2butene"    />
        <result property="ibutane"    column="ibutane"    />
        <result property="butane"    column="butane"    />
        <result property="cpd13"    column="cpd13"    />
        <result property="isoprene"    column="isoprene"    />
        <result property="c13pnd"    column="c13pnd"    />
        <result property="pentene1"    column="pentene1"    />
        <result property="ipentane"    column="ipentane"    />
        <result property="pentane"    column="pentane"    />
        <result property="hexene1"    column="hexene1"    />
        <result property="benzene"    column="benzene"    />
        <result property="toluene"    column="toluene"    />
        <result property="oxylene"    column="oxylene"    />
        <result property="c9200c"    column="c9_200c"    />
        <result property="fuelOil"    column="fuel_oil"    />
        <result property="co2"    column="co2"    />
        <result property="h2s"    column="h2s"    />
        <result property="nbp25"    column="nbp25"    />
        <result property="nbp58"    column="nbp58"    />
        <result property="nbp72"    column="nbp72"    />
        <result property="nbp86"    column="nbp86"    />
        <result property="nbp100"    column="nbp100"    />
        <result property="nbp114"    column="nbp114"    />
        <result property="nbp128"    column="nbp128"    />
        <result property="nbp141"    column="nbp141"    />
        <result property="nbp155"    column="nbp155"    />
        <result property="nbp169"    column="nbp169"    />
        <result property="nbp183"    column="nbp183"    />
        <result property="nbp199"    column="nbp199"    />
        <result property="nbp207"    column="nbp207"    />
        <result property="nbp222"    column="nbp222"    />
        <result property="nbp236"    column="nbp236"    />
        <result property="nbp249"    column="nbp249"    />
        <result property="totalMolarFlowrate"    column="total_molar_flowrate"    />
        <result property="totalMassFlowrate"    column="total_mass_flowrate"    />
        <result property="totalMolecularWeight"    column="total_molecular_weight"    />
        <result property="temperature"    column="temperature"    />
        <result property="pressure"    column="pressure"    />
        <result property="vaporMassFlowrate"    column="vapor_mass_flowrate"    />
        <result property="vaporMolecularWeight"    column="vapor_molecular_weight"    />
        <result property="vaporDensityAct"    column="vapor_density_act"    />
        <result property="vaporZ"    column="vapor_z"    />
        <result property="vaporActVolFlow"    column="vapor_act_vol_flow"    />
        <result property="vaporHtCapacity"    column="vapor_ht_capacity"    />
        <result property="vaporViscosity"    column="vapor_viscosity"    />
        <result property="liquidMassFlowrate"    column="liquid_mass_flowrate"    />
        <result property="liquidMolecularWeight"    column="liquid_molecular_weight"    />
        <result property="liquidDensityAct"    column="liquid_density_act"    />
        <result property="liquidActVolFlow"    column="liquid_act_vol_flow"    />
        <result property="liquidHtCapacity"    column="liquid_ht_capacity"    />
        <result property="liquidViscosity"    column="liquid_viscosity"    />
        <result property="liquidSurfTension"    column="liquid_surf_tension"    />
        <result property="delFlag"    column="del_flag"    />
        <result property="createBy"    column="create_by"    />
        <result property="createTime"    column="create_time"    />
        <result property="updateBy"    column="update_by"    />
        <result property="updateTime"    column="update_time"    />
        <result property="deptId"    column="dept_id"    />
        <result property="deptName" column="dept_name" />
        <result property="description" column="description" />
    </resultMap>

    <sql id="selectTPfdVo">
        select d.id, d.description, d.code, d.h2o, d.hydrogen, d.co, d.methane, d.acetyln, d.ethylene, d.ethane, d.macetyln, d.propdien, d.propylen, d.propane, d.butd13, d.butene1, d.ibte, d.c2butene, d.t2butene, d.ibutane, d.butane, d.cpd13, d.isoprene, d.c13pnd, d.pentene1, d.ipentane, d.pentane, d.hexene1, d.benzene, d.toluene, d.oxylene, d.c9_200c, d.fuel_oil, d.co2, d.h2s, d.nbp25, d.nbp58, d.nbp72, d.nbp86, d.nbp100, d.nbp114, d.nbp128, d.nbp141, d.nbp155, d.nbp169, d.nbp183, d.nbp199, d.nbp207, d.nbp222, d.nbp236, d.nbp249, d.total_molar_flowrate, d.total_mass_flowrate, d.total_molecular_weight, d.temperature, d.pressure, d.vapor_mass_flowrate, d.vapor_molecular_weight, d.vapor_density_act, d.vapor_z, d.vapor_act_vol_flow, d.vapor_ht_capacity, d.vapor_viscosity, d.liquid_mass_flowrate, d.liquid_molecular_weight, d.liquid_density_act, d.liquid_act_vol_flow, d.liquid_ht_capacity, d.liquid_viscosity, d.liquid_surf_tension, d.del_flag, d.create_by, d.create_time, d.update_by, d.update_time, d.dept_id from t_pfd d
      left join sys_dept s on s.dept_id = d.dept_id
    </sql>

    <select id="selectTPfdList" parameterType="TPfd" resultMap="TPfdResult">
        <include refid="selectTPfdVo"/>
        <where>  
            <if test="code != null  and code != ''"> and code = #{code}</if>
            <if test="h2o != null  and h2o != ''"> and h2o = #{h2o}</if>
            <if test="hydrogen != null  and hydrogen != ''"> and hydrogen = #{hydrogen}</if>
            <if test="co != null  and co != ''"> and co = #{co}</if>
            <if test="methane != null  and methane != ''"> and methane = #{methane}</if>
            <if test="acetyln != null  and acetyln != ''"> and acetyln = #{acetyln}</if>
            <if test="ethylene != null  and ethylene != ''"> and ethylene = #{ethylene}</if>
            <if test="ethane != null  and ethane != ''"> and ethane = #{ethane}</if>
            <if test="macetyln != null  and macetyln != ''"> and macetyln = #{macetyln}</if>
            <if test="propdien != null  and propdien != ''"> and propdien = #{propdien}</if>
            <if test="propylen != null  and propylen != ''"> and propylen = #{propylen}</if>
            <if test="propane != null  and propane != ''"> and propane = #{propane}</if>
            <if test="butd13 != null  and butd13 != ''"> and butd13 = #{butd13}</if>
            <if test="butene1 != null  and butene1 != ''"> and butene1 = #{butene1}</if>
            <if test="ibte != null  and ibte != ''"> and ibte = #{ibte}</if>
            <if test="c2butene != null  and c2butene != ''"> and c2butene = #{c2butene}</if>
            <if test="t2butene != null  and t2butene != ''"> and t2butene = #{t2butene}</if>
            <if test="ibutane != null  and ibutane != ''"> and ibutane = #{ibutane}</if>
            <if test="butane != null  and butane != ''"> and butane = #{butane}</if>
            <if test="cpd13 != null  and cpd13 != ''"> and cpd13 = #{cpd13}</if>
            <if test="isoprene != null  and isoprene != ''"> and isoprene = #{isoprene}</if>
            <if test="c13pnd != null  and c13pnd != ''"> and c13pnd = #{c13pnd}</if>
            <if test="pentene1 != null  and pentene1 != ''"> and pentene1 = #{pentene1}</if>
            <if test="ipentane != null  and ipentane != ''"> and ipentane = #{ipentane}</if>
            <if test="pentane != null  and pentane != ''"> and pentane = #{pentane}</if>
            <if test="hexene1 != null  and hexene1 != ''"> and hexene1 = #{hexene1}</if>
            <if test="benzene != null  and benzene != ''"> and benzene = #{benzene}</if>
            <if test="toluene != null  and toluene != ''"> and toluene = #{toluene}</if>
            <if test="oxylene != null  and oxylene != ''"> and oxylene = #{oxylene}</if>
            <if test="c9200c != null  and c9200c != ''"> and c9_200c = #{c9200c}</if>
            <if test="fuelOil != null  and fuelOil != ''"> and fuel_oil = #{fuelOil}</if>
            <if test="co2 != null  and co2 != ''"> and co2 = #{co2}</if>
            <if test="h2s != null  and h2s != ''"> and h2s = #{h2s}</if>
            <if test="nbp25 != null  and nbp25 != ''"> and nbp25 = #{nbp25}</if>
            <if test="nbp58 != null  and nbp58 != ''"> and nbp58 = #{nbp58}</if>
            <if test="nbp72 != null  and nbp72 != ''"> and nbp72 = #{nbp72}</if>
            <if test="nbp86 != null  and nbp86 != ''"> and nbp86 = #{nbp86}</if>
            <if test="nbp100 != null  and nbp100 != ''"> and nbp100 = #{nbp100}</if>
            <if test="nbp114 != null  and nbp114 != ''"> and nbp114 = #{nbp114}</if>
            <if test="nbp128 != null  and nbp128 != ''"> and nbp128 = #{nbp128}</if>
            <if test="nbp141 != null  and nbp141 != ''"> and nbp141 = #{nbp141}</if>
            <if test="nbp155 != null  and nbp155 != ''"> and nbp155 = #{nbp155}</if>
            <if test="nbp169 != null  and nbp169 != ''"> and nbp169 = #{nbp169}</if>
            <if test="nbp183 != null  and nbp183 != ''"> and nbp183 = #{nbp183}</if>
            <if test="nbp199 != null  and nbp199 != ''"> and nbp199 = #{nbp199}</if>
            <if test="nbp207 != null  and nbp207 != ''"> and nbp207 = #{nbp207}</if>
            <if test="nbp222 != null  and nbp222 != ''"> and nbp222 = #{nbp222}</if>
            <if test="nbp236 != null  and nbp236 != ''"> and nbp236 = #{nbp236}</if>
            <if test="nbp249 != null  and nbp249 != ''"> and nbp249 = #{nbp249}</if>
            <if test="totalMolarFlowrate != null  and totalMolarFlowrate != ''"> and total_molar_flowrate = #{totalMolarFlowrate}</if>
            <if test="totalMassFlowrate != null  and totalMassFlowrate != ''"> and total_mass_flowrate = #{totalMassFlowrate}</if>
            <if test="totalMolecularWeight != null  and totalMolecularWeight != ''"> and total_molecular_weight = #{totalMolecularWeight}</if>
            <if test="temperature != null  and temperature != ''"> and temperature = #{temperature}</if>
            <if test="pressure != null  and pressure != ''"> and pressure = #{pressure}</if>
            <if test="vaporMassFlowrate != null  and vaporMassFlowrate != ''"> and vapor_mass_flowrate = #{vaporMassFlowrate}</if>
            <if test="vaporMolecularWeight != null  and vaporMolecularWeight != ''"> and vapor_molecular_weight = #{vaporMolecularWeight}</if>
            <if test="vaporDensityAct != null  and vaporDensityAct != ''"> and vapor_density_act = #{vaporDensityAct}</if>
            <if test="vaporZ != null  and vaporZ != ''"> and vapor_z = #{vaporZ}</if>
            <if test="vaporActVolFlow != null  and vaporActVolFlow != ''"> and vapor_act_vol_flow = #{vaporActVolFlow}</if>
            <if test="vaporHtCapacity != null  and vaporHtCapacity != ''"> and vapor_ht_capacity = #{vaporHtCapacity}</if>
            <if test="vaporViscosity != null  and vaporViscosity != ''"> and vapor_viscosity = #{vaporViscosity}</if>
            <if test="liquidMassFlowrate != null  and liquidMassFlowrate != ''"> and liquid_mass_flowrate = #{liquidMassFlowrate}</if>
            <if test="liquidMolecularWeight != null  and liquidMolecularWeight != ''"> and liquid_molecular_weight = #{liquidMolecularWeight}</if>
            <if test="liquidDensityAct != null  and liquidDensityAct != ''"> and liquid_density_act = #{liquidDensityAct}</if>
            <if test="liquidActVolFlow != null  and liquidActVolFlow != ''"> and liquid_act_vol_flow = #{liquidActVolFlow}</if>
            <if test="liquidHtCapacity != null  and liquidHtCapacity != ''"> and liquid_ht_capacity = #{liquidHtCapacity}</if>
            <if test="liquidViscosity != null  and liquidViscosity != ''"> and liquid_viscosity = #{liquidViscosity}</if>
            <if test="liquidSurfTension != null  and liquidSurfTension != ''"> and liquid_surf_tension = #{liquidSurfTension}</if>
            <if test="deptId != null "> and dept_id = #{deptId}</if>
            and d.del_flag = 0
        </where>
        <!-- 数据范围过滤 -->
        ${params.dataScope}
    </select>

    <select id="selectTPfdByCode" parameterType="String" resultMap="TPfdResult">
        <include refid="selectTPfdVo"/>
        where d.code = #{code} and d.del_flag = 0
    </select>

    <select id="selectTPfdById" parameterType="Long" resultMap="TPfdResult">
        <include refid="selectTPfdVo"/>
        where id = #{id}
    </select>
        
    <insert id="insertTPfd" parameterType="TPfd">
        <selectKey keyProperty="id" resultType="long" order="BEFORE">
            SELECT seq_t_pfd.NEXTVAL as id FROM DUAL
        </selectKey>
        insert into t_pfd
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="id != null">id,</if>
            <if test="code != null">code,</if>
            <if test="h2o != null">h2o,</if>
            <if test="hydrogen != null">hydrogen,</if>
            <if test="co != null">co,</if>
            <if test="methane != null">methane,</if>
            <if test="acetyln != null">acetyln,</if>
            <if test="ethylene != null">ethylene,</if>
            <if test="ethane != null">ethane,</if>
            <if test="macetyln != null">macetyln,</if>
            <if test="propdien != null">propdien,</if>
            <if test="propylen != null">propylen,</if>
            <if test="propane != null">propane,</if>
            <if test="butd13 != null">butd13,</if>
            <if test="butene1 != null">butene1,</if>
            <if test="ibte != null">ibte,</if>
            <if test="c2butene != null">c2butene,</if>
            <if test="t2butene != null">t2butene,</if>
            <if test="ibutane != null">ibutane,</if>
            <if test="butane != null">butane,</if>
            <if test="cpd13 != null">cpd13,</if>
            <if test="isoprene != null">isoprene,</if>
            <if test="c13pnd != null">c13pnd,</if>
            <if test="pentene1 != null">pentene1,</if>
            <if test="ipentane != null">ipentane,</if>
            <if test="pentane != null">pentane,</if>
            <if test="hexene1 != null">hexene1,</if>
            <if test="benzene != null">benzene,</if>
            <if test="toluene != null">toluene,</if>
            <if test="oxylene != null">oxylene,</if>
            <if test="c9200c != null">c9_200c,</if>
            <if test="fuelOil != null">fuel_oil,</if>
            <if test="co2 != null">co2,</if>
            <if test="h2s != null">h2s,</if>
            <if test="nbp25 != null">nbp25,</if>
            <if test="nbp58 != null">nbp58,</if>
            <if test="nbp72 != null">nbp72,</if>
            <if test="nbp86 != null">nbp86,</if>
            <if test="nbp100 != null">nbp100,</if>
            <if test="nbp114 != null">nbp114,</if>
            <if test="nbp128 != null">nbp128,</if>
            <if test="nbp141 != null">nbp141,</if>
            <if test="nbp155 != null">nbp155,</if>
            <if test="nbp169 != null">nbp169,</if>
            <if test="nbp183 != null">nbp183,</if>
            <if test="nbp199 != null">nbp199,</if>
            <if test="nbp207 != null">nbp207,</if>
            <if test="nbp222 != null">nbp222,</if>
            <if test="nbp236 != null">nbp236,</if>
            <if test="nbp249 != null">nbp249,</if>
            <if test="totalMolarFlowrate != null">total_molar_flowrate,</if>
            <if test="totalMassFlowrate != null">total_mass_flowrate,</if>
            <if test="totalMolecularWeight != null">total_molecular_weight,</if>
            <if test="temperature != null">temperature,</if>
            <if test="pressure != null">pressure,</if>
            <if test="vaporMassFlowrate != null">vapor_mass_flowrate,</if>
            <if test="vaporMolecularWeight != null">vapor_molecular_weight,</if>
            <if test="vaporDensityAct != null">vapor_density_act,</if>
            <if test="vaporZ != null">vapor_z,</if>
            <if test="vaporActVolFlow != null">vapor_act_vol_flow,</if>
            <if test="vaporHtCapacity != null">vapor_ht_capacity,</if>
            <if test="vaporViscosity != null">vapor_viscosity,</if>
            <if test="liquidMassFlowrate != null">liquid_mass_flowrate,</if>
            <if test="liquidMolecularWeight != null">liquid_molecular_weight,</if>
            <if test="liquidDensityAct != null">liquid_density_act,</if>
            <if test="liquidActVolFlow != null">liquid_act_vol_flow,</if>
            <if test="liquidHtCapacity != null">liquid_ht_capacity,</if>
            <if test="liquidViscosity != null">liquid_viscosity,</if>
            <if test="liquidSurfTension != null">liquid_surf_tension,</if>
            <if test="delFlag != null">del_flag,</if>
            <if test="createBy != null">create_by,</if>
            <if test="createTime != null">create_time,</if>
            <if test="updateBy != null">update_by,</if>
            <if test="updateTime != null">update_time,</if>
            <if test="deptId != null">dept_id,</if>
            <if test="description != null">description,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="id != null">#{id},</if>
            <if test="code != null">#{code},</if>
            <if test="h2o != null">#{h2o},</if>
            <if test="hydrogen != null">#{hydrogen},</if>
            <if test="co != null">#{co},</if>
            <if test="methane != null">#{methane},</if>
            <if test="acetyln != null">#{acetyln},</if>
            <if test="ethylene != null">#{ethylene},</if>
            <if test="ethane != null">#{ethane},</if>
            <if test="macetyln != null">#{macetyln},</if>
            <if test="propdien != null">#{propdien},</if>
            <if test="propylen != null">#{propylen},</if>
            <if test="propane != null">#{propane},</if>
            <if test="butd13 != null">#{butd13},</if>
            <if test="butene1 != null">#{butene1},</if>
            <if test="ibte != null">#{ibte},</if>
            <if test="c2butene != null">#{c2butene},</if>
            <if test="t2butene != null">#{t2butene},</if>
            <if test="ibutane != null">#{ibutane},</if>
            <if test="butane != null">#{butane},</if>
            <if test="cpd13 != null">#{cpd13},</if>
            <if test="isoprene != null">#{isoprene},</if>
            <if test="c13pnd != null">#{c13pnd},</if>
            <if test="pentene1 != null">#{pentene1},</if>
            <if test="ipentane != null">#{ipentane},</if>
            <if test="pentane != null">#{pentane},</if>
            <if test="hexene1 != null">#{hexene1},</if>
            <if test="benzene != null">#{benzene},</if>
            <if test="toluene != null">#{toluene},</if>
            <if test="oxylene != null">#{oxylene},</if>
            <if test="c9200c != null">#{c9200c},</if>
            <if test="fuelOil != null">#{fuelOil},</if>
            <if test="co2 != null">#{co2},</if>
            <if test="h2s != null">#{h2s},</if>
            <if test="nbp25 != null">#{nbp25},</if>
            <if test="nbp58 != null">#{nbp58},</if>
            <if test="nbp72 != null">#{nbp72},</if>
            <if test="nbp86 != null">#{nbp86},</if>
            <if test="nbp100 != null">#{nbp100},</if>
            <if test="nbp114 != null">#{nbp114},</if>
            <if test="nbp128 != null">#{nbp128},</if>
            <if test="nbp141 != null">#{nbp141},</if>
            <if test="nbp155 != null">#{nbp155},</if>
            <if test="nbp169 != null">#{nbp169},</if>
            <if test="nbp183 != null">#{nbp183},</if>
            <if test="nbp199 != null">#{nbp199},</if>
            <if test="nbp207 != null">#{nbp207},</if>
            <if test="nbp222 != null">#{nbp222},</if>
            <if test="nbp236 != null">#{nbp236},</if>
            <if test="nbp249 != null">#{nbp249},</if>
            <if test="totalMolarFlowrate != null">#{totalMolarFlowrate},</if>
            <if test="totalMassFlowrate != null">#{totalMassFlowrate},</if>
            <if test="totalMolecularWeight != null">#{totalMolecularWeight},</if>
            <if test="temperature != null">#{temperature},</if>
            <if test="pressure != null">#{pressure},</if>
            <if test="vaporMassFlowrate != null">#{vaporMassFlowrate},</if>
            <if test="vaporMolecularWeight != null">#{vaporMolecularWeight},</if>
            <if test="vaporDensityAct != null">#{vaporDensityAct},</if>
            <if test="vaporZ != null">#{vaporZ},</if>
            <if test="vaporActVolFlow != null">#{vaporActVolFlow},</if>
            <if test="vaporHtCapacity != null">#{vaporHtCapacity},</if>
            <if test="vaporViscosity != null">#{vaporViscosity},</if>
            <if test="liquidMassFlowrate != null">#{liquidMassFlowrate},</if>
            <if test="liquidMolecularWeight != null">#{liquidMolecularWeight},</if>
            <if test="liquidDensityAct != null">#{liquidDensityAct},</if>
            <if test="liquidActVolFlow != null">#{liquidActVolFlow},</if>
            <if test="liquidHtCapacity != null">#{liquidHtCapacity},</if>
            <if test="liquidViscosity != null">#{liquidViscosity},</if>
            <if test="liquidSurfTension != null">#{liquidSurfTension},</if>
            <if test="delFlag != null">#{delFlag},</if>
            <if test="createBy != null">#{createBy},</if>
            <if test="createTime != null">#{createTime},</if>
            <if test="updateBy != null">#{updateBy},</if>
            <if test="updateTime != null">#{updateTime},</if>
            <if test="deptId != null">#{deptId},</if>
            <if test="description != null">#{description},</if>
         </trim>
    </insert>

    <update id="updateTPfd" parameterType="TPfd">
        update t_pfd
        <trim prefix="SET" suffixOverrides=",">
            <if test="code != null">code = #{code},</if>
            <if test="h2o != null">h2o = #{h2o},</if>
            <if test="hydrogen != null">hydrogen = #{hydrogen},</if>
            <if test="co != null">co = #{co},</if>
            <if test="methane != null">methane = #{methane},</if>
            <if test="acetyln != null">acetyln = #{acetyln},</if>
            <if test="ethylene != null">ethylene = #{ethylene},</if>
            <if test="ethane != null">ethane = #{ethane},</if>
            <if test="macetyln != null">macetyln = #{macetyln},</if>
            <if test="propdien != null">propdien = #{propdien},</if>
            <if test="propylen != null">propylen = #{propylen},</if>
            <if test="propane != null">propane = #{propane},</if>
            <if test="butd13 != null">butd13 = #{butd13},</if>
            <if test="butene1 != null">butene1 = #{butene1},</if>
            <if test="ibte != null">ibte = #{ibte},</if>
            <if test="c2butene != null">c2butene = #{c2butene},</if>
            <if test="t2butene != null">t2butene = #{t2butene},</if>
            <if test="ibutane != null">ibutane = #{ibutane},</if>
            <if test="butane != null">butane = #{butane},</if>
            <if test="cpd13 != null">cpd13 = #{cpd13},</if>
            <if test="isoprene != null">isoprene = #{isoprene},</if>
            <if test="c13pnd != null">c13pnd = #{c13pnd},</if>
            <if test="pentene1 != null">pentene1 = #{pentene1},</if>
            <if test="ipentane != null">ipentane = #{ipentane},</if>
            <if test="pentane != null">pentane = #{pentane},</if>
            <if test="hexene1 != null">hexene1 = #{hexene1},</if>
            <if test="benzene != null">benzene = #{benzene},</if>
            <if test="toluene != null">toluene = #{toluene},</if>
            <if test="oxylene != null">oxylene = #{oxylene},</if>
            <if test="c9200c != null">c9_200c = #{c9200c},</if>
            <if test="fuelOil != null">fuel_oil = #{fuelOil},</if>
            <if test="co2 != null">co2 = #{co2},</if>
            <if test="h2s != null">h2s = #{h2s},</if>
            <if test="nbp25 != null">nbp25 = #{nbp25},</if>
            <if test="nbp58 != null">nbp58 = #{nbp58},</if>
            <if test="nbp72 != null">nbp72 = #{nbp72},</if>
            <if test="nbp86 != null">nbp86 = #{nbp86},</if>
            <if test="nbp100 != null">nbp100 = #{nbp100},</if>
            <if test="nbp114 != null">nbp114 = #{nbp114},</if>
            <if test="nbp128 != null">nbp128 = #{nbp128},</if>
            <if test="nbp141 != null">nbp141 = #{nbp141},</if>
            <if test="nbp155 != null">nbp155 = #{nbp155},</if>
            <if test="nbp169 != null">nbp169 = #{nbp169},</if>
            <if test="nbp183 != null">nbp183 = #{nbp183},</if>
            <if test="nbp199 != null">nbp199 = #{nbp199},</if>
            <if test="nbp207 != null">nbp207 = #{nbp207},</if>
            <if test="nbp222 != null">nbp222 = #{nbp222},</if>
            <if test="nbp236 != null">nbp236 = #{nbp236},</if>
            <if test="nbp249 != null">nbp249 = #{nbp249},</if>
            <if test="totalMolarFlowrate != null">total_molar_flowrate = #{totalMolarFlowrate},</if>
            <if test="totalMassFlowrate != null">total_mass_flowrate = #{totalMassFlowrate},</if>
            <if test="totalMolecularWeight != null">total_molecular_weight = #{totalMolecularWeight},</if>
            <if test="temperature != null">temperature = #{temperature},</if>
            <if test="pressure != null">pressure = #{pressure},</if>
            <if test="vaporMassFlowrate != null">vapor_mass_flowrate = #{vaporMassFlowrate},</if>
            <if test="vaporMolecularWeight != null">vapor_molecular_weight = #{vaporMolecularWeight},</if>
            <if test="vaporDensityAct != null">vapor_density_act = #{vaporDensityAct},</if>
            <if test="vaporZ != null">vapor_z = #{vaporZ},</if>
            <if test="vaporActVolFlow != null">vapor_act_vol_flow = #{vaporActVolFlow},</if>
            <if test="vaporHtCapacity != null">vapor_ht_capacity = #{vaporHtCapacity},</if>
            <if test="vaporViscosity != null">vapor_viscosity = #{vaporViscosity},</if>
            <if test="liquidMassFlowrate != null">liquid_mass_flowrate = #{liquidMassFlowrate},</if>
            <if test="liquidMolecularWeight != null">liquid_molecular_weight = #{liquidMolecularWeight},</if>
            <if test="liquidDensityAct != null">liquid_density_act = #{liquidDensityAct},</if>
            <if test="liquidActVolFlow != null">liquid_act_vol_flow = #{liquidActVolFlow},</if>
            <if test="liquidHtCapacity != null">liquid_ht_capacity = #{liquidHtCapacity},</if>
            <if test="liquidViscosity != null">liquid_viscosity = #{liquidViscosity},</if>
            <if test="liquidSurfTension != null">liquid_surf_tension = #{liquidSurfTension},</if>
            <if test="delFlag != null">del_flag = #{delFlag},</if>
            <if test="createBy != null">create_by = #{createBy},</if>
            <if test="createTime != null">create_time = #{createTime},</if>
            <if test="updateBy != null">update_by = #{updateBy},</if>
            <if test="updateTime != null">update_time = #{updateTime},</if>
            <if test="deptId != null">dept_id = #{deptId},</if>
            <if test="description != null">description = #{description},</if>
        </trim>
        where id = #{id}
    </update>

    <update id="deleteTPfdById" parameterType="Long">
        update t_pfd set del_flag = 2 where id = #{id}
    </update>

    <update id="deleteTPfdByIds" parameterType="String">
        update t_pfd set del_flag = 2 where id in
        <foreach item="id" collection="array" open="(" separator="," close=")">
            #{id}
        </foreach>
    </update>
    
</mapper>