123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- package com.zy.omp.model;
- import java.io.Serializable;
- import java.time.LocalDateTime;
- import com.baomidou.mybatisplus.annotation.TableField;
- import com.baomidou.mybatisplus.annotation.TableName;
- import lombok.Data;
- import com.baomidou.mybatisplus.annotation.IdType;
- import com.baomidou.mybatisplus.annotation.TableId;
- /**
- * <p>
- * 设备-路牌
- * </p>
- *
- * @author chenyi
- * @since 2021-06-12
- */
- @Data
- @TableName("device_lp")
- public class DeviceLp implements Serializable {
- private static final long serialVersionUID = 1L;
- @TableId(value = "id", type = IdType.AUTO)
- private Integer id;
- /**
- * 设备IMEI
- */
- private String num;
- /**
- * 登录MQTT 用户名
- */
- private String clientId;
- /**
- * 登录MQTT 密码
- */
- private String password;
- /**
- * 设备组
- */
- @TableField("`group`")
- private String group;
- /**
- * SN码
- */
- private String sn;
- /**
- * 定时唤醒时间
- */
- private Double wakeInt;
- /**
- * 阈值
- */
- private Integer thresh;
- /**
- * 电量
- */
- private String battery;
- /**
- * 信号
- */
- private String s4g;
- private String x;
- private String y;
- private String z;
- private String anglex;
- private String angley;
- private String anglez;
- /**
- * 温度
- */
- private String temp;
- /**
- * 经度
- */
- private String lon;
- /**
- * 纬度
- */
- private String lat;
- /**
- * 经度(gcj)
- */
- private String lonGcj;
- /**
- * 纬度(gcj)
- */
- private String latGcj;
- /**
- * 格式化的地理位置
- */
- private String site;
- /**
- * 定位模式 1:GPS 2:基站
- */
- private Integer mode;
- /**
- * 上传类型
- */
- private String dataType;
- /**
- * 数据更新时间
- */
- private LocalDateTime updateTime;
- /**
- * 获取在线状态
- */
- public Integer getStatus() {
- if (updateTime == null || wakeInt == null) return 0;
- return updateTime.compareTo(LocalDateTime.now().minusMinutes((int) (wakeInt * 60) + 5));
- }
- }
|