监测点稳态指标越限次数统计
This commit is contained in:
@@ -0,0 +1,19 @@
|
|||||||
|
package com.njcn.algorithm.service.line;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.algorithm.pojo.bo.CalculatedParam;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: wr
|
||||||
|
* @Date: 2025/3/6 10:22
|
||||||
|
*/
|
||||||
|
public interface IDataCrossingService {
|
||||||
|
|
||||||
|
/***
|
||||||
|
* r_stat_limit_rate_d数据越线次数
|
||||||
|
* @author xy
|
||||||
|
* @param calculatedParam 查询条件
|
||||||
|
*/
|
||||||
|
void limitRateHandler(CalculatedParam calculatedParam);
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,6 @@ package com.njcn.dataProcess.param;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -26,6 +25,11 @@ public class LineCountEvaluateParam extends BaseParam implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String tableName;
|
private String tableName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 相别集合
|
||||||
|
*/
|
||||||
|
private List<String> phasicType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 异常数据时间集合
|
* 异常数据时间集合
|
||||||
* Map<String,List<String>> key:监测点id value:异常时间集合
|
* Map<String,List<String>> key:监测点id value:异常时间集合
|
||||||
|
|||||||
@@ -0,0 +1,388 @@
|
|||||||
|
package com.njcn.dataProcess.pojo.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author web2023
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class DataLimitRateDto implements Serializable {
|
||||||
|
/**
|
||||||
|
* 监测点ID合格率的变电站/装置/母线/线路序号
|
||||||
|
*/
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据类型,’A’表示A相,’B’表示B相,’C’表示C相,’’M’表示ABC三项总和,T’表示总
|
||||||
|
*/
|
||||||
|
private String phasicType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合格率时间
|
||||||
|
*/
|
||||||
|
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总计算次数
|
||||||
|
*/
|
||||||
|
private Integer allTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 闪变越限次数
|
||||||
|
*/
|
||||||
|
private Integer flickerOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 闪变总计算次数
|
||||||
|
*/
|
||||||
|
private Integer flickerAllTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 频率偏差越限次数
|
||||||
|
*/
|
||||||
|
private Integer freqDevOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压偏差越限次数
|
||||||
|
*/
|
||||||
|
private Integer voltageDevOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 三相电压不平衡度越限次数
|
||||||
|
*/
|
||||||
|
private Integer ubalanceOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电压谐波畸变率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uaberranceOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负序电流限值次数
|
||||||
|
*/
|
||||||
|
private Integer iNegOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm2Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 3次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm3Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm4Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm5Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 6次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm6Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 7次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm7Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 8次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm8Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 9次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm9Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 10次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm10Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 11次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm11Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 12次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm12Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 13次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm13Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 14次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm14Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 15次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm15Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 16次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm16Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 17次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm17Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 18次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm18Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 19次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm19Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 20次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm20Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 21次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm21Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 22次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm22Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 23次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm23Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 24次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm24Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 25次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
private Integer uharm25Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm2Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 3次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm3Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm4Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm5Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 6次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm6Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 7次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm7Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 8次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm8Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 9次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm9Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 10次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm10Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 11次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm11Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 12次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm12Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 13次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm13Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 14次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm14Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 15次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm15Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 16次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm16Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 17次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm17Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 18次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm18Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 19次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm19Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 20次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm20Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 21次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm21Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 22次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm22Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 23次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm23Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 24次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm24Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 25次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
private Integer iharm25Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm1Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm2Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm3Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 3.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm4Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm5Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm6Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 6.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm7Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 7.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm8Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 8.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm9Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 9.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm10Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 10.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm11Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 11.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm12Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 12.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm13Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 13.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm14Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 14.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm15Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 15.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
private Integer inuharm16Overtime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,468 @@
|
|||||||
|
package com.njcn.dataProcess.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName(value = "r_stat_limit_rate_d")
|
||||||
|
public class RStatLimitRateD implements Serializable {
|
||||||
|
/**
|
||||||
|
* 监测点ID合格率的变电站/装置/母线/线路序号
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "my_index")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据类型,’A’表示A相,’B’表示B相,’C’表示C相,’’M’表示ABC三项总和,T’表示总
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "phasic_type")
|
||||||
|
private String phasicType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 合格率时间
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time_id")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总计算次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "all_time")
|
||||||
|
private Integer allTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 闪变越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "flicker_overtime")
|
||||||
|
private Integer flickerOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 闪变总计算次数
|
||||||
|
*/
|
||||||
|
@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 = "uaberrance_overtime")
|
||||||
|
private Integer uaberranceOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负序电流限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "i_neg_overtime")
|
||||||
|
private Integer iNegOvertime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_2_overtime")
|
||||||
|
private Integer uharm2Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 3次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_3_overtime")
|
||||||
|
private Integer uharm3Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_4_overtime")
|
||||||
|
private Integer uharm4Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_5_overtime")
|
||||||
|
private Integer uharm5Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 6次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_6_overtime")
|
||||||
|
private Integer uharm6Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 7次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_7_overtime")
|
||||||
|
private Integer uharm7Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 8次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_8_overtime")
|
||||||
|
private Integer uharm8Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 9次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_9_overtime")
|
||||||
|
private Integer uharm9Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 10次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_10_overtime")
|
||||||
|
private Integer uharm10Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 11次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_11_overtime")
|
||||||
|
private Integer uharm11Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 12次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_12_overtime")
|
||||||
|
private Integer uharm12Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 13次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_13_overtime")
|
||||||
|
private Integer uharm13Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 14次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_14_overtime")
|
||||||
|
private Integer uharm14Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 15次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_15_overtime")
|
||||||
|
private Integer uharm15Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 16次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_16_overtime")
|
||||||
|
private Integer uharm16Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 17次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_17_overtime")
|
||||||
|
private Integer uharm17Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 18次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_18_overtime")
|
||||||
|
private Integer uharm18Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 19次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_19_overtime")
|
||||||
|
private Integer uharm19Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 20次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_20_overtime")
|
||||||
|
private Integer uharm20Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 21次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_21_overtime")
|
||||||
|
private Integer uharm21Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 22次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_22_overtime")
|
||||||
|
private Integer uharm22Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 23次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_23_overtime")
|
||||||
|
private Integer uharm23Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 24次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_24_overtime")
|
||||||
|
private Integer uharm24Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 25次电压谐波含有率越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "uharm_25_overtime")
|
||||||
|
private Integer uharm25Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_2_overtime")
|
||||||
|
private Integer iharm2Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 3次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_3_overtime")
|
||||||
|
private Integer iharm3Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_4_overtime")
|
||||||
|
private Integer iharm4Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_5_overtime")
|
||||||
|
private Integer iharm5Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 6次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_6_overtime")
|
||||||
|
private Integer iharm6Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 7次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_7_overtime")
|
||||||
|
private Integer iharm7Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 8次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_8_overtime")
|
||||||
|
private Integer iharm8Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 9次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_9_overtime")
|
||||||
|
private Integer iharm9Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 10次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_10_overtime")
|
||||||
|
private Integer iharm10Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 11次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_11_overtime")
|
||||||
|
private Integer iharm11Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 12次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_12_overtime")
|
||||||
|
private Integer iharm12Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 13次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_13_overtime")
|
||||||
|
private Integer iharm13Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 14次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_14_overtime")
|
||||||
|
private Integer iharm14Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 15次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_15_overtime")
|
||||||
|
private Integer iharm15Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 16次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_16_overtime")
|
||||||
|
private Integer iharm16Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 17次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_17_overtime")
|
||||||
|
private Integer iharm17Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 18次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_18_overtime")
|
||||||
|
private Integer iharm18Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 19次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_19_overtime")
|
||||||
|
private Integer iharm19Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 20次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_20_overtime")
|
||||||
|
private Integer iharm20Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 21次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_21_overtime")
|
||||||
|
private Integer iharm21Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 22次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_22_overtime")
|
||||||
|
private Integer iharm22Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 23次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_23_overtime")
|
||||||
|
private Integer iharm23Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 24次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_24_overtime")
|
||||||
|
private Integer iharm24Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 25次电流谐波幅值越限次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "iharm_25_overtime")
|
||||||
|
private Integer iharm25Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 0.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_1_overtime")
|
||||||
|
private Integer inuharm1Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 1.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_2_overtime")
|
||||||
|
private Integer inuharm2Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 2.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_3_overtime")
|
||||||
|
private Integer inuharm3Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 3.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_4_overtime")
|
||||||
|
private Integer inuharm4Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 4.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_5_overtime")
|
||||||
|
private Integer inuharm5Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 5.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_6_overtime")
|
||||||
|
private Integer inuharm6Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 6.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_7_overtime")
|
||||||
|
private Integer inuharm7Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 7.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_8_overtime")
|
||||||
|
private Integer inuharm8Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 8.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_9_overtime")
|
||||||
|
private Integer inuharm9Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 9.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_10_overtime")
|
||||||
|
private Integer inuharm10Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 10.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_11_overtime")
|
||||||
|
private Integer inuharm11Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 11.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_12_overtime")
|
||||||
|
private Integer inuharm12Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 12.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_13_overtime")
|
||||||
|
private Integer inuharm13Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 13.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_14_overtime")
|
||||||
|
private Integer inuharm14Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 14.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_15_overtime")
|
||||||
|
private Integer inuharm15Overtime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 15.5次间谐波电压限值次数
|
||||||
|
*/
|
||||||
|
@TableField(value = "inuharm_16_overtime")
|
||||||
|
private Integer inuharm16Overtime;
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
package com.njcn.dataProcess.controller;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
|
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.dataProcess.annotation.InsertBean;
|
||||||
|
import com.njcn.dataProcess.annotation.QueryBean;
|
||||||
|
import com.njcn.dataProcess.dto.DataVDTO;
|
||||||
|
import com.njcn.dataProcess.dto.DataVFiveItemDTO;
|
||||||
|
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||||
|
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||||
|
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||||
|
import com.njcn.dataProcess.pojo.dto.DataVCvtDto;
|
||||||
|
import com.njcn.dataProcess.pojo.dto.DataVDto;
|
||||||
|
import com.njcn.dataProcess.pojo.po.RStatLimitRateD;
|
||||||
|
import com.njcn.dataProcess.service.IDataV;
|
||||||
|
import com.njcn.dataProcess.service.ILimitRateService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hongawen
|
||||||
|
* @version 1.0
|
||||||
|
* @data 2024/11/6 19:48
|
||||||
|
*/
|
||||||
|
@Validated
|
||||||
|
@Slf4j
|
||||||
|
@Controller
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/dataV")
|
||||||
|
@Api(tags = "电压类数据获取")
|
||||||
|
public class DataLimitRateController extends BaseController {
|
||||||
|
|
||||||
|
@QueryBean
|
||||||
|
private ILimitRateService limitRateQuery;
|
||||||
|
|
||||||
|
@InsertBean
|
||||||
|
private ILimitRateService limitRateInsert;
|
||||||
|
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@PostMapping("/batchInsertion")
|
||||||
|
@ApiOperation("批量插入")
|
||||||
|
public HttpResult<String> batchInsertion(@RequestBody List<DataLimitRateDto> dataVDTOList) {
|
||||||
|
String methodDescribe = getMethodDescribe("batchInsertion");
|
||||||
|
limitRateInsert.batchInsertion(dataVDTOList);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.njcn.dataProcess.dao.imapper;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||||
|
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
* @author web2023
|
||||||
|
*/
|
||||||
|
public interface DataLimitRateMapper extends MppBaseMapper<DataLimitRateDto> {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.njcn.dataProcess.dao.relation.mapper;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||||
|
import com.njcn.dataProcess.pojo.po.RStatLimitRateD;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
* @author web2023
|
||||||
|
*/
|
||||||
|
public interface RStatLimitRateRelationMapper extends MppBaseMapper<RStatLimitRateD> {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.njcn.dataProcess.service;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||||
|
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||||
|
import com.njcn.dataProcess.pojo.po.RStatLimitRateD;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description:
|
||||||
|
* @Author: wr
|
||||||
|
* @Date: 2025/3/6 10:22
|
||||||
|
*/
|
||||||
|
public interface ILimitRateService extends IMppService<RStatLimitRateD> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量插入数据
|
||||||
|
* @param dataVDTOList
|
||||||
|
*/
|
||||||
|
void batchInsertion(List<DataLimitRateDto> dataVDTOList);
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.dataProcess.service.impl.influxdb;
|
package com.njcn.dataProcess.service.impl.influxdb;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
import com.njcn.common.utils.HarmonicTimesUtil;
|
import com.njcn.common.utils.HarmonicTimesUtil;
|
||||||
@@ -45,7 +46,7 @@ public class InfluxdbDataHarmRateVImpl extends MppServiceImpl<RStatDataHarmRateV
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmDto> getRawData(LineCountEvaluateParam lineParam) {
|
public List<DataHarmDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||||
List<DataHarmDto> result = new ArrayList<>();
|
List<DataHarmDto> result = new ArrayList<>();
|
||||||
List<DataHarmrateV> list = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(), lineParam.getAbnormalTime());
|
List<DataHarmrateV> list = getMinuteData(lineParam);
|
||||||
list.forEach(item->{
|
list.forEach(item->{
|
||||||
DataHarmDto dto = new DataHarmDto();
|
DataHarmDto dto = new DataHarmDto();
|
||||||
BeanUtils.copyProperties(item,dto);
|
BeanUtils.copyProperties(item,dto);
|
||||||
@@ -77,7 +78,7 @@ public class InfluxdbDataHarmRateVImpl extends MppServiceImpl<RStatDataHarmRateV
|
|||||||
@Override
|
@Override
|
||||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||||
List<CommonMinuteDto> result = new ArrayList<>();
|
List<CommonMinuteDto> result = new ArrayList<>();
|
||||||
List<DataHarmrateV> data = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
|
List<DataHarmrateV> data = getMinuteData(lineParam);
|
||||||
if (CollectionUtil.isNotEmpty(data)) {
|
if (CollectionUtil.isNotEmpty(data)) {
|
||||||
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
||||||
//以监测点分组
|
//以监测点分组
|
||||||
@@ -190,23 +191,26 @@ public class InfluxdbDataHarmRateVImpl extends MppServiceImpl<RStatDataHarmRateV
|
|||||||
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
|
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
|
||||||
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
|
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
|
||||||
*/
|
*/
|
||||||
public List<DataHarmrateV> getMinuteData(List<String> lineList, String startTime, String endTime, Map<String,List<String>> timeMap) {
|
public List<DataHarmrateV> getMinuteData(LineCountEvaluateParam lineParam) {
|
||||||
List<DataHarmrateV> result = new ArrayList<>();
|
List<DataHarmrateV> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataHarmrateV::getLineId, lineList)
|
influxQueryWrapper.regular(DataHarmrateV::getLineId, lineParam.getLineId())
|
||||||
.select(DataHarmrateV::getLineId)
|
.select(DataHarmrateV::getLineId)
|
||||||
.select(DataHarmrateV::getPhasicType)
|
.select(DataHarmrateV::getPhasicType)
|
||||||
.select(DataHarmrateV::getValueType)
|
.select(DataHarmrateV::getValueType)
|
||||||
.select(DataHarmrateV::getQualityFlag)
|
.select(DataHarmrateV::getQualityFlag)
|
||||||
.between(DataHarmrateV::getTime, startTime, endTime)
|
.between(DataHarmrateV::getTime, lineParam.getStartTime(), lineParam.getEndTime())
|
||||||
.eq(DataHarmrateV::getQualityFlag,"0");
|
.eq(DataHarmrateV::getQualityFlag,"0");
|
||||||
|
if(CollUtil.isNotEmpty(lineParam.getPhasicType())){
|
||||||
|
influxQueryWrapper.regular(DataV::getPhasicType,lineParam.getPhasicType());
|
||||||
|
}
|
||||||
List<DataHarmrateV> list = dataHarmRateVMapper.selectByQueryWrapper(influxQueryWrapper);
|
List<DataHarmrateV> list = dataHarmRateVMapper.selectByQueryWrapper(influxQueryWrapper);
|
||||||
Map<String,List<DataHarmrateV>> lineMap = list.stream().collect(Collectors.groupingBy(DataHarmrateV::getLineId));
|
Map<String,List<DataHarmrateV>> lineMap = list.stream().collect(Collectors.groupingBy(DataHarmrateV::getLineId));
|
||||||
//有异常数据
|
//有异常数据
|
||||||
if (CollectionUtil.isNotEmpty(timeMap)) {
|
if (CollectionUtil.isNotEmpty(lineParam.getAbnormalTime())) {
|
||||||
lineMap.forEach((k,v)->{
|
lineMap.forEach((k,v)->{
|
||||||
List<String> timeList = timeMap.get(k);
|
List<String> timeList = lineParam.getAbnormalTime().get(k);
|
||||||
//有异常数据,当前监测点自身的异常数据
|
//有异常数据,当前监测点自身的异常数据
|
||||||
if (CollectionUtil.isNotEmpty(timeList)) {
|
if (CollectionUtil.isNotEmpty(timeList)) {
|
||||||
List<DataHarmrateV> filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList());
|
List<DataHarmrateV> filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.dataProcess.service.impl.influxdb;
|
package com.njcn.dataProcess.service.impl.influxdb;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
import com.njcn.common.utils.HarmonicTimesUtil;
|
import com.njcn.common.utils.HarmonicTimesUtil;
|
||||||
@@ -8,6 +9,7 @@ import com.njcn.dataProcess.dao.relation.mapper.RStatDataIRelationMapper;
|
|||||||
import com.njcn.dataProcess.dto.DataIDTO;
|
import com.njcn.dataProcess.dto.DataIDTO;
|
||||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||||
import com.njcn.dataProcess.po.influx.DataI;
|
import com.njcn.dataProcess.po.influx.DataI;
|
||||||
|
import com.njcn.dataProcess.po.influx.DataV;
|
||||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||||
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
||||||
import com.njcn.dataProcess.pojo.po.RStatDataID;
|
import com.njcn.dataProcess.pojo.po.RStatDataID;
|
||||||
@@ -65,7 +67,7 @@ public class InfluxdbDataIImpl extends MppServiceImpl<RStatDataIRelationMapper,
|
|||||||
@Override
|
@Override
|
||||||
public List<DataIDto> getRawData(LineCountEvaluateParam lineParam) {
|
public List<DataIDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||||
List<DataIDto> result = new ArrayList<>();
|
List<DataIDto> result = new ArrayList<>();
|
||||||
List<DataI> list = getMinuteDataI(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(), lineParam.getAbnormalTime());
|
List<DataI> list = getMinuteDataI(lineParam);
|
||||||
list.forEach(item->{
|
list.forEach(item->{
|
||||||
DataIDto dto = new DataIDto();
|
DataIDto dto = new DataIDto();
|
||||||
BeanUtils.copyProperties(item,dto);
|
BeanUtils.copyProperties(item,dto);
|
||||||
@@ -78,7 +80,7 @@ public class InfluxdbDataIImpl extends MppServiceImpl<RStatDataIRelationMapper,
|
|||||||
@Override
|
@Override
|
||||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||||
List<CommonMinuteDto> result = new ArrayList<>();
|
List<CommonMinuteDto> result = new ArrayList<>();
|
||||||
List<DataI> dataIList = getMinuteDataI(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
|
List<DataI> dataIList = getMinuteDataI(lineParam);
|
||||||
if (CollectionUtil.isNotEmpty(dataIList)) {
|
if (CollectionUtil.isNotEmpty(dataIList)) {
|
||||||
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
||||||
//以监测点分组
|
//以监测点分组
|
||||||
@@ -192,11 +194,11 @@ public class InfluxdbDataIImpl extends MppServiceImpl<RStatDataIRelationMapper,
|
|||||||
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
|
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
|
||||||
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
|
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
|
||||||
*/
|
*/
|
||||||
public List<DataI> getMinuteDataI(List<String> lineList, String startTime, String endTime, Map<String,List<String>> timeMap) {
|
public List<DataI> getMinuteDataI(LineCountEvaluateParam lineParam) {
|
||||||
List<DataI> result = new ArrayList<>();
|
List<DataI> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataI::getLineId, lineList)
|
influxQueryWrapper.regular(DataI::getLineId, lineParam.getLineId())
|
||||||
.select(DataI::getLineId)
|
.select(DataI::getLineId)
|
||||||
.select(DataI::getPhasicType)
|
.select(DataI::getPhasicType)
|
||||||
.select(DataI::getValueType)
|
.select(DataI::getValueType)
|
||||||
@@ -207,14 +209,17 @@ public class InfluxdbDataIImpl extends MppServiceImpl<RStatDataIRelationMapper,
|
|||||||
.select(DataI::getIZero)
|
.select(DataI::getIZero)
|
||||||
.select(DataI::getRms)
|
.select(DataI::getRms)
|
||||||
.select(DataI::getQualityFlag)
|
.select(DataI::getQualityFlag)
|
||||||
.between(DataI::getTime, startTime, endTime)
|
.between(DataI::getTime, lineParam.getStartTime(), lineParam.getEndTime())
|
||||||
.eq(DataI::getQualityFlag,"0");
|
.eq(DataI::getQualityFlag,"0");
|
||||||
|
if(CollUtil.isNotEmpty(lineParam.getPhasicType())){
|
||||||
|
influxQueryWrapper.regular(DataV::getPhasicType,lineParam.getPhasicType());
|
||||||
|
}
|
||||||
List<DataI> list = dataIMapper.selectByQueryWrapper(influxQueryWrapper);
|
List<DataI> list = dataIMapper.selectByQueryWrapper(influxQueryWrapper);
|
||||||
Map<String,List<DataI>> lineMap = list.stream().collect(Collectors.groupingBy(DataI::getLineId));
|
Map<String,List<DataI>> lineMap = list.stream().collect(Collectors.groupingBy(DataI::getLineId));
|
||||||
//有异常数据
|
//有异常数据
|
||||||
if (CollectionUtil.isNotEmpty(timeMap)) {
|
if (CollectionUtil.isNotEmpty(lineParam.getAbnormalTime())) {
|
||||||
lineMap.forEach((k,v)->{
|
lineMap.forEach((k,v)->{
|
||||||
List<String> timeList = timeMap.get(k);
|
List<String> timeList = lineParam.getAbnormalTime().get(k);
|
||||||
//有异常数据,当前监测点自身的异常数据
|
//有异常数据,当前监测点自身的异常数据
|
||||||
if (CollectionUtil.isNotEmpty(timeList)) {
|
if (CollectionUtil.isNotEmpty(timeList)) {
|
||||||
List<DataI> filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList());
|
List<DataI> filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.dataProcess.service.impl.influxdb;
|
package com.njcn.dataProcess.service.impl.influxdb;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
import com.njcn.common.utils.HarmonicTimesUtil;
|
import com.njcn.common.utils.HarmonicTimesUtil;
|
||||||
@@ -9,6 +10,7 @@ import com.njcn.dataProcess.dto.DataInharmVDTO;
|
|||||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||||
import com.njcn.dataProcess.po.influx.DataI;
|
import com.njcn.dataProcess.po.influx.DataI;
|
||||||
import com.njcn.dataProcess.po.influx.DataInharmV;
|
import com.njcn.dataProcess.po.influx.DataInharmV;
|
||||||
|
import com.njcn.dataProcess.po.influx.DataV;
|
||||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||||
import com.njcn.dataProcess.pojo.dto.DataInHarmVDto;
|
import com.njcn.dataProcess.pojo.dto.DataInHarmVDto;
|
||||||
@@ -68,7 +70,7 @@ public class InfluxdbDataInharmVImpl extends MppServiceImpl<RStatDataInHarmVRela
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmDto> getRawData(LineCountEvaluateParam lineParam) {
|
public List<DataHarmDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||||
List<DataHarmDto> result = new ArrayList<>();
|
List<DataHarmDto> result = new ArrayList<>();
|
||||||
List<DataInharmV> list = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(), lineParam.getAbnormalTime());
|
List<DataInharmV> list = getMinuteData(lineParam);
|
||||||
list.forEach(item->{
|
list.forEach(item->{
|
||||||
DataHarmDto dto = new DataHarmDto();
|
DataHarmDto dto = new DataHarmDto();
|
||||||
BeanUtils.copyProperties(item,dto);
|
BeanUtils.copyProperties(item,dto);
|
||||||
@@ -81,7 +83,7 @@ public class InfluxdbDataInharmVImpl extends MppServiceImpl<RStatDataInHarmVRela
|
|||||||
@Override
|
@Override
|
||||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||||
List<CommonMinuteDto> result = new ArrayList<>();
|
List<CommonMinuteDto> result = new ArrayList<>();
|
||||||
List<DataInharmV> data = getMinuteData(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
|
List<DataInharmV> data = getMinuteData(lineParam);
|
||||||
if (CollectionUtil.isNotEmpty(data)) {
|
if (CollectionUtil.isNotEmpty(data)) {
|
||||||
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
||||||
//以监测点分组
|
//以监测点分组
|
||||||
@@ -187,23 +189,26 @@ public class InfluxdbDataInharmVImpl extends MppServiceImpl<RStatDataInHarmVRela
|
|||||||
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
|
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
|
||||||
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
|
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
|
||||||
*/
|
*/
|
||||||
public List<DataInharmV> getMinuteData(List<String> lineList, String startTime, String endTime, Map<String,List<String>> timeMap) {
|
public List<DataInharmV> getMinuteData(LineCountEvaluateParam lineParam) {
|
||||||
List<DataInharmV> result = new ArrayList<>();
|
List<DataInharmV> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataInharmV::getLineId, lineList)
|
influxQueryWrapper.regular(DataInharmV::getLineId, lineParam.getLineId())
|
||||||
.select(DataInharmV::getLineId)
|
.select(DataInharmV::getLineId)
|
||||||
.select(DataInharmV::getPhasicType)
|
.select(DataInharmV::getPhasicType)
|
||||||
.select(DataInharmV::getValueType)
|
.select(DataInharmV::getValueType)
|
||||||
.select(DataInharmV::getQualityFlag)
|
.select(DataInharmV::getQualityFlag)
|
||||||
.between(DataI::getTime, startTime, endTime)
|
.between(DataI::getTime, lineParam.getStartTime(), lineParam.getEndTime())
|
||||||
.eq(DataI::getQualityFlag,"0");
|
.eq(DataI::getQualityFlag,"0");
|
||||||
|
if(CollUtil.isNotEmpty(lineParam.getPhasicType())){
|
||||||
|
influxQueryWrapper.regular(DataV::getPhasicType,lineParam.getPhasicType());
|
||||||
|
}
|
||||||
List<DataInharmV> list = dataInharmVMapper.selectByQueryWrapper(influxQueryWrapper);
|
List<DataInharmV> list = dataInharmVMapper.selectByQueryWrapper(influxQueryWrapper);
|
||||||
Map<String,List<DataInharmV>> lineMap = list.stream().collect(Collectors.groupingBy(DataInharmV::getLineId));
|
Map<String,List<DataInharmV>> lineMap = list.stream().collect(Collectors.groupingBy(DataInharmV::getLineId));
|
||||||
//有异常数据
|
//有异常数据
|
||||||
if (CollectionUtil.isNotEmpty(timeMap)) {
|
if (CollectionUtil.isNotEmpty(lineParam.getAbnormalTime())) {
|
||||||
lineMap.forEach((k,v)->{
|
lineMap.forEach((k,v)->{
|
||||||
List<String> timeList = timeMap.get(k);
|
List<String> timeList = lineParam.getAbnormalTime().get(k);
|
||||||
//有异常数据,当前监测点自身的异常数据
|
//有异常数据,当前监测点自身的异常数据
|
||||||
if (CollectionUtil.isNotEmpty(timeList)) {
|
if (CollectionUtil.isNotEmpty(timeList)) {
|
||||||
List<DataInharmV> filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList());
|
List<DataInharmV> filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.dataProcess.service.impl.influxdb;
|
package com.njcn.dataProcess.service.impl.influxdb;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
import com.njcn.dataProcess.dao.imapper.DataPltMapper;
|
import com.njcn.dataProcess.dao.imapper.DataPltMapper;
|
||||||
@@ -7,6 +8,7 @@ import com.njcn.dataProcess.dao.relation.mapper.RStatDataPltRelationMapper;
|
|||||||
import com.njcn.dataProcess.dto.DataPltDTO;
|
import com.njcn.dataProcess.dto.DataPltDTO;
|
||||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||||
import com.njcn.dataProcess.po.influx.DataPlt;
|
import com.njcn.dataProcess.po.influx.DataPlt;
|
||||||
|
import com.njcn.dataProcess.po.influx.DataV;
|
||||||
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
import com.njcn.dataProcess.pojo.dto.CommonMinuteDto;
|
||||||
import com.njcn.dataProcess.pojo.dto.DataPltDto;
|
import com.njcn.dataProcess.pojo.dto.DataPltDto;
|
||||||
import com.njcn.dataProcess.pojo.po.RStatDataPltD;
|
import com.njcn.dataProcess.pojo.po.RStatDataPltD;
|
||||||
@@ -60,7 +62,7 @@ public class InfluxdbDataPltImpl extends MppServiceImpl<RStatDataPltRelationMapp
|
|||||||
@Override
|
@Override
|
||||||
public List<DataPltDto> getRawData(LineCountEvaluateParam lineParam) {
|
public List<DataPltDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||||
List<DataPltDto> result = new ArrayList<>();
|
List<DataPltDto> result = new ArrayList<>();
|
||||||
List<DataPlt> list = getMinuteDataPlt(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(), lineParam.getAbnormalTime());
|
List<DataPlt> list = getMinuteDataPlt(lineParam);
|
||||||
list.forEach(item->{
|
list.forEach(item->{
|
||||||
DataPltDto dto = new DataPltDto();
|
DataPltDto dto = new DataPltDto();
|
||||||
BeanUtils.copyProperties(item,dto);
|
BeanUtils.copyProperties(item,dto);
|
||||||
@@ -73,7 +75,7 @@ public class InfluxdbDataPltImpl extends MppServiceImpl<RStatDataPltRelationMapp
|
|||||||
@Override
|
@Override
|
||||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||||
List<CommonMinuteDto> result = new ArrayList<>();
|
List<CommonMinuteDto> result = new ArrayList<>();
|
||||||
List<DataPlt> data = getMinuteDataPlt(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
|
List<DataPlt> data = getMinuteDataPlt(lineParam);
|
||||||
if (CollectionUtil.isNotEmpty(data)) {
|
if (CollectionUtil.isNotEmpty(data)) {
|
||||||
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
||||||
//以监测点分组
|
//以监测点分组
|
||||||
@@ -124,22 +126,25 @@ public class InfluxdbDataPltImpl extends MppServiceImpl<RStatDataPltRelationMapp
|
|||||||
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
|
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
|
||||||
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
|
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
|
||||||
*/
|
*/
|
||||||
public List<DataPlt> getMinuteDataPlt(List<String> lineList, String startTime, String endTime, Map<String,List<String>> timeMap) {
|
public List<DataPlt> getMinuteDataPlt(LineCountEvaluateParam lineParam) {
|
||||||
List<DataPlt> result = new ArrayList<>();
|
List<DataPlt> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataPlt.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataPlt.class);
|
||||||
influxQueryWrapper.regular(DataPlt::getLineId, lineList)
|
influxQueryWrapper.regular(DataPlt::getLineId, lineParam.getLineId())
|
||||||
.select(DataPlt::getLineId)
|
.select(DataPlt::getLineId)
|
||||||
.select(DataPlt::getPhasicType)
|
.select(DataPlt::getPhasicType)
|
||||||
.select(DataPlt::getPlt)
|
.select(DataPlt::getPlt)
|
||||||
.select(DataPlt::getQualityFlag)
|
.select(DataPlt::getQualityFlag)
|
||||||
.between(DataPlt::getTime, startTime, endTime)
|
.between(DataPlt::getTime, lineParam.getStartTime(), lineParam.getEndTime())
|
||||||
.eq(DataPlt::getQualityFlag,"0");
|
.eq(DataPlt::getQualityFlag,"0");
|
||||||
|
if(CollUtil.isNotEmpty(lineParam.getPhasicType())){
|
||||||
|
influxQueryWrapper.regular(DataV::getPhasicType,lineParam.getPhasicType());
|
||||||
|
}
|
||||||
List<DataPlt> list = dataPltMapper.selectByQueryWrapper(influxQueryWrapper);
|
List<DataPlt> list = dataPltMapper.selectByQueryWrapper(influxQueryWrapper);
|
||||||
Map<String,List<DataPlt>> lineMap = list.stream().collect(Collectors.groupingBy(DataPlt::getLineId));
|
Map<String,List<DataPlt>> lineMap = list.stream().collect(Collectors.groupingBy(DataPlt::getLineId));
|
||||||
//有异常数据
|
//有异常数据
|
||||||
if (CollectionUtil.isNotEmpty(timeMap)) {
|
if (CollectionUtil.isNotEmpty(lineParam.getAbnormalTime())) {
|
||||||
lineMap.forEach((k,v)->{
|
lineMap.forEach((k,v)->{
|
||||||
List<String> timeList = timeMap.get(k);
|
List<String> timeList = lineParam.getAbnormalTime().get(k);
|
||||||
//有异常数据,当前监测点自身的异常数据
|
//有异常数据,当前监测点自身的异常数据
|
||||||
if (CollectionUtil.isNotEmpty(timeList)) {
|
if (CollectionUtil.isNotEmpty(timeList)) {
|
||||||
List<DataPlt> filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList());
|
List<DataPlt> filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.njcn.dataProcess.service.impl.influxdb;
|
package com.njcn.dataProcess.service.impl.influxdb;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
import cn.hutool.core.collection.ListUtil;
|
import cn.hutool.core.collection.ListUtil;
|
||||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
@@ -129,7 +130,7 @@ public class InfluxdbDataVImpl extends MppServiceImpl<RStatDataVRelationMapper,
|
|||||||
@Override
|
@Override
|
||||||
public List<DataVDto> getRawData(LineCountEvaluateParam lineParam) {
|
public List<DataVDto> getRawData(LineCountEvaluateParam lineParam) {
|
||||||
List<DataVDto> result = new ArrayList<>();
|
List<DataVDto> result = new ArrayList<>();
|
||||||
List<DataV> list = getMinuteDataV(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(), lineParam.getAbnormalTime());
|
List<DataV> list = getMinuteDataV(lineParam);
|
||||||
list.forEach(item->{
|
list.forEach(item->{
|
||||||
DataVDto dto = new DataVDto();
|
DataVDto dto = new DataVDto();
|
||||||
BeanUtils.copyProperties(item,dto);
|
BeanUtils.copyProperties(item,dto);
|
||||||
@@ -142,7 +143,7 @@ public class InfluxdbDataVImpl extends MppServiceImpl<RStatDataVRelationMapper,
|
|||||||
@Override
|
@Override
|
||||||
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
public List<CommonMinuteDto> getBaseData(LineCountEvaluateParam lineParam) {
|
||||||
List<CommonMinuteDto> result = new ArrayList<>();
|
List<CommonMinuteDto> result = new ArrayList<>();
|
||||||
List<DataV> dataVList = getMinuteDataV(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(),lineParam.getAbnormalTime());
|
List<DataV> dataVList = getMinuteDataV(lineParam);
|
||||||
if (CollectionUtil.isNotEmpty(dataVList)) {
|
if (CollectionUtil.isNotEmpty(dataVList)) {
|
||||||
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
String time = TimeUtils.StringTimeToString(lineParam.getStartTime());
|
||||||
//以监测点分组
|
//以监测点分组
|
||||||
@@ -299,11 +300,11 @@ public class InfluxdbDataVImpl extends MppServiceImpl<RStatDataVRelationMapper,
|
|||||||
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
|
* 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据;
|
||||||
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
|
* 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常
|
||||||
*/
|
*/
|
||||||
public List<DataV> getMinuteDataV(List<String> lineList, String startTime, String endTime, Map<String,List<String>> timeMap) {
|
public List<DataV> getMinuteDataV(LineCountEvaluateParam lineParam) {
|
||||||
List<DataV> result = new ArrayList<>();
|
List<DataV> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataV::getLineId, lineList)
|
influxQueryWrapper.regular(DataV::getLineId,lineParam.getLineId())
|
||||||
.select(DataV::getLineId)
|
.select(DataV::getLineId)
|
||||||
.select(DataV::getPhasicType)
|
.select(DataV::getPhasicType)
|
||||||
.select(DataV::getValueType)
|
.select(DataV::getValueType)
|
||||||
@@ -319,14 +320,17 @@ public class InfluxdbDataVImpl extends MppServiceImpl<RStatDataVRelationMapper,
|
|||||||
.select(DataV::getVlDev)
|
.select(DataV::getVlDev)
|
||||||
.select(DataV::getVuDev)
|
.select(DataV::getVuDev)
|
||||||
.select(DataV::getQualityFlag)
|
.select(DataV::getQualityFlag)
|
||||||
.between(DataV::getTime, startTime, endTime)
|
.between(DataV::getTime, lineParam.getStartTime(), lineParam.getEndTime())
|
||||||
.eq(DataV::getQualityFlag,"0");
|
.eq(DataV::getQualityFlag,"0");
|
||||||
|
if(CollUtil.isNotEmpty(lineParam.getPhasicType())){
|
||||||
|
influxQueryWrapper.regular(DataV::getPhasicType,lineParam.getPhasicType());
|
||||||
|
}
|
||||||
List<DataV> list = dataVMapper.selectByQueryWrapper(influxQueryWrapper);
|
List<DataV> list = dataVMapper.selectByQueryWrapper(influxQueryWrapper);
|
||||||
Map<String,List<DataV>> lineMap = list.stream().collect(Collectors.groupingBy(DataV::getLineId));
|
Map<String,List<DataV>> lineMap = list.stream().collect(Collectors.groupingBy(DataV::getLineId));
|
||||||
//有异常数据
|
//有异常数据
|
||||||
if (CollectionUtil.isNotEmpty(timeMap)) {
|
if (CollectionUtil.isNotEmpty(lineParam.getAbnormalTime())) {
|
||||||
lineMap.forEach((k,v)->{
|
lineMap.forEach((k,v)->{
|
||||||
List<String> timeList = timeMap.get(k);
|
List<String> timeList = lineParam.getAbnormalTime().get(k);
|
||||||
//有异常数据,是自身异常数据
|
//有异常数据,是自身异常数据
|
||||||
if (CollectionUtil.isNotEmpty(timeList)) {
|
if (CollectionUtil.isNotEmpty(timeList)) {
|
||||||
List<DataV> filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList());
|
List<DataV> filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList());
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.njcn.dataProcess.service.impl.influxdb;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
|
import com.njcn.dataProcess.dao.relation.mapper.RStatLimitRateRelationMapper;
|
||||||
|
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||||
|
import com.njcn.dataProcess.pojo.po.RStatLimitRateD;
|
||||||
|
import com.njcn.dataProcess.service.ILimitRateService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Date: 2024/11/18 14:33【需求编号】
|
||||||
|
*
|
||||||
|
* @author clam
|
||||||
|
* @version V1.0.0
|
||||||
|
*/
|
||||||
|
@Service("InfluxdbILimitRateImpl")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class InfluxdbLimitRateImpl extends MppServiceImpl<RStatLimitRateRelationMapper, RStatLimitRateD> implements ILimitRateService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batchInsertion(List<DataLimitRateDto> dataVDTOList) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.njcn.dataProcess.service.impl.relation;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
|
import com.njcn.dataProcess.dao.relation.mapper.RStatLimitRateRelationMapper;
|
||||||
|
import com.njcn.dataProcess.pojo.dto.DataLimitRateDto;
|
||||||
|
import com.njcn.dataProcess.pojo.po.RStatLimitRateD;
|
||||||
|
import com.njcn.dataProcess.service.ILimitRateService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author hongawen
|
||||||
|
* @version 1.0
|
||||||
|
* @data 2024/11/7 11:02
|
||||||
|
*/
|
||||||
|
@Service("RelationDataVImpl")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class RelationLimitRateImpl extends MppServiceImpl<RStatLimitRateRelationMapper, RStatLimitRateD> implements ILimitRateService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void batchInsertion(List<DataLimitRateDto> dataVDTOList) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user