<?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="uml.tech.bigdata.mapper.FarmStatMapper">

    <insert id="insertFromList">
        replace into ${tb_name} (did, jobArea, jobTime,
        mileage, softwareVersion, hardwareVersion,
        totalDepth, totalPercentOfPass, totalPositionsSum,
        totalDryingWeight,
        totalBundleWeight,
        totalBundles,
        totalDose,
        totalFertilization,
        totalPlotYield,
        totalJobMileage,
        totalDidJobMileage,
        totalFuelConsumption,
        runTime,
        totalPowerConsumption,
        totalData,
        totalNormal ,
        totalA,
        totalB,
        totalC,
        totalD,
        totalE,
        totalF,
        totalG,
        lastGpsTime,
        lastLon ,
        lastLat ,
        province ,
        city ,
        district ,
        provinceCode,
        cityCode ,
        districtCode,
        es1,
        es2,
        es3,
        es4,
        es5,
        es6,
        es7,
        es8,
        es9,
        es10,
        es11,
        cwt1,
        cwt2,
        cwt3,
        cwt4,
        cwt5,
        cwt6,
        el1,
        el2,
        el3,
        el4,
        el5,
        el6,
        el7,
        el8,
        el9
        )
        values
        <foreach collection="list" index="index" item="item" separator=",">
            (
            #{item.did},
            #{item.jobArea},
            #{item.jobTime},
            #{item.mileage},
            #{item.softwareVersion},
            #{item.hardwareVersion},
            #{item.totalDepth},
            #{item.totalPercentOfPass},
            #{item.totalPositionsSum},
            #{item.totalDryingWeight},
            #{item.totalBundleWeight},
            #{item.totalBundles},
            #{item.totalDose},
            #{item.totalFertilization},
            #{item.totalPlotYield},
            #{item.totalJobMileage},
            #{item.totalDidJobMileage},
            #{item.totalFuelConsumption},
            #{item.runTime},
            #{item.totalPowerConsumption},
            #{item.totalData},
            #{item.totalNormal},
            #{item.totalA},
            #{item.totalB},
            #{item.totalC},
            #{item.totalD},
            #{item.totalE},
            #{item.totalF},
            #{item.totalG},
            #{item.lastGpsTime},
            #{item.lastLon},
            #{item.lastLat},
            #{item.province},
            #{item.city},
            #{item.district},
            #{item.provinceCode},
            #{item.cityCode},
            #{item.districtCode},
            #{item.es1},
            #{item.es2},
            #{item.es3},
            #{item.es4},
            #{item.es5},
            #{item.es6},
            #{item.es7},
            #{item.es8},
            #{item.es9},
            #{item.es10},
            #{item.es11},
            #{item.cwt1},
            #{item.cwt2},
            #{item.cwt3},
            #{item.cwt4},
            #{item.cwt5},
            #{item.cwt6},
            #{item.el1},
            #{item.el2},
            #{item.el3},
            #{item.el4},
            #{item.el5},
            #{item.el6},
            #{item.el7},
            #{item.el8},
            #{item.el9}
            )
        </foreach>
    </insert>

</mapper>