<?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.hdkj.lt.bf.mapper.FhzgSeSnapshotDetailMapper">

    <!-- 批量插入断面明细 -->
    <insert id="insertBatch">
        INSERT INTO fhzg_se_snapshot_detail (
            snapshot_time, device_id, device_type, feeder_id, feeder_name,
            subs_id, county_id, mvtrans_id, consumer_id, consumer_name,
            active_power, reactive_power, current_value, voltage_value, load_rate,
            lv_voltage_a, capacity, voltage_ratio, current_status, voltage_status, create_time
        ) VALUES
        <foreach collection="list" item="item" separator=",">
            (
            #{item.snapshotTime}, #{item.deviceId}, #{item.deviceType}, #{item.feederId}, #{item.feederName},
            #{item.subsId}, #{item.countyId}, #{item.mvtransId}, #{item.consumerId}, #{item.consumerName},
            #{item.activePower}, #{item.reactivePower}, #{item.currentValue}, #{item.voltageValue}, #{item.loadRate},
            #{item.lvVoltageA}, #{item.capacity}, #{item.voltageRatio}, #{item.currentStatus}, #{item.voltageStatus}, #{item.createTime}
            )
        </foreach>
    </insert>

</mapper>
