移动代码
This commit is contained in:
@@ -14,6 +14,28 @@
|
||||
|
||||
<name>cs-warn-api</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-db</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-microservice</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>8</maven.compiler.source>
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.njcn.cswarn.pojo.parm;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/5/16 16:25【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class CsEquipmentAlarmAddParm {
|
||||
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@ApiModelProperty(value = "项目Id")
|
||||
@NotBlank(message="项目Id不能为空!")
|
||||
private String projectId;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@ApiModelProperty(value = "设备id")
|
||||
@NotBlank(message="设备id不能为空!")
|
||||
private String equipmentId;
|
||||
|
||||
/**
|
||||
* 告警信息
|
||||
*/
|
||||
@ApiModelProperty(value = "告警信息")
|
||||
private String alarmMsg;
|
||||
|
||||
/**
|
||||
* 告警级别(字典表)
|
||||
*/
|
||||
@ApiModelProperty(value = "告警级别")
|
||||
@NotBlank(message="告警级别不能为空!")
|
||||
private String alarmLevel;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@NotNull(message="开始时间不能为空!")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
@NotNull(message="结束时间不能为空!")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.njcn.cswarn.pojo.parm;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/5/16 16:25【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class CsEquipmentAlarmPageParm {
|
||||
@NotNull(message="当前页不能为空!")
|
||||
@Min(value = 1, message = "当前页不能为0")
|
||||
@ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true)
|
||||
private Integer currentPage;
|
||||
/**显示条数*/
|
||||
@NotNull(message="显示条数不能为空!")
|
||||
@ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true)
|
||||
private Integer pageSize;
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@ApiModelProperty(value = "项目Id")
|
||||
private String projectId;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@ApiModelProperty(value = "设备id")
|
||||
private String equipmentId;
|
||||
|
||||
|
||||
/**
|
||||
* 告警级别(字典表)
|
||||
*/
|
||||
@ApiModelProperty(value = "告警级别")
|
||||
private String alarmLevel;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.njcn.cswarn.pojo.parm;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/5/16 16:25【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class CsEventDetailPageParm {
|
||||
@NotNull(message="当前页不能为空!")
|
||||
@Min(value = 1, message = "当前页不能为0")
|
||||
@ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true)
|
||||
private Integer currentPage;
|
||||
/**显示条数*/
|
||||
@NotNull(message="显示条数不能为空!")
|
||||
@ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true)
|
||||
private Integer pageSize;
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@ApiModelProperty(value = "项目Id")
|
||||
private String projectId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.njcn.cswarn.pojo.parm;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/5/16 16:25【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class CsStatLimitRatePageParm {
|
||||
@NotNull(message="当前页不能为空!")
|
||||
@Min(value = 1, message = "当前页不能为0")
|
||||
@ApiModelProperty(value = "当前页",name = "currentPage",dataType ="Integer",required = true)
|
||||
private Integer currentPage;
|
||||
/**显示条数*/
|
||||
@NotNull(message="显示条数不能为空!")
|
||||
@ApiModelProperty(value = "显示条数",name = "pageSize",dataType ="Integer",required = true)
|
||||
private Integer pageSize;
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@ApiModelProperty(value = "项目Id")
|
||||
private String projectId;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.njcn.cswarn.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
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 io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/5/16 16:25【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "cs_equipment_alarm")
|
||||
public class CsEquipmentAlarmPO extends BaseEntity {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
@TableField(value = "project_id")
|
||||
private String projectId;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
@TableField(value = "equipment_id")
|
||||
private String equipmentId;
|
||||
|
||||
/**
|
||||
* 告警信息
|
||||
*/
|
||||
@TableField(value = "alarm_msg")
|
||||
private String alarmMsg;
|
||||
|
||||
/**
|
||||
* 告警级别(字典表)
|
||||
*/
|
||||
@TableField(value = "alarm_level")
|
||||
private String alarmLevel;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@TableField(value = "start_time")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@TableField(value = "end_time")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 状态(0:删除 1:正常)
|
||||
*/
|
||||
@TableField(value = "`status`")
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
public static final String COL_ID = "id";
|
||||
|
||||
public static final String COL_PROJECT_ID = "project_id";
|
||||
|
||||
public static final String COL_EQUIPMENT_ID = "equipment_id";
|
||||
|
||||
public static final String COL_ALARM_MSG = "alarm_msg";
|
||||
|
||||
public static final String COL_ALARM_LEVEL = "alarm_level";
|
||||
|
||||
public static final String COL_START_TIME = "start_time";
|
||||
|
||||
public static final String COL_END_TIME = "end_time";
|
||||
|
||||
public static final String COL_STATUS = "status";
|
||||
|
||||
public static final String COL_CREATE_BY = "create_by";
|
||||
|
||||
public static final String COL_CREATE_TIME = "create_time";
|
||||
|
||||
public static final String COL_UPDATE_BY = "update_by";
|
||||
|
||||
public static final String COL_UPDATE_TIME = "update_time";
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
package com.njcn.cswarn.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/5/17 10:51【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "cs_event_detail")
|
||||
public class CsEventDetailPO {
|
||||
/**
|
||||
* 暂时事件ID
|
||||
*/
|
||||
@TableId(value = "event_id", type = IdType.ASSIGN_UUID)
|
||||
private String eventId;
|
||||
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
@TableField(value = "measurement_point_id")
|
||||
private String measurementPointId;
|
||||
|
||||
/**
|
||||
* 统计指标类型
|
||||
*/
|
||||
@TableField(value = "event_type")
|
||||
private String eventType;
|
||||
|
||||
/**
|
||||
* 暂降原因(字典表PQS_Dicdata)
|
||||
*/
|
||||
@TableField(value = "advance_reason")
|
||||
private String advanceReason;
|
||||
|
||||
/**
|
||||
* 暂降类型(字典表PQS_Dicdata)
|
||||
*/
|
||||
@TableField(value = "advance_type")
|
||||
private String advanceType;
|
||||
|
||||
/**
|
||||
* 事件关联分析表Guid
|
||||
*/
|
||||
@TableField(value = "eventass_index")
|
||||
private String eventassIndex;
|
||||
|
||||
@TableField(value = "dq_time")
|
||||
private Double dqTime;
|
||||
|
||||
/**
|
||||
* 特征值计算更新时间(外键PQS_Relevance的Time字段)
|
||||
*/
|
||||
@TableField(value = "deal_time")
|
||||
private Date dealTime;
|
||||
|
||||
/**
|
||||
* 默认事件个数为0
|
||||
*/
|
||||
@TableField(value = "num")
|
||||
private Integer num;
|
||||
|
||||
/**
|
||||
* 波形文件是否从装置招到本地(0:未招,1:已招)默认值为0
|
||||
*/
|
||||
@TableField(value = "file_flag")
|
||||
private Boolean fileFlag;
|
||||
|
||||
/**
|
||||
* 特征值计算标志(0,未处理;1,已处理; 2,已处理,无结果;3,计算失败)默认值为0
|
||||
*/
|
||||
@TableField(value = "deal_flag")
|
||||
private Boolean dealFlag;
|
||||
|
||||
/**
|
||||
* 处理结果第一条事件发生时间(读comtra文件获取)
|
||||
*/
|
||||
@TableField(value = "first_time")
|
||||
private Date firstTime;
|
||||
|
||||
/**
|
||||
* 处理结果第一条事件暂降类型(字典表PQS_Dicdata)
|
||||
*/
|
||||
@TableField(value = "first_type")
|
||||
private String firstType;
|
||||
|
||||
/**
|
||||
* 处理结果第一条事件发生时间毫秒(读comtra文件获取)
|
||||
*/
|
||||
@TableField(value = "first_ms")
|
||||
private BigDecimal firstMs;
|
||||
|
||||
/**
|
||||
* 暂降能量
|
||||
*/
|
||||
@TableField(value = "energy")
|
||||
private Double energy;
|
||||
|
||||
/**
|
||||
* 暂降严重度
|
||||
*/
|
||||
@TableField(value = "severity")
|
||||
private Double severity;
|
||||
|
||||
/**
|
||||
* 暂降源与监测位置关系 Upper:上游;Lower :下游;Unknown :未知;为空则是未计算
|
||||
*/
|
||||
@TableField(value = "sagsource")
|
||||
private String sagsource;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@TableField(value = "start_time")
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 持续时间,单位秒
|
||||
*/
|
||||
@TableField(value = "duration")
|
||||
private BigDecimal duration;
|
||||
|
||||
/**
|
||||
* 特征幅值
|
||||
*/
|
||||
@TableField(value = "feature_amplitude")
|
||||
private BigDecimal featureAmplitude;
|
||||
|
||||
/**
|
||||
* 相别
|
||||
*/
|
||||
@TableField(value = "phase")
|
||||
private String phase;
|
||||
|
||||
/**
|
||||
* 事件描述
|
||||
*/
|
||||
@TableField(value = "event_describe")
|
||||
private String eventDescribe;
|
||||
|
||||
/**
|
||||
* 波形路径
|
||||
*/
|
||||
@TableField(value = "wave_path")
|
||||
private String wavePath;
|
||||
|
||||
/**
|
||||
* 暂态事件上送时间
|
||||
*/
|
||||
@TableField(value = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(value = "transient_value")
|
||||
private Double transientValue;
|
||||
|
||||
public static final String COL_EVENT_ID = "event_id";
|
||||
|
||||
public static final String COL_MEASUREMENT_POINT_ID = "measurement_point_id";
|
||||
|
||||
public static final String COL_EVENT_TYPE = "event_type";
|
||||
|
||||
public static final String COL_ADVANCE_REASON = "advance_reason";
|
||||
|
||||
public static final String COL_ADVANCE_TYPE = "advance_type";
|
||||
|
||||
public static final String COL_EVENTASS_INDEX = "eventass_index";
|
||||
|
||||
public static final String COL_DQ_TIME = "dq_time";
|
||||
|
||||
public static final String COL_DEAL_TIME = "deal_time";
|
||||
|
||||
public static final String COL_NUM = "num";
|
||||
|
||||
public static final String COL_FILE_FLAG = "file_flag";
|
||||
|
||||
public static final String COL_DEAL_FLAG = "deal_flag";
|
||||
|
||||
public static final String COL_FIRST_TIME = "first_time";
|
||||
|
||||
public static final String COL_FIRST_TYPE = "first_type";
|
||||
|
||||
public static final String COL_FIRST_MS = "first_ms";
|
||||
|
||||
public static final String COL_ENERGY = "energy";
|
||||
|
||||
public static final String COL_SEVERITY = "severity";
|
||||
|
||||
public static final String COL_SAGSOURCE = "sagsource";
|
||||
|
||||
public static final String COL_START_TIME = "start_time";
|
||||
|
||||
public static final String COL_DURATION = "duration";
|
||||
|
||||
public static final String COL_FEATURE_AMPLITUDE = "feature_amplitude";
|
||||
|
||||
public static final String COL_PHASE = "phase";
|
||||
|
||||
public static final String COL_EVENT_DESCRIBE = "event_describe";
|
||||
|
||||
public static final String COL_WAVE_PATH = "wave_path";
|
||||
|
||||
public static final String COL_CREATE_TIME = "create_time";
|
||||
|
||||
public static final String COL_TRANSIENT_VALUE = "transient_value";
|
||||
}
|
||||
@@ -0,0 +1,244 @@
|
||||
package com.njcn.cswarn.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/5/17 13:45【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "cs_stat_limit_rate_d")
|
||||
public class CsStatLimitRateDPO {
|
||||
@TableField(value = "time_id")
|
||||
private Date timeId;
|
||||
|
||||
@TableField(value = "my_index")
|
||||
private String myIndex;
|
||||
|
||||
@TableField(value = "phasic_type")
|
||||
private String phasicType;
|
||||
|
||||
@TableField(value = "all_time")
|
||||
private Integer allTime;
|
||||
|
||||
@TableField(value = "flicker_all_time")
|
||||
private Integer flickerAllTime;
|
||||
|
||||
@TableField(value = "freq_dev_overtime")
|
||||
private Integer freqDevOvertime;
|
||||
|
||||
@TableField(value = "voltage_dev_overtime")
|
||||
private Integer voltageDevOvertime;
|
||||
|
||||
@TableField(value = "ubalance_overtime")
|
||||
private Integer ubalanceOvertime;
|
||||
|
||||
@TableField(value = "flicker_overtime")
|
||||
private Integer flickerOvertime;
|
||||
|
||||
@TableField(value = "uaberrance_overtime")
|
||||
private Integer uaberranceOvertime;
|
||||
|
||||
@TableField(value = "uharm_2_overtime")
|
||||
private Integer uharm2Overtime;
|
||||
|
||||
@TableField(value = "uharm_3_overtime")
|
||||
private Integer uharm3Overtime;
|
||||
|
||||
@TableField(value = "uharm_4_overtime")
|
||||
private Integer uharm4Overtime;
|
||||
|
||||
@TableField(value = "uharm_5_overtime")
|
||||
private Integer uharm5Overtime;
|
||||
|
||||
@TableField(value = "uharm_6_overtime")
|
||||
private Integer uharm6Overtime;
|
||||
|
||||
@TableField(value = "uharm_7_overtime")
|
||||
private Integer uharm7Overtime;
|
||||
|
||||
@TableField(value = "uharm_8_overtime")
|
||||
private Integer uharm8Overtime;
|
||||
|
||||
@TableField(value = "uharm_9_overtime")
|
||||
private Integer uharm9Overtime;
|
||||
|
||||
@TableField(value = "uharm_10_overtime")
|
||||
private Integer uharm10Overtime;
|
||||
|
||||
@TableField(value = "uharm_11_overtime")
|
||||
private Integer uharm11Overtime;
|
||||
|
||||
@TableField(value = "uharm_12_overtime")
|
||||
private Integer uharm12Overtime;
|
||||
|
||||
@TableField(value = "uharm_13_overtime")
|
||||
private Integer uharm13Overtime;
|
||||
|
||||
@TableField(value = "uharm_14_overtime")
|
||||
private Integer uharm14Overtime;
|
||||
|
||||
@TableField(value = "uharm_15_overtime")
|
||||
private Integer uharm15Overtime;
|
||||
|
||||
@TableField(value = "uharm_16_overtime")
|
||||
private Integer uharm16Overtime;
|
||||
|
||||
@TableField(value = "uharm_17_overtime")
|
||||
private Integer uharm17Overtime;
|
||||
|
||||
@TableField(value = "uharm_18_overtime")
|
||||
private Integer uharm18Overtime;
|
||||
|
||||
@TableField(value = "uharm_19_overtime")
|
||||
private Integer uharm19Overtime;
|
||||
|
||||
@TableField(value = "uharm_20_overtime")
|
||||
private Integer uharm20Overtime;
|
||||
|
||||
@TableField(value = "uharm_21_overtime")
|
||||
private Integer uharm21Overtime;
|
||||
|
||||
@TableField(value = "uharm_22_overtime")
|
||||
private Integer uharm22Overtime;
|
||||
|
||||
@TableField(value = "uharm_23_overtime")
|
||||
private Integer uharm23Overtime;
|
||||
|
||||
@TableField(value = "uharm_24_overtime")
|
||||
private Integer uharm24Overtime;
|
||||
|
||||
@TableField(value = "uharm_25_overtime")
|
||||
private Integer uharm25Overtime;
|
||||
|
||||
@TableField(value = "iharm_2_overtime")
|
||||
private Integer iharm2Overtime;
|
||||
|
||||
@TableField(value = "iharm_3_overtime")
|
||||
private Integer iharm3Overtime;
|
||||
|
||||
@TableField(value = "iharm_4_overtime")
|
||||
private Integer iharm4Overtime;
|
||||
|
||||
@TableField(value = "iharm_5_overtime")
|
||||
private Integer iharm5Overtime;
|
||||
|
||||
@TableField(value = "iharm_6_overtime")
|
||||
private Integer iharm6Overtime;
|
||||
|
||||
@TableField(value = "iharm_7_overtime")
|
||||
private Integer iharm7Overtime;
|
||||
|
||||
@TableField(value = "iharm_8_overtime")
|
||||
private Integer iharm8Overtime;
|
||||
|
||||
@TableField(value = "iharm_9_overtime")
|
||||
private Integer iharm9Overtime;
|
||||
|
||||
@TableField(value = "iharm_10_overtime")
|
||||
private Integer iharm10Overtime;
|
||||
|
||||
@TableField(value = "iharm_11_overtime")
|
||||
private Integer iharm11Overtime;
|
||||
|
||||
@TableField(value = "iharm_12_overtime")
|
||||
private Integer iharm12Overtime;
|
||||
|
||||
@TableField(value = "iharm_13_overtime")
|
||||
private Integer iharm13Overtime;
|
||||
|
||||
@TableField(value = "iharm_14_overtime")
|
||||
private Integer iharm14Overtime;
|
||||
|
||||
@TableField(value = "iharm_15_overtime")
|
||||
private Integer iharm15Overtime;
|
||||
|
||||
@TableField(value = "iharm_16_overtime")
|
||||
private Integer iharm16Overtime;
|
||||
|
||||
@TableField(value = "iharm_17_overtime")
|
||||
private Integer iharm17Overtime;
|
||||
|
||||
@TableField(value = "iharm_18_overtime")
|
||||
private Integer iharm18Overtime;
|
||||
|
||||
@TableField(value = "iharm_19_overtime")
|
||||
private Integer iharm19Overtime;
|
||||
|
||||
@TableField(value = "iharm_20_overtime")
|
||||
private Integer iharm20Overtime;
|
||||
|
||||
@TableField(value = "iharm_21_overtime")
|
||||
private Integer iharm21Overtime;
|
||||
|
||||
@TableField(value = "iharm_22_overtime")
|
||||
private Integer iharm22Overtime;
|
||||
|
||||
@TableField(value = "iharm_23_overtime")
|
||||
private Integer iharm23Overtime;
|
||||
|
||||
@TableField(value = "iharm_24_overtime")
|
||||
private Integer iharm24Overtime;
|
||||
|
||||
@TableField(value = "iharm_25_overtime")
|
||||
private Integer iharm25Overtime;
|
||||
|
||||
@TableField(value = "inuharm_1_overtime")
|
||||
private Integer inuharm1Overtime;
|
||||
|
||||
@TableField(value = "inuharm_2_overtime")
|
||||
private Integer inuharm2Overtime;
|
||||
|
||||
@TableField(value = "inuharm_3_overtime")
|
||||
private Integer inuharm3Overtime;
|
||||
|
||||
@TableField(value = "inuharm_4_overtime")
|
||||
private Integer inuharm4Overtime;
|
||||
|
||||
@TableField(value = "inuharm_5_overtime")
|
||||
private Integer inuharm5Overtime;
|
||||
|
||||
@TableField(value = "inuharm_6_overtime")
|
||||
private Integer inuharm6Overtime;
|
||||
|
||||
@TableField(value = "inuharm_7_overtime")
|
||||
private Integer inuharm7Overtime;
|
||||
|
||||
@TableField(value = "inuharm_8_overtime")
|
||||
private Integer inuharm8Overtime;
|
||||
|
||||
@TableField(value = "inuharm_9_overtime")
|
||||
private Integer inuharm9Overtime;
|
||||
|
||||
@TableField(value = "inuharm_10_overtime")
|
||||
private Integer inuharm10Overtime;
|
||||
|
||||
@TableField(value = "inuharm_11_overtime")
|
||||
private Integer inuharm11Overtime;
|
||||
|
||||
@TableField(value = "inuharm_12_overtime")
|
||||
private Integer inuharm12Overtime;
|
||||
|
||||
@TableField(value = "inuharm_13_overtime")
|
||||
private Integer inuharm13Overtime;
|
||||
|
||||
@TableField(value = "inuharm_14_overtime")
|
||||
private Integer inuharm14Overtime;
|
||||
|
||||
@TableField(value = "inuharm_15_overtime")
|
||||
private Integer inuharm15Overtime;
|
||||
|
||||
@TableField(value = "inuharm_16_overtime")
|
||||
private Integer inuharm16Overtime;
|
||||
|
||||
@TableField(value = "i_neg_overtime")
|
||||
private Integer iNegOvertime;
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.njcn.cswarn.pojo.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/5/16 16:25【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@TableName(value = "cs_equipment_alarm")
|
||||
public class CsEquipmentAlarmVO extends BaseEntity {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
/**
|
||||
* 项目Id
|
||||
*/
|
||||
private String projectId;
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 设备id
|
||||
*/
|
||||
private String equipmentId;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
private String equipmentName;
|
||||
|
||||
/**
|
||||
* 告警信息
|
||||
*/
|
||||
private String alarmMsg;
|
||||
|
||||
/**
|
||||
* 告警级别(字典表)
|
||||
*/
|
||||
private String alarmLevel;
|
||||
|
||||
/**
|
||||
* 告警级别名称
|
||||
*/
|
||||
private String alarmLevelName;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.njcn.cswarn.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/5/17 10:51【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class CsEventDetailVO {
|
||||
|
||||
private String projectId;
|
||||
|
||||
private String projectName;
|
||||
|
||||
private String subId;
|
||||
|
||||
private String subName;
|
||||
/**
|
||||
* 暂时事件ID
|
||||
*/
|
||||
private String eventId;
|
||||
|
||||
/**
|
||||
* 监测点ID
|
||||
*/
|
||||
private String measurementPointId;
|
||||
|
||||
private String lineName;
|
||||
|
||||
|
||||
/**
|
||||
* 统计指标类型
|
||||
*/
|
||||
private String eventType;
|
||||
|
||||
/**
|
||||
* 暂降原因(字典表PQS_Dicdata)
|
||||
*/
|
||||
private String advanceReason;
|
||||
|
||||
/**
|
||||
* 暂降类型(字典表PQS_Dicdata)
|
||||
*/
|
||||
private String advanceType;
|
||||
|
||||
/**
|
||||
* 事件关联分析表Guid
|
||||
*/
|
||||
private String eventassIndex;
|
||||
|
||||
private Double dqTime;
|
||||
|
||||
/**
|
||||
* 特征值计算更新时间(外键PQS_Relevance的Time字段)
|
||||
*/
|
||||
private Date dealTime;
|
||||
|
||||
/**
|
||||
* 默认事件个数为0
|
||||
*/
|
||||
private Integer num;
|
||||
|
||||
/**
|
||||
* 波形文件是否从装置招到本地(0:未招,1:已招)默认值为0
|
||||
*/
|
||||
private String fileFlag;
|
||||
|
||||
/**
|
||||
* 特征值计算标志(0,未处理;1,已处理; 2,已处理,无结果;3,计算失败)默认值为0
|
||||
*/
|
||||
private String dealFlag;
|
||||
|
||||
/**
|
||||
* 处理结果第一条事件发生时间(读comtra文件获取)
|
||||
*/
|
||||
private Date firstTime;
|
||||
|
||||
/**
|
||||
* 处理结果第一条事件暂降类型(字典表PQS_Dicdata)
|
||||
*/
|
||||
private String firstType;
|
||||
|
||||
/**
|
||||
* 处理结果第一条事件发生时间毫秒(读comtra文件获取)
|
||||
*/
|
||||
private BigDecimal firstMs;
|
||||
|
||||
/**
|
||||
* 暂降能量
|
||||
*/
|
||||
private Double energy;
|
||||
|
||||
/**
|
||||
* 暂降严重度
|
||||
*/
|
||||
private Double severity;
|
||||
|
||||
/**
|
||||
* 暂降源与监测位置关系 Upper:上游;Lower :下游;Unknown :未知;为空则是未计算
|
||||
*/
|
||||
private String sagsource;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
|
||||
/**
|
||||
* 持续时间,单位秒
|
||||
*/
|
||||
private BigDecimal duration;
|
||||
|
||||
/**
|
||||
* 特征幅值
|
||||
*/
|
||||
private BigDecimal featureAmplitude;
|
||||
|
||||
/**
|
||||
* 相别
|
||||
*/
|
||||
private String phase;
|
||||
|
||||
/**
|
||||
* 事件描述
|
||||
*/
|
||||
private String eventDescribe;
|
||||
|
||||
/**
|
||||
* 波形路径
|
||||
*/
|
||||
private String wavePath;
|
||||
|
||||
/**
|
||||
* 暂态事件上送时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
private Double transientValue;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
package com.njcn.cswarn.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/5/17 13:45【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class CsStatLimitRateDVO {
|
||||
|
||||
private String projectId;
|
||||
|
||||
private String projectName;
|
||||
|
||||
private String subId;
|
||||
|
||||
private String subName;
|
||||
|
||||
private Date timeId;
|
||||
|
||||
private String myIndex;
|
||||
|
||||
private String lineName;
|
||||
|
||||
private String phasicType;
|
||||
|
||||
private Integer allTime;
|
||||
|
||||
private Integer flickerAllTime;
|
||||
|
||||
private Integer freqDevOvertime;
|
||||
|
||||
private Integer voltageDevOvertime;
|
||||
|
||||
private Integer ubalanceOvertime;
|
||||
|
||||
private Integer flickerOvertime;
|
||||
|
||||
private Integer uaberranceOvertime;
|
||||
|
||||
private Integer uharm2Overtime;
|
||||
|
||||
private Integer uharm3Overtime;
|
||||
|
||||
private Integer uharm4Overtime;
|
||||
|
||||
private Integer uharm5Overtime;
|
||||
|
||||
private Integer uharm6Overtime;
|
||||
|
||||
private Integer uharm7Overtime;
|
||||
|
||||
private Integer uharm8Overtime;
|
||||
|
||||
private Integer uharm9Overtime;
|
||||
|
||||
private Integer uharm10Overtime;
|
||||
|
||||
private Integer uharm11Overtime;
|
||||
|
||||
private Integer uharm12Overtime;
|
||||
|
||||
private Integer uharm13Overtime;
|
||||
|
||||
private Integer uharm14Overtime;
|
||||
|
||||
private Integer uharm15Overtime;
|
||||
|
||||
private Integer uharm16Overtime;
|
||||
|
||||
private Integer uharm17Overtime;
|
||||
|
||||
private Integer uharm18Overtime;
|
||||
|
||||
private Integer uharm19Overtime;
|
||||
|
||||
private Integer uharm20Overtime;
|
||||
|
||||
private Integer uharm21Overtime;
|
||||
|
||||
private Integer uharm22Overtime;
|
||||
|
||||
private Integer uharm23Overtime;
|
||||
|
||||
private Integer uharm24Overtime;
|
||||
|
||||
private Integer uharm25Overtime;
|
||||
|
||||
private Integer iharm2Overtime;
|
||||
|
||||
private Integer iharm3Overtime;
|
||||
|
||||
private Integer iharm4Overtime;
|
||||
|
||||
private Integer iharm5Overtime;
|
||||
|
||||
private Integer iharm6Overtime;
|
||||
|
||||
private Integer iharm7Overtime;
|
||||
|
||||
private Integer iharm8Overtime;
|
||||
|
||||
private Integer iharm9Overtime;
|
||||
|
||||
private Integer iharm10Overtime;
|
||||
|
||||
private Integer iharm11Overtime;
|
||||
|
||||
private Integer iharm12Overtime;
|
||||
|
||||
private Integer iharm13Overtime;
|
||||
|
||||
private Integer iharm14Overtime;
|
||||
|
||||
private Integer iharm15Overtime;
|
||||
|
||||
private Integer iharm16Overtime;
|
||||
|
||||
private Integer iharm17Overtime;
|
||||
|
||||
private Integer iharm18Overtime;
|
||||
|
||||
private Integer iharm19Overtime;
|
||||
|
||||
private Integer iharm20Overtime;
|
||||
|
||||
private Integer iharm21Overtime;
|
||||
|
||||
private Integer iharm22Overtime;
|
||||
|
||||
private Integer iharm23Overtime;
|
||||
|
||||
private Integer iharm24Overtime;
|
||||
|
||||
private Integer iharm25Overtime;
|
||||
|
||||
private Integer inuharm1Overtime;
|
||||
|
||||
private Integer inuharm2Overtime;
|
||||
|
||||
private Integer inuharm3Overtime;
|
||||
|
||||
private Integer inuharm4Overtime;
|
||||
|
||||
private Integer inuharm5Overtime;
|
||||
|
||||
private Integer inuharm6Overtime;
|
||||
|
||||
private Integer inuharm7Overtime;
|
||||
|
||||
private Integer inuharm8Overtime;
|
||||
|
||||
private Integer inuharm9Overtime;
|
||||
|
||||
private Integer inuharm10Overtime;
|
||||
|
||||
private Integer inuharm11Overtime;
|
||||
|
||||
private Integer inuharm12Overtime;
|
||||
|
||||
private Integer inuharm13Overtime;
|
||||
|
||||
private Integer inuharm14Overtime;
|
||||
|
||||
private Integer inuharm15Overtime;
|
||||
|
||||
private Integer inuharm16Overtime;
|
||||
|
||||
private Integer iNegOvertime;
|
||||
}
|
||||
@@ -41,6 +41,24 @@
|
||||
<artifactId>common-db</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>cs-warn-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>cs-device-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>system-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.warn;
|
||||
package com.njcn.cswarn;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.njcn.cswarn.controller.alarm;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.cswarn.service.CsEquipmentAlarmPOService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.cswarn.pojo.parm.CsEquipmentAlarmAddParm;
|
||||
import com.njcn.cswarn.pojo.parm.CsEquipmentAlarmPageParm;
|
||||
import com.njcn.cswarn.pojo.vo.CsEquipmentAlarmVO;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/5/16 16:33【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/EquipmentAlarm")
|
||||
@Api(tags = "设备警告")
|
||||
@AllArgsConstructor
|
||||
public class CsEquipmentAlarmController extends BaseController {
|
||||
|
||||
private final CsEquipmentAlarmPOService csEquipmentAlarmPOService;
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增设备警告")
|
||||
@ApiImplicitParam(name = "csEquipmentAlarmAddParm", value = "新增设备警告参数", required = true)
|
||||
public HttpResult<CsEquipmentAlarmVO> add(@RequestBody @Validated CsEquipmentAlarmAddParm csEquipmentAlarmAddParm){
|
||||
String methodDescribe = getMethodDescribe("add");
|
||||
CsEquipmentAlarmVO csEquipmentAlarmVO = csEquipmentAlarmPOService.add (csEquipmentAlarmAddParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, csEquipmentAlarmVO, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPage")
|
||||
@ApiOperation("设备警告分页查询")
|
||||
@ApiImplicitParam(name = "csEquipmentAlarmPageParm", value = "设备警告查询参数", required = true)
|
||||
public HttpResult<IPage<CsEquipmentAlarmVO>> queryPage(@RequestBody @Validated CsEquipmentAlarmPageParm csEquipmentAlarmPageParm ){
|
||||
String methodDescribe = getMethodDescribe("queryPage");
|
||||
|
||||
IPage<CsEquipmentAlarmVO> page = csEquipmentAlarmPOService.queryPage (csEquipmentAlarmPageParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.njcn.cswarn.controller.alarm;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.cswarn.service.CsEventDetailPOService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.cswarn.pojo.parm.CsEventDetailPageParm;
|
||||
import com.njcn.cswarn.pojo.vo.CsEventDetailVO;
|
||||
|
||||
/**
|
||||
* (cs_event_detail)表控制层
|
||||
*
|
||||
* @author xxxxx
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/EventAlarm")
|
||||
@Api(tags = "暂态警告")
|
||||
@AllArgsConstructor
|
||||
public class CsEventDetailPOController extends BaseController {
|
||||
|
||||
private final CsEventDetailPOService csEventDetailPOService;
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPage")
|
||||
@ApiOperation("暂态警告分页查询")
|
||||
@ApiImplicitParam(name = "csEventDetailPageParm", value = "暂态警告查询参数", required = true)
|
||||
public HttpResult<IPage<CsEventDetailVO>> queryPage(@RequestBody @Validated CsEventDetailPageParm csEventDetailPageParm ){
|
||||
String methodDescribe = getMethodDescribe("queryPage");
|
||||
|
||||
IPage<CsEventDetailVO> page = csEventDetailPOService.queryPage (csEventDetailPageParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.njcn.cswarn.controller.alarm;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.HttpResultUtil;
|
||||
import com.njcn.cswarn.service.CsStatLimitRateDPOService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.njcn.cswarn.pojo.parm.CsStatLimitRatePageParm;
|
||||
import com.njcn.cswarn.pojo.vo.CsStatLimitRateDVO;
|
||||
|
||||
|
||||
/**
|
||||
* (cs_stat_limit_rate_d)表控制层
|
||||
*
|
||||
* @author xxxxx
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/LimitRateAlarm")
|
||||
@Api(tags = "稳态警告")
|
||||
@AllArgsConstructor
|
||||
public class CsStatLimitRateDPOController extends BaseController {
|
||||
|
||||
|
||||
private final CsStatLimitRateDPOService csStatLimitRateDPOService;
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/queryPage")
|
||||
@ApiOperation("设备模板分页查询")
|
||||
@ApiImplicitParam(name = "csStatLimitRatePageParm", value = "设备警告查询参数", required = true)
|
||||
public HttpResult<IPage<CsStatLimitRateDVO>> queryPage(@RequestBody @Validated CsStatLimitRatePageParm csStatLimitRatePageParm ){
|
||||
String methodDescribe = getMethodDescribe("queryPage");
|
||||
|
||||
IPage<CsStatLimitRateDVO> page = csStatLimitRateDPOService.queryPage (csStatLimitRatePageParm);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, page, methodDescribe);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.njcn.cswarn.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.cswarn.pojo.po.CsEquipmentAlarmPO;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/5/16 16:25【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface CsEquipmentAlarmPOMapper extends BaseMapper<CsEquipmentAlarmPO> {
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.njcn.cswarn.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.njcn.cswarn.pojo.parm.CsEventDetailPageParm;
|
||||
import com.njcn.cswarn.pojo.po.CsEventDetailPO;
|
||||
import com.njcn.cswarn.pojo.vo.CsEventDetailVO;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2023/5/17 10:51【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface CsEventDetailPOMapper extends BaseMapper<CsEventDetailPO> {
|
||||
Page<CsEventDetailVO> queryPage(Page<CsEventDetailVO> returnpage, @Param("csEventDetailPageParm") CsEventDetailPageParm csEventDetailPageParm);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.cswarn.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import com.njcn.cswarn.pojo.parm.CsStatLimitRatePageParm;
|
||||
import com.njcn.cswarn.pojo.po.CsStatLimitRateDPO;
|
||||
import com.njcn.cswarn.pojo.vo.CsStatLimitRateDVO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/5/17 13:45【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface CsStatLimitRateDPOMapper extends BaseMapper<CsStatLimitRateDPO> {
|
||||
Page<CsStatLimitRateDVO> queryPage(Page<CsStatLimitRateDVO> returnpage, @Param("csStatLimitRatePageParm") CsStatLimitRatePageParm csStatLimitRatePageParm);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.cswarn.mapper.CsEquipmentAlarmPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.cswarn.pojo.po.CsEquipmentAlarmPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table cs_equipment_alarm-->
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="equipment_id" jdbcType="VARCHAR" property="equipmentId" />
|
||||
<result column="alarm_msg" jdbcType="VARCHAR" property="alarmMsg" />
|
||||
<result column="alarm_level" jdbcType="VARCHAR" property="alarmLevel" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="end_time" jdbcType="TIMESTAMP" property="endTime" />
|
||||
<result column="status" jdbcType="BIT" property="status" />
|
||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, project_id, equipment_id, alarm_msg, alarm_level, start_time, end_time, `status`,
|
||||
create_by, create_time, update_by, update_time
|
||||
</sql>
|
||||
</mapper>
|
||||
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.cswarn.mapper.CsEventDetailPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.cswarn.pojo.po.CsEventDetailPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table cs_event_detail-->
|
||||
<id column="event_id" jdbcType="CHAR" property="eventId" />
|
||||
<result column="measurement_point_id" jdbcType="VARCHAR" property="measurementPointId" />
|
||||
<result column="event_type" jdbcType="CHAR" property="eventType" />
|
||||
<result column="advance_reason" jdbcType="CHAR" property="advanceReason" />
|
||||
<result column="advance_type" jdbcType="CHAR" property="advanceType" />
|
||||
<result column="eventass_index" jdbcType="VARCHAR" property="eventassIndex" />
|
||||
<result column="dq_time" jdbcType="DOUBLE" property="dqTime" />
|
||||
<result column="deal_time" jdbcType="TIMESTAMP" property="dealTime" />
|
||||
<result column="num" jdbcType="INTEGER" property="num" />
|
||||
<result column="file_flag" jdbcType="BIT" property="fileFlag" />
|
||||
<result column="deal_flag" jdbcType="BIT" property="dealFlag" />
|
||||
<result column="first_time" jdbcType="TIMESTAMP" property="firstTime" />
|
||||
<result column="first_type" jdbcType="VARCHAR" property="firstType" />
|
||||
<result column="first_ms" jdbcType="DECIMAL" property="firstMs" />
|
||||
<result column="energy" jdbcType="DOUBLE" property="energy" />
|
||||
<result column="severity" jdbcType="DOUBLE" property="severity" />
|
||||
<result column="sagsource" jdbcType="VARCHAR" property="sagsource" />
|
||||
<result column="start_time" jdbcType="TIMESTAMP" property="startTime" />
|
||||
<result column="duration" jdbcType="DECIMAL" property="duration" />
|
||||
<result column="feature_amplitude" jdbcType="DECIMAL" property="featureAmplitude" />
|
||||
<result column="phase" jdbcType="VARCHAR" property="phase" />
|
||||
<result column="event_describe" jdbcType="VARCHAR" property="eventDescribe" />
|
||||
<result column="wave_path" jdbcType="VARCHAR" property="wavePath" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="transient_value" jdbcType="DOUBLE" property="transientValue" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
event_id, measurement_point_id, event_type, advance_reason, advance_type, eventass_index,
|
||||
dq_time, deal_time, num, file_flag, deal_flag, first_time, first_type, first_ms,
|
||||
energy, severity, sagsource, start_time, duration, feature_amplitude, phase, event_describe,
|
||||
wave_path, create_time, transient_value
|
||||
</sql>
|
||||
|
||||
<select id="queryPage" resultType="com.njcn.cswarn.pojo.vo.CsEventDetailVO">
|
||||
SELECT
|
||||
temp.*, cs.*
|
||||
FROM
|
||||
cs_event_detail cs
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
a.line_id,
|
||||
a. NAME line_name,
|
||||
c.id project_id,
|
||||
c. NAME project_name
|
||||
FROM
|
||||
cs_line a,
|
||||
cs_project_equipment b,
|
||||
cs_project c
|
||||
WHERE
|
||||
1 = 1
|
||||
AND c.id = b.project_id
|
||||
AND b.equipment_id = a.dev_id
|
||||
<if test="csEventDetailPageParm.projectId != null and csEventDetailPageParm.projectId != ''">
|
||||
AND c.id = #{csEventDetailPageParm.projectId }
|
||||
</if>
|
||||
) temp ON cs.measurement_point_id = temp.line_id
|
||||
where 1=1
|
||||
<if test="csEventDetailPageParm.startTime != null and csEventDetailPageParm.startTime != ''">
|
||||
AND cs.start_time >= #{csEventDetailPageParm.startTime }
|
||||
</if>
|
||||
<if test="csEventDetailPageParm.endTime != null and csEventDetailPageParm.endTime != ''">
|
||||
AND cs.start_time <= #{csEventDetailPageParm.endTime }
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.njcn.cswarn.mapper.CsStatLimitRateDPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.cswarn.pojo.po.CsStatLimitRateDPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table cs_stat_limit_rate_d-->
|
||||
<id column="time_id" jdbcType="TIMESTAMP" property="timeId" />
|
||||
<id column="my_index" jdbcType="VARCHAR" property="myIndex" />
|
||||
<id column="phasic_type" jdbcType="VARCHAR" property="phasicType" />
|
||||
<result column="all_time" jdbcType="INTEGER" property="allTime" />
|
||||
<result column="flicker_all_time" jdbcType="INTEGER" property="flickerAllTime" />
|
||||
<result column="freq_dev_overtime" jdbcType="INTEGER" property="freqDevOvertime" />
|
||||
<result column="voltage_dev_overtime" jdbcType="INTEGER" property="voltageDevOvertime" />
|
||||
<result column="ubalance_overtime" jdbcType="INTEGER" property="ubalanceOvertime" />
|
||||
<result column="flicker_overtime" jdbcType="INTEGER" property="flickerOvertime" />
|
||||
<result column="uaberrance_overtime" jdbcType="INTEGER" property="uaberranceOvertime" />
|
||||
<result column="uharm_2_overtime" jdbcType="INTEGER" property="uharm2Overtime" />
|
||||
<result column="uharm_3_overtime" jdbcType="INTEGER" property="uharm3Overtime" />
|
||||
<result column="uharm_4_overtime" jdbcType="INTEGER" property="uharm4Overtime" />
|
||||
<result column="uharm_5_overtime" jdbcType="INTEGER" property="uharm5Overtime" />
|
||||
<result column="uharm_6_overtime" jdbcType="INTEGER" property="uharm6Overtime" />
|
||||
<result column="uharm_7_overtime" jdbcType="INTEGER" property="uharm7Overtime" />
|
||||
<result column="uharm_8_overtime" jdbcType="INTEGER" property="uharm8Overtime" />
|
||||
<result column="uharm_9_overtime" jdbcType="INTEGER" property="uharm9Overtime" />
|
||||
<result column="uharm_10_overtime" jdbcType="INTEGER" property="uharm10Overtime" />
|
||||
<result column="uharm_11_overtime" jdbcType="INTEGER" property="uharm11Overtime" />
|
||||
<result column="uharm_12_overtime" jdbcType="INTEGER" property="uharm12Overtime" />
|
||||
<result column="uharm_13_overtime" jdbcType="INTEGER" property="uharm13Overtime" />
|
||||
<result column="uharm_14_overtime" jdbcType="INTEGER" property="uharm14Overtime" />
|
||||
<result column="uharm_15_overtime" jdbcType="INTEGER" property="uharm15Overtime" />
|
||||
<result column="uharm_16_overtime" jdbcType="INTEGER" property="uharm16Overtime" />
|
||||
<result column="uharm_17_overtime" jdbcType="INTEGER" property="uharm17Overtime" />
|
||||
<result column="uharm_18_overtime" jdbcType="INTEGER" property="uharm18Overtime" />
|
||||
<result column="uharm_19_overtime" jdbcType="INTEGER" property="uharm19Overtime" />
|
||||
<result column="uharm_20_overtime" jdbcType="INTEGER" property="uharm20Overtime" />
|
||||
<result column="uharm_21_overtime" jdbcType="INTEGER" property="uharm21Overtime" />
|
||||
<result column="uharm_22_overtime" jdbcType="INTEGER" property="uharm22Overtime" />
|
||||
<result column="uharm_23_overtime" jdbcType="INTEGER" property="uharm23Overtime" />
|
||||
<result column="uharm_24_overtime" jdbcType="INTEGER" property="uharm24Overtime" />
|
||||
<result column="uharm_25_overtime" jdbcType="INTEGER" property="uharm25Overtime" />
|
||||
<result column="iharm_2_overtime" jdbcType="INTEGER" property="iharm2Overtime" />
|
||||
<result column="iharm_3_overtime" jdbcType="INTEGER" property="iharm3Overtime" />
|
||||
<result column="iharm_4_overtime" jdbcType="INTEGER" property="iharm4Overtime" />
|
||||
<result column="iharm_5_overtime" jdbcType="INTEGER" property="iharm5Overtime" />
|
||||
<result column="iharm_6_overtime" jdbcType="INTEGER" property="iharm6Overtime" />
|
||||
<result column="iharm_7_overtime" jdbcType="INTEGER" property="iharm7Overtime" />
|
||||
<result column="iharm_8_overtime" jdbcType="INTEGER" property="iharm8Overtime" />
|
||||
<result column="iharm_9_overtime" jdbcType="INTEGER" property="iharm9Overtime" />
|
||||
<result column="iharm_10_overtime" jdbcType="INTEGER" property="iharm10Overtime" />
|
||||
<result column="iharm_11_overtime" jdbcType="INTEGER" property="iharm11Overtime" />
|
||||
<result column="iharm_12_overtime" jdbcType="INTEGER" property="iharm12Overtime" />
|
||||
<result column="iharm_13_overtime" jdbcType="INTEGER" property="iharm13Overtime" />
|
||||
<result column="iharm_14_overtime" jdbcType="INTEGER" property="iharm14Overtime" />
|
||||
<result column="iharm_15_overtime" jdbcType="INTEGER" property="iharm15Overtime" />
|
||||
<result column="iharm_16_overtime" jdbcType="INTEGER" property="iharm16Overtime" />
|
||||
<result column="iharm_17_overtime" jdbcType="INTEGER" property="iharm17Overtime" />
|
||||
<result column="iharm_18_overtime" jdbcType="INTEGER" property="iharm18Overtime" />
|
||||
<result column="iharm_19_overtime" jdbcType="INTEGER" property="iharm19Overtime" />
|
||||
<result column="iharm_20_overtime" jdbcType="INTEGER" property="iharm20Overtime" />
|
||||
<result column="iharm_21_overtime" jdbcType="INTEGER" property="iharm21Overtime" />
|
||||
<result column="iharm_22_overtime" jdbcType="INTEGER" property="iharm22Overtime" />
|
||||
<result column="iharm_23_overtime" jdbcType="INTEGER" property="iharm23Overtime" />
|
||||
<result column="iharm_24_overtime" jdbcType="INTEGER" property="iharm24Overtime" />
|
||||
<result column="iharm_25_overtime" jdbcType="INTEGER" property="iharm25Overtime" />
|
||||
<result column="inuharm_1_overtime" jdbcType="INTEGER" property="inuharm1Overtime" />
|
||||
<result column="inuharm_2_overtime" jdbcType="INTEGER" property="inuharm2Overtime" />
|
||||
<result column="inuharm_3_overtime" jdbcType="INTEGER" property="inuharm3Overtime" />
|
||||
<result column="inuharm_4_overtime" jdbcType="INTEGER" property="inuharm4Overtime" />
|
||||
<result column="inuharm_5_overtime" jdbcType="INTEGER" property="inuharm5Overtime" />
|
||||
<result column="inuharm_6_overtime" jdbcType="INTEGER" property="inuharm6Overtime" />
|
||||
<result column="inuharm_7_overtime" jdbcType="INTEGER" property="inuharm7Overtime" />
|
||||
<result column="inuharm_8_overtime" jdbcType="INTEGER" property="inuharm8Overtime" />
|
||||
<result column="inuharm_9_overtime" jdbcType="INTEGER" property="inuharm9Overtime" />
|
||||
<result column="inuharm_10_overtime" jdbcType="INTEGER" property="inuharm10Overtime" />
|
||||
<result column="inuharm_11_overtime" jdbcType="INTEGER" property="inuharm11Overtime" />
|
||||
<result column="inuharm_12_overtime" jdbcType="INTEGER" property="inuharm12Overtime" />
|
||||
<result column="inuharm_13_overtime" jdbcType="INTEGER" property="inuharm13Overtime" />
|
||||
<result column="inuharm_14_overtime" jdbcType="INTEGER" property="inuharm14Overtime" />
|
||||
<result column="inuharm_15_overtime" jdbcType="INTEGER" property="inuharm15Overtime" />
|
||||
<result column="inuharm_16_overtime" jdbcType="INTEGER" property="inuharm16Overtime" />
|
||||
<result column="i_neg_overtime" jdbcType="INTEGER" property="iNegOvertime" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
time_id, my_index, phasic_type, all_time, flicker_all_time, freq_dev_overtime, voltage_dev_overtime,
|
||||
ubalance_overtime, flicker_overtime, uaberrance_overtime, uharm_2_overtime, uharm_3_overtime,
|
||||
uharm_4_overtime, uharm_5_overtime, uharm_6_overtime, uharm_7_overtime, uharm_8_overtime,
|
||||
uharm_9_overtime, uharm_10_overtime, uharm_11_overtime, uharm_12_overtime, uharm_13_overtime,
|
||||
uharm_14_overtime, uharm_15_overtime, uharm_16_overtime, uharm_17_overtime, uharm_18_overtime,
|
||||
uharm_19_overtime, uharm_20_overtime, uharm_21_overtime, uharm_22_overtime, uharm_23_overtime,
|
||||
uharm_24_overtime, uharm_25_overtime, iharm_2_overtime, iharm_3_overtime, iharm_4_overtime,
|
||||
iharm_5_overtime, iharm_6_overtime, iharm_7_overtime, iharm_8_overtime, iharm_9_overtime,
|
||||
iharm_10_overtime, iharm_11_overtime, iharm_12_overtime, iharm_13_overtime, iharm_14_overtime,
|
||||
iharm_15_overtime, iharm_16_overtime, iharm_17_overtime, iharm_18_overtime, iharm_19_overtime,
|
||||
iharm_20_overtime, iharm_21_overtime, iharm_22_overtime, iharm_23_overtime, iharm_24_overtime,
|
||||
iharm_25_overtime, inuharm_1_overtime, inuharm_2_overtime, inuharm_3_overtime, inuharm_4_overtime,
|
||||
inuharm_5_overtime, inuharm_6_overtime, inuharm_7_overtime, inuharm_8_overtime, inuharm_9_overtime,
|
||||
inuharm_10_overtime, inuharm_11_overtime, inuharm_12_overtime, inuharm_13_overtime,
|
||||
inuharm_14_overtime, inuharm_15_overtime, inuharm_16_overtime, i_neg_overtime
|
||||
</sql>
|
||||
|
||||
<select id="queryPage" resultType="com.njcn.cswarn.pojo.vo.CsStatLimitRateDVO">
|
||||
SELECT
|
||||
temp.*, cs.*
|
||||
FROM
|
||||
cs_stat_limit_rate_d cs
|
||||
INNER JOIN (
|
||||
SELECT
|
||||
a.line_id,
|
||||
a. NAME line_name,
|
||||
c.id project_id,
|
||||
c. NAME project_name
|
||||
FROM
|
||||
cs_line a,
|
||||
cs_project_equipment b,
|
||||
cs_project c
|
||||
WHERE
|
||||
1 = 1
|
||||
AND c.id = b.project_id
|
||||
AND b.equipment_id = a.dev_id
|
||||
<if test="csStatLimitRatePageParm.projectId != null and csStatLimitRatePageParm.projectId != ''">
|
||||
AND c.id = #{csStatLimitRatePageParm.projectId }
|
||||
</if>
|
||||
) temp ON cs.my_index = temp.line_id
|
||||
where 1=1
|
||||
<if test="csStatLimitRatePageParm.startTime != null and csStatLimitRatePageParm.startTime != ''">
|
||||
AND cs.time_id >= #{csStatLimitRatePageParm.startTime }
|
||||
</if>
|
||||
<if test="csStatLimitRatePageParm.endTime != null and csStatLimitRatePageParm.endTime != ''">
|
||||
AND cs.time_id <= #{csStatLimitRatePageParm.endTime }
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.njcn.cswarn.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.cswarn.pojo.parm.CsEquipmentAlarmAddParm;
|
||||
import com.njcn.cswarn.pojo.parm.CsEquipmentAlarmPageParm;
|
||||
import com.njcn.cswarn.pojo.po.CsEquipmentAlarmPO;
|
||||
import com.njcn.cswarn.pojo.vo.CsEquipmentAlarmVO;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/5/16 16:24【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface CsEquipmentAlarmPOService extends IService<CsEquipmentAlarmPO>{
|
||||
|
||||
/**
|
||||
* @Description: 新增设备警告
|
||||
* @Param:
|
||||
* @return: com.njcn.algorithm.pojo.vo.CsEquipmentAlarmVO
|
||||
* @Author: clam
|
||||
* @Date: 2023/5/17
|
||||
*/
|
||||
CsEquipmentAlarmVO add(CsEquipmentAlarmAddParm csEquipmentAlarmAddParm);
|
||||
|
||||
IPage<CsEquipmentAlarmVO> queryPage(CsEquipmentAlarmPageParm csEquipmentAlarmPageParm);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.cswarn.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.cswarn.pojo.parm.CsEventDetailPageParm;
|
||||
import com.njcn.cswarn.pojo.po.CsEventDetailPO;
|
||||
import com.njcn.cswarn.pojo.vo.CsEventDetailVO;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/5/17 10:49【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface CsEventDetailPOService extends IService<CsEventDetailPO>{
|
||||
|
||||
|
||||
IPage<CsEventDetailVO> queryPage(CsEventDetailPageParm csEventDetailPageParm);
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.cswarn.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.cswarn.pojo.parm.CsStatLimitRatePageParm;
|
||||
import com.njcn.cswarn.pojo.po.CsStatLimitRateDPO;
|
||||
import com.njcn.cswarn.pojo.vo.CsStatLimitRateDVO;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/5/17 13:45【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface CsStatLimitRateDPOService extends IService<CsStatLimitRateDPO>{
|
||||
|
||||
|
||||
IPage<CsStatLimitRateDVO> queryPage(CsStatLimitRatePageParm csStatLimitRatePageParm);
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.njcn.cswarn.service.impl;
|
||||
|
||||
import com.alibaba.cloud.commons.lang.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.csdevice.api.AppProjectFeignClient;
|
||||
import com.njcn.csdevice.api.EquipmentFeignClient;
|
||||
import com.njcn.csdevice.pojo.po.AppProjectPO;
|
||||
import com.njcn.csdevice.pojo.po.CsEquipmentDeliveryPO;
|
||||
import com.njcn.cswarn.mapper.CsEquipmentAlarmPOMapper;
|
||||
import com.njcn.cswarn.service.CsEquipmentAlarmPOService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataTypeEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.njcn.cswarn.pojo.parm.CsEquipmentAlarmAddParm;
|
||||
import com.njcn.cswarn.pojo.parm.CsEquipmentAlarmPageParm;
|
||||
import com.njcn.cswarn.pojo.po.CsEquipmentAlarmPO;
|
||||
import com.njcn.cswarn.pojo.vo.CsEquipmentAlarmVO;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import static java.util.stream.Collectors.toList;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/5/16 16:24【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class CsEquipmentAlarmPOServiceImpl extends ServiceImpl<CsEquipmentAlarmPOMapper, CsEquipmentAlarmPO> implements CsEquipmentAlarmPOService {
|
||||
|
||||
private final EquipmentFeignClient equipmentFeignClient;
|
||||
private final AppProjectFeignClient appProjectFeignClient;
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public CsEquipmentAlarmVO add(CsEquipmentAlarmAddParm csEquipmentAlarmAddParm) {
|
||||
CsEquipmentAlarmPO csEquipmentAlarmPO = new CsEquipmentAlarmPO();
|
||||
BeanUtils.copyProperties(csEquipmentAlarmAddParm,csEquipmentAlarmPO);
|
||||
csEquipmentAlarmPO.setStatus("1");
|
||||
this.save(csEquipmentAlarmPO);
|
||||
|
||||
CsEquipmentAlarmVO csEquipmentAlarmVO = new CsEquipmentAlarmVO();
|
||||
|
||||
List<CsEquipmentDeliveryPO> data = equipmentFeignClient.queryDeviceById(Stream.of(csEquipmentAlarmAddParm.getEquipmentId()).collect(toList())).getData();
|
||||
List<AppProjectPO> data1 = appProjectFeignClient.queryProjectById(Stream.of(csEquipmentAlarmAddParm.getProjectId()).collect(toList())).getData();
|
||||
List<DictData> data3 = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.ALARM_TYPE.getCode()).getData();
|
||||
|
||||
Map<String, String> collect3 = data.stream().collect(Collectors.toMap(CsEquipmentDeliveryPO::getId, CsEquipmentDeliveryPO::getName));
|
||||
Map<String, String> collect4 = data1.stream().collect(Collectors.toMap(AppProjectPO::getId, AppProjectPO::getName));
|
||||
Map<String, String> collect5 = data3.stream().collect(Collectors.toMap(DictData::getId, DictData::getName));
|
||||
csEquipmentAlarmVO.setEquipmentName(collect3.get(csEquipmentAlarmAddParm.getEquipmentId()));
|
||||
csEquipmentAlarmVO.setAlarmLevelName(collect4.get(csEquipmentAlarmAddParm.getAlarmLevel()));
|
||||
csEquipmentAlarmVO.setProjectName(collect5.get(csEquipmentAlarmAddParm.getProjectId()));
|
||||
log.info("新增设备警告:{}", csEquipmentAlarmVO.toString());
|
||||
return csEquipmentAlarmVO;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<CsEquipmentAlarmVO> queryPage(CsEquipmentAlarmPageParm csEquipmentAlarmPageParm) {
|
||||
Page<CsEquipmentAlarmVO> returnpage = new Page<> (csEquipmentAlarmPageParm.getCurrentPage ( ), csEquipmentAlarmPageParm.getPageSize ( ));
|
||||
Page<CsEquipmentAlarmPO> queryPage = new Page<> (csEquipmentAlarmPageParm.getCurrentPage ( ), csEquipmentAlarmPageParm.getPageSize ( ));
|
||||
QueryWrapper<CsEquipmentAlarmPO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("status", "1");
|
||||
queryWrapper.eq(StringUtils.isNotBlank(csEquipmentAlarmPageParm.getProjectId()),CsEquipmentAlarmPO.COL_PROJECT_ID,csEquipmentAlarmPageParm.getProjectId());
|
||||
queryWrapper.eq(StringUtils.isNotBlank(csEquipmentAlarmPageParm.getEquipmentId()),CsEquipmentAlarmPO.COL_EQUIPMENT_ID,csEquipmentAlarmPageParm.getEquipmentId());
|
||||
queryWrapper.eq(StringUtils.isNotBlank(csEquipmentAlarmPageParm.getAlarmLevel()),CsEquipmentAlarmPO.COL_ALARM_LEVEL,csEquipmentAlarmPageParm.getAlarmLevel());
|
||||
queryWrapper.ge(Objects.nonNull(csEquipmentAlarmPageParm.getStartTime()),CsEquipmentAlarmPO.COL_START_TIME,csEquipmentAlarmPageParm.getStartTime());
|
||||
queryWrapper.le(Objects.nonNull(csEquipmentAlarmPageParm.getStartTime()),CsEquipmentAlarmPO.COL_START_TIME,csEquipmentAlarmPageParm.getEndTime());
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
|
||||
Page<CsEquipmentAlarmPO> csEquipmentAlarmPOPage = this.getBaseMapper().selectPage(queryPage, queryWrapper);
|
||||
List<String> collect1 = csEquipmentAlarmPOPage.getRecords().stream().map(CsEquipmentAlarmPO::getProjectId).distinct().collect(toList());
|
||||
List<String> collect2 = csEquipmentAlarmPOPage.getRecords().stream().map(CsEquipmentAlarmPO::getEquipmentId).distinct().collect(toList());
|
||||
|
||||
List<CsEquipmentDeliveryPO> data = equipmentFeignClient.queryDeviceById(collect2).getData();
|
||||
List<AppProjectPO> data1 = appProjectFeignClient.queryProjectById(collect1).getData();
|
||||
List<DictData> data3 = dicDataFeignClient.getDicDataByTypeCode(DicDataTypeEnum.ALARM_TYPE.getCode()).getData();
|
||||
|
||||
Map<String, String> collect3 = data.stream().collect(Collectors.toMap(CsEquipmentDeliveryPO::getId, CsEquipmentDeliveryPO::getName));
|
||||
Map<String, String> collect4 = data1.stream().collect(Collectors.toMap(AppProjectPO::getId, AppProjectPO::getName));
|
||||
Map<String, String> collect5 = data3.stream().collect(Collectors.toMap(DictData::getId, DictData::getName));
|
||||
|
||||
|
||||
List<CsEquipmentAlarmVO> collect = csEquipmentAlarmPOPage.getRecords().stream().map(temp -> {
|
||||
CsEquipmentAlarmVO csEquipmentAlarmVO = new CsEquipmentAlarmVO();
|
||||
csEquipmentAlarmVO.setEquipmentName(collect3.get(temp.getEquipmentId()));
|
||||
csEquipmentAlarmVO.setAlarmLevelName(collect4.get(temp.getAlarmLevel()));
|
||||
csEquipmentAlarmVO.setProjectName(collect5.get(temp.getProjectId()));
|
||||
return csEquipmentAlarmVO;
|
||||
}).collect(toList());
|
||||
returnpage.setRecords(collect);
|
||||
return returnpage;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.njcn.cswarn.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.cswarn.mapper.CsEventDetailPOMapper;
|
||||
import com.njcn.cswarn.service.CsEventDetailPOService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.njcn.cswarn.pojo.parm.CsEventDetailPageParm;
|
||||
import com.njcn.cswarn.pojo.po.CsEventDetailPO;
|
||||
import com.njcn.cswarn.pojo.vo.CsEventDetailVO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/5/17 10:49【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class CsEventDetailPOServiceImpl extends ServiceImpl<CsEventDetailPOMapper, CsEventDetailPO> implements CsEventDetailPOService {
|
||||
|
||||
@Override
|
||||
public IPage<CsEventDetailVO> queryPage(CsEventDetailPageParm csEventDetailPageParm) {
|
||||
Page<CsEventDetailVO> returnpage = new Page<> (csEventDetailPageParm.getCurrentPage ( ), csEventDetailPageParm.getPageSize ( ));
|
||||
returnpage = this.getBaseMapper().queryPage(returnpage,csEventDetailPageParm);
|
||||
return returnpage;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.njcn.cswarn.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.cswarn.mapper.CsStatLimitRateDPOMapper;
|
||||
import com.njcn.cswarn.service.CsStatLimitRateDPOService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.njcn.cswarn.pojo.parm.CsStatLimitRatePageParm;
|
||||
import com.njcn.cswarn.pojo.po.CsStatLimitRateDPO;
|
||||
import com.njcn.cswarn.pojo.vo.CsStatLimitRateDVO;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* Date: 2023/5/17 13:45【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Service
|
||||
public class CsStatLimitRateDPOServiceImpl extends ServiceImpl<CsStatLimitRateDPOMapper, CsStatLimitRateDPO> implements CsStatLimitRateDPOService {
|
||||
|
||||
@Override
|
||||
public IPage<CsStatLimitRateDVO> queryPage(CsStatLimitRatePageParm csStatLimitRatePageParm) {
|
||||
Page<CsStatLimitRateDVO> returnpage = new Page<> (csStatLimitRatePageParm.getCurrentPage ( ), csStatLimitRatePageParm.getPageSize ( ));
|
||||
returnpage = this.getBaseMapper().queryPage(returnpage,csStatLimitRatePageParm);
|
||||
return returnpage;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user