feat(alarm): 添加告警统计功能并优化设备管理
- 在AlarmVO中新增interruptCounts和warnCounts字段用于统计通信中断和终端告警次数 - 在CsAlarmServiceImpl中实现告警次数统计逻辑,解析告警事件数据并计算各类告警数量 - 重构CsEventUserPOServiceImpl中的查询逻辑,优化暂态事件详细信息查询接口 - 在CsEquipmentDeliveryServiceImpl中集成事件查询功能,实时获取设备告警状态 - 优化数据库查询语句,改进事件查询的排序和过滤逻辑
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
package com.njcn.csharmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2026-04-15
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("cs_harmonic_plan")
|
||||
public class CsHarmonicPlan extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 稳态方案名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 稳态指标集合
|
||||
*/
|
||||
private String harmonicTarget;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 监测点ID集合(非数据库字段)
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private List<String> lineList;
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.csharmonic.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2026-04-15
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("cs_harmonic_plan_line")
|
||||
public class CsHarmonicPlanLine implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 监测点id
|
||||
*/
|
||||
private String lineId;
|
||||
|
||||
|
||||
}
|
||||
@@ -24,6 +24,12 @@ public class AlarmVO implements Serializable {
|
||||
@ApiModelProperty(value = "告警设备台数")
|
||||
private Integer warnNums;
|
||||
|
||||
@ApiModelProperty(value = "通讯中断告警次数")
|
||||
private Integer interruptCounts;
|
||||
|
||||
@ApiModelProperty(value = "终端告警次数")
|
||||
private Integer warnCounts;
|
||||
|
||||
@ApiModelProperty(value = "告警设备id集合")
|
||||
private List<String> devIds;
|
||||
|
||||
@@ -42,6 +48,9 @@ public class AlarmVO implements Serializable {
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String devName;
|
||||
|
||||
@ApiModelProperty(value = "设备类型")
|
||||
private String devType;
|
||||
|
||||
@ApiModelProperty(value = "告警次数")
|
||||
private Integer warnCounts = 0;
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -47,6 +46,8 @@ public class EventDetailVO {
|
||||
*/
|
||||
private String deviceId;
|
||||
|
||||
@ApiModelProperty(value = "设备类型")
|
||||
private String devType;
|
||||
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String equipmentName;
|
||||
|
||||
Reference in New Issue
Block a user