feat(harmonic): 新增获取主要监测点列表、监测点指标越限详情、总体指标越限统计数据、总体指标越限统计列表、每日越限占比统计接口
This commit is contained in:
@@ -81,7 +81,8 @@ public class Knife4jSwaggerConfig {
|
||||
"com.njcn.supervision.controller",
|
||||
"com.njcn.algorithm",
|
||||
"com.njcn.dataProcess",
|
||||
"com.njcn.migration"
|
||||
"com.njcn.migration",
|
||||
"com.njcn.harmonic.rstatlimitrate.controller"
|
||||
)
|
||||
.collect(Collectors.toList());
|
||||
List<GrantType> grantTypes = new ArrayList<>();
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.harmonic.pojo.param;
|
||||
|
||||
import com.njcn.web.pojo.annotation.DateTimeStrValid;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class MainLineQueryParam {
|
||||
@ApiModelProperty("关键词")
|
||||
private String keywords;
|
||||
|
||||
@ApiModelProperty(name = "searchBeginTime", value = "开始时间")
|
||||
@NotBlank(message = "起始时间不可为空")
|
||||
@DateTimeStrValid(message = "起始时间格式出错")
|
||||
private String searchBeginTime;
|
||||
|
||||
@ApiModelProperty(name = "searchEndTime", value = "结束时间")
|
||||
@NotBlank(message = "结束时间不可为空")
|
||||
private String searchEndTime;
|
||||
|
||||
@ApiModelProperty(value = "页码", example = "1")
|
||||
private int pageNum = 1;
|
||||
|
||||
@ApiModelProperty(value = "每页记录数", example = "10")
|
||||
private int pageSize = 10;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.njcn.harmonic.pojo.param;
|
||||
|
||||
import com.njcn.web.pojo.annotation.DateTimeStrValid;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class MainLineStatLimitRateDetailsQueryParam {
|
||||
@NotBlank(message = "监测点ID不可为空")
|
||||
@ApiModelProperty("监测点ID")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty(name = "searchBeginTime", value = "开始时间")
|
||||
@NotBlank(message = "起始时间不可为空")
|
||||
@DateTimeStrValid(message = "起始时间格式出错")
|
||||
private String searchBeginTime;
|
||||
|
||||
@ApiModelProperty(name = "searchEndTime", value = "结束时间")
|
||||
@NotBlank(message = "结束时间不可为空")
|
||||
private String searchEndTime;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.njcn.harmonic.pojo.param;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class TotalLimitStatisticsDetailsQueryParam extends MainLineStatLimitRateDetailsQueryParam {
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.njcn.harmonic.pojo.param;
|
||||
|
||||
import com.njcn.web.pojo.annotation.DateTimeStrValid;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
public class TotalLimitStatisticsParam {
|
||||
@ApiModelProperty(name = "searchBeginTime", value = "开始时间")
|
||||
@NotBlank(message = "起始时间不可为空")
|
||||
@DateTimeStrValid(message = "起始时间格式出错")
|
||||
private String searchBeginTime;
|
||||
|
||||
@ApiModelProperty(name = "searchEndTime", value = "结束时间")
|
||||
@NotBlank(message = "结束时间不可为空")
|
||||
private String searchEndTime;
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import com.njcn.harmonic.annotaion.HarCurrent;
|
||||
import com.njcn.harmonic.annotaion.HarVoltage;
|
||||
import com.njcn.harmonic.annotaion.InterharVoltage;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -23,6 +24,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "my_index")
|
||||
@ApiModelProperty(value = "监测点ID合格率的变电站/装置/母线/线路序号")
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
@@ -30,6 +32,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "phasic_type")
|
||||
@ApiModelProperty(value = "数据类型,'A'表示A相,'B'表示B相,'C'表示C相,''M'表示ABC三项总和,T'表示总")
|
||||
private String phasicType;
|
||||
|
||||
/**
|
||||
@@ -37,55 +40,64 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "time_id")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@ApiModelProperty(value = "合格率时间")
|
||||
private LocalDate time;
|
||||
|
||||
/**
|
||||
* 总计算次数
|
||||
*/
|
||||
@TableField(value = "all_time")
|
||||
@ApiModelProperty(value = "总计算次数")
|
||||
private Integer allTime;
|
||||
|
||||
/**
|
||||
* 闪变越限次数
|
||||
*/
|
||||
@TableField(value = "flicker_overtime")
|
||||
@ApiModelProperty(value = "闪变越限次数")
|
||||
private Integer flickerOvertime;
|
||||
|
||||
/**
|
||||
* 闪变总计算次数
|
||||
*/
|
||||
@TableField(value = "flicker_all_time")
|
||||
@ApiModelProperty(value = "闪变总计算次数")
|
||||
private Integer flickerAllTime;
|
||||
|
||||
/**
|
||||
* 频率偏差越限次数
|
||||
*/
|
||||
@TableField(value = "freq_dev_overtime")
|
||||
@ApiModelProperty(value = "频率偏差越限次数")
|
||||
private Integer freqDevOvertime;
|
||||
|
||||
/**
|
||||
* 电压偏差越限次数
|
||||
*/
|
||||
@TableField(value = "voltage_dev_overtime")
|
||||
@ApiModelProperty(value = "电压偏差越限次数")
|
||||
private Integer voltageDevOvertime;
|
||||
|
||||
/**
|
||||
* 三相电压不平衡度越限次数
|
||||
*/
|
||||
@TableField(value = "ubalance_overtime")
|
||||
@ApiModelProperty(value = "三相电压不平衡度越限次数")
|
||||
private Integer ubalanceOvertime;
|
||||
|
||||
/**
|
||||
* 电压谐波畸变率越限次数
|
||||
*/
|
||||
@TableField(value = "uaberrance_overtime")
|
||||
@ApiModelProperty(value = "电压谐波畸变率越限次数")
|
||||
private Integer uaberranceOvertime;
|
||||
|
||||
/**
|
||||
* 负序电流限值次数
|
||||
*/
|
||||
@TableField(value = "i_neg_overtime")
|
||||
@ApiModelProperty(value = "负序电流限值次数")
|
||||
private Integer iNegOvertime;
|
||||
|
||||
/**
|
||||
@@ -93,6 +105,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_2_overtime")
|
||||
@ApiModelProperty(value = "2次电压谐波含有率越限次数")
|
||||
private Integer uharm2Overtime;
|
||||
|
||||
/**
|
||||
@@ -100,6 +113,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_3_overtime")
|
||||
@ApiModelProperty(value = "3次电压谐波含有率越限次数")
|
||||
private Integer uharm3Overtime;
|
||||
|
||||
/**
|
||||
@@ -107,6 +121,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_4_overtime")
|
||||
@ApiModelProperty(value = "4次电压谐波含有率越限次数")
|
||||
private Integer uharm4Overtime;
|
||||
|
||||
/**
|
||||
@@ -114,6 +129,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_5_overtime")
|
||||
@ApiModelProperty(value = "5次电压谐波含有率越限次数")
|
||||
private Integer uharm5Overtime;
|
||||
|
||||
/**
|
||||
@@ -121,6 +137,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_6_overtime")
|
||||
@ApiModelProperty(value = "6次电压谐波含有率越限次数")
|
||||
private Integer uharm6Overtime;
|
||||
|
||||
/**
|
||||
@@ -128,6 +145,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_7_overtime")
|
||||
@ApiModelProperty(value = "7次电压谐波含有率越限次数")
|
||||
private Integer uharm7Overtime;
|
||||
|
||||
/**
|
||||
@@ -135,6 +153,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_8_overtime")
|
||||
@ApiModelProperty(value = "8次电压谐波含有率越限次数")
|
||||
private Integer uharm8Overtime;
|
||||
|
||||
/**
|
||||
@@ -142,6 +161,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_9_overtime")
|
||||
@ApiModelProperty(value = "9次电压谐波含有率越限次数")
|
||||
private Integer uharm9Overtime;
|
||||
|
||||
/**
|
||||
@@ -149,6 +169,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_10_overtime")
|
||||
@ApiModelProperty(value = "10次电压谐波含有率越限次数")
|
||||
private Integer uharm10Overtime;
|
||||
|
||||
/**
|
||||
@@ -156,6 +177,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_11_overtime")
|
||||
@ApiModelProperty(value = "11次电压谐波含有率越限次数")
|
||||
private Integer uharm11Overtime;
|
||||
|
||||
/**
|
||||
@@ -163,6 +185,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_12_overtime")
|
||||
@ApiModelProperty(value = "12次电压谐波含有率越限次数")
|
||||
private Integer uharm12Overtime;
|
||||
|
||||
/**
|
||||
@@ -170,6 +193,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_13_overtime")
|
||||
@ApiModelProperty(value = "13次电压谐波含有率越限次数")
|
||||
private Integer uharm13Overtime;
|
||||
|
||||
/**
|
||||
@@ -177,6 +201,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_14_overtime")
|
||||
@ApiModelProperty(value = "14次电压谐波含有率越限次数")
|
||||
private Integer uharm14Overtime;
|
||||
|
||||
/**
|
||||
@@ -184,6 +209,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_15_overtime")
|
||||
@ApiModelProperty(value = "15次电压谐波含有率越限次数")
|
||||
private Integer uharm15Overtime;
|
||||
|
||||
/**
|
||||
@@ -191,6 +217,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_16_overtime")
|
||||
@ApiModelProperty(value = "16次电压谐波含有率越限次数")
|
||||
private Integer uharm16Overtime;
|
||||
|
||||
/**
|
||||
@@ -198,6 +225,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_17_overtime")
|
||||
@ApiModelProperty(value = "17次电压谐波含有率越限次数")
|
||||
private Integer uharm17Overtime;
|
||||
|
||||
/**
|
||||
@@ -205,6 +233,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_18_overtime")
|
||||
@ApiModelProperty(value = "18次电压谐波含有率越限次数")
|
||||
private Integer uharm18Overtime;
|
||||
|
||||
/**
|
||||
@@ -212,6 +241,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_19_overtime")
|
||||
@ApiModelProperty(value = "19次电压谐波含有率越限次数")
|
||||
private Integer uharm19Overtime;
|
||||
|
||||
/**
|
||||
@@ -219,6 +249,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_20_overtime")
|
||||
@ApiModelProperty(value = "20次电压谐波含有率越限次数")
|
||||
private Integer uharm20Overtime;
|
||||
|
||||
/**
|
||||
@@ -226,6 +257,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_21_overtime")
|
||||
@ApiModelProperty(value = "21次电压谐波含有率越限次数")
|
||||
private Integer uharm21Overtime;
|
||||
|
||||
/**
|
||||
@@ -233,6 +265,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_22_overtime")
|
||||
@ApiModelProperty(value = "22次电压谐波含有率越限次数")
|
||||
private Integer uharm22Overtime;
|
||||
|
||||
/**
|
||||
@@ -240,6 +273,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_23_overtime")
|
||||
@ApiModelProperty(value = "23次电压谐波含有率越限次数")
|
||||
private Integer uharm23Overtime;
|
||||
|
||||
/**
|
||||
@@ -247,6 +281,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_24_overtime")
|
||||
@ApiModelProperty(value = "24次电压谐波含有率越限次数")
|
||||
private Integer uharm24Overtime;
|
||||
|
||||
/**
|
||||
@@ -254,6 +289,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarVoltage
|
||||
@TableField(value = "uharm_25_overtime")
|
||||
@ApiModelProperty(value = "25次电压谐波含有率越限次数")
|
||||
private Integer uharm25Overtime;
|
||||
|
||||
/**
|
||||
@@ -261,6 +297,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_2_overtime")
|
||||
@ApiModelProperty(value = "2次电流谐波幅值越限次数")
|
||||
private Integer iharm2Overtime;
|
||||
|
||||
/**
|
||||
@@ -268,6 +305,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_3_overtime")
|
||||
@ApiModelProperty(value = "3次电流谐波幅值越限次数")
|
||||
private Integer iharm3Overtime;
|
||||
|
||||
/**
|
||||
@@ -275,6 +313,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_4_overtime")
|
||||
@ApiModelProperty(value = "4次电流谐波幅值越限次数")
|
||||
private Integer iharm4Overtime;
|
||||
|
||||
/**
|
||||
@@ -282,6 +321,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_5_overtime")
|
||||
@ApiModelProperty(value = "5次电流谐波幅值越限次数")
|
||||
private Integer iharm5Overtime;
|
||||
|
||||
/**
|
||||
@@ -289,6 +329,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_6_overtime")
|
||||
@ApiModelProperty(value = "6次电流谐波幅值越限次数")
|
||||
private Integer iharm6Overtime;
|
||||
|
||||
/**
|
||||
@@ -296,6 +337,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_7_overtime")
|
||||
@ApiModelProperty(value = "7次电流谐波幅值越限次数")
|
||||
private Integer iharm7Overtime;
|
||||
|
||||
/**
|
||||
@@ -303,6 +345,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_8_overtime")
|
||||
@ApiModelProperty(value = "8次电流谐波幅值越限次数")
|
||||
private Integer iharm8Overtime;
|
||||
|
||||
/**
|
||||
@@ -310,6 +353,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_9_overtime")
|
||||
@ApiModelProperty(value = "9次电流谐波幅值越限次数")
|
||||
private Integer iharm9Overtime;
|
||||
|
||||
/**
|
||||
@@ -317,6 +361,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_10_overtime")
|
||||
@ApiModelProperty(value = "10次电流谐波幅值越限次数")
|
||||
private Integer iharm10Overtime;
|
||||
|
||||
/**
|
||||
@@ -324,6 +369,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_11_overtime")
|
||||
@ApiModelProperty(value = "11次电流谐波幅值越限次数")
|
||||
private Integer iharm11Overtime;
|
||||
|
||||
/**
|
||||
@@ -331,6 +377,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_12_overtime")
|
||||
@ApiModelProperty(value = "12次电流谐波幅值越限次数")
|
||||
private Integer iharm12Overtime;
|
||||
|
||||
/**
|
||||
@@ -338,6 +385,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_13_overtime")
|
||||
@ApiModelProperty(value = "13次电流谐波幅值越限次数")
|
||||
private Integer iharm13Overtime;
|
||||
|
||||
/**
|
||||
@@ -345,6 +393,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_14_overtime")
|
||||
@ApiModelProperty(value = "14次电流谐波幅值越限次数")
|
||||
private Integer iharm14Overtime;
|
||||
|
||||
/**
|
||||
@@ -352,6 +401,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_15_overtime")
|
||||
@ApiModelProperty(value = "15次电流谐波幅值越限次数")
|
||||
private Integer iharm15Overtime;
|
||||
|
||||
/**
|
||||
@@ -359,6 +409,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_16_overtime")
|
||||
@ApiModelProperty(value = "16次电流谐波幅值越限次数")
|
||||
private Integer iharm16Overtime;
|
||||
|
||||
/**
|
||||
@@ -366,6 +417,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_17_overtime")
|
||||
@ApiModelProperty(value = "17次电流谐波幅值越限次数")
|
||||
private Integer iharm17Overtime;
|
||||
|
||||
/**
|
||||
@@ -373,6 +425,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_18_overtime")
|
||||
@ApiModelProperty(value = "18次电流谐波幅值越限次数")
|
||||
private Integer iharm18Overtime;
|
||||
|
||||
/**
|
||||
@@ -380,6 +433,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_19_overtime")
|
||||
@ApiModelProperty(value = "19次电流谐波幅值越限次数")
|
||||
private Integer iharm19Overtime;
|
||||
|
||||
/**
|
||||
@@ -387,6 +441,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_20_overtime")
|
||||
@ApiModelProperty(value = "20次电流谐波幅值越限次数")
|
||||
private Integer iharm20Overtime;
|
||||
|
||||
/**
|
||||
@@ -394,6 +449,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_21_overtime")
|
||||
@ApiModelProperty(value = "21次电流谐波幅值越限次数")
|
||||
private Integer iharm21Overtime;
|
||||
|
||||
/**
|
||||
@@ -401,6 +457,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_22_overtime")
|
||||
@ApiModelProperty(value = "22次电流谐波幅值越限次数")
|
||||
private Integer iharm22Overtime;
|
||||
|
||||
/**
|
||||
@@ -408,6 +465,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_23_overtime")
|
||||
@ApiModelProperty(value = "23次电流谐波幅值越限次数")
|
||||
private Integer iharm23Overtime;
|
||||
|
||||
/**
|
||||
@@ -415,6 +473,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_24_overtime")
|
||||
@ApiModelProperty(value = "24次电流谐波幅值越限次数")
|
||||
private Integer iharm24Overtime;
|
||||
|
||||
/**
|
||||
@@ -422,6 +481,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@HarCurrent
|
||||
@TableField(value = "iharm_25_overtime")
|
||||
@ApiModelProperty(value = "25次电流谐波幅值越限次数")
|
||||
private Integer iharm25Overtime;
|
||||
|
||||
/**
|
||||
@@ -429,6 +489,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@TableField(value = "inuharm_1_overtime")
|
||||
@InterharVoltage
|
||||
@ApiModelProperty(value = "0.5次间谐波电压限值次数")
|
||||
private Integer inuharm1Overtime;
|
||||
|
||||
/**
|
||||
@@ -436,6 +497,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_2_overtime")
|
||||
@ApiModelProperty(value = "1.5次间谐波电压限值次数")
|
||||
private Integer inuharm2Overtime;
|
||||
|
||||
/**
|
||||
@@ -443,6 +505,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_3_overtime")
|
||||
@ApiModelProperty(value = "2.5次间谐波电压限值次数")
|
||||
private Integer inuharm3Overtime;
|
||||
|
||||
/**
|
||||
@@ -450,6 +513,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_4_overtime")
|
||||
@ApiModelProperty(value = "3.5次间谐波电压限值次数")
|
||||
private Integer inuharm4Overtime;
|
||||
|
||||
/**
|
||||
@@ -457,6 +521,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_5_overtime")
|
||||
@ApiModelProperty(value = "4.5次间谐波电压限值次数")
|
||||
private Integer inuharm5Overtime;
|
||||
|
||||
/**
|
||||
@@ -464,6 +529,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_6_overtime")
|
||||
@ApiModelProperty(value = "5.5次间谐波电压限值次数")
|
||||
private Integer inuharm6Overtime;
|
||||
|
||||
/**
|
||||
@@ -471,6 +537,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_7_overtime")
|
||||
@ApiModelProperty(value = "6.5次间谐波电压限值次数")
|
||||
private Integer inuharm7Overtime;
|
||||
|
||||
/**
|
||||
@@ -478,6 +545,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_8_overtime")
|
||||
@ApiModelProperty(value = "7.5次间谐波电压限值次数")
|
||||
private Integer inuharm8Overtime;
|
||||
|
||||
/**
|
||||
@@ -485,6 +553,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_9_overtime")
|
||||
@ApiModelProperty(value = "8.5次间谐波电压限值次数")
|
||||
private Integer inuharm9Overtime;
|
||||
|
||||
/**
|
||||
@@ -492,6 +561,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_10_overtime")
|
||||
@ApiModelProperty(value = "9.5次间谐波电压限值次数")
|
||||
private Integer inuharm10Overtime;
|
||||
|
||||
/**
|
||||
@@ -499,6 +569,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_11_overtime")
|
||||
@ApiModelProperty(value = "10.5次间谐波电压限值次数")
|
||||
private Integer inuharm11Overtime;
|
||||
|
||||
/**
|
||||
@@ -506,6 +577,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_12_overtime")
|
||||
@ApiModelProperty(value = "11.5次间谐波电压限值次数")
|
||||
private Integer inuharm12Overtime;
|
||||
|
||||
/**
|
||||
@@ -513,6 +585,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_13_overtime")
|
||||
@ApiModelProperty(value = "12.5次间谐波电压限值次数")
|
||||
private Integer inuharm13Overtime;
|
||||
|
||||
/**
|
||||
@@ -520,6 +593,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_14_overtime")
|
||||
@ApiModelProperty(value = "13.5次间谐波电压限值次数")
|
||||
private Integer inuharm14Overtime;
|
||||
|
||||
/**
|
||||
@@ -527,6 +601,7 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_15_overtime")
|
||||
@ApiModelProperty(value = "14.5次间谐波电压限值次数")
|
||||
private Integer inuharm15Overtime;
|
||||
|
||||
/**
|
||||
@@ -534,5 +609,6 @@ public class RStatLimitRateDPO {
|
||||
*/
|
||||
@InterharVoltage
|
||||
@TableField(value = "inuharm_16_overtime")
|
||||
@ApiModelProperty(value = "15.5次间谐波电压限值次数")
|
||||
private Integer inuharm16Overtime;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.njcn.harmonic.pojo.vo;
|
||||
|
||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MainLineStatLimitRateDetailsVO extends RStatLimitRateDPO {
|
||||
@ApiModelProperty("监测点名称")
|
||||
private String lineName;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.harmonic.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class MainLineVO implements Serializable {
|
||||
@ApiModelProperty("监测点ID")
|
||||
private String lineId;
|
||||
@ApiModelProperty("监测点名称")
|
||||
private String lineName;
|
||||
@ApiModelProperty("监测对象类型")
|
||||
private String objType;
|
||||
@ApiModelProperty("是否治理")
|
||||
private String govern;
|
||||
@ApiModelProperty("主要存在的电能质量问题")
|
||||
private String problems;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.njcn.harmonic.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class TotalLimitStatisticsDetailsVO extends MainLineStatLimitRateDetailsVO {
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.njcn.harmonic.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class TotalLimitStatisticsVO extends TotalLimitTotalStatisticsVO {
|
||||
|
||||
@ApiModelProperty("监测点ID")
|
||||
private String lineId;
|
||||
@ApiModelProperty("监测点名称")
|
||||
private String lineName;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.njcn.harmonic.pojo.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TotalLimitTotalStatisticsVO {
|
||||
|
||||
@ApiModelProperty("闪变越限占比")
|
||||
private int flicker;
|
||||
@ApiModelProperty("谐波电压越限占比")
|
||||
private int uharm;
|
||||
@ApiModelProperty("谐波电流越限占比")
|
||||
private int iharm;
|
||||
@ApiModelProperty("电压偏差越限占比")
|
||||
private int voltageDev;
|
||||
@ApiModelProperty("三相不平衡越限占比")
|
||||
private int ubalance;
|
||||
}
|
||||
@@ -131,6 +131,12 @@
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>harmonic-common</artifactId>
|
||||
<version>1.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -24,7 +24,12 @@
|
||||
<artifactId>harmonic-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>cs-device-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
package com.njcn.harmonic.rstatlimitrate.controller;
|
||||
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.harmonic.pojo.param.RStatLimitQueryParam;
|
||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.param.*;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||
import com.njcn.harmonic.pojo.vo.*;
|
||||
import com.njcn.harmonic.rstatlimitrate.service.IRStatLimitRateDService;
|
||||
import com.njcn.web.controller.BaseController;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -17,6 +19,7 @@ import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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.RequestParam;
|
||||
@@ -24,6 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Validated
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "合格率统计日表(越限次数)")
|
||||
@@ -31,7 +35,6 @@ public class RStatLimitRateDController extends BaseController {
|
||||
|
||||
private final IRStatLimitRateDService limitRateDService;
|
||||
|
||||
|
||||
/**
|
||||
* 来源于RStatLimitController的monitorIdsGetLimitRateInfo
|
||||
*/
|
||||
@@ -40,7 +43,7 @@ public class RStatLimitRateDController extends BaseController {
|
||||
@ApiOperation("获取指定日期超标监测点详细信息")
|
||||
public HttpResult<List<RStatLimitRateDPO>> monitorIdsGetLimitRateInfo(@RequestBody RStatLimitQueryParam rStatLimitQueryParam) {
|
||||
String methodDescribe = getMethodDescribe("monitorIdsGetLimitRateInfo");
|
||||
List<RStatLimitRateDPO> result = limitRateDService.monitorIdsGetLimitRateInfo(rStatLimitQueryParam.getDate(),rStatLimitQueryParam.getIds());
|
||||
List<RStatLimitRateDPO> result = limitRateDService.monitorIdsGetLimitRateInfo(rStatLimitQueryParam.getDate(), rStatLimitQueryParam.getIds());
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -58,7 +61,7 @@ public class RStatLimitRateDController extends BaseController {
|
||||
})
|
||||
public HttpResult<List<RStatLimitRateDPO>> getOverData(@RequestParam("lineId") String lineId, @RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime, @RequestParam("type") Integer type) {
|
||||
String methodDescribe = getMethodDescribe("getOverData");
|
||||
List<RStatLimitRateDPO> result = limitRateDService.getOverData(lineId,startTime,endTime,type);
|
||||
List<RStatLimitRateDPO> result = limitRateDService.getOverData(lineId, startTime, endTime, type);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
@@ -81,4 +84,55 @@ public class RStatLimitRateDController extends BaseController {
|
||||
);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("/mainLine/list")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("获取主要监测点列表")
|
||||
public HttpResult<Page<MainLineVO>> mainLineList(@RequestBody MainLineQueryParam mainLineQueryParam) {
|
||||
String methodDescribe = getMethodDescribe("mainLineList");
|
||||
Page<MainLineVO> list = limitRateDService.mainLineList(mainLineQueryParam);
|
||||
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/mainLine/statLimitRateDetails")
|
||||
@ApiOperation("监测点指标越限详情")
|
||||
@ApiImplicitParam(name = "param", value = "获取监测点指标越限详情请求参数", required = true)
|
||||
public HttpResult<List<MainLineStatLimitRateDetailsVO>> mainLineStatLimitRateDetails(@RequestBody MainLineStatLimitRateDetailsQueryParam param) {
|
||||
String methodDescribe = getMethodDescribe("mainLineStatLimitRateDetails");
|
||||
List<MainLineStatLimitRateDetailsVO> list = limitRateDService.mainLineStatLimitRateDetails(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/totalLimitStatistics/data")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("总体指标越限统计数据")
|
||||
public HttpResult<TotalLimitTotalStatisticsVO> totalLimitTotalStatisticsData(@RequestBody TotalLimitStatisticsParam mainLineQueryParam) {
|
||||
String methodDescribe = getMethodDescribe("totalLimitStatisticsList");
|
||||
TotalLimitTotalStatisticsVO data = limitRateDService.totalLimitTotalStatisticsData(mainLineQueryParam);
|
||||
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("/totalLimitStatistics/list")
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@ApiOperation("总体指标越限统计列表")
|
||||
public HttpResult<List<TotalLimitStatisticsVO>> totalLimitStatisticsList(@RequestBody TotalLimitStatisticsParam mainLineQueryParam) {
|
||||
String methodDescribe = getMethodDescribe("totalLimitStatisticsList");
|
||||
List<TotalLimitStatisticsVO> list = limitRateDService.totalLimitStatisticsList(mainLineQueryParam);
|
||||
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/totalLimitStatistics/details")
|
||||
@ApiOperation("每日越限占比统计")
|
||||
@ApiImplicitParam(name = "param", value = "每日越限占比统计请求参数", required = true)
|
||||
public HttpResult<List<TotalLimitStatisticsDetailsVO>> totalLimitStatisticsDetails(@RequestBody TotalLimitStatisticsDetailsQueryParam param) {
|
||||
String methodDescribe = getMethodDescribe("totalLimitStatisticsDetails");
|
||||
List<TotalLimitStatisticsDetailsVO> list = limitRateDService.totalLimitStatisticsDetails(param);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
package com.njcn.harmonic.rstatlimitrate.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.harmonic.pojo.param.MainLineQueryParam;
|
||||
import com.njcn.harmonic.pojo.param.MainLineStatLimitRateDetailsQueryParam;
|
||||
import com.njcn.harmonic.pojo.param.TotalLimitStatisticsDetailsQueryParam;
|
||||
import com.njcn.harmonic.pojo.param.TotalLimitStatisticsParam;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||
import com.njcn.harmonic.pojo.vo.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -17,10 +23,21 @@ public interface IRStatLimitRateDService extends IService<RStatLimitRateDPO> {
|
||||
|
||||
/**
|
||||
* 获取指定日期的监测点超标详情
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2024/2/28
|
||||
*/
|
||||
List<RStatLimitRateDPO> monitorIdsGetLimitRateInfo(String date, List<String> monitorIds);
|
||||
|
||||
List<RStatLimitRateDPO> getOverData(String lineId, String startTime, String endTime, Integer type);
|
||||
|
||||
Page<MainLineVO> mainLineList(MainLineQueryParam param);
|
||||
|
||||
List<MainLineStatLimitRateDetailsVO> mainLineStatLimitRateDetails(MainLineStatLimitRateDetailsQueryParam param);
|
||||
|
||||
TotalLimitTotalStatisticsVO totalLimitTotalStatisticsData(TotalLimitStatisticsParam param);
|
||||
|
||||
List<TotalLimitStatisticsVO> totalLimitStatisticsList(TotalLimitStatisticsParam param);
|
||||
|
||||
List<TotalLimitStatisticsDetailsVO> totalLimitStatisticsDetails(TotalLimitStatisticsDetailsQueryParam param);
|
||||
}
|
||||
|
||||
@@ -1,14 +1,35 @@
|
||||
package com.njcn.harmonic.rstatlimitrate.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.csdevice.api.CsLineFeignClient;
|
||||
import com.njcn.csdevice.pojo.po.CsLinePO;
|
||||
import com.njcn.harmonic.pojo.param.MainLineQueryParam;
|
||||
import com.njcn.harmonic.pojo.param.MainLineStatLimitRateDetailsQueryParam;
|
||||
import com.njcn.harmonic.pojo.param.TotalLimitStatisticsDetailsQueryParam;
|
||||
import com.njcn.harmonic.pojo.param.TotalLimitStatisticsParam;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||
import com.njcn.harmonic.pojo.vo.*;
|
||||
import com.njcn.harmonic.rstatlimitrate.mapper.RStatLimitRateDMapper;
|
||||
import com.njcn.harmonic.rstatlimitrate.service.IRStatLimitRateDService;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -18,14 +39,17 @@ import java.util.List;
|
||||
* @author wr
|
||||
* @since 2023-04-03
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Service
|
||||
public class RStatLimitRateDServiceImpl extends ServiceImpl<RStatLimitRateDMapper, RStatLimitRateDPO> implements IRStatLimitRateDService {
|
||||
|
||||
private final CsLineFeignClient csLineFeignClient;
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
@Override
|
||||
public List<RStatLimitRateDPO> monitorIdsGetLimitRateInfo(String date, List<String> monitorIds) {
|
||||
return this.baseMapper.selectList(new LambdaQueryWrapper<RStatLimitRateDPO>()
|
||||
.in(RStatLimitRateDPO::getLineId,monitorIds).eq(RStatLimitRateDPO::getTime,date).eq(RStatLimitRateDPO::getPhasicType,"T"));
|
||||
.in(RStatLimitRateDPO::getLineId, monitorIds).eq(RStatLimitRateDPO::getTime, date).eq(RStatLimitRateDPO::getPhasicType, "T"));
|
||||
}
|
||||
|
||||
|
||||
@@ -33,44 +57,44 @@ public class RStatLimitRateDServiceImpl extends ServiceImpl<RStatLimitRateDMappe
|
||||
public List<RStatLimitRateDPO> getOverData(String lineId, String startTime, String endTime, Integer type) {
|
||||
QueryWrapper<RStatLimitRateDPO> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda()
|
||||
.eq(RStatLimitRateDPO::getLineId,lineId)
|
||||
.between(RStatLimitRateDPO::getTime,startTime,endTime)
|
||||
.eq(RStatLimitRateDPO::getLineId, lineId)
|
||||
.between(RStatLimitRateDPO::getTime, startTime, endTime)
|
||||
.groupBy(RStatLimitRateDPO::getTime);
|
||||
//频率偏差
|
||||
if (type == 1) {
|
||||
queryWrapper.select("time_id time,max(freq_dev_overtime) freq_dev_overtime");
|
||||
queryWrapper.lambda().gt(RStatLimitRateDPO::getFreqDevOvertime,0);
|
||||
queryWrapper.lambda().gt(RStatLimitRateDPO::getFreqDevOvertime, 0);
|
||||
}
|
||||
//电压偏差
|
||||
else if (type == 2) {
|
||||
queryWrapper.select("time_id time,max(voltage_dev_overtime) voltage_dev_overtime");
|
||||
queryWrapper.lambda().gt(RStatLimitRateDPO::getVoltageDevOvertime,0);
|
||||
queryWrapper.lambda().gt(RStatLimitRateDPO::getVoltageDevOvertime, 0);
|
||||
}
|
||||
//长时闪变
|
||||
else if (type == 3) {
|
||||
queryWrapper.select("time_id time,max(flicker_overtime) flicker_overtime");
|
||||
queryWrapper.lambda().gt(RStatLimitRateDPO::getFlickerOvertime,0);
|
||||
queryWrapper.lambda().gt(RStatLimitRateDPO::getFlickerOvertime, 0);
|
||||
}
|
||||
//电压总谐波畸变率
|
||||
else if (type == 4) {
|
||||
queryWrapper.select("time_id time,max(uaberrance_overtime) uaberrance_overtime");
|
||||
queryWrapper.lambda().gt(RStatLimitRateDPO::getUaberranceOvertime,0);
|
||||
queryWrapper.lambda().gt(RStatLimitRateDPO::getUaberranceOvertime, 0);
|
||||
}
|
||||
//负序电压不平衡度
|
||||
else if (type == 5) {
|
||||
queryWrapper.select("time_id time,max(ubalance_overtime) ubalance_overtime");
|
||||
queryWrapper.lambda().gt(RStatLimitRateDPO::getUbalanceOvertime,0);
|
||||
queryWrapper.lambda().gt(RStatLimitRateDPO::getUbalanceOvertime, 0);
|
||||
}
|
||||
//负序电流
|
||||
else if (type == 6) {
|
||||
queryWrapper.select("time_id time,max(i_neg_overtime) i_neg_overtime");
|
||||
queryWrapper.lambda().gt(RStatLimitRateDPO::getINegOvertime,0);
|
||||
queryWrapper.lambda().gt(RStatLimitRateDPO::getINegOvertime, 0);
|
||||
}
|
||||
//谐波电压含有率
|
||||
else if (type == 7) {
|
||||
StringBuilder selectSql = new StringBuilder();
|
||||
StringBuilder havingSql = new StringBuilder();
|
||||
for (int i = 2; i <=25 ; i++) {
|
||||
for (int i = 2; i <= 25; i++) {
|
||||
selectSql.append("max(uharm_").append(i).append("_overtime) uharm_").append(i).append("_overtime,");
|
||||
if (i == 25) {
|
||||
havingSql.append("uharm_").append(i).append("_overtime");
|
||||
@@ -80,13 +104,13 @@ public class RStatLimitRateDServiceImpl extends ServiceImpl<RStatLimitRateDMappe
|
||||
}
|
||||
selectSql.append("time_id time");
|
||||
havingSql = new StringBuilder("sum(" + havingSql + ")");
|
||||
queryWrapper.select(selectSql.toString()).having(havingSql.toString(),0);
|
||||
queryWrapper.select(selectSql.toString()).having(havingSql.toString(), 0);
|
||||
}
|
||||
//谐波电流
|
||||
else if (type == 8) {
|
||||
StringBuilder selectSql = new StringBuilder();
|
||||
StringBuilder havingSql = new StringBuilder();
|
||||
for (int i = 2; i <=25 ; i++) {
|
||||
for (int i = 2; i <= 25; i++) {
|
||||
selectSql.append("max(iharm_").append(i).append("_overtime) iharm_").append(i).append("_overtime,");
|
||||
if (i == 25) {
|
||||
havingSql.append("iharm_").append(i).append("_overtime");
|
||||
@@ -96,13 +120,13 @@ public class RStatLimitRateDServiceImpl extends ServiceImpl<RStatLimitRateDMappe
|
||||
}
|
||||
selectSql.append("time_id time");
|
||||
havingSql = new StringBuilder("sum(" + havingSql + ")");
|
||||
queryWrapper.select(selectSql.toString()).having(havingSql.toString(),0);
|
||||
queryWrapper.select(selectSql.toString()).having(havingSql.toString(), 0);
|
||||
}
|
||||
//间谐波电压
|
||||
else if (type == 9) {
|
||||
StringBuilder selectSql = new StringBuilder();
|
||||
StringBuilder havingSql = new StringBuilder();
|
||||
for (int i = 1; i <=16 ; i++) {
|
||||
for (int i = 1; i <= 16; i++) {
|
||||
selectSql.append("max(inuharm_").append(i).append("_overtime) inuharm_").append(i).append("_overtime,");
|
||||
if (i == 16) {
|
||||
havingSql.append("inuharm_").append(i).append("_overtime");
|
||||
@@ -112,9 +136,302 @@ public class RStatLimitRateDServiceImpl extends ServiceImpl<RStatLimitRateDMappe
|
||||
}
|
||||
selectSql.append("time_id time");
|
||||
havingSql = new StringBuilder("sum(" + havingSql + ")");
|
||||
queryWrapper.select(selectSql.toString()).having(havingSql.toString(),0);
|
||||
queryWrapper.select(selectSql.toString()).having(havingSql.toString(), 0);
|
||||
}
|
||||
return this.baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<MainLineVO> mainLineList(MainLineQueryParam param) {
|
||||
Page<MainLineVO> result = new Page<>();
|
||||
result.setCurrent(param.getPageNum());
|
||||
result.setSize(param.getPageSize());
|
||||
String keywords = param.getKeywords();
|
||||
List<String> keywordsLineIds = new ArrayList<>();
|
||||
if (StrUtil.isNotBlank(keywords)) {
|
||||
List<CsLinePO> lineList = csLineFeignClient.getLineByName(keywords).getData();
|
||||
if (CollUtil.isEmpty(lineList)) {
|
||||
return result;
|
||||
}
|
||||
keywordsLineIds = lineList.stream().map(CsLinePO::getLineId).collect(Collectors.toList());
|
||||
}
|
||||
// 根据监测点Id分组,再分页
|
||||
Page<RStatLimitRateDPO> ratePage = this.page(new Page<RStatLimitRateDPO>(param.getPageNum(), param.getPageSize()), new LambdaQueryWrapper<RStatLimitRateDPO>()
|
||||
.eq(RStatLimitRateDPO::getPhasicType, "T")
|
||||
.ge(StrUtil.isNotBlank(param.getSearchBeginTime()), RStatLimitRateDPO::getTime, param.getSearchBeginTime())
|
||||
.le(StrUtil.isNotBlank(param.getSearchEndTime()), RStatLimitRateDPO::getTime, param.getSearchEndTime())
|
||||
.in(CollUtil.isNotEmpty(keywordsLineIds), RStatLimitRateDPO::getLineId, keywordsLineIds)
|
||||
.groupBy(RStatLimitRateDPO::getLineId)
|
||||
.select(RStatLimitRateDPO::getLineId)
|
||||
);
|
||||
BeanUtil.copyProperties(ratePage, result);
|
||||
List<RStatLimitRateDPO> records = ratePage.getRecords();
|
||||
if (CollUtil.isEmpty(records)) {
|
||||
return result;
|
||||
}
|
||||
List<MainLineVO> list = new ArrayList<>();
|
||||
MainLineVO mainLineVO;
|
||||
for (RStatLimitRateDPO record : records) {
|
||||
String lineId = record.getLineId();
|
||||
CsLinePO linePO = csLineFeignClient.getById(lineId).getData();
|
||||
mainLineVO = new MainLineVO();
|
||||
mainLineVO.setLineId(lineId);
|
||||
if (linePO != null) {
|
||||
mainLineVO.setLineName(linePO.getName());
|
||||
if (linePO.getGovern().equals(0)) {
|
||||
mainLineVO.setGovern("未治理");
|
||||
}
|
||||
if (linePO.getGovern().equals(1)) {
|
||||
mainLineVO.setGovern("已治理");
|
||||
}
|
||||
mainLineVO.setObjType(linePO.getMonitorObj());
|
||||
DictData dictData = dicDataFeignClient.getDicDataById(linePO.getMonitorObj()).getData();
|
||||
if (dictData != null) {
|
||||
mainLineVO.setObjType(dictData.getName());
|
||||
}
|
||||
}
|
||||
MainLineStatLimitRateDetailsQueryParam detailsQueryParam = new MainLineStatLimitRateDetailsQueryParam();
|
||||
detailsQueryParam.setLineId(lineId);
|
||||
detailsQueryParam.setSearchBeginTime(param.getSearchBeginTime());
|
||||
detailsQueryParam.setSearchEndTime(param.getSearchEndTime());
|
||||
List<MainLineStatLimitRateDetailsVO> detailsList = this.mainLineStatLimitRateDetails(detailsQueryParam);
|
||||
List<String> problemList = new ArrayList<>();
|
||||
for (MainLineStatLimitRateDetailsVO details : detailsList) {
|
||||
JSONObject entries = JSONUtil.parseObj(details);
|
||||
for (Map.Entry<String, Object> entry : entries.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
if (key.endsWith("Overtime")) {
|
||||
String value = entry.getValue().toString();
|
||||
// 值 >0 则表示该电能质量指标有问题
|
||||
Integer intValue = new Integer(value);
|
||||
if (intValue > 0) {
|
||||
String description = getDescription(key);
|
||||
if (StrUtil.isNotBlank(description)) {
|
||||
if (!problemList.contains(description)) {
|
||||
problemList.add(description);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CollUtil.isEmpty(problemList)) {
|
||||
mainLineVO.setProblems("所有指标都合格");
|
||||
} else {
|
||||
mainLineVO.setProblems(CollUtil.join(problemList, "、"));
|
||||
}
|
||||
|
||||
list.add(mainLineVO);
|
||||
}
|
||||
result.setRecords(list);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MainLineStatLimitRateDetailsVO> mainLineStatLimitRateDetails(MainLineStatLimitRateDetailsQueryParam param) {
|
||||
|
||||
HttpResult<CsLinePO> lineResult = csLineFeignClient.getById(param.getLineId());
|
||||
CsLinePO linePO = lineResult.getData();
|
||||
if (linePO == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<RStatLimitRateDPO> list = this.list(new LambdaQueryWrapper<RStatLimitRateDPO>()
|
||||
.eq(RStatLimitRateDPO::getLineId, param.getLineId())
|
||||
.eq(RStatLimitRateDPO::getPhasicType, "T")
|
||||
.ge(StrUtil.isNotBlank(param.getSearchBeginTime()), RStatLimitRateDPO::getTime, param.getSearchBeginTime())
|
||||
.le(StrUtil.isNotBlank(param.getSearchEndTime()), RStatLimitRateDPO::getTime, param.getSearchEndTime())
|
||||
.orderByAsc(RStatLimitRateDPO::getTime)
|
||||
);
|
||||
return list.stream().map(item -> {
|
||||
MainLineStatLimitRateDetailsVO vo = BeanUtil.copyProperties(item, MainLineStatLimitRateDetailsVO.class);
|
||||
vo.setLineName(linePO.getName());
|
||||
Integer lineInterval = linePO.getLineInterval();
|
||||
JSONObject entries = JSONUtil.parseObj(vo);
|
||||
for (Map.Entry<String, Object> entry : entries.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
if (key.endsWith("Overtime")) {
|
||||
String value = entry.getValue().toString();
|
||||
Integer intValue = new Integer(value);
|
||||
// 总分钟 = 越限次数 * 间隔时间
|
||||
int minutes = intValue * lineInterval;
|
||||
entries.putOpt(key, minutes);
|
||||
}
|
||||
}
|
||||
return BeanUtil.copyProperties(entries, MainLineStatLimitRateDetailsVO.class);
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public TotalLimitTotalStatisticsVO totalLimitTotalStatisticsData(TotalLimitStatisticsParam param) {
|
||||
List<RStatLimitRateDPO> rateList = this.list(new LambdaQueryWrapper<RStatLimitRateDPO>()
|
||||
.eq(RStatLimitRateDPO::getPhasicType, "T")
|
||||
.ge(StrUtil.isNotBlank(param.getSearchBeginTime()), RStatLimitRateDPO::getTime, param.getSearchBeginTime())
|
||||
.le(StrUtil.isNotBlank(param.getSearchEndTime()), RStatLimitRateDPO::getTime, param.getSearchEndTime())
|
||||
.orderByAsc(RStatLimitRateDPO::getTime)
|
||||
);
|
||||
|
||||
TotalLimitTotalStatisticsVO statisticsVO = new TotalLimitTotalStatisticsVO();
|
||||
int flickerTotalTime = rateList.stream().mapToInt(RStatLimitRateDPO::getFlickerOvertime).sum();
|
||||
int voltageDevTotalTime = rateList.stream().mapToInt(RStatLimitRateDPO::getVoltageDevOvertime).sum();
|
||||
int ubalanceTotalTime = rateList.stream().mapToInt(RStatLimitRateDPO::getUbalanceOvertime).sum();
|
||||
int iharmTotalTime = 0;
|
||||
int uharmTotalTime = 0;
|
||||
for (RStatLimitRateDPO rate : rateList) {
|
||||
JSONObject entries = JSONUtil.parseObj(rate);
|
||||
for (Map.Entry<String, Object> entry : entries.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
if (key.endsWith("Overtime")) {
|
||||
String value = entry.getValue().toString();
|
||||
Integer intValue = new Integer(value);
|
||||
if (key.startsWith("uharm")) {
|
||||
uharmTotalTime += intValue;
|
||||
}
|
||||
if (key.startsWith("iharm")) {
|
||||
iharmTotalTime += intValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
int totalTime = flickerTotalTime + voltageDevTotalTime + ubalanceTotalTime + iharmTotalTime + uharmTotalTime;
|
||||
if (totalTime == 0) {
|
||||
return statisticsVO;
|
||||
}
|
||||
statisticsVO.setFlicker(flickerTotalTime / totalTime * 100);
|
||||
statisticsVO.setUharm(uharmTotalTime / totalTime * 100);
|
||||
statisticsVO.setIharm(iharmTotalTime / totalTime * 100);
|
||||
statisticsVO.setVoltageDev(voltageDevTotalTime / totalTime * 100);
|
||||
statisticsVO.setUbalance(ubalanceTotalTime / totalTime * 100);
|
||||
return statisticsVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TotalLimitStatisticsVO> totalLimitStatisticsList(TotalLimitStatisticsParam param) {
|
||||
List<TotalLimitStatisticsVO> result = new ArrayList<>();
|
||||
|
||||
List<RStatLimitRateDPO> rateList = this.list(new LambdaQueryWrapper<RStatLimitRateDPO>()
|
||||
.eq(RStatLimitRateDPO::getPhasicType, "T")
|
||||
.ge(StrUtil.isNotBlank(param.getSearchBeginTime()), RStatLimitRateDPO::getTime, param.getSearchBeginTime())
|
||||
.le(StrUtil.isNotBlank(param.getSearchEndTime()), RStatLimitRateDPO::getTime, param.getSearchEndTime())
|
||||
.orderByAsc(RStatLimitRateDPO::getTime)
|
||||
);
|
||||
if (CollUtil.isEmpty(rateList)) {
|
||||
return result;
|
||||
}
|
||||
Map<String, List<RStatLimitRateDPO>> lineMap = rateList.stream().collect(Collectors.groupingBy(RStatLimitRateDPO::getLineId));
|
||||
|
||||
List<CsLinePO> linePOList = csLineFeignClient.queryLineById(new ArrayList<>(lineMap.keySet())).getData();
|
||||
if (CollUtil.isEmpty(linePOList)) {
|
||||
return result;
|
||||
}
|
||||
TotalLimitStatisticsVO statisticsVO;
|
||||
for (CsLinePO linePO : linePOList) {
|
||||
statisticsVO = new TotalLimitStatisticsVO();
|
||||
statisticsVO.setLineId(linePO.getLineId());
|
||||
statisticsVO.setLineName(linePO.getName());
|
||||
List<RStatLimitRateDPO> lineRateList = lineMap.get(linePO.getLineId());
|
||||
int totalTime = lineRateList.stream().mapToInt(RStatLimitRateDPO::getAllTime).sum();
|
||||
int flickerTotalTime = lineRateList.stream().mapToInt(RStatLimitRateDPO::getFlickerOvertime).sum();
|
||||
int voltageDevTotalTime = lineRateList.stream().mapToInt(RStatLimitRateDPO::getVoltageDevOvertime).sum();
|
||||
int ubalanceTotalTime = lineRateList.stream().mapToInt(RStatLimitRateDPO::getUbalanceOvertime).sum();
|
||||
int uharm = 0;
|
||||
int iharm = 0;
|
||||
for (RStatLimitRateDPO item : lineRateList) {
|
||||
JSONObject entries = JSONUtil.parseObj(item);
|
||||
List<Integer> uharmList = new ArrayList<>();
|
||||
List<Integer> iharmList = new ArrayList<>();
|
||||
for (Map.Entry<String, Object> entry : entries.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
if (key.endsWith("Overtime")) {
|
||||
if (key.startsWith("uharm")) {
|
||||
String value = entry.getValue().toString();
|
||||
Integer intValue = new Integer(value);
|
||||
uharmList.add(intValue);
|
||||
}
|
||||
if (key.startsWith("iharm")) {
|
||||
String value = entry.getValue().toString();
|
||||
Integer intValue = new Integer(value);
|
||||
iharmList.add(intValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
// 取最大值
|
||||
uharm += uharmList.stream().max(Integer::compareTo).get();
|
||||
iharm += iharmList.stream().max(Integer::compareTo).get();
|
||||
}
|
||||
if (totalTime != 0) {
|
||||
statisticsVO.setFlicker(flickerTotalTime / totalTime * 100);
|
||||
statisticsVO.setVoltageDev(voltageDevTotalTime / totalTime * 100);
|
||||
statisticsVO.setUbalance(ubalanceTotalTime / totalTime * 100);
|
||||
statisticsVO.setUharm(uharm / totalTime * 100);
|
||||
statisticsVO.setIharm(iharm / totalTime * 100);
|
||||
}
|
||||
result.add(statisticsVO);
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TotalLimitStatisticsDetailsVO> totalLimitStatisticsDetails(TotalLimitStatisticsDetailsQueryParam param) {
|
||||
|
||||
HttpResult<CsLinePO> lineResult = csLineFeignClient.getById(param.getLineId());
|
||||
CsLinePO linePO = lineResult.getData();
|
||||
if (linePO == null) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<RStatLimitRateDPO> list = this.list(new LambdaQueryWrapper<RStatLimitRateDPO>()
|
||||
.eq(RStatLimitRateDPO::getLineId, param.getLineId())
|
||||
.eq(RStatLimitRateDPO::getPhasicType, "T")
|
||||
.ge(StrUtil.isNotBlank(param.getSearchBeginTime()), RStatLimitRateDPO::getTime, param.getSearchBeginTime())
|
||||
.le(StrUtil.isNotBlank(param.getSearchEndTime()), RStatLimitRateDPO::getTime, param.getSearchEndTime())
|
||||
.orderByAsc(RStatLimitRateDPO::getTime)
|
||||
);
|
||||
return list.stream().map(item -> {
|
||||
MainLineStatLimitRateDetailsVO vo = BeanUtil.copyProperties(item, MainLineStatLimitRateDetailsVO.class);
|
||||
vo.setLineName(linePO.getName());
|
||||
Integer allTime = item.getAllTime();
|
||||
JSONObject entries = JSONUtil.parseObj(vo);
|
||||
for (Map.Entry<String, Object> entry : entries.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
if (key.endsWith("Overtime") && allTime != 0) {
|
||||
String value = entry.getValue().toString();
|
||||
Integer intValue = new Integer(value);
|
||||
// 占比 = 越限次数 / 总次数 * 100
|
||||
int proportion = intValue / allTime * 100;
|
||||
entries.putOpt(key, proportion);
|
||||
}
|
||||
}
|
||||
return BeanUtil.copyProperties(entries, TotalLimitStatisticsDetailsVO.class);
|
||||
}).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private String getDescription(String key) {
|
||||
if (StrUtil.equals(key, "flickerOvertime")) {
|
||||
return "闪变越限超标";
|
||||
}
|
||||
if (StrUtil.equals(key, "freqDevOvertime")) {
|
||||
return "频率偏差超标";
|
||||
}
|
||||
if (StrUtil.equals(key, "voltageDevOvertime")) {
|
||||
return "电压偏差超标";
|
||||
}
|
||||
if (StrUtil.equals(key, "ubalanceOvertime")) {
|
||||
return "三相电压不平衡超标";
|
||||
}
|
||||
// 电压
|
||||
if (StrUtil.startWith(key, "uharm")) {
|
||||
// 从 key 中提取数字 2
|
||||
String number = key.substring(5, key.indexOf("Overtime"));
|
||||
return number + "次谐波电压";
|
||||
}
|
||||
// 电流
|
||||
if (StrUtil.startWith(key, "iharm")) {
|
||||
// 从 key 中提取数字
|
||||
String number = key.substring(5, key.indexOf("Overtime"));
|
||||
return number + "次谐波电流";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user