1.灿能云接口移植,实时数据接口代码调整
This commit is contained in:
@@ -31,7 +31,28 @@
|
||||
<artifactId>common-microservice</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.poi</groupId>
|
||||
<artifactId>poi-ooxml</artifactId>
|
||||
<version>4.1.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
|
||||
<version>2.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>aliyun-java-sdk-core</artifactId>
|
||||
<version>4.6.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>user-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.njcn.cloud.enums.app;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description: 指标编码
|
||||
@@ -63,38 +62,54 @@ public enum TypeCodeEnum {
|
||||
IHARM_24_OVERTIME(53, "24次电流谐波幅值越限"),
|
||||
IHARM_25_OVERTIME(54, "25次电流谐波幅值越限");
|
||||
|
||||
private int code;
|
||||
private int code;
|
||||
|
||||
private String type;
|
||||
|
||||
TypeCodeEnum(int code, String type){
|
||||
private String type;
|
||||
|
||||
TypeCodeEnum(int code,String type){
|
||||
this.code = code;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(int code){
|
||||
for (TypeCodeEnum typeCodeEnum : TypeCodeEnum.values()) {
|
||||
if (typeCodeEnum.code==code) {
|
||||
return typeCodeEnum.type;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public static int getCodeByMsg(String type){
|
||||
for (TypeCodeEnum typeCodeEnum : TypeCodeEnum.values()) {
|
||||
if (typeCodeEnum.type.equalsIgnoreCase(type)) {
|
||||
return typeCodeEnum.code;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TypeCodeEnum{" +
|
||||
"code=" + code +
|
||||
", type='" + type + '\'' +
|
||||
'}';
|
||||
}
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public static String getMsgByCode(int code){
|
||||
for (TypeCodeEnum typeCodeEnum : TypeCodeEnum.values()) {
|
||||
if (typeCodeEnum.code==code) {
|
||||
return typeCodeEnum.type;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static int getCodeByMsg(String type){
|
||||
for (TypeCodeEnum typeCodeEnum : TypeCodeEnum.values()) {
|
||||
if (typeCodeEnum.type.equalsIgnoreCase(type)) {
|
||||
return typeCodeEnum.code;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TypeCodeEnum{" +
|
||||
"code=" + code +
|
||||
", type='" + type + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.njcn.cloud.pojo.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 终端消息
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-11-07
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("app_dev_msg")
|
||||
@ApiModel(value = "AppDevMsg对象", description = "终端消息")
|
||||
public class AppDevMsg {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("终端消息列表Guid")
|
||||
@TableId("DevMsg_Index")
|
||||
private String devmsgIndex;
|
||||
|
||||
@ApiModelProperty("(关联pqs_top_msg表top_Id)消息id")
|
||||
@TableField("Top_Id")
|
||||
private String topId;
|
||||
|
||||
@ApiModelProperty("(关联app_user表User_Index)权限用户id")
|
||||
@TableField("User_Index")
|
||||
private String userIndex;
|
||||
|
||||
@ApiModelProperty("统计时间")
|
||||
@TableField("Time_Id")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime timeId;
|
||||
|
||||
@ApiModelProperty("读取状态(0:未读,1:已读,2:删除)")
|
||||
@TableField("State")
|
||||
private Integer state;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.njcn.cloud.pojo.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 终端消息详情
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-11-07
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("app_dev_msg_ass")
|
||||
@ApiModel(value = "AppDevMsgAss对象", description = "终端消息详情")
|
||||
public class AppDevMsgAss {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("终端消息列表Guid")
|
||||
@TableField("DevMsg_Index")
|
||||
private String devmsgIndex;
|
||||
|
||||
@ApiModelProperty("统计时间")
|
||||
@TableField("Time_Id")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime timeId;
|
||||
|
||||
@ApiModelProperty("(关联pq_device表dev_index)")
|
||||
@TableField("Dev_Index")
|
||||
private Integer devIndex;
|
||||
|
||||
@TableField("Alarm_Num")
|
||||
private Integer alarmNum;
|
||||
|
||||
@TableField("ComOut_NUM")
|
||||
private Integer comoutNum;
|
||||
|
||||
@TableField("Flow_Num")
|
||||
private Float flowNum;
|
||||
|
||||
|
||||
}
|
||||
@@ -4,8 +4,6 @@ import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.cloud.pojo.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
@@ -27,7 +28,7 @@ public class AppEventMsg {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("暂态消息Guid")
|
||||
@TableField("EventMsg_Index")
|
||||
@TableId("EventMsg_Index")
|
||||
private String eventmsgIndex;
|
||||
|
||||
@ApiModelProperty("(关联app_user表User_Index)权限用户id")
|
||||
@@ -36,11 +37,11 @@ public class AppEventMsg {
|
||||
|
||||
@ApiModelProperty("(关联表PQS_EventDetail)事件总表Guid")
|
||||
@TableField("EventDetail_Index")
|
||||
private LocalDateTime eventdetailIndex;
|
||||
private String eventdetailIndex;
|
||||
|
||||
@ApiModelProperty("读取状态(0:未读,1:已读,2:删除)")
|
||||
@TableField("state")
|
||||
private String state;
|
||||
private Integer state;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.njcn.cloud.pojo.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 推送消息设置
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-11-10
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("app_info_set")
|
||||
@ApiModel(value = "AppInfoSet对象", description = "推送消息设置")
|
||||
public class AppInfoSet extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("用户索引")
|
||||
@TableId("User_Index")
|
||||
private String userIndex;
|
||||
|
||||
@ApiModelProperty("0:false ;1:true 暂态消息模块")
|
||||
@TableField("Event_Info")
|
||||
private Integer eventInfo;
|
||||
|
||||
@ApiModelProperty("0:false ;1:true 稳态消息模块")
|
||||
@TableField("Target_Info")
|
||||
private Integer targetInfo;
|
||||
|
||||
@ApiModelProperty("0:false ;1:true 终端消息模块")
|
||||
@TableField("Device_Info")
|
||||
private Integer deviceInfo;
|
||||
|
||||
@ApiModelProperty("0:false ;1:true 系统消息模块")
|
||||
@TableField("System_Info")
|
||||
private Integer systemInfo;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.njcn.cloud.pojo.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Description: 部门监测点关系表
|
||||
* @Author: wr
|
||||
* @Date: 2023/11/1 10:33
|
||||
*/
|
||||
@Data
|
||||
@TableName("pq_dept_line")
|
||||
public class DeptLine {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 部门Id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 监测点Id
|
||||
*/
|
||||
private String lineId;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,130 +0,0 @@
|
||||
package com.njcn.cloud.pojo.dto;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author wr
|
||||
* @since 2023-11-02
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("r_mp_event_detail")
|
||||
@ApiModel(value = "RMpEventDetail对象", description = "")
|
||||
public class RMpEventDetail {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("暂时事件ID")
|
||||
@TableId("event_id")
|
||||
private String eventId;
|
||||
|
||||
@ApiModelProperty("监测点ID")
|
||||
@TableField("measurement_point_id")
|
||||
private String measurementPointId;
|
||||
|
||||
@ApiModelProperty("开始时间")
|
||||
@TableField("start_time")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@ApiModelProperty("统计指标类型(字典表PQS_Dicdata)")
|
||||
@TableField("event_type")
|
||||
private String eventType;
|
||||
|
||||
@ApiModelProperty("暂降原因(字典表PQS_Dicdata)")
|
||||
@TableField("advance_reason")
|
||||
private String advanceReason;
|
||||
|
||||
@ApiModelProperty("暂降类型(字典表PQS_Dicdata)")
|
||||
@TableField("advance_type")
|
||||
private String advanceType;
|
||||
|
||||
@ApiModelProperty("事件关联分析表Guid")
|
||||
@TableField("eventass_index")
|
||||
private String eventassIndex;
|
||||
|
||||
@TableField("dq_time")
|
||||
private Double dqTime;
|
||||
|
||||
@ApiModelProperty("特征值计算更新时间(外键PQS_Relevance的Time字段)")
|
||||
@TableField("deal_time")
|
||||
private LocalDateTime dealTime;
|
||||
|
||||
@ApiModelProperty("默认事件个数为0")
|
||||
@TableField("num")
|
||||
private Integer num;
|
||||
|
||||
@ApiModelProperty("波形文件是否从装置招到本地(0:未招,1:已招)默认值为0")
|
||||
@TableField("file_flag")
|
||||
private Boolean fileFlag;
|
||||
|
||||
@ApiModelProperty("特征值计算标志(0,未处理;1,已处理; 2,已处理,无结果;3,计算失败)默认值为0")
|
||||
@TableField("deal_flag")
|
||||
private Boolean dealFlag;
|
||||
|
||||
@ApiModelProperty("处理结果第一条事件发生时间(读comtra文件获取)")
|
||||
@TableField("first_time")
|
||||
private LocalDateTime firstTime;
|
||||
|
||||
@ApiModelProperty("处理结果第一条事件暂降类型(字典表PQS_Dicdata)")
|
||||
@TableField("first_type")
|
||||
private String firstType;
|
||||
|
||||
@ApiModelProperty("处理结果第一条事件发生时间毫秒(读comtra文件获取)")
|
||||
@TableField("first_ms")
|
||||
private BigDecimal firstMs;
|
||||
|
||||
@ApiModelProperty("暂降能量")
|
||||
@TableField("energy")
|
||||
private Double energy;
|
||||
|
||||
@ApiModelProperty("暂降严重度")
|
||||
@TableField("severity")
|
||||
private Double severity;
|
||||
|
||||
@ApiModelProperty("暂降源与监测位置关系 Upper:上游;Lower :下游;Unknown :未知;为空则是未计算")
|
||||
@TableField("sagsource")
|
||||
private String sagsource;
|
||||
|
||||
@ApiModelProperty("持续时间,单位秒")
|
||||
@TableField("duration")
|
||||
private BigDecimal duration;
|
||||
|
||||
@ApiModelProperty("特征幅值")
|
||||
@TableField("feature_amplitude")
|
||||
private BigDecimal featureAmplitude;
|
||||
|
||||
@ApiModelProperty("相别")
|
||||
@TableField("phase")
|
||||
private String phase;
|
||||
|
||||
@ApiModelProperty("事件描述")
|
||||
@TableField("event_describe")
|
||||
private String eventDescribe;
|
||||
|
||||
@ApiModelProperty("波形路径")
|
||||
@TableField("wave_path")
|
||||
private String wavePath;
|
||||
|
||||
@ApiModelProperty("暂态事件上送时间")
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@TableField("transient_value")
|
||||
private Double transientValue;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.njcn.cloud.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
public class DevComTJ implements Serializable {
|
||||
|
||||
@ApiModelProperty("所有终端")
|
||||
private Integer allDevCount;
|
||||
|
||||
@ApiModelProperty("异常终端")
|
||||
private Integer errDevCount;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.njcn.cloud.pojo.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 终端消息详情
|
||||
* @Author: wr
|
||||
* @Date: 2023/11/7 15:26
|
||||
*/
|
||||
@Data
|
||||
public class DevMsgAssInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty("终端Id")
|
||||
private String devIndex;
|
||||
|
||||
@ApiModelProperty("终端名称")
|
||||
private String devName;
|
||||
|
||||
@ApiModelProperty("ip")
|
||||
private String ip;
|
||||
|
||||
@ApiModelProperty("供电公司")
|
||||
private String gdName;
|
||||
|
||||
@ApiModelProperty("变电站名称")
|
||||
private String bdzName;
|
||||
|
||||
@ApiModelProperty("")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime timeID;
|
||||
|
||||
@ApiModelProperty("")
|
||||
private int comOutNum;
|
||||
|
||||
@ApiModelProperty("")
|
||||
private String flowInfo;
|
||||
|
||||
@ApiModelProperty("")
|
||||
private List<String> devMsgDescribe;
|
||||
|
||||
@ApiModelProperty("")
|
||||
private List<String> alarmInfo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.njcn.cloud.pojo.vo;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 终端消息详情
|
||||
* @Author: wr
|
||||
* @Date: 2023/11/7 10:59
|
||||
*/
|
||||
@Data
|
||||
public class DevMsgDetailInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty("终端消息id")
|
||||
private String topId;
|
||||
|
||||
@ApiModelProperty("终端Id")
|
||||
private String devIndex;
|
||||
|
||||
@ApiModelProperty("供电公司")
|
||||
private String gdName;
|
||||
|
||||
@ApiModelProperty("变电站名称")
|
||||
private String bdzName;
|
||||
|
||||
@ApiModelProperty("终端名称")
|
||||
private String devName;
|
||||
|
||||
@ApiModelProperty("ip")
|
||||
private String ip;
|
||||
|
||||
@ApiModelProperty("统计时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private LocalDateTime timeID;
|
||||
|
||||
@ApiModelProperty("总告警次数")
|
||||
private Integer allNum;
|
||||
|
||||
@ApiModelProperty("终端告警")
|
||||
private Integer alarmNum;
|
||||
|
||||
@ApiModelProperty("通讯中断")
|
||||
private Integer comOutNum;
|
||||
|
||||
@ApiModelProperty("终端流量百分比")
|
||||
private Float flowNum;
|
||||
|
||||
@ApiModelProperty("中断描述")
|
||||
private List<String> comoutDesc;
|
||||
|
||||
@ApiModelProperty("告警描述")
|
||||
private List<String> alarmDesc;
|
||||
|
||||
@ApiModelProperty("读取状态")
|
||||
private Integer state;
|
||||
public void setComoutDesc(String comoutDesc) {
|
||||
List<String> collect =new ArrayList<>();
|
||||
if(StrUtil.isNotBlank(comoutDesc)){
|
||||
String[] split = comoutDesc.split(",");
|
||||
collect = Arrays.stream(split).sorted().collect(Collectors.toList());
|
||||
}
|
||||
this.comoutDesc = collect;
|
||||
}
|
||||
|
||||
public void setAlarmDesc(String alarmDesc) {
|
||||
List<String> collect =new ArrayList<>();
|
||||
if(StrUtil.isNotBlank(alarmDesc)){
|
||||
String[] split = alarmDesc.split(",");
|
||||
collect = Arrays.stream(split).sorted().collect(Collectors.toList());
|
||||
}
|
||||
this.alarmDesc = collect;
|
||||
}
|
||||
}
|
||||
@@ -43,13 +43,13 @@ public class EventInfoDetailVO implements Serializable {
|
||||
private LocalDateTime timeID;
|
||||
|
||||
@ApiModelProperty("持续时间")
|
||||
private Float persistTime;
|
||||
private Double persistTime;
|
||||
|
||||
@ApiModelProperty("处理结果第一条事件发生时间毫秒")
|
||||
private Long ms;
|
||||
private Double ms;
|
||||
|
||||
@ApiModelProperty("特征幅值")
|
||||
private Float eventValue;
|
||||
private Double eventValue;
|
||||
|
||||
@ApiModelProperty("报告状态")
|
||||
private int report;
|
||||
|
||||
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@@ -27,16 +28,16 @@ public class EventMsgDetailVO implements Serializable {
|
||||
|
||||
@ApiModelProperty("触发时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date timeID;
|
||||
private LocalDateTime timeID;
|
||||
|
||||
@ApiModelProperty("持续时间")
|
||||
private Float persistTime;
|
||||
private Double persistTime;
|
||||
|
||||
@ApiModelProperty("毫秒数")
|
||||
private Long ms;
|
||||
private Double ms;
|
||||
|
||||
@ApiModelProperty("特征幅值")
|
||||
private Float eventValue;
|
||||
private Double eventValue;
|
||||
|
||||
@ApiModelProperty("终端信息")
|
||||
private String lineInfo;
|
||||
@@ -45,7 +46,7 @@ public class EventMsgDetailVO implements Serializable {
|
||||
private String eventMsgIndex;
|
||||
|
||||
@ApiModelProperty("读取状态")
|
||||
private int state;
|
||||
private Integer state;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.njcn.cloud.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Description: 监测点信息
|
||||
* @Author: wr
|
||||
* @Date: 2023/11/3 14:36
|
||||
*/
|
||||
@Data
|
||||
public class LineDetailVO implements Serializable {
|
||||
@ApiModelProperty("供电公司名称")
|
||||
private String gdName;
|
||||
|
||||
@ApiModelProperty("变电站名称")
|
||||
private String subName;
|
||||
|
||||
@ApiModelProperty("终端名称")
|
||||
private String devName;
|
||||
|
||||
@ApiModelProperty("监测点Id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty("监测点名称")
|
||||
private String lineName;
|
||||
|
||||
@ApiModelProperty("测量间隔(1-10分钟)")
|
||||
private Integer timeInterval;
|
||||
|
||||
@ApiModelProperty("网络参数")
|
||||
private String ip;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.cloud.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class MsgInfo implements Serializable {
|
||||
|
||||
@ApiModelProperty("暂态消息Ids")
|
||||
private List<String> eventMsgList;
|
||||
|
||||
@ApiModelProperty("稳态消息Ids")
|
||||
private List<String> steadyMsgList;
|
||||
|
||||
@ApiModelProperty("终端消息Ids")
|
||||
private List<String> deviceMsgList;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.cloud.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 稳态越限图形数据
|
||||
* @Author: wr
|
||||
* @Date: 2023/11/6 9:30
|
||||
*/
|
||||
@Data
|
||||
public class SteadyUrlData {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("时间")
|
||||
private String time;
|
||||
|
||||
@ApiModelProperty("数值")
|
||||
private Float value;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.njcn.cloud.utils;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
|
||||
/**
|
||||
* @author wr
|
||||
* @description
|
||||
* @date 2023/11/9 9:34
|
||||
*/
|
||||
public class PubUtil {
|
||||
|
||||
public static String lineName(String sagSource,String lineName){
|
||||
if(StrUtil.isNotBlank(sagSource)&&"Upper".equals(sagSource)){
|
||||
return lineName+" (暂降源位置:上游)";
|
||||
}
|
||||
if(StrUtil.isNotBlank(sagSource)&&"Lower".equals(sagSource)){
|
||||
return lineName+" (暂降源位置:下游)";
|
||||
}
|
||||
if(StrUtil.isNotBlank(sagSource)){
|
||||
return lineName+" (暂降源位置:未知)";
|
||||
}
|
||||
return lineName;
|
||||
}
|
||||
}
|
||||
@@ -96,12 +96,11 @@ public class SmsUtil {
|
||||
* 发送消息
|
||||
* @param phone 手机号
|
||||
* @param template 模板号
|
||||
* @param param 短信模板中定义的参数名称
|
||||
* @param value 参数实际值
|
||||
* @param smsValue 短信模板中定义的参数名称
|
||||
* @return sendSmsResponse 发送消息结果
|
||||
* @throws ClientException
|
||||
*/
|
||||
public SendSmsResponse sendSms(String phone, String template, String param, String value) throws ClientException {
|
||||
public SendSmsResponse sendSms(String phone, String template,String smsValue) throws ClientException {
|
||||
System.setProperty(DEFAULTCONNECTTIMEOUT, message.getTime());
|
||||
System.setProperty(DEFAULTREADTIMEOUT, message.getTime());
|
||||
//初始化ascClient,暂时不支持多region(请勿修改)
|
||||
@@ -115,8 +114,7 @@ public class SmsUtil {
|
||||
request.setSignName(message.getAutoGraph());
|
||||
//必填:短信模板-可在短信控制台中找到,发送国际/港澳台消息时,请使用国际/港澳台短信模版
|
||||
request.setTemplateCode(template);
|
||||
String code = "{\""+param+"\":\"" + value + "\"}";
|
||||
request.setTemplateParam(code);
|
||||
request.setTemplateParam(smsValue);
|
||||
//请求失败这里会抛ClientException异常
|
||||
return acsClient.getAcsResponse(request);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user