<?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.uml.tech.mapper.FarmWorkMapper">

    <insert id="insertFromList">
        insert into ${tb_name} (unitPrice, GPSDateTime, serialNumber,
        jobArea, jobStartLat, TIME,
        jobStartTime, DATE_TYPE, jobWidth,
        unit, currentBlockNumber,
        jobStartLon, createTime, vehicleTypeCode,
        jobType, brand, farmDataType,
        jobEquipment, did, jobEndTime,
        insertTime, GPSLat, GPSLon,
        jobTime, id, lk,
        province, city, district,
        sematicDescription, centerLat, centerLon,
        avgDepth, avgPercentOfPass, positionsSum,
        standardDepth, averageSprayDose, totalDose,
        flowCoefficient, avgFertilizationRate,
        fertilizationTotal, fertilizerDischargeCoefficient,
        averageYieldPerMu, totalPlotYield, isdel,
        totalPoints,dryingWeight,absoluteJobTime,bundleWeight,bundles,jobMileage,avgStubbleHeight,standardStubbleHeight
        )
        values
        <foreach collection="list" item="item" index="index" separator=",">
            (
            #{item.unitPrice},
            #{item.GPSDateTime},
            #{item.serialNumber},
            #{item.jobArea},
            #{item.jobStartLat},
            #{item.TIME},
            #{item.jobStartTime},
            #{item.dateType},
            #{item.jobWidth},
            #{item.unit},
            #{item.currentBlockNumber},
            #{item.jobStartLon},
            #{item.createTime},
            #{item.vehicleTypeCode},
            #{item.jobType},
            #{item.brand},
            #{item.farmDataType},
            #{item.jobEquipment},
            #{item.did},
            #{item.jobEndTime},
            DATE_FORMAT(NOW(),'%Y%m%d%H%i%s'),
            #{item.GPSLat},
            #{item.GPSLon},
            #{item.jobTime},
            #{item.id},
            #{item.lk},
            #{item.province},
            #{item.city},
            #{item.district},
            #{item.sematicDescription},
            #{item.centerLat},
            #{item.centerLon},
            #{item.avgDepth},
            #{item.avgPercentOfPass},
            #{item.positionsSum},
            #{item.standardDepth},
            #{item.averageSprayDose},
            #{item.totalDose},
            #{item.flowCoefficient},
            #{item.avgFertilizationRate},
            #{item.fertilizationTotal},
            #{item.fertilizerDischargeCoefficient},
            #{item.averageYieldPerMu},
            #{item.totalPlotYield},
            #{item.isdel},
            #{item.totalPoints},
            #{item.dryingWeight},
            #{item.absoluteJobTime},
            #{item.bundleWeight},
            #{item.bundles},
            #{item.jobMileage},
            #{item.avgStubbleHeight},
            #{item.standardStubbleHeight}
            )
        </foreach>
    </insert>

</mapper>