<?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.huatek.busi.mapper.XTransformerEvaluateDataMapper">
    <sql id="Base_Column_List">
        id,
        main_tree_id AS mainTreeId,
        h2,
        ch4,
        c2h2,
        c2h4,
        c2h6,
        co,
        co2,
        zj,
        water_in_oil AS waterInOil,
        oill_medium AS oillMedium,
        oil_breakdown_voltage AS oilBreakdownVoltage,
        furfural,
        degree_cardboard AS degreeCardboard,
        polarizatio_index AS polarizatioIndex,
        partial_discharge AS partialDischarge,
        insulation_resistance AS insulationResistance,
        insulation_resistance_absorption_ratio AS insulationResistanceAbsorptionRatio,
        phase_difference_dc_resistance AS phaseDifferenceDcResistance,
        line_difference_dc_resistance AS lineDifferenceDcResistance,
        winding_insulation_dielectric_loss AS windingInsulationDielectricLoss,
        core_insulation_resistance AS coreInsulationResistance,
        end_screen_insulation_resistance AS endScreenInsulationResistance,
        casing_dielectric_loss AS casingDielectricLoss,
        casing_h2 AS casingH2,
        casing_ch4 AS casingCh4,
        casing_c2h2 AS casingC2h2,
        water_content_of_insulating_paper AS waterContentOfInsulatingPaper,
        noload_current_and_noload_loss_rate AS noloadCurrentAndNoloadLossRate,
        short_circuit_impedance_change_rate AS shortCircuitImpedanceChangeRate,
        vibration_sound_level AS vibrationSoundLevel,
        dc_leakage_current_winding AS dcLeakageCurrentWinding,
        create_user AS createUser,
        create_time AS createTime,
        core_ground_current AS coreGroundCurrent,
        secondary_vibration AS secondaryVibration,
        primary_vibration AS primaryVibration,
        neutral_point_current AS neutralPointCurrent,
        noise,
        oil_level_drop AS oilLevelDrop,
        oil_leaks_count AS oilLeaksCount,
        transformer_noise AS transformerNoise,
        water_temperature AS waterTemperature,
        water_pressure AS waterPressure,
        environment_temperature AS environmentTemperature,
        maintenance_count AS maintenanceCount,
        oil_puncture AS oilPuncture,
        transimission_gear AS transmissionGear,
        relay_action AS relayAction,
        relief_valve_action AS reliefValveAction,
        total_current AS totalCurrent,
        capacitative_current AS capacitiveCurrent,
        resistive_current AS resistiveCurrent,
        infrared_temperature AS infraredTemperature,
        end_screen_dielectric_damage AS endScreenDielectricDamage,
        final_screen_insulation_capacitance AS finalScreenInsulationCapacitance,
        capacitance,
        operating_environment AS operatingEnvironment,
        working_voltage AS workingVoltage,
        working_current AS workingCurrent,
        working_time AS workingTime,
        pumping_voltage AS pumpingVoltage,
        pumping_current AS pumpingCurrent,
        pumping_time AS pumpingTime
    </sql>

    <select id="selectByMainTreeId" parameterType="java.lang.String" resultType="com.huatek.busi.entity.XTransformerEvaluateData">
        select
        <include refid="Base_Column_List" />
        from x_transformer_evaluate_data
        where main_tree_id = #{mainTreeId}
        order by create_time desc
    </select>

    <delete id="delete" parameterType="java.lang.String">
        delete from x_transformer_evaluate_data
        where main_tree_id = #{mainTreeId}
    </delete>
</mapper>