12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- package com.yihu.es.entity;
- import com.alibaba.fastjson.annotation.JSONField;
- import com.fasterxml.jackson.annotation.JsonFormat;
- import io.searchbox.annotations.JestId;
- import org.springframework.data.elasticsearch.annotations.GeoPointField;
- import org.springframework.data.elasticsearch.core.geo.GeoPoint;
- import java.util.Date;
- /**
- * Created by chenweida on 2018/2/12.
- */
- public class MapDataDTO {
- @JestId
- private String id;
- private String idCard; //设备绑定身份证
- private String deviceSn;//设备SnID
- private Long deviceId;//设备ID 用于区分类型
- @GeoPointField
- private GeoPoint location;//经纬度
- @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXX")
- @JSONField(format = "yyyy-MM-dd'T'HH:mm:ssXX")
- private Date deviceTime;//设备版定数时间
- @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ssXX")
- @JSONField(format = "yyyy-MM-dd'T'HH:mm:ssXX")
- private Date createTime; // 创建时间(ES:必填)
- public String getId() {
- return id;
- }
- public void setId(String id) {
- this.id = id;
- }
- public String getIdCard() {
- return idCard;
- }
- public void setIdCard(String idCard) {
- this.idCard = idCard;
- }
- public String getDeviceSn() {
- return deviceSn;
- }
- public void setDeviceSn(String deviceSn) {
- this.deviceSn = deviceSn;
- }
- public Long getDeviceId() {
- return deviceId;
- }
- public void setDeviceId(Long deviceId) {
- this.deviceId = deviceId;
- }
- public GeoPoint getLocation() {
- return location;
- }
- public void setLocation(GeoPoint location) {
- this.location = location;
- }
- public Date getDeviceTime() {
- return deviceTime;
- }
- public void setDeviceTime(Date deviceTime) {
- this.deviceTime = deviceTime;
- }
- public Date getCreateTime() {
- return createTime;
- }
- public void setCreateTime(Date createTime) {
- this.createTime = createTime;
- }
- public void setLocation(Double lat, Double lng) {
- GeoPoint geoPoint = new GeoPoint(lat, lng);
- this.location = geoPoint;
- }
- }
|