From ab41aa01dd4709fc5374ade18a77c8c0d72647a9 Mon Sep 17 00:00:00 2001 From: yang_shj Date: Wed, 22 Mar 2023 10:42:39 +0800 Subject: [PATCH] =?UTF-8?q?#=E5=91=8A=E8=AD=A6=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../alert/constants/AbnormalAlarmConstant.java | 4 +- .../alert/entity/AlarmHandleEntity.java | 2 +- .../hzims/operational/alert/vo/AlarmHandleVo.java | 26 +++--- .../hzims/operational/census/vo/DeviceGroupVo.java | 38 +++++++++ .../hzims/operational/census/vo/TicketGroupVo.java | 25 ++++++ .../operational/alert/mapper/AlarmHandleMapper.xml | 6 +- .../service/impl/AbnormalAlarmServiceImpl.java | 14 ++-- .../alert/service/impl/AlarmHandleServiceImpl.java | 5 +- .../operational/alert/wrapper/HandleWrapper.java | 28 +++++++ .../census/controller/TargetController.java | 14 ++++ .../operational/census/service/TargetService.java | 8 ++ .../census/service/impl/TargetServiceImpl.java | 92 ++++++++++++++++++++++ .../config/scheduled/StAlamRecordTask.java | 7 +- .../service/impl/StAlamRecordServiceImpl.java | 14 ++-- 14 files changed, 243 insertions(+), 40 deletions(-) create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/DeviceGroupVo.java create mode 100644 hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/TicketGroupVo.java create mode 100644 hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/wrapper/HandleWrapper.java diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/constants/AbnormalAlarmConstant.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/constants/AbnormalAlarmConstant.java index 2238cd2..6835eba 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/constants/AbnormalAlarmConstant.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/constants/AbnormalAlarmConstant.java @@ -8,7 +8,7 @@ import java.util.List; */ public interface AbnormalAlarmConstant { - List TYPE_LIST = Arrays.asList("13","14"); + List TYPE_LIST = Arrays.asList("3","2","5","10","13","14"); /**通讯恢复*/ String ABNORMAL_STATUS = "1"; @@ -16,5 +16,5 @@ public interface AbnormalAlarmConstant { String TYPE_NAMES[] = {"默认", "系统", "告警", "故障", "用户操作", "遥测越限", "遥信变位", "注册信息", "信息提示", "设备巡检", "遥控操作", "遥测越限恢复","未定义","通讯中断","数据异常"}; /**处理、延后、误报*/ - List HANDLE_WAY = Arrays.asList(1L,2L,3L,4l); + List HANDLE_WAY = Arrays.asList(1L,2L,3L,4L); } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/AlarmHandleEntity.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/AlarmHandleEntity.java index 0b4cc1c..97a9216 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/AlarmHandleEntity.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/entity/AlarmHandleEntity.java @@ -28,7 +28,7 @@ public class AlarmHandleEntity extends BaseEntity { private String alarmContent; @ApiModelProperty("处理方式") - private String handleWay; + private Long handleWay; @ApiModelProperty("处理详情ID") private Long detailId; diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmHandleVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmHandleVo.java index 31816a9..68b7539 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmHandleVo.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/alert/vo/AlarmHandleVo.java @@ -1,5 +1,8 @@ package com.hnac.hzims.operational.alert.vo; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import com.hnac.hzims.operational.alert.entity.AlarmHandleEntity; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -11,22 +14,10 @@ import java.util.Date; * @version 4.0.0 */ @Data -public class AlarmHandleVo{ +public class AlarmHandleVo extends AlarmHandleEntity { - @ApiModelProperty("站点编码") - private String stationCode; - - @ApiModelProperty("告警类型") - private Long alarmType; - - @ApiModelProperty("告警内容") - private String alarmContent; - - @ApiModelProperty("告警时间") - private Date alarmTime; - - @ApiModelProperty("处理方式:1-延后 2-误报 3-缺陷 4-检修") - private Long handleWay; + @ApiModelProperty("站点名称") + private String stationName; @ApiModelProperty("延后处理时间") private Date delayTime; @@ -44,8 +35,13 @@ public class AlarmHandleVo{ private String handleUser; @ApiModelProperty("现象Id") + @JsonSerialize(nullsUsing = NullSerializer.class) private Long phenomenonId; @ApiModelProperty("检修ID") + @JsonSerialize(nullsUsing = NullSerializer.class) private Long accessId; + + @ApiModelProperty("用户名称") + private String userName; } diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/DeviceGroupVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/DeviceGroupVo.java new file mode 100644 index 0000000..6dafb3d --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/DeviceGroupVo.java @@ -0,0 +1,38 @@ +package com.hnac.hzims.operational.census.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + * @date 2023/03/14 15:01:17 + * @version 4.0.0 + */ +@Data +public class DeviceGroupVo { + + @ApiModelProperty("区域Id") + private Long deptId; + + @ApiModelProperty("区域名称") + private String areaName; + + @ApiModelProperty("故障数量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Long faultCount; + + @ApiModelProperty("检修数量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Long overhaultCount; + + @ApiModelProperty("运行数量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Long runCount; + + @ApiModelProperty("备用数量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Long reserveCount; + +} diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/TicketGroupVo.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/TicketGroupVo.java new file mode 100644 index 0000000..492ba38 --- /dev/null +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/census/vo/TicketGroupVo.java @@ -0,0 +1,25 @@ +package com.hnac.hzims.operational.census.vo; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.NullSerializer; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author ysj + * @date 2023/03/14 15:01:17 + * @version 4.0.0 + */ +@Data +public class TicketGroupVo { + + @ApiModelProperty("区域Id") + private Long deptId; + + @ApiModelProperty("区域名称") + private String areaName; + + @ApiModelProperty("票据数量") + @JsonSerialize(nullsUsing = NullSerializer.class) + private Integer count; +} diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.xml b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.xml index 0c0f088..9cf8d26 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.xml +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/alert/mapper/AlarmHandleMapper.xml @@ -4,8 +4,12 @@