<?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.cpxt.biz.mapper.TrackTempMapper">
    
    <resultMap type="TrackTemp" id="TrackTempResult">
        <result property="id"    column="id"    />
        <result property="carId"    column="car_id"    />
        <result property="carNo"    column="car_no"    />
        <result property="vin"    column="vin"    />
        <result property="vehicleNo"    column="vehicle_no"    />
        <result property="regName"    column="reg_name"    />
        <result property="gpsTime"    column="gps_time"    />
        <result property="speed"    column="speed"    />
        <result property="odometer"    column="odometer"    />
        <result property="lat"    column="lat"    />
        <result property="lon"    column="lon"    />
        <result property="direction"    column="direction"    />
        <result property="status"    column="status"    />
        <result property="placeName"    column="place_name"    />
        <result property="provice"    column="provice"    />
        <result property="city"    column="city"    />
        <result property="district"    column="district"    />
        <result property="roadName"    column="road_name"    />
        <result property="t1"    column="t1"    />
        <result property="t2"    column="t2"    />
        <result property="t3"    column="t3"    />
        <result property="t4"    column="t4"    />
        <result property="t5"    column="t5"    />
        <result property="t6"    column="t6"    />
        <result property="t7"    column="t7"    />
        <result property="t8"    column="t8"    />
        <result property="lat02"    column="lat02"    />
        <result property="lon02"    column="lon02"    />
        <result property="areaName"    column="area_name"    />
        <result property="time1"    column="time1"    />
        <result property="time2"    column="time2"    />
        <result property="time3"    column="time3"    />
        <result property="time4"    column="time4"    />
        <result property="time5"    column="time5"    />
        <result property="time6"    column="time6"    />
        <result property="time7"    column="time7"    />
        <result property="time8"    column="time8"    />
        <result property="h1"    column="h1"    />
        <result property="h2"    column="h2"    />
        <result property="h3"    column="h3"    />
        <result property="h4"    column="h4"    />
        <result property="h5"    column="h5"    />
        <result property="h6"    column="h6"    />
        <result property="h7"    column="h7"    />
        <result property="h8"    column="h8"    />
        <result property="ht1"    column="ht1"    />
        <result property="ht2"    column="ht2"    />
        <result property="ht3"    column="ht3"    />
        <result property="ht4"    column="ht4"    />
        <result property="ht5"    column="ht5"    />
        <result property="ht6"    column="ht6"    />
        <result property="ht7"    column="ht7"    />
        <result property="ht8"    column="ht8"    />
        <result property="deviceTypeStr"    column="device_type_str"    />
        <result property="equipCode"    column="equip_code"    />
        <result property="oil"    column="oil"    />
        <result property="height"    column="height"    />
        <result property="stopSec"    column="stop_sec"    />
        <result property="acc"    column="acc"    />
        <result property="ohm"    column="ohm"    />
        <result property="curAccSta"    column="cur_acc_sta"    />
        <result property="commIds"    column="commIds"    />
        <result property="createTime"    column="create_time"    />
    </resultMap>

    <insert id="insertTrack" parameterType="TrackTemp" useGeneratedKeys="true" keyProperty="id">
        insert into track_#{carId}
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="carId != null">car_id,</if>
            <if test="carNo != null">car_no,</if>
            <if test="vin != null">vin,</if>
            <if test="vehicleNo != null">vehicle_no,</if>
            <if test="regName != null">reg_name,</if>
            <if test="gpsTime != null">gps_time,</if>
            <if test="speed != null">speed,</if>
            <if test="odometer != null">odometer,</if>
            <if test="lat != null">lat,</if>
            <if test="lon != null">lon,</if>
            <if test="direction != null">direction,</if>
            <if test="status != null">status,</if>
            <if test="placeName != null">place_name,</if>
            <if test="provice != null">provice,</if>
            <if test="city != null">city,</if>
            <if test="district != null">district,</if>
            <if test="roadName != null">road_name,</if>
            <if test="t1 != null">t1,</if>
            <if test="t2 != null">t2,</if>
            <if test="t3 != null">t3,</if>
            <if test="t4 != null">t4,</if>
            <if test="t5 != null">t5,</if>
            <if test="t6 != null">t6,</if>
            <if test="t7 != null">t7,</if>
            <if test="t8 != null">t8,</if>
            <if test="lat02 != null">lat02,</if>
            <if test="lon02 != null">lon02,</if>
            <if test="areaName != null">area_name,</if>
            <if test="time1 != null">time1,</if>
            <if test="time2 != null">time2,</if>
            <if test="time3 != null">time3,</if>
            <if test="time4 != null">time4,</if>
            <if test="time5 != null">time5,</if>
            <if test="time6 != null">time6,</if>
            <if test="time7 != null">time7,</if>
            <if test="time8 != null">time8,</if>
            <if test="h1 != null">h1,</if>
            <if test="h2 != null">h2,</if>
            <if test="h3 != null">h3,</if>
            <if test="h4 != null">h4,</if>
            <if test="h5 != null">h5,</if>
            <if test="h6 != null">h6,</if>
            <if test="h7 != null">h7,</if>
            <if test="h8 != null">h8,</if>
            <if test="ht1 != null">ht1,</if>
            <if test="ht2 != null">ht2,</if>
            <if test="ht3 != null">ht3,</if>
            <if test="ht4 != null">ht4,</if>
            <if test="ht5 != null">ht5,</if>
            <if test="ht6 != null">ht6,</if>
            <if test="ht7 != null">ht7,</if>
            <if test="ht8 != null">ht8,</if>
            <if test="deviceTypeStr != null">device_type_str,</if>
            <if test="equipCode != null">equip_code,</if>
            <if test="oil != null">oil,</if>
            <if test="height != null">height,</if>
            <if test="stopSec != null">stop_sec,</if>
            <if test="acc != null">acc,</if>
            <if test="ohm != null">ohm,</if>
            <if test="curAccSta != null">cur_acc_sta,</if>
            <if test="commIds != null">commIds,</if>
            <if test="createTime != null">create_time,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="carId != null">#{carId},</if>
            <if test="carNo != null">#{carNo},</if>
            <if test="vin != null">#{vin},</if>
            <if test="vehicleNo != null">#{vehicleNo},</if>
            <if test="regName != null">#{regName},</if>
            <if test="gpsTime != null">#{gpsTime},</if>
            <if test="speed != null">#{speed},</if>
            <if test="odometer != null">#{odometer},</if>
            <if test="lat != null">#{lat},</if>
            <if test="lon != null">#{lon},</if>
            <if test="direction != null">#{direction},</if>
            <if test="status != null">#{status},</if>
            <if test="placeName != null">#{placeName},</if>
            <if test="provice != null">#{provice},</if>
            <if test="city != null">#{city},</if>
            <if test="district != null">#{district},</if>
            <if test="roadName != null">#{roadName},</if>
            <if test="t1 != null">#{t1},</if>
            <if test="t2 != null">#{t2},</if>
            <if test="t3 != null">#{t3},</if>
            <if test="t4 != null">#{t4},</if>
            <if test="t5 != null">#{t5},</if>
            <if test="t6 != null">#{t6},</if>
            <if test="t7 != null">#{t7},</if>
            <if test="t8 != null">#{t8},</if>
            <if test="lat02 != null">#{lat02},</if>
            <if test="lon02 != null">#{lon02},</if>
            <if test="areaName != null">#{areaName},</if>
            <if test="time1 != null">#{time1},</if>
            <if test="time2 != null">#{time2},</if>
            <if test="time3 != null">#{time3},</if>
            <if test="time4 != null">#{time4},</if>
            <if test="time5 != null">#{time5},</if>
            <if test="time6 != null">#{time6},</if>
            <if test="time7 != null">#{time7},</if>
            <if test="time8 != null">#{time8},</if>
            <if test="h1 != null">#{h1},</if>
            <if test="h2 != null">#{h2},</if>
            <if test="h3 != null">#{h3},</if>
            <if test="h4 != null">#{h4},</if>
            <if test="h5 != null">#{h5},</if>
            <if test="h6 != null">#{h6},</if>
            <if test="h7 != null">#{h7},</if>
            <if test="h8 != null">#{h8},</if>
            <if test="ht1 != null">#{ht1},</if>
            <if test="ht2 != null">#{ht2},</if>
            <if test="ht3 != null">#{ht3},</if>
            <if test="ht4 != null">#{ht4},</if>
            <if test="ht5 != null">#{ht5},</if>
            <if test="ht6 != null">#{ht6},</if>
            <if test="ht7 != null">#{ht7},</if>
            <if test="ht8 != null">#{ht8},</if>
            <if test="deviceTypeStr != null">#{deviceTypeStr},</if>
            <if test="equipCode != null">#{equipCode},</if>
            <if test="oil != null">#{oil},</if>
            <if test="height != null">#{height},</if>
            <if test="stopSec != null">#{stopSec},</if>
            <if test="acc != null">#{acc},</if>
            <if test="ohm != null">#{ohm},</if>
            <if test="curAccSta != null">#{curAccSta},</if>
            <if test="commIds != null">#{commIds},</if>
            <if test="createTime != null">#{createTime},</if>
         </trim>
    </insert>

</mapper>