存储最后上报时间
This commit is contained in:
parent
f580956f19
commit
5cb28e4371
@ -2,6 +2,8 @@ package com.cdzy.common.model.dto;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author attiya
|
* @author attiya
|
||||||
* @since 2025-03-20
|
* @since 2025-03-20
|
||||||
@ -104,13 +106,15 @@ public class ResGPSDto {
|
|||||||
*/
|
*/
|
||||||
private Boolean inParking;
|
private Boolean inParking;
|
||||||
|
|
||||||
/**
|
|
||||||
* 最后一次还车时间
|
|
||||||
*/
|
|
||||||
private Number latestTimestamp;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 放电状态:0-关闭(断电) 1-打开(通电)
|
* 放电状态:0-关闭(断电) 1-打开(通电)
|
||||||
*/
|
*/
|
||||||
private Integer mosState;
|
private Integer mosState;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最后一次上报时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime latestTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -36,40 +36,6 @@ public class EbikeOrderBikeInfoDto implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private Long bikeInfoId;
|
private Long bikeInfoId;
|
||||||
|
|
||||||
/**
|
|
||||||
* 运营商ID
|
|
||||||
*/
|
|
||||||
private Long operatorId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运营区ID
|
|
||||||
*/
|
|
||||||
private Long regionId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 运营区名称
|
|
||||||
*/
|
|
||||||
private String regionName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 车辆编号(与车辆二维码编号相同
|
|
||||||
*/
|
|
||||||
private String bikeCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 电池ID
|
|
||||||
*/
|
|
||||||
private Long batteryId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 中控ID
|
|
||||||
*/
|
|
||||||
private Long ecuId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 头盔ID
|
|
||||||
*/
|
|
||||||
private Long helmetId;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 定位
|
* 定位
|
||||||
@ -79,15 +45,6 @@ public class EbikeOrderBikeInfoDto implements Serializable {
|
|||||||
@JsonDeserialize(using = PGpointDeserializer.class)
|
@JsonDeserialize(using = PGpointDeserializer.class)
|
||||||
private PGpoint location;
|
private PGpoint location;
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
private String remarks;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 车辆状态
|
|
||||||
*/
|
|
||||||
private Integer status;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 车辆使用状态
|
* 车辆使用状态
|
||||||
@ -95,35 +52,98 @@ public class EbikeOrderBikeInfoDto implements Serializable {
|
|||||||
private Integer usageStatus;
|
private Integer usageStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 外接电池电量(该值由控制器提供,若控制器不支持此值为0)
|
||||||
*/
|
*/
|
||||||
@Column(onInsertValue = "now()")
|
private Integer soc;
|
||||||
private LocalDateTime createdAt;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 外接电源电压,单位:毫伏
|
||||||
*/
|
*/
|
||||||
private Long createdBy;
|
private Integer voltage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改时间
|
* GPS信号强度【0-31】
|
||||||
*/
|
*/
|
||||||
@Column(onUpdateValue = "now()")
|
private Integer gsm;
|
||||||
private LocalDateTime updatedAt;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改人
|
* 时间戳
|
||||||
*/
|
*/
|
||||||
private Long updatedBy;
|
private Number timestamp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除与否
|
* 0: 头盔不在位 1: 头盔在位
|
||||||
*/
|
*/
|
||||||
private Boolean isDeleted;
|
private Character helmetExit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否包含头盔
|
* 0: 头盔锁未上锁 1: 头盔锁已上锁
|
||||||
*/
|
*/
|
||||||
private Boolean hasHelme;
|
private Character isHelmetLocked;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0:后轮静止 1:后轮转动(轮动状态
|
||||||
|
*/
|
||||||
|
private Character isWheelSpin;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0:撤防状态 1:设防状态
|
||||||
|
*/
|
||||||
|
private Character isDefendOn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0: 车辆静止 1: 车辆移动(运动状态
|
||||||
|
*/
|
||||||
|
private Character isMoving;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0:电门关闭 1:电门打开
|
||||||
|
*/
|
||||||
|
private Character accOn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0:后轮未锁 1:后轮已锁
|
||||||
|
*/
|
||||||
|
private Character wheelLocked;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0:电池仓未锁 1:电池仓已锁
|
||||||
|
*/
|
||||||
|
private Character seatLocked;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 速度
|
||||||
|
*/
|
||||||
|
private Float speed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 中文位置
|
||||||
|
*/
|
||||||
|
private String chineseLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ecuSn
|
||||||
|
*/
|
||||||
|
private String ecuSn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否在运营区(记录最后一次用户停车
|
||||||
|
*/
|
||||||
|
private Boolean inOperation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否在停车区(记录最后一次用户停车
|
||||||
|
*/
|
||||||
|
private Boolean inParking;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 最后一次上报时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime latestTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 放电状态:0-关闭(断电) 1-打开(通电)
|
||||||
|
*/
|
||||||
|
private Integer mosState;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -14,6 +14,8 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author attiya
|
* @author attiya
|
||||||
@ -79,6 +81,7 @@ public class ReoprtHandler {
|
|||||||
resGpsDto.setIsHelmetLocked(isHelmetLocked);
|
resGpsDto.setIsHelmetLocked(isHelmetLocked);
|
||||||
resGpsDto.setIsWheelSpin(isWheelSpin);
|
resGpsDto.setIsWheelSpin(isWheelSpin);
|
||||||
resGpsDto.setIsMoving(isMoving);
|
resGpsDto.setIsMoving(isMoving);
|
||||||
|
resGpsDto.setLatestTime(LocalDateTime.now());
|
||||||
redisUtil.saveEcu(deviceId, resGpsDto);
|
redisUtil.saveEcu(deviceId, resGpsDto);
|
||||||
double[] doubles = CoordinateUtil.WGS84ToGCJ02(resGpsDto.getLongitude(), resGpsDto.getLatitude());
|
double[] doubles = CoordinateUtil.WGS84ToGCJ02(resGpsDto.getLongitude(), resGpsDto.getLatitude());
|
||||||
boolean outOfChina = CoordinateUtil.outOfChina(doubles[0], doubles[1]);
|
boolean outOfChina = CoordinateUtil.outOfChina(doubles[0], doubles[1]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user