月流量表、数据完整性表切换&&异常统计优化

This commit is contained in:
zhuxinyu
2023-04-01 21:42:18 +08:00
parent ccf973b8a9
commit 07a905ae8d
13 changed files with 306 additions and 348 deletions

View File

@@ -5,6 +5,8 @@ import org.influxdb.annotation.Column;
import org.influxdb.annotation.Measurement;
import java.time.Instant;
import java.time.LocalDateTime;
import java.util.Date;
/**
* <p>
@@ -29,6 +31,9 @@ public class Communicate {
@Column(name = "time")
private Instant updateTime;
// @Column(name = "time")
// private String updateTime;
@Column(name = "dev_id")
private String devId;

View File

@@ -6,23 +6,35 @@ import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
@EqualsAndHashCode(callSuper = true)
public class AlarmPO extends BaseEntity {
public class AlarmPO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 监测点Id
* 监测点id
*/
private String id;
/**
* 监测点等级 : 0-极重要 1-重要 2-普通 3-不重要
*/
private Integer level;
/**
* 装置id
*/
private String deviceId;
private LocalDateTime updateTime;
/**
* 装置等级 : 0-极重要 1-重要 2-普通 3-不重要
*/
private Integer deviceLevel;
/**
* 告警描述
@@ -32,13 +44,10 @@ public class AlarmPO extends BaseEntity {
/**
* 监测点告警次数
*/
private Integer alarmCount = 0;
/**
* 装置下属监测点等级 : 0-极重要 1-重要 2-普通 3-不重要
* */
private Integer level;
private Integer alarmCount;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
private LocalDateTime updateTime;
/**
* 1.装置 2.监测点
@@ -48,23 +57,23 @@ public class AlarmPO extends BaseEntity {
/**
* 理论数据量
*/
private BigDecimal due;
private Integer due;
/**
* 实际数据量
*/
private BigDecimal real;
private Integer real;
/**
* 数据完整性
*/
private BigDecimal integrity;
private Float integrity;
private Float flowMeal;
private Float statisValue;
private Float actualValue;
private Float flowProportion;
@@ -79,5 +88,16 @@ public class AlarmPO extends BaseEntity {
*/
private String comOutDesc;
/**
* 在线时间
*/
private Integer online_min;
/**
* 离线时间
*/
private Integer offline_min;
private float onlineRate;
}

View File

@@ -1,113 +0,0 @@
package com.njcn.prepare.harmonic.pojo.mysql.po.line;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.njcn.db.bo.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.time.LocalDateTime;
import java.util.List;
@Data
@EqualsAndHashCode(callSuper = true)
// @TableName("pq_line")
public class LinePO extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 监测点Id
*/
private String id;
/**
* 所属装置id
*/
private String deviceId;
/**
* 父节点0为根节点
*/
private String pid;
/**
* 上层所有节点
*/
private String pids;
/**
* 名称
*/
private String name;
/**
* 等级0-项目名称1- 工程名称2-单位3-部门4-终端5-母线6-监测点
*/
private Integer level;
/**
* 排序默认为0有特殊排序需要时候人为输入
*/
private Integer sort;
/**
* 备注
*/
private String remark;
/**
* 状态 0-删除1-正常;默认正常
*/
private Integer state;
/**
* 监测点等级
*/
private String lineGrade;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private LocalDateTime updateTime;
/**
* 告警描述
*/
private String alarmDesc;
/**
* 监测点告警次数
*/
private Integer alarmCount;
/**
* 1.装置 2.监测点
*/
private Integer alarmDevLineType;
/**
* 在线率
*/
private Float onlineRate;
@ApiModelProperty("数据完整性")
private Float integrity;
@ApiModelProperty("理论数据量")
private Integer due;
@ApiModelProperty("实际数据量")
private Integer real;
@ApiModelProperty("套餐流量")
private Float flowMeal;
@ApiModelProperty("已用流量")
private Float statisValue;
@ApiModelProperty("流量占比")
private Float flowProportion;
}

View File

@@ -4,6 +4,7 @@ import com.njcn.db.bo.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.math.BigDecimal;
import java.util.List;
@Data
@@ -20,6 +21,11 @@ public class TopMsgPO extends BaseEntity {
*/
private String devId;
/**
* 装置等级 : 0-极重要 1-重要 2-普通 3-不重要
*/
private Integer deviceLevel;
/**
* 通信中断次数
*/
@@ -30,15 +36,17 @@ public class TopMsgPO extends BaseEntity {
*/
private List<String> comOutDesc;
private String comOutDescription;
/**
* 数据完整性标识 0.不达标 1.达标
*/
private String integrityFlag;
private Integer integrityFlag;
/**
* 数据完成性百分比
*/
private Integer integrityValue;
private Float integrityValue;
/**
* 告警次数
@@ -50,6 +58,8 @@ public class TopMsgPO extends BaseEntity {
*/
private String alarmDesc;
private Integer alarmCountFlag;
/**
* 流量超标标识 0.不达标 1.达标
*/
@@ -60,6 +70,14 @@ public class TopMsgPO extends BaseEntity {
*/
private float flowValue;
private Integer onlineRateFlag;
private float onlineRateValue;
private Integer offtimeValue;
private Integer offtimeFlag;
/**
* 状态 0.删除 1.正常
*/