From a1f8ee4ef07e69930c2a299530a829f6980332d5 Mon Sep 17 00:00:00 2001
From: ty <1577900710@qq.com>
Date: Mon, 5 Feb 2024 17:32:20 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E8=BF=90=E8=A1=8C=E6=9C=88=E6=8A=A5-?=
=?UTF-8?q?=E6=99=BA=E8=83=BD=E8=AF=8A=E6=96=AD=E6=95=B0=E6=8D=AE=E6=B7=BB?=
=?UTF-8?q?=E5=8A=A0=EF=BC=9B=E6=96=B0=E5=A2=9E=E5=8E=86=E5=8F=B2=E6=99=BA?=
=?UTF-8?q?=E8=83=BD=E8=AF=8A=E6=96=AD=E6=95=B0=E6=8D=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/hnac/hzims/alarm/config/vo/FdpAlarmVo.java | 8 ++
.../com/hnac/hzims/fdp/dto/FDPFaultTableDTO.java | 45 +++++++++
.../fdp/entity/FdpFaultHistoryDataEntity.java | 110 +++++++++++++++++++++
.../hnac/hzims/fdp/feign/IFdpDiagnoseClient.java | 8 +-
.../fdp/feign/IFdpDiagnoseClientFallBack.java | 10 ++
.../hnac/hzims/fdp/vo/FdpFaultHistoryDataVo.java | 29 ++++++
.../inspect/report/feign/IInspectReportClient.java | 2 +-
.../fdp/controller/FdpHistoryDataController.java | 65 ++++++++++++
.../hnac/hzims/fdp/feign/FdpDiagnoseClient.java | 11 +++
.../hzims/fdp/service/IFdpHistoryDataService.java | 31 ++++++
.../service/impl/FdpHistoryDataServiceImpl.java | 73 ++++++++++++++
.../source/service/impl/FdpAlarmServiceImpl.java | 4 +-
.../impl/OperStationMonthReportServiceImpl.java | 74 ++++++++------
.../template/word/stationMonthReport.docx | Bin 23366 -> 22495 bytes
14 files changed, 436 insertions(+), 34 deletions(-)
create mode 100644 hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/dto/FDPFaultTableDTO.java
create mode 100644 hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/entity/FdpFaultHistoryDataEntity.java
create mode 100644 hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/vo/FdpFaultHistoryDataVo.java
create mode 100644 hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/controller/FdpHistoryDataController.java
create mode 100644 hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/IFdpHistoryDataService.java
create mode 100644 hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpHistoryDataServiceImpl.java
diff --git a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/vo/FdpAlarmVo.java b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/vo/FdpAlarmVo.java
index e7b3d9f..30c8d7a 100644
--- a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/vo/FdpAlarmVo.java
+++ b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/alarm/config/vo/FdpAlarmVo.java
@@ -19,6 +19,10 @@ public class FdpAlarmVo {
*/
private String faultId;
/**
+ * 故障ID
+ */
+ private String UUID;
+ /**
* 故障站点
*/
private String station;
@@ -55,6 +59,10 @@ public class FdpAlarmVo {
* 设备名称
*/
private String deviceName;
+ /**
+ * 设备名称
+ */
+ private String deviceCode;
// /**
// * 报警内容
// */
diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/dto/FDPFaultTableDTO.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/dto/FDPFaultTableDTO.java
new file mode 100644
index 0000000..9da9e94
--- /dev/null
+++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/dto/FDPFaultTableDTO.java
@@ -0,0 +1,45 @@
+package com.hnac.hzims.fdp.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @author HX
+ */
+@Data
+public class FDPFaultTableDTO {
+
+ @ApiModelProperty("站点ID数组")
+ private String[] stationIds;
+
+ @ApiModelProperty("故障ID")
+ private String faultId;
+
+ @ApiModelProperty("筛选来源,可以为“auto”或“manual”")
+ private String source;
+
+ @ApiModelProperty("故障名称模糊匹配")
+ private String nameLike;
+
+ @ApiModelProperty("筛选故障处理结果,可为“处理中”、“误报”、“处理完成”、“延后处理”")
+ private String result;
+
+ @ApiModelProperty("分页的每页数量,-1则为不限制数量")
+ private Integer pageSize;
+
+ @ApiModelProperty("分页的序号")
+ private Integer pageIndex;
+
+ @ApiModelProperty("排序方式")
+ private String orderBy;
+
+ @ApiModelProperty("升降序方式,“asc”或“desc”")
+ private String orderKind;
+
+ @ApiModelProperty("查询开始时间")
+ private String createTimeLeft;
+
+ @ApiModelProperty("查询结束时间")
+ private String createTimeRight;
+
+}
diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/entity/FdpFaultHistoryDataEntity.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/entity/FdpFaultHistoryDataEntity.java
new file mode 100644
index 0000000..68ef354
--- /dev/null
+++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/entity/FdpFaultHistoryDataEntity.java
@@ -0,0 +1,110 @@
+package com.hnac.hzims.fdp.entity;
+
+import com.alibaba.fastjson.annotation.JSONField;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.core.tenant.mp.TenantEntity;
+
+/**
+ *
+ *
+ *
+ *
+ * @author ty
+ * @since 2024-02-05
+ */
+
+@Data
+public class FdpFaultHistoryDataEntity{
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("uuid")
+ @JSONField(name = "ID")
+ private String id;
+
+ @ApiModelProperty(value = "故障ID")
+ @JSONField(name = "FAULT_ID")
+ private String faultId;
+
+
+ @ApiModelProperty(value = "站点ID")
+ @JSONField(name = "STATION")
+ private String station;
+
+
+ @ApiModelProperty(value = "位置")
+ @JSONField(name = "ORD")
+ private String ord;
+
+
+ @ApiModelProperty(value = "名称")
+ @JSONField(name = "NAME")
+ private String name;
+
+
+ @ApiModelProperty(value = "故障发生的概率")
+ @JSONField(name = "STATUS")
+ private Float status;
+
+
+ @ApiModelProperty(value = "发生故障的时间")
+ @JSONField(name = "CREATE_TIME")
+ private String createTime;
+
+
+ @ApiModelProperty(value = "故障结束的时间")
+ @JSONField(name = "DELETE_TIME")
+ private String deleteTime;
+
+
+ @ApiModelProperty(value = "故障有效时间")
+ @JSONField(name = "LIFE_TIME")
+ private String lifeTime;
+
+
+ @ApiModelProperty(value = "故障优先级,越大优先级越高")
+ @JSONField(name = "PRIORITY")
+ private String priority;
+
+ @ApiModelProperty(value = "来源")
+ @JSONField(name = "SOURCE")
+ private String source;
+
+ @ApiModelProperty(value = "故障的其它信息")
+ @JSONField(name = "INFO")
+ private String info;
+
+ @ApiModelProperty(value = "故障的业务ID")
+ @JSONField(name = "TASK_ID")
+ private String taskId;
+
+ @ApiModelProperty(value = "故障处理结果,可为“处理中”、“误报”、“处理完成”、“延后处理”")
+ @JSONField(name = "RESULT")
+ private String result;
+
+ @ApiModelProperty(value = "关于误报、延后处理的其它补充信息")
+ @JSONField(name = "RESULT_INFO")
+ private String resultInfo;
+
+ @ApiModelProperty(value = "诊断的原因")
+ @JSONField(name = "DIAG_REASON")
+ private String diagReason;
+
+ @ApiModelProperty(value = "诊断的解决方法")
+ @JSONField(name = "DIAG_SOLUTION")
+ private String diagSolution;
+
+ @ApiModelProperty(value = "创建故障人")
+ @JSONField(name = "CREATE_USER")
+ private String createUser;
+
+ @ApiModelProperty(value = "故障结束标记")
+ @JSONField(name = "IS_DELETED")
+ private Integer isDeleted;
+}
diff --git a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/feign/IFdpDiagnoseClient.java b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/feign/IFdpDiagnoseClient.java
index 5e8a382..695f0af 100644
--- a/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/feign/IFdpDiagnoseClient.java
+++ b/hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/fdp/feign/IFdpDiagnoseClient.java
@@ -1,7 +1,10 @@
package com.hnac.hzims.fdp.feign;
import com.hnac.hzims.EquipmentConstants;
+import com.hnac.hzims.fdp.dto.FDPFaultTableDTO;
import com.hnac.hzims.fdp.dto.StatisticStatusDTO;
+import com.hnac.hzims.fdp.entity.FdpFaultHistoryDataEntity;
+import com.hnac.hzims.fdp.vo.FdpFaultHistoryDataVo;
import com.hnac.hzims.fdp.vo.StatisticStatusVO;
import org.springblade.core.tool.api.R;
import org.springframework.cloud.openfeign.FeignClient;
@@ -23,7 +26,10 @@ import java.util.Map;
public interface IFdpDiagnoseClient {
String API_PREFIX = "/feign/fdp/diagnose";
String GET_STATISTIC_STATUS = API_PREFIX + "/getStatisticStatus";
-
+ String GET_HISTORY_DATA = API_PREFIX + "/getHistoryData";
@PostMapping(GET_STATISTIC_STATUS)
R