Commit 8b03d0d2 authored by hanbing's avatar hanbing

[update] 态势监测,实时数据时间戳转换

parent 84214beb
...@@ -1091,7 +1091,10 @@ public class TrendServiceImpl implements TrendService { ...@@ -1091,7 +1091,10 @@ public class TrendServiceImpl implements TrendService {
for (CrossLaneSnapshotDataDTO dto : dtoList) { for (CrossLaneSnapshotDataDTO dto : dtoList) {
TableQueryVO.RealTimeDataElement element = new TableQueryVO.RealTimeDataElement(); TableQueryVO.RealTimeDataElement element = new TableQueryVO.RealTimeDataElement();
element.setTime(new Date()); // todo String timeStamp = dto.getTimeStamp();
long timeStampInt = Long.parseLong(timeStamp);
Date date = new Date(timeStampInt * 1000); // 转换为毫秒
element.setTime(date);
element.setDir(dto.getDir()); element.setDir(dto.getDir());
......
...@@ -28,6 +28,7 @@ public class TableQueryVO { ...@@ -28,6 +28,7 @@ public class TableQueryVO {
@Data @Data
public static class RealTimeDataElement { public static class RealTimeDataElement {
@ApiModelProperty(value = "时间 格式 yyyy-MM-dd HH:mm:ss") @ApiModelProperty(value = "时间 格式 yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date time; private Date time;
@ApiModelProperty(value = "方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北") @ApiModelProperty(value = "方向:1北;2东北;3东;4东南;5南;6西南;7西;8西北")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment