初始化influx公共模块项目
This commit is contained in:
38
src/main/java/com/njcn/influx/pojo/bo/CarryCapcityData.java
Normal file
38
src/main/java/com/njcn/influx/pojo/bo/CarryCapcityData.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package com.njcn.influx.pojo.bo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.njcn.influx.utils.InstantDateSerializer;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 9:13
|
||||
*/
|
||||
@Data
|
||||
public class CarryCapcityData {
|
||||
|
||||
@Column(name = "time")
|
||||
@JsonSerialize(using = InstantDateSerializer.class)
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type")
|
||||
private String phaseType;
|
||||
|
||||
@Column(name = "quality_flag")
|
||||
private String qualityFlag;
|
||||
|
||||
@Column(name = "value_type")
|
||||
private String valueType;
|
||||
|
||||
private Double value;
|
||||
|
||||
}
|
||||
24
src/main/java/com/njcn/influx/pojo/bo/CommonQueryParam.java
Normal file
24
src/main/java/com/njcn/influx/pojo/bo/CommonQueryParam.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package com.njcn.influx.pojo.bo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* Date: 2024/1/24 9:05【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class CommonQueryParam {
|
||||
private String lineId;
|
||||
private String tableName;
|
||||
private String columnName;
|
||||
private String phasic;
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
private String dataType;
|
||||
private String process;
|
||||
private String clDid;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.njcn.influx.pojo.bo;
|
||||
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.njcn.influx.utils.InstantDateSerializer;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2023年07月17日 16:25
|
||||
*/
|
||||
@Data
|
||||
public class HarmonicHistoryData implements Serializable {
|
||||
|
||||
|
||||
@JsonSerialize(using = InstantDateSerializer.class)
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "phasic_type")
|
||||
private String phasicType;
|
||||
|
||||
private Float aValue;
|
||||
|
||||
private Float bValue;
|
||||
|
||||
private Float cValue;
|
||||
|
||||
private Instant timeId;
|
||||
|
||||
public void setTimeId(Instant timeId) {
|
||||
if(ObjUtil.isNotNull(timeId)){
|
||||
Instant instant = timeId.plusMillis(TimeUnit.HOURS.toMillis(8));
|
||||
this.time = instant;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
33
src/main/java/com/njcn/influx/pojo/bo/MeasurementCount.java
Normal file
33
src/main/java/com/njcn/influx/pojo/bo/MeasurementCount.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package com.njcn.influx.pojo.bo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.njcn.influx.utils.InstantDateSerializer;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2023/11/10 16:17
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_v")
|
||||
public class MeasurementCount implements Serializable {
|
||||
|
||||
@Column(name = "time")
|
||||
@JsonSerialize(using = InstantDateSerializer.class)
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "freq")
|
||||
private String freq;
|
||||
|
||||
}
|
||||
28
src/main/java/com/njcn/influx/pojo/bo/StatisticsResult.java
Normal file
28
src/main/java/com/njcn/influx/pojo/bo/StatisticsResult.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package com.njcn.influx.pojo.bo;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.njcn.influx.utils.InstantDateSerializer;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 用来收集统计结果,比如max min mean cp95等函数
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
*/
|
||||
@Data
|
||||
public class StatisticsResult implements Serializable {
|
||||
|
||||
@JsonSerialize(using = InstantDateSerializer.class)
|
||||
private Instant time;
|
||||
|
||||
/***
|
||||
* 统计值
|
||||
*/
|
||||
private Double value;
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user