日志加分页
This commit is contained in:
@@ -8,6 +8,8 @@ package com.njcn.device.pojo.constant;
|
||||
*/
|
||||
public interface DeviceValidMessage {
|
||||
|
||||
String ID_NOT_BLANK = "id不能为空,请检查id参数";
|
||||
|
||||
String PROJECT_NAME_NOT = "项目名称不能为空";
|
||||
String PROJECT_NAME_RULE = "项目名称违规";
|
||||
String PROVINCE_NAME_NOT = "省份不可为空";
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.njcn.device.pojo.param;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.device.pojo.constant.DeviceValidMessage;
|
||||
import com.njcn.web.constant.ValidMessage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/06/23 14:54
|
||||
*/
|
||||
@Data
|
||||
public class AlarmStrategyParam {
|
||||
|
||||
@ApiModelProperty(value = "告警策略Id", required = true)
|
||||
@NotBlank(message = DeviceValidMessage.ID_NOT_BLANK)
|
||||
@Pattern(regexp = PatternRegex.SYSTEM_ID, message = ValidMessage.ID_FORMAT_ERROR)
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "数据完整性标准", required = true)
|
||||
private Integer integrityValue;
|
||||
|
||||
@ApiModelProperty(value = "在线率标准", required = true)
|
||||
private Integer onlineValue;
|
||||
|
||||
@ApiModelProperty(value = "离线持续时间", required = true)
|
||||
private Integer offTimeValue;
|
||||
|
||||
@ApiModelProperty(value = "告警次数", required = true)
|
||||
private Integer warnValue;
|
||||
|
||||
|
||||
}
|
||||
@@ -4,7 +4,9 @@ import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
@@ -19,7 +21,7 @@ public class DeviceLogParam {
|
||||
/**
|
||||
* 套餐类型
|
||||
*/
|
||||
@ApiModelProperty("套餐类型")
|
||||
@ApiModelProperty("套餐类型,为空表示查询所有")
|
||||
private String type;
|
||||
/**
|
||||
* 开始时间
|
||||
@@ -33,6 +35,20 @@ public class DeviceLogParam {
|
||||
@ApiModelProperty("结束时间")
|
||||
@Pattern(regexp = PatternRegex.TIME_FORMAT, message = "时间格式错误")
|
||||
private String searchEndTime;
|
||||
/**
|
||||
* 页码
|
||||
*/
|
||||
@ApiModelProperty("页码")
|
||||
@NotNull(message = "页码不可为空")
|
||||
@Range(min = 1,message = "页码必须大于0")
|
||||
private Integer pageNum;
|
||||
/**
|
||||
* 条数
|
||||
*/
|
||||
@ApiModelProperty("条数")
|
||||
@NotNull(message = "条数不可为空")
|
||||
@Range(min = 1,message = "条数必须大于0")
|
||||
private Integer pageSize;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.njcn.device.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/06/23 16:43
|
||||
*/
|
||||
@Data
|
||||
@TableName("pqs_alarm_strategy")
|
||||
public class AlarmStrategy {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
private Integer integrityValue;
|
||||
|
||||
private Integer onlineValue;
|
||||
|
||||
private Integer offtimeValue;
|
||||
|
||||
private Integer warnValue;
|
||||
|
||||
private String updateBy;
|
||||
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
private Integer state;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.njcn.device.pojo.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/06/22 19:03
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "pqs_terminal_logs")
|
||||
public class TerminalLogs {
|
||||
|
||||
@Column(name = "time")
|
||||
private Instant timeId;
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "terminal_type")
|
||||
private String terminalType;
|
||||
|
||||
@Column(name = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
@Column(name = "terminal_describe")
|
||||
private String terminalDescribe;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.njcn.device.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: chenchao
|
||||
* @date: 2022/06/23 11:39
|
||||
*/
|
||||
@Data
|
||||
public class AlarmStrategyVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty("id")
|
||||
private String id;
|
||||
/**
|
||||
* 等级
|
||||
*/
|
||||
@ApiModelProperty("等级")
|
||||
private String name;
|
||||
/**
|
||||
* 数据完整性标准
|
||||
*/
|
||||
@ApiModelProperty("数据完整性标准")
|
||||
private Integer integrityValue;
|
||||
/**
|
||||
* 在线率标准
|
||||
*/
|
||||
@ApiModelProperty("在线率标准")
|
||||
private Integer onlineValue;
|
||||
/**
|
||||
* 离线持续时间
|
||||
*/
|
||||
@ApiModelProperty("离线持续时间")
|
||||
private Integer offTimeValue;
|
||||
/**
|
||||
* 告警次数
|
||||
*/
|
||||
@ApiModelProperty("告警次数")
|
||||
private Integer warnValue;
|
||||
/**
|
||||
* 更新日期
|
||||
*/
|
||||
@ApiModelProperty("更新日期")
|
||||
private LocalDateTime updateTime;
|
||||
/**
|
||||
* 更新用户
|
||||
*/
|
||||
@ApiModelProperty("更新用户")
|
||||
private String updateBy;
|
||||
|
||||
|
||||
}
|
||||
@@ -14,11 +14,6 @@ import java.io.Serializable;
|
||||
public class DeviceLogVO implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@ApiModelProperty("id")
|
||||
private String id;
|
||||
/**
|
||||
* 装置、监测点名称
|
||||
*/
|
||||
|
||||
@@ -15,9 +15,10 @@ public class ShowVersionVO extends VersionVO {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 终端版本文件状态(0-不存在 1-存在)
|
||||
* 终端版本文件
|
||||
*/
|
||||
@ApiModelProperty("终端版本文件状态(0-不存在 1-存在)")
|
||||
private Integer fileFlag;
|
||||
@ApiModelProperty("终端版本文件")
|
||||
// private MultipartFile file;
|
||||
private byte[] file;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user