liujie
2026-05-07 ea86cc455053b205e1b8ca88de4e91e6c64ec298
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package com.xiaopeng.api.vo.automaticPilot;
 
 
import lombok.Data;
import org.springframework.data.mongodb.core.geo.GeoJsonPoint;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexType;
import org.springframework.data.mongodb.core.index.GeoSpatialIndexed;
import org.springframework.data.mongodb.core.mapping.Document;
 
import java.io.Serializable;
 
/**
 * 车辆实时位置信息
 */
@Data
@Document(collection = "vehicle_position")
@CompoundIndexes({
        @CompoundIndex(name = "vehicle_id_electronic_id", def = "{'vehicle_id': 1, 'electronic_id': 1}"),
        @CompoundIndex(name = "location_index", def = "{'point': '2dsphere'}")
}
)
public class VehiclePosition implements Serializable {
    /**
     * 车辆VIN
     */
    private String vin;
    /**
     * 车辆所属围栏id
     */
    private Long electronic_id;
    /**
     * 车辆实时位置信息
     */
    @GeoSpatialIndexed(type = GeoSpatialIndexType.GEO_2DSPHERE)
    private GeoJsonPoint point;
    /**
     * 航向,单位:度,北零顺时针。范围:[0-360)。0 => 北, 90 => 东, 180 => 南, 270 => 西
     */
    private Double course;
    /**
     * 海拔 单位米
     */
    private Float alt;
    /**
     * 当前速度
     */
    private Float speed;
    /**
     * 当前电量
     */
    private Integer currentElectricity;
    /**
     * 综合续航
     */
    private Float mileageRange;
 
    /**
     * 是否有巡游单子 1有 0否
     */
    private Integer hasOrder;
 
    /**
     * 订单id
     */
    private Long orderId;
    /**
     * 总里程
     */
    private Long totalOdometer;
    /**
     * 添加时间
     */
    private Long addTime;
}