添加谐波报告功能

This commit is contained in:
wr
2023-04-19 10:26:43 +08:00
parent dc3c4a8321
commit fb60e6c074
25 changed files with 4145 additions and 0 deletions

View File

@@ -27,4 +27,10 @@ public class ReportQueryParam {
@NotBlank(message = "结束时间不可为空")
private String endTime;
@ApiModelProperty(name = "b",value = "判断时间是否是当天true 当天 false不是当天")
private Boolean b ;
@ApiModelProperty(name = "lineId",value = "95条数取值")
private double count;
}

View File

@@ -0,0 +1,81 @@
package com.njcn.harmonic.pojo.po.report;
import lombok.Data;
import org.influxdb.annotation.Column;
import org.influxdb.annotation.Measurement;
import java.time.Instant;
/**
* data_v influxDB别名映射表
*
* @author qijian
* @version 1.0.0
* @createTime 2022/10/27 15:27
*/
@Data
@Measurement(name = "data_i")
public class DataI {
@Column(name = "time")
private Instant time;
@Column(name = "phasic_type")
private String phaseType;
@Column(name = "value_type")
private String valueType;
@Column(name = "rms")
private Double rms;
@Column(name = "line_id")
private String lineId;
@Column(name = "freq_max")
private Double frepMAX;
@Column(name = "freq_min")
private Double frepMIN;
@Column(name = "rms_max")
private Double rmsMAX;
@Column(name = "rms_min")
private Double rmsMIN;
@Column(name = "rms_lvr_max")
private Double rmsLvrMAX;
@Column(name = "rms_lvr_min")
private Double rmsLvrMIN;
@Column(name = "v_thd_max")
private Double vThdMAX;
@Column(name = "v_thd_min")
private Double vThdMIN;
@Column(name = "v_unbalance_max")
private Double vUnbalanceMAX;
@Column(name = "v_unbalance_min")
private Double vUnbalanceMIN;
@Column(name = "freq_count")
private Integer freqCount;
@Column(name = "rms_count")
private Integer rmsCount;
@Column(name = "rms_lvr_count")
private Integer rmsLvrCount;
@Column(name = "v_thd_count")
private Integer vThdCount;
@Column(name = "v_unbalance_count")
private Integer vUnbalanceCount;
}

View File

@@ -0,0 +1,35 @@
package com.njcn.harmonic.pojo.po.report;
public enum EnumPass {
MAX(1, "使用最大值与国标限值比较,判断指标是否合格"),
MIN(2, "使用最小值与国标限值比较,判断指标是否合格"),
MEAN(3, "使用平均值与国标限值比较,判断指标是否合格"),
CP95(4, "使用CP95值与国标限值比较判断指标是否合格"),
DEFAULT(5, "不作比较"),
PASS(0, "合格"),
FPYVALUE(98, "合格率限值"),
FPYV(1, "UHARM_0_OVERTIME"),
FPYI(2, "IHARM_0_OVERTIME"),
FPYVOLTAGE(3, "VOLTAGE_DEV_OVERTIME"),
FPYTHREE(4, "UBALANCE_OVERTIME"),
FPYTHDV(5, "UABERRANCE_OVERTIME"),
FPYRATE(6, "FREQ_DEV_OVERTIME"),
FPYFLICKER(7, "FLICKER_OVERTIME"),
NOPASS(-1, "不合格");
private Integer code;
private String describe;
EnumPass(Integer code, String describe) {
this.code = code;
this.describe = describe;
}
public Integer getCode() {
return code;
}
public String getDescribe() {
return describe;
}
}

View File

@@ -0,0 +1,20 @@
package com.njcn.harmonic.pojo.po.report;
import com.njcn.device.pq.pojo.po.Overlimit;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class OverLimitInfo implements Serializable {
private static final long serialVersionUID = 7466469972886414616L;
private List<Overlimit> overLimitRate;
private Double count;
private Double pltCount;
private Double pstCount;
private List<String> list;
private String mode;
}

View File

@@ -0,0 +1,24 @@
package com.njcn.harmonic.pojo.po.report;
import lombok.Data;
/**
* @author wr
* @description
* @date 2023/4/12 11:40
*/
@Data
public class Pass {
private Float overLimit;
private Integer code;
public Pass(Float overLimit) {
this.code = EnumPass.DEFAULT.getCode();
this.overLimit = overLimit;
}
public Pass(Float overLimit, Integer code) {
this.overLimit = overLimit;
this.code = code;
}
}

View File

@@ -0,0 +1,17 @@
package com.njcn.harmonic.pojo.po.report;
import com.njcn.harmonic.pojo.vo.ReportValue;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class ReportTarget implements Serializable {
private static final long serialVersionUID = -6931764660060228127L;
private List<ReportValue> list;
private Float overLimit; //指标的国标限值
private Integer pass;
}

View File

@@ -0,0 +1,77 @@
package com.njcn.harmonic.pojo.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author wr
* @description
* @date 2023/4/10 15:36
*/
@NoArgsConstructor
public class ReportValue implements Serializable {
private String phaseType; //A(AB)相B(BC)相C(CA)相T总功
private Float fmaxValue; //最大值
private Float minValue; //最小值
private Float meanValue; //平均值
private Float cp95Value; //CP95值
public String getPhaseType() {
return phaseType;
}
public Float getFmaxValue() {
return fmaxValue;
}
public Float getMinValue() {
return minValue;
}
public Float getMeanValue() {
return meanValue;
}
public Float getCp95Value() {
return cp95Value;
}
public void setPhaseType(String phaseType) {
this.phaseType = phaseType;
}
public void setFmaxValue(Float fmaxValue) {
this.fmaxValue = transData(fmaxValue);
}
public void setMinValue(Float minValue) {
this.minValue = transData(minValue);
}
public void setMeanValue(Float meanValue) {
this.meanValue = transData(meanValue);
}
public void setCp95Value(Float cp95Value) {
this.cp95Value = transData(cp95Value);
}
public ReportValue(String phaseType, Float maxValue, Float minValue, Float meanValue, Float cp95Value) {
this.phaseType = phaseType;
this.fmaxValue = transData(maxValue);
this.minValue = transData(minValue);
this.meanValue = transData(meanValue);
this.cp95Value = transData(cp95Value);
}
private Float transData(Float f) {
if (f == null) {
return f;
}
float f1 = (float) (Math.round(f.floatValue() * 100)) / 100;
return new Float(f1);
}
}