<?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.pqs9900.mapper.HisData.DataFlucMapper'>

    <insert id="insertDataFluc" parameterType="java.util.List" useGeneratedKeys="false" databaseId="Oracle">
        insert into DATA_FLUC
        (
        <foreach collection="list" item="item" index="index" separator="UNION ALL">
            select
            #{item.timeID},
            #{item.lineID},
            #{item.phasicType},
            #{item.fluc},
            #{item.fluccf},
            #{item.qualityFlag}
            from dual
        </foreach>
        )
    </insert>

    <insert id="insertDataFluc" parameterType="java.util.List" databaseId="MariaDB">
        insert into DATA_FLUC ( TIMEID, LINEID, PHASIC_TYPE, FLUC, FLUCCF,  QUALITYFLAG ) values 
		<foreach collection="list" item="item" index="index" open="("
				 separator="),(" close=")">
            #{item.timeID},
            #{item.lineID},
            #{item.phasicType},
            #{item.fluc},
            #{item.fluccf},
            #{item.qualityFlag}
        </foreach>
    </insert>
</mapper>