调整部分prepare项目关于influx查询的代码
This commit is contained in:
@@ -11,7 +11,6 @@ public interface BizParamConstant {
|
||||
* 前端查询时间类型
|
||||
* 1年 2季度 3月份 4周 5日
|
||||
*/
|
||||
String s = "测试jenkins打包";
|
||||
String STAT_BIZ_YEAR = "1";
|
||||
String STAT_BIZ_QUARTER = "2";
|
||||
String STAT_BIZ_MONTH = "3";
|
||||
|
||||
@@ -66,7 +66,9 @@ public enum CommonResponseEnum {
|
||||
|
||||
REQUEST_EMPTY("A0027", "当前请求web环境为空"),
|
||||
|
||||
EXPORT_FILE_ERROR("A00551","数据完整报表下载异常"),
|
||||
EXPORT_FILE_ERROR("A0051","数据完整报表下载异常"),
|
||||
|
||||
PREPARE_RESPONSE_ENUM("A0089", "预处理响应枚举类型"),
|
||||
|
||||
USER_RESPONSE_ENUM("A0090", "用户响应枚举类型"),
|
||||
|
||||
|
||||
@@ -51,19 +51,17 @@
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>pqs-influx</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>pq-device-api</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.jeffreyning</groupId>
|
||||
<artifactId>mybatisplus-plus</artifactId>
|
||||
<version>1.5.1-RELEASE</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<artifactId>pqs-influx</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>influx公共模块</name>
|
||||
<description>pqs-influx</description>
|
||||
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.njcn.influx;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.DependsOn;
|
||||
|
||||
@SpringBootApplication
|
||||
@DependsOn("proxyMapperRegister")
|
||||
public class PqsInfluxApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(PqsInfluxApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,279 @@
|
||||
package com.njcn.influx.deprecated;
|
||||
|
||||
/**
|
||||
* 类的介绍:使用influxDB查询时的公共参数
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/6/24 15:02
|
||||
*/
|
||||
@Deprecated
|
||||
public interface InfluxDBPublicParam {
|
||||
|
||||
/**
|
||||
* 暂态事件汇总表
|
||||
*/
|
||||
String PQS_EVENT_DETAIL = " pqs_eventdetail";
|
||||
|
||||
/**
|
||||
* 电压波动闪变表
|
||||
*/
|
||||
String DATA_FLICKER = "data_flicker";
|
||||
|
||||
/**
|
||||
* 电压波动表
|
||||
*/
|
||||
String DATA_FLUC = "data_fluc";
|
||||
|
||||
/**
|
||||
* 谐波电流角度表
|
||||
*/
|
||||
String DATA_HARM_PHASIC_I = "data_harmphasic_i";
|
||||
|
||||
/**
|
||||
* 谐波电压角度表
|
||||
*/
|
||||
String DATA_HARM_PHASIC_V = "data_harmphasic_v";
|
||||
|
||||
/**
|
||||
* 有功功率表
|
||||
*/
|
||||
String DATA_HARM_POWER_P = "data_harmpower_p";
|
||||
|
||||
/**
|
||||
* 无功功率表
|
||||
*/
|
||||
String DATA_HARM_POWER_Q = "data_harmpower_q";
|
||||
|
||||
/**
|
||||
* 视在功率表
|
||||
*/
|
||||
String DATA_HARM_POWER_S = "data_harmpower_s";
|
||||
|
||||
/**
|
||||
* 谐波电流含有率表
|
||||
*/
|
||||
String DATA_HARM_RATE_I = "data_harmrate_i";
|
||||
|
||||
/**
|
||||
* 谐波电压含有率表
|
||||
*/
|
||||
String DATA_HARM_RATE_V = "data_harmrate_v";
|
||||
|
||||
/**
|
||||
* 电流表
|
||||
*/
|
||||
String DATA_I = "data_i";
|
||||
|
||||
/**
|
||||
* 电流间谐波幅值表
|
||||
*/
|
||||
String DATA_IN_HARM_I = "data_inharm_i";
|
||||
|
||||
/**
|
||||
* 电压间谐波幅值表
|
||||
*/
|
||||
String DATA_IN_HARM_V = "data_inharm_v";
|
||||
|
||||
/**
|
||||
* 长时闪变表
|
||||
*/
|
||||
String DATA_PLT = "data_plt";
|
||||
|
||||
/**
|
||||
* 电压表
|
||||
*/
|
||||
String DATA_V = "data_v";
|
||||
|
||||
/**
|
||||
* 日统计-电压波动闪变表
|
||||
*/
|
||||
String DAY_FLICKER = "day_flicker";
|
||||
|
||||
/**
|
||||
* 日统计-电压波动表
|
||||
*/
|
||||
String DAY_FLUC = "day_fluc";
|
||||
|
||||
/**
|
||||
* 日统计-谐波电流角度表
|
||||
*/
|
||||
String DAY_HARM_PHASIC_I = "day_harmphasic_i";
|
||||
|
||||
/**
|
||||
* 日统计-谐波电压角度表
|
||||
*/
|
||||
String DAY_HARM_PHASIC_V = "day_harmphasic_v";
|
||||
|
||||
/**
|
||||
* 日统计-有功功率表
|
||||
*/
|
||||
String DAY_HARM_POWER_P = "day_harmpower_p";
|
||||
|
||||
/**
|
||||
* 日统计-无功功率表
|
||||
*/
|
||||
String DAY_HARM_POWER_Q = "day_harmpower_q";
|
||||
|
||||
/**
|
||||
* 日统计-视在功率表
|
||||
*/
|
||||
String DAY_HARM_POWER_S = "day_harmpower_s";
|
||||
|
||||
/**
|
||||
* 日统计-谐波电流含有率表
|
||||
*/
|
||||
String DAY_HARM_RATE_I = "day_harmrate_i";
|
||||
|
||||
/**
|
||||
* 日统计-谐波电压含有率表
|
||||
*/
|
||||
String DAY_HARM_RATE_V = "day_harmrate_v";
|
||||
|
||||
/**
|
||||
* 日统计-电流表
|
||||
*/
|
||||
String DAY_I = "day_i";
|
||||
|
||||
/**
|
||||
* 日统计-电流间谐波幅值表
|
||||
*/
|
||||
String DAY_IN_HARM_I = "day_inharm_i";
|
||||
|
||||
/**
|
||||
* 日统计-电压间谐波幅值表
|
||||
*/
|
||||
String DAY_IN_HARM_V = "day_inharm_v";
|
||||
|
||||
/**
|
||||
* 日统计-长时闪变表
|
||||
*/
|
||||
String DAY_PLT = "day_plt";
|
||||
|
||||
/**
|
||||
* 日统计-电压表
|
||||
*/
|
||||
String DAY_V = "day_v";
|
||||
|
||||
/**
|
||||
* 时区
|
||||
*/
|
||||
String TIME_ZONE = " tz('Asia/Shanghai')";
|
||||
|
||||
String TZ = "Asia/Shanghai";
|
||||
|
||||
|
||||
/**
|
||||
* 日起始时间
|
||||
*/
|
||||
String START_TIME = " 00:00:00";
|
||||
|
||||
/**
|
||||
* 日结束时间
|
||||
*/
|
||||
String END_TIME = " 23:59:59";
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
String TIME = "time";
|
||||
|
||||
/**
|
||||
* 数据线路号
|
||||
*/
|
||||
String LINE_ID = "line_id";
|
||||
|
||||
/**
|
||||
* 装置ID
|
||||
*/
|
||||
String DEV_ID = "dev_id";
|
||||
|
||||
/**
|
||||
* 数据类型
|
||||
*/
|
||||
String PHASIC_TYPE = "phasic_type";
|
||||
|
||||
/**
|
||||
* 指标类型
|
||||
*/
|
||||
String VALUE_TYPE = "value_type";
|
||||
|
||||
/**
|
||||
* 数据质量标志
|
||||
*/
|
||||
String QUALITY_FLAG = "quality_flag";
|
||||
|
||||
/**
|
||||
* limit_rate
|
||||
*/
|
||||
String LIMIT_RATE = "limit_rate";
|
||||
|
||||
/**
|
||||
* limit_target
|
||||
*/
|
||||
String LIMIT_TARGET = "limit_target";
|
||||
|
||||
/**
|
||||
* pqs_comasses
|
||||
*/
|
||||
String PQS_COMASSES = "pqs_comasses";
|
||||
|
||||
/**
|
||||
* 终端运维日志表
|
||||
*/
|
||||
String PQS_TERMINAL_LOGS = "pqs_terminal_logs";
|
||||
|
||||
/**
|
||||
* 监测点状态信息表
|
||||
*/
|
||||
String PQS_COMMUNICATE = "pqs_communicate";
|
||||
|
||||
String PQS_ACTUAL_FLOW = "pqs_actual_flow";
|
||||
|
||||
String CLD_STATIS_FLOW = "cld_statis_flow";
|
||||
|
||||
/**
|
||||
* 终端在线率表
|
||||
*/
|
||||
String PQS_ONLINERATE = "pqs_onlinerate";
|
||||
|
||||
/**
|
||||
* 数据完整性表
|
||||
*/
|
||||
String PQS_INTEGRITY = "pqs_integrity";
|
||||
|
||||
/**
|
||||
* 终端在线率表公共字段
|
||||
*/
|
||||
String ONLINE_MIN = "online_min";
|
||||
|
||||
String OFFLINE_MIN = "offline_min";
|
||||
|
||||
String ONLINE_RATE = "online_rate";
|
||||
|
||||
/**
|
||||
* data表中InfluxDBPublicParam
|
||||
*/
|
||||
String VALUETYPE = "value_type";
|
||||
|
||||
|
||||
/**
|
||||
* 数据完整性表公共字段
|
||||
*/
|
||||
String DUE = "due";
|
||||
|
||||
String REAL = "real";
|
||||
|
||||
String DEV_INDEX = "dev_id";
|
||||
|
||||
/**
|
||||
* 稳态数据分析字段
|
||||
*/
|
||||
String PHASIC_TYPET = "T";
|
||||
|
||||
/**
|
||||
* 每天固定时间分钟
|
||||
*/
|
||||
Integer DAY_MINUTE = 1440;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.njcn.influx.deprecated;
|
||||
|
||||
import cn.hutool.core.text.StrPool;
|
||||
|
||||
/**
|
||||
* 拼接influx查询语句相关常量
|
||||
*
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2022年10月14日 14:02
|
||||
*/
|
||||
@Deprecated
|
||||
public interface InfluxDBSqlConstant {
|
||||
|
||||
/**
|
||||
* "SELECT "
|
||||
*/
|
||||
String SELECT = "SELECT" + StrPool.C_SPACE;
|
||||
|
||||
/**
|
||||
* "* "
|
||||
*/
|
||||
String ALL = "*" + StrPool.C_SPACE;
|
||||
|
||||
/**
|
||||
* "FROM "
|
||||
*/
|
||||
String FROM = "FROM" + StrPool.C_SPACE;
|
||||
|
||||
/**
|
||||
* " WHERE "
|
||||
*/
|
||||
String WHERE = StrPool.C_SPACE + "WHERE" + StrPool.C_SPACE;
|
||||
|
||||
/**
|
||||
* " AND "
|
||||
*/
|
||||
String AND = StrPool.C_SPACE + "AND" + StrPool.C_SPACE;
|
||||
|
||||
/**
|
||||
* " OR "
|
||||
*/
|
||||
String OR = StrPool.C_SPACE + "OR" + StrPool.C_SPACE;
|
||||
|
||||
/**
|
||||
* " GROUP BY "
|
||||
*/
|
||||
String GB = StrPool.C_SPACE + "GROUP BY" + StrPool.C_SPACE;
|
||||
|
||||
/**
|
||||
* " ORDER BY "
|
||||
*/
|
||||
String OB = StrPool.C_SPACE + "ORDER BY" + StrPool.C_SPACE;
|
||||
|
||||
/**
|
||||
* “DESC ”
|
||||
*/
|
||||
String DESC = "DESC" + StrPool.C_SPACE;
|
||||
|
||||
/**
|
||||
* " as value "
|
||||
*/
|
||||
String AS_VALUE = StrPool.C_SPACE + "as value" + StrPool.C_SPACE;
|
||||
|
||||
String EQ = "=";
|
||||
String QM = "'";
|
||||
String LBK = "(";
|
||||
String RBK = ")";
|
||||
String GT = ">";
|
||||
String GE = ">=";
|
||||
String LT = "<";
|
||||
String LE = "<=";
|
||||
|
||||
/**
|
||||
* influxDB函数拼接
|
||||
*/
|
||||
String MAX = "MAX";
|
||||
String MIN = "MIN";
|
||||
String AVG = "MEAN";
|
||||
String NUM_95 = ",95";
|
||||
String CP95 = "PERCENTILE";
|
||||
|
||||
/**
|
||||
* “ tz('Asia/Shanghai')”
|
||||
*/
|
||||
String TZ = StrPool.C_SPACE + "tz('Asia/Shanghai')";
|
||||
String TIME_AREA = "Asia/Shanghai";
|
||||
|
||||
|
||||
/**
|
||||
* 日起始时间
|
||||
*/
|
||||
String START_TIME = " 00:00:00";
|
||||
|
||||
/**
|
||||
* 日结束时间
|
||||
*/
|
||||
String END_TIME = " 23:59:59";
|
||||
|
||||
/**
|
||||
* 时间
|
||||
*/
|
||||
String TIME = "time" + StrPool.C_SPACE;
|
||||
|
||||
/**
|
||||
* 每天固定时间分钟
|
||||
*/
|
||||
Integer DAY_MINUTE = 1440;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.njcn.influx.deprecated;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2021/12/10 10:48
|
||||
*/
|
||||
@Data
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "spring.influx")
|
||||
@Deprecated
|
||||
public class InfluxDbConfig {
|
||||
|
||||
private String url;
|
||||
|
||||
private String user;
|
||||
|
||||
private String password;
|
||||
|
||||
private String database;
|
||||
|
||||
@Bean
|
||||
public InfluxDbUtils influxDbUtils() {
|
||||
return new InfluxDbUtils(user, password, url, database, "autogen");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,378 @@
|
||||
package com.njcn.influx.deprecated;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import okhttp3.OkHttpClient;
|
||||
import org.influxdb.InfluxDB;
|
||||
import org.influxdb.InfluxDB.ConsistencyLevel;
|
||||
import org.influxdb.InfluxDBFactory;
|
||||
import org.influxdb.dto.*;
|
||||
import org.influxdb.dto.Point.Builder;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.format.DateTimeFormatterBuilder;
|
||||
import java.time.temporal.ChronoField;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2021/11/16 10:20
|
||||
*/
|
||||
@Slf4j
|
||||
@Data
|
||||
@Deprecated
|
||||
public class InfluxDbUtils {
|
||||
static OkHttpClient.Builder client = new OkHttpClient.Builder()
|
||||
.connectTimeout(1000,TimeUnit.SECONDS)
|
||||
.readTimeout(1000, TimeUnit.SECONDS)
|
||||
.writeTimeout(1000, TimeUnit.SECONDS);
|
||||
private static final int FRACTION_MIN_WIDTH = 0;
|
||||
private static final int FRACTION_MAX_WIDTH = 9;
|
||||
private static final boolean ADD_DECIMAL_POINT = true;
|
||||
private static final DateTimeFormatter RFC3339_FORMATTER = new DateTimeFormatterBuilder()
|
||||
.appendPattern("yyyy-MM-dd'T'HH:mm:ss")
|
||||
.appendFraction(ChronoField.NANO_OF_SECOND, FRACTION_MIN_WIDTH, FRACTION_MAX_WIDTH, ADD_DECIMAL_POINT)
|
||||
.appendZoneOrOffsetId()
|
||||
.toFormatter();
|
||||
|
||||
/**用户名*/
|
||||
private String username;
|
||||
/**密码*/
|
||||
private String password;
|
||||
/**链接地址*/
|
||||
private String openurl;
|
||||
/**数据库*/
|
||||
private String dbName;
|
||||
/**保留策略*/
|
||||
private String retentionPolicy;
|
||||
|
||||
private InfluxDB influxDB;
|
||||
|
||||
public InfluxDbUtils(String username, String password, String url, String dbName, String retentionPolicy) {
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.openurl = url;
|
||||
this.dbName = dbName;
|
||||
this.retentionPolicy = retentionPolicy == null || retentionPolicy.equals("") ? "autogen" : retentionPolicy;
|
||||
influxDbBuild();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 连接时序数据库 ,若不存在则创建
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public InfluxDB influxDbBuild() {
|
||||
if (influxDB == null) {
|
||||
influxDB = InfluxDBFactory.connect(openurl, username, password,client);
|
||||
}
|
||||
try {
|
||||
// if (!influxDB.databaseExists(database)) {
|
||||
// influxDB.createDatabase(database);
|
||||
// }
|
||||
} catch (Exception e) {
|
||||
// 该数据库可能设置动态代理,不支持创建数据库
|
||||
// e.printStackTrace();
|
||||
} finally {
|
||||
influxDB.setRetentionPolicy(retentionPolicy);
|
||||
}
|
||||
influxDB.setLogLevel(InfluxDB.LogLevel.NONE);
|
||||
return influxDB;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 创建数据库
|
||||
*
|
||||
* @param dbName
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void createDB(String dbName) {
|
||||
influxDB.createDatabase(dbName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据库
|
||||
*
|
||||
* @param dbName
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public void deleteDB(String dbName) {
|
||||
influxDB.deleteDatabase(dbName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试连接是否正常
|
||||
*
|
||||
* @return true 正常
|
||||
*/
|
||||
public boolean ping() {
|
||||
boolean isConnected = false;
|
||||
Pong pong;
|
||||
try {
|
||||
pong = influxDB.ping();
|
||||
if (pong != null) {
|
||||
isConnected = true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return isConnected;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建自定义保留策略
|
||||
*
|
||||
* @param policyName 策略名
|
||||
* @param days 保存天数
|
||||
* @param replication 保存副本数量
|
||||
* @param isDefault 是否设为默认保留策略
|
||||
*/
|
||||
public void createRetentionPolicy(String dataBaseName, String policyName, int days, int replication,
|
||||
Boolean isDefault) {
|
||||
String sql = String.format("CREATE RETENTION POLICY \"%s\" ON \"%s\" DURATION %sd REPLICATION %s ", policyName,
|
||||
dataBaseName, days, replication);
|
||||
if (isDefault) {
|
||||
sql = sql + " DEFAULT";
|
||||
}
|
||||
query(sql);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建默认的保留策略
|
||||
*
|
||||
* 策略名:hour,保存天数:30天,保存副本数量:1,设为默认保留策略
|
||||
*/
|
||||
public void createDefaultRetentionPolicy() {
|
||||
String command = String
|
||||
.format("CREATE RETENTION POLICY \"%s\" ON \"%s\" DURATION %s REPLICATION %s DEFAULT", "hour", dbName,
|
||||
"30d", 1);
|
||||
this.query(command);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param command 查询语句
|
||||
* @return
|
||||
*/
|
||||
public QueryResult query(String command) {
|
||||
return influxDB.query(new Query(command, dbName));
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入
|
||||
*
|
||||
* @param measurement 表
|
||||
* @param tags 标签
|
||||
* @param fields 字段
|
||||
*/
|
||||
public void insert(String measurement, Map<String, String> tags, Map<String, Object> fields, long time,
|
||||
TimeUnit timeUnit) {
|
||||
Builder builder = Point.measurement(measurement);
|
||||
builder.tag(tags);
|
||||
builder.fields(fields);
|
||||
if (0 != time) {
|
||||
builder.time(time, timeUnit);
|
||||
}
|
||||
influxDB.write(dbName, retentionPolicy, builder.build());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 批量写入测点
|
||||
*
|
||||
* @param batchPoints
|
||||
*/
|
||||
public void batchInsert(BatchPoints batchPoints, TimeUnit timeUnit) {
|
||||
influxDB.write(batchPoints);
|
||||
// influxDB.enableGzip();
|
||||
// influxDB.enableBatch(2000,100,timeUnit);
|
||||
// influxDB.disableGzip();
|
||||
// influxDB.disableBatch();
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量写入数据
|
||||
*
|
||||
* @param database 数据库
|
||||
* @param retentionPolicy 保存策略
|
||||
* @param consistency 一致性
|
||||
* @param records 要保存的数据(调用BatchPoints.lineProtocol()可得到一条record)
|
||||
*/
|
||||
public void batchInsert(final String database, final String retentionPolicy, final ConsistencyLevel consistency,TimeUnit timeUnit, final List<String> records) {
|
||||
influxDB.write(database, retentionPolicy, consistency, records);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量写入数据
|
||||
*
|
||||
* @param database 数据库
|
||||
* @param retentionPolicy 保存策略
|
||||
* @param consistency 一致性
|
||||
* @param records 要保存的数据(调用BatchPoints.lineProtocol()可得到一条record)
|
||||
*/
|
||||
public void batchInsert(final String database, final String retentionPolicy, final ConsistencyLevel consistency, final List<String> records) {
|
||||
influxDB.write(database, retentionPolicy, consistency, records);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param command 删除语句
|
||||
* @return 返回错误信息
|
||||
*/
|
||||
public String deleteMeasurementData(String command) {
|
||||
QueryResult result = influxDB.query(new Query(command, dbName));
|
||||
return result.getError();
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭数据库
|
||||
*/
|
||||
public void close() {
|
||||
influxDB.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建Point
|
||||
*
|
||||
* @param measurement
|
||||
* @param time
|
||||
* @param fields
|
||||
* @return
|
||||
*/
|
||||
public Point pointBuilder(String measurement, long time, TimeUnit timeUnit, Map<String, String> tags,
|
||||
Map<String, Object> fields) {
|
||||
Point point = Point.measurement(measurement).time(time, timeUnit).tag(tags).fields(fields).build();
|
||||
return point;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//单条查询语句封装
|
||||
/**
|
||||
* 查询结果封装到map
|
||||
* @param commond 单条sql语句
|
||||
* @return 查询结果
|
||||
*/
|
||||
@Deprecated
|
||||
public List<Map<String, Object>> getResult(String commond){
|
||||
List<Map<String, Object>> retList = new ArrayList<>();
|
||||
QueryResult queryResult = influxDB.query(new Query(commond,dbName));
|
||||
List<QueryResult.Result> results = queryResult.getResults();
|
||||
if (results==null||results.isEmpty()){
|
||||
return retList;
|
||||
}
|
||||
QueryResult.Result result = results.get(0);
|
||||
List<QueryResult.Series> seriess = result.getSeries();
|
||||
if (seriess==null||seriess.isEmpty()){
|
||||
return retList;
|
||||
}
|
||||
QueryResult.Series series = seriess.get(0);
|
||||
List<String> columns = series.getColumns();
|
||||
List<List<Object>> values = series.getValues();
|
||||
for (List<Object> columnValue :values){
|
||||
Map<String, Object> map = new HashMap<>(1);
|
||||
for (int i=0;i<columnValue.size();i++){
|
||||
if(columns.get(i).equals("time")){
|
||||
long aa = Instant.parse(columnValue.get(i).toString()).minusMillis(TimeUnit.HOURS.toMillis(8)).getEpochSecond();
|
||||
map.put(columns.get(i), aa);
|
||||
}else {
|
||||
map.put(columns.get(i),columnValue.get(i));
|
||||
}
|
||||
}
|
||||
retList.add(map);
|
||||
}
|
||||
return retList;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public List<Map<String, Object>> getResult(String commond, String type){
|
||||
|
||||
List<Map<String, Object>> retList = new ArrayList<>();
|
||||
QueryResult queryResult = influxDB.query(new Query(commond,dbName));
|
||||
List<QueryResult.Result> results = queryResult.getResults();
|
||||
if (results==null||results.isEmpty()){
|
||||
return retList;
|
||||
}
|
||||
QueryResult.Result result = results.get(0);
|
||||
List<QueryResult.Series> seriess = result.getSeries();
|
||||
if (seriess==null||seriess.isEmpty()){
|
||||
return retList;
|
||||
}
|
||||
QueryResult.Series series = seriess.get(0);
|
||||
List<String> columns = series.getColumns();
|
||||
List<List<Object>> values = series.getValues();
|
||||
for (List<Object> columnValue :values){
|
||||
Map<String, Object> map = new HashMap<>(1);
|
||||
for (int i=0;i<columnValue.size();i++){
|
||||
if(columns.get(i).equals("time")){
|
||||
Instant aa = Instant.parse(columnValue.get(i).toString()).minusMillis(TimeUnit.HOURS.toMillis(8));
|
||||
LocalDateTime localDateTime =LocalDateTime.ofInstant(aa,ZoneId.systemDefault());
|
||||
String time = localDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
map.put(columns.get(i), time);
|
||||
}else {
|
||||
map.put(columns.get(i),columnValue.get(i));
|
||||
}
|
||||
}
|
||||
retList.add(map);
|
||||
}
|
||||
return retList;
|
||||
}
|
||||
|
||||
|
||||
public List<Map<String, Object>> getMapResult(String commond){
|
||||
|
||||
List<Map<String, Object>> retList = new ArrayList<>();
|
||||
QueryResult queryResult = influxDB.query(new Query(commond,dbName));
|
||||
List<QueryResult.Result> results = queryResult.getResults();
|
||||
if (results==null||results.isEmpty()){
|
||||
return retList;
|
||||
}
|
||||
QueryResult.Result result = results.get(0);
|
||||
List<QueryResult.Series> seriess = result.getSeries();
|
||||
if (seriess==null||seriess.isEmpty()){
|
||||
return retList;
|
||||
}
|
||||
QueryResult.Series series = seriess.get(0);
|
||||
List<String> columns = series.getColumns();
|
||||
List<List<Object>> values = series.getValues();
|
||||
for (List<Object> columnValue :values){
|
||||
Map<String, Object> map = new HashMap<>(1);
|
||||
for (int i=0;i<columnValue.size();i++){
|
||||
if(columns.get(i).equals("time")){
|
||||
Instant instant = Instant.from(RFC3339_FORMATTER.parse(String.valueOf(columnValue.get(i))));
|
||||
LocalDateTime localDateTime =LocalDateTime.ofInstant(instant,ZoneId.systemDefault());
|
||||
String time = localDateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
|
||||
map.put(columns.get(i), time);
|
||||
}else {
|
||||
map.put(columns.get(i),columnValue.get(i));
|
||||
}
|
||||
}
|
||||
retList.add(map);
|
||||
}
|
||||
return retList;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -124,7 +124,7 @@ public interface InfluxDBTableConstant {
|
||||
*/
|
||||
String QUALITY_FLAG = "quality_flag";
|
||||
|
||||
String CP95 = "CP95";
|
||||
|
||||
|
||||
/**
|
||||
* 相别
|
||||
@@ -166,4 +166,13 @@ public interface InfluxDBTableConstant {
|
||||
*/
|
||||
String UUID = "uuid";
|
||||
|
||||
/**
|
||||
* 报表业务计算方式
|
||||
*/
|
||||
String MAX = "MAX";
|
||||
String MIN = "MIN";
|
||||
String AVG = "AVG";
|
||||
String CP95 = "CP95";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -40,4 +40,18 @@ public class DataFlicker {
|
||||
@Column(name = "quality_flag")
|
||||
private String qualityFlag;
|
||||
|
||||
|
||||
//自定义字段
|
||||
@Column(name = "value_type")
|
||||
private String valueType;
|
||||
|
||||
@Column(name = "count")
|
||||
private Integer count;
|
||||
|
||||
@Column(name = "pst_count")
|
||||
private Integer pstCount;
|
||||
|
||||
@Column(name = "plt_count")
|
||||
private Integer pltCount;
|
||||
|
||||
}
|
||||
|
||||
@@ -37,5 +37,7 @@ public class DataFluc {
|
||||
@Column(name = "quality_flag")
|
||||
private String qualityFlag;
|
||||
|
||||
@Column(name = "value_type")
|
||||
private String valueType;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
package com.njcn.influx.pojo.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
@@ -15,7 +15,7 @@ import java.time.Instant;
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_inharmrate_i")
|
||||
public class DataInHarmRateIPO {
|
||||
public class DataInHarmRateI {
|
||||
|
||||
@Column(name = "time")
|
||||
private Instant time;
|
||||
@@ -1,4 +1,4 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
package com.njcn.influx.pojo.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
@@ -15,7 +15,7 @@ import java.time.Instant;
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_inharmrate_v")
|
||||
public class DataInHarmRateVPO {
|
||||
public class DataInHarmRateV {
|
||||
|
||||
@Column(name = "time")
|
||||
private Instant time;
|
||||
@@ -42,4 +42,8 @@ public class DataPlt {
|
||||
@Column(name = "flicker_all_time")
|
||||
private Integer flickerAllTime;
|
||||
|
||||
//自定义字段
|
||||
@Column(name = "mean")
|
||||
private Double mean;
|
||||
|
||||
}
|
||||
|
||||
@@ -218,7 +218,16 @@ public class DataV{
|
||||
@Column(name = "value_type")
|
||||
private String valueType;
|
||||
|
||||
|
||||
//自定义字段-总计算次数
|
||||
//@Column(name = "all_time")
|
||||
//private Integer allTime;
|
||||
@Column(name = "all_time")
|
||||
private Integer allTime;
|
||||
|
||||
//自定义字段
|
||||
@Column(name = "mean")
|
||||
private Double mean;
|
||||
|
||||
//自定义字段
|
||||
@Column(name = "count")
|
||||
private Integer count;
|
||||
}
|
||||
|
||||
@@ -32,4 +32,9 @@ public class PqsCommunicate {
|
||||
@Column(name = "type")
|
||||
private Integer type;
|
||||
|
||||
//自定义
|
||||
private int duration;
|
||||
|
||||
private String desc;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.njcn.influx.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.Dict;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.csdevice.api.CsLineFeignClient;
|
||||
import com.njcn.csdevice.enums.AlgorithmResponseEnum;
|
||||
@@ -9,7 +8,6 @@ import com.njcn.influx.pojo.constant.InfluxDBTableConstant;
|
||||
import com.njcn.influx.pojo.dto.StatisticalDataDTO;
|
||||
import com.njcn.influx.query.InfluxQueryWrapper;
|
||||
import com.njcn.influx.service.CommonService;
|
||||
import com.njcn.influx.utils.ReflectUitl;
|
||||
import com.njcn.system.api.DicDataFeignClient;
|
||||
import com.njcn.system.enums.DicDataEnum;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
@@ -17,7 +15,6 @@ import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -33,8 +30,8 @@ import java.util.Objects;
|
||||
public class CommonServiceImpl implements CommonService {
|
||||
|
||||
private final CommonMapper commonMapper;
|
||||
private final
|
||||
DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
private final DicDataFeignClient dicDataFeignClient;
|
||||
|
||||
private final CsLineFeignClient csLineFeignClient;
|
||||
@Override
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
spring:
|
||||
influx:
|
||||
url: http://192.168.1.16:8086
|
||||
user: admin
|
||||
password: 123456
|
||||
database: pqsbase_zl
|
||||
mapper-location: com.njcn.influx.imapper
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.njcn.influx;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2021年12月10日 15:05
|
||||
*/
|
||||
@RunWith(SpringRunner.class)
|
||||
@WebAppConfiguration
|
||||
@SpringBootTest(classes = PqsInfluxApplication.class)
|
||||
public class BaseJunitTest {
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
//package com.njcn.influx;
|
||||
//
|
||||
//import com.njcn.influx.imapper.CldStatisticsFlowMapper;
|
||||
//import com.njcn.influx.pojo.dto.StatisticalDataDTO;
|
||||
//import com.njcn.influx.pojo.po.DataV;
|
||||
//import com.njcn.influx.service.CommonService;
|
||||
//import com.njcn.influx.service.DataFlickerService;
|
||||
//import com.njcn.influx.service.IDataVService;
|
||||
//import lombok.SneakyThrows;
|
||||
//import org.junit.Test;
|
||||
//import org.springframework.beans.factory.annotation.Autowired;
|
||||
//
|
||||
//import java.util.List;
|
||||
//
|
||||
///**
|
||||
// * @author hongawen
|
||||
// * @version 1.0.0
|
||||
// * @date 2021年12月14日 12:55
|
||||
// */
|
||||
//public class DemoTest extends BaseJunitTest {
|
||||
//
|
||||
// @Autowired
|
||||
// private CldStatisticsFlowMapper cldStatisticsFlowMapper;
|
||||
//
|
||||
// @Autowired
|
||||
// private DataFlickerService dataFlickerService;
|
||||
//
|
||||
// @Autowired
|
||||
// private IDataVService dataVService;
|
||||
//
|
||||
// @Autowired
|
||||
// private CommonService commonService;
|
||||
//
|
||||
// @SneakyThrows
|
||||
// @Test
|
||||
// public void test() {
|
||||
//// dataFlickerService.getDataFlicker("ff2d9674c1f1ecce7f33a5bf17fc4f2d","2023-05-02 00:00:00","2023-05-02 23:59:59");
|
||||
//// List<DataV> ss = dataVService.getDataV("ff2d9674c1f1ecce7f33a5bf17fc4f2d", "2023-05-02 00:00:00", "2023-05-02 23:59:59");
|
||||
//// System.out.println(ss);
|
||||
//
|
||||
// StatisticalDataDTO statisticalDataDTO = commonService.getLineRtData("4","data_harmpower_p","W","A","max");
|
||||
// System.out.println("statisticalDataDTO==:" + statisticalDataDTO);
|
||||
//
|
||||
//
|
||||
// }
|
||||
//
|
||||
//}
|
||||
@@ -12,11 +12,6 @@
|
||||
<name>预处理对外接口模块</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>user-api</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-core</artifactId>
|
||||
@@ -24,11 +19,9 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>harmonic-api</artifactId>
|
||||
<artifactId>common-db</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-web</artifactId>
|
||||
|
||||
@@ -3,9 +3,9 @@ package com.njcn.prepare.harmonic.api.device.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import com.njcn.prepare.harmonic.api.device.DeviceAbnormalFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.DeviceAbnormaStatisticsParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -19,7 +19,7 @@ public class DeviceAbnormalFeignClientFallbackFactory implements FallbackFactor
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,9 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import com.njcn.prepare.harmonic.api.line.CoustmReportFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -27,7 +27,7 @@ public class CoustomReportFeignClientFallbackFactory implements FallbackFactory<
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,9 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
import com.njcn.prepare.harmonic.api.line.DayDataFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -27,7 +27,7 @@ public class DayDataFeignClientFallbackFactory implements FallbackFactory<DayDat
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.DistortionRateFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -25,7 +26,7 @@ public class DistortionRateFeignClientFallbackFactory implements FallbackFactory
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.HarmOverLimitFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -22,7 +23,7 @@ public class HarmOverLimitFeignClientFallbackFactory implements FallbackFactory<
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.HarmonicGeneralFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -25,7 +26,7 @@ public class HarmonicGeneralFeignClientFallbackFactory implements FallbackFactor
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.HarmonicMetricFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -25,7 +26,7 @@ public class HarmonicMetricFeignClientFallbackFactory implements FallbackFactory
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.IntegrityFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -24,7 +25,7 @@ public class IntegrityFeignClientFallbackFactory implements FallbackFactory<Inte
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.LimitTargetFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -28,7 +29,7 @@ public class LimitTargetFeignClientFallbackFactory implements FallbackFactory<Li
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.LimitrateFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -27,7 +28,7 @@ public class LimitrateFeignClientFallbackFactory implements FallbackFactory<Limi
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.NormalLimitFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -22,7 +23,7 @@ public class NormalFeignClientFallbackFactory implements FallbackFactory<NormalL
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.OnlineRateFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -24,7 +25,7 @@ public class OnlineRateFeignClientFallbackFactory implements FallbackFactory<Onl
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.PollutionFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -25,7 +26,7 @@ public class PollutionFeignClientFallbackFactory implements FallbackFactory<Poll
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,10 +3,11 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.RAlarmCountFeignClient;
|
||||
import com.njcn.prepare.harmonic.api.line.RStatEventFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.OrgParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -23,7 +24,7 @@ public class RAlarmCountFeignClientFallbackFactory implements FallbackFactory<RA
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,10 +3,11 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.RMpDevEvaluateDetailFeignClient;
|
||||
import com.njcn.prepare.harmonic.api.line.RStatOrgFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.OrgParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -23,7 +24,7 @@ public class RMpDevEvaluateDetailFeignClientFallbackFactory implements FallbackF
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,11 +3,12 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.HarmOverLimitFeignClient;
|
||||
import com.njcn.prepare.harmonic.api.line.RStatEventFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.pojo.param.OrgParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -24,7 +25,7 @@ public class RStatEventFeignClientFallbackFactory implements FallbackFactory<RSt
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,10 +3,11 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.RStatEventFeignClient;
|
||||
import com.njcn.prepare.harmonic.api.line.RStatEventOrgFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.OrgParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -23,7 +24,7 @@ public class RStatEventOrgFeignClientFallbackFactory implements FallbackFactory<
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,10 +3,11 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.RStatEventFeignClient;
|
||||
import com.njcn.prepare.harmonic.api.line.RStatOrgFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.OrgParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -23,7 +24,7 @@ public class RStatOrgFeignClientFallbackFactory implements FallbackFactory<RStat
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,10 +3,11 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.RStatEventFeignClient;
|
||||
import com.njcn.prepare.harmonic.api.line.RStatSubstationFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.OrgParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -23,7 +24,7 @@ public class RStatSubstationFeignClientFallbackFactory implements FallbackFactor
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,10 +3,11 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.HarmOverLimitFeignClient;
|
||||
import com.njcn.prepare.harmonic.api.line.TargetWarnFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -23,7 +24,7 @@ public class TargetWarnFeignClientFallbackFactory implements FallbackFactory<Tar
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.line.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.line.ThsSuperviseClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.SuperviseParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -20,7 +21,7 @@ public class ThsSuperviseClientFallbackFactory implements FallbackFactory<ThsSup
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException) throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
return new ThsSuperviseClient() {
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.newalgorithm.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.RMpEventDetailFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -18,7 +19,7 @@ public class RMpEventDetailFeignClientFallbackFactory implements FallbackFactory
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.newalgorithm.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.RMpMonitorEvaluateFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -18,7 +19,7 @@ public class RMpMonitorEvaluateFeignClientFallbackFactory implements FallbackFac
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.newalgorithm.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.RMpPassrateFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -18,7 +19,7 @@ public class RMpPassrateFeignClientFallbackFactory implements FallbackFactory<RM
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.newalgorithm.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.ROperatingMonitorFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -18,7 +19,7 @@ public class ROperatingMonitorFeignClientFallbackFactory implements FallbackFact
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.newalgorithm.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.RStatAbnormalFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -18,7 +19,7 @@ public class RStatAbnormalFeignClientFallbackFactory implements FallbackFactory<
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,9 +3,10 @@ package com.njcn.prepare.harmonic.api.newalgorithm.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.RStatHarmonicFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.OrgParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -18,7 +19,7 @@ public class RStatHarmonicFeignClientFallbackFactory implements FallbackFactory
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -3,10 +3,11 @@ package com.njcn.prepare.harmonic.api.newalgorithm.fallback;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.device.biz.utils.DeviceEnumUtil;
|
||||
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.RStatHarmonicFeignClient;
|
||||
import com.njcn.prepare.harmonic.api.newalgorithm.RStatHarmonicOrgFeignClient;
|
||||
import com.njcn.prepare.harmonic.pojo.param.OrgParam;
|
||||
import com.njcn.prepare.harmonic.utils.PrepareEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -19,7 +20,7 @@ public class RStatHarmonicOrgFeignClientFallbackFactory implements FallbackFacto
|
||||
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||
if (throwable.getCause() instanceof BusinessException) {
|
||||
BusinessException businessException = (BusinessException)throwable.getCause();
|
||||
exceptionEnum = DeviceEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
exceptionEnum = PrepareEnumUtil.getExceptionEnum(businessException.getResult());
|
||||
}
|
||||
|
||||
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.njcn.prepare.harmonic.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2021年04月13日 10:50
|
||||
*/
|
||||
@Getter
|
||||
public enum PrepareResponseEnum {
|
||||
|
||||
PREPARE_INNER_ERROR("A0801", "业务功能内部错误")
|
||||
;
|
||||
|
||||
private final String code;
|
||||
|
||||
private final String message;
|
||||
|
||||
PrepareResponseEnum(String code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public static String getCodeByMsg(String msg){
|
||||
for (PrepareResponseEnum userCodeEnum : PrepareResponseEnum.values()) {
|
||||
if (userCodeEnum.message.equalsIgnoreCase(msg)) {
|
||||
return userCodeEnum.code;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author cdf
|
||||
* @since 2022-01-07
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "pqs_communicate")
|
||||
public class Communicate {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 终端Id
|
||||
*/
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@Column(name = "time")
|
||||
private Instant updateTime;
|
||||
|
||||
// @Column(name = "time")
|
||||
// private String updateTime;
|
||||
|
||||
@Column(name = "dev_id")
|
||||
private String devId;
|
||||
|
||||
|
||||
/**
|
||||
* 事件类型(0:中断;1:正常;2:退出)
|
||||
*/
|
||||
@Column(name = "type")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@Column(name = "description")
|
||||
private String remark;
|
||||
|
||||
private Integer duration;
|
||||
|
||||
private String desc;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_flicker")
|
||||
public class DataFlickerPO {
|
||||
|
||||
@Column(name = "time")
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "fluc")
|
||||
private Double fluc;
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type")
|
||||
private String phaseType;
|
||||
|
||||
@Column(name = "plt")
|
||||
private Double plt;
|
||||
|
||||
@Column(name = "pst")
|
||||
private Double pst;
|
||||
|
||||
@Column(name = "quality_flag")
|
||||
private String qualityFlag;
|
||||
|
||||
@Column(name = "value_type")
|
||||
private String valueType;
|
||||
|
||||
|
||||
|
||||
//自定义字段
|
||||
@Column(name = "count")
|
||||
private Integer count;
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/11 16:33
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_fluc")
|
||||
public class DataFlucPO {
|
||||
|
||||
@Column(name = "time")
|
||||
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;
|
||||
|
||||
@Column(name = "fluc")
|
||||
private Double fluc;
|
||||
|
||||
@Column(name = "fluccf")
|
||||
private Double fluccf;
|
||||
|
||||
}
|
||||
@@ -1,185 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 9:13
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_harmphasic_i")
|
||||
public class DataHarmPhasicIPO {
|
||||
|
||||
@Column(name = "time")
|
||||
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;
|
||||
|
||||
@Column(name = "i_1")
|
||||
private Double i1;
|
||||
|
||||
@Column(name = "i_2")
|
||||
private Double i2;
|
||||
|
||||
@Column(name = "i_3")
|
||||
private Double i3;
|
||||
|
||||
@Column(name = "i_4")
|
||||
private Double i4;
|
||||
|
||||
@Column(name = "i_5")
|
||||
private Double i5;
|
||||
|
||||
@Column(name = "i_6")
|
||||
private Double i6;
|
||||
|
||||
@Column(name = "i_7")
|
||||
private Double i7;
|
||||
|
||||
@Column(name = "i_8")
|
||||
private Double i8;
|
||||
|
||||
@Column(name = "i_9")
|
||||
private Double i9;
|
||||
|
||||
@Column(name = "i_10")
|
||||
private Double i10;
|
||||
|
||||
@Column(name = "i_11")
|
||||
private Double i11;
|
||||
|
||||
@Column(name = "i_12")
|
||||
private Double i12;
|
||||
|
||||
@Column(name = "i_13")
|
||||
private Double i13;
|
||||
|
||||
@Column(name = "i_14")
|
||||
private Double i14;
|
||||
|
||||
@Column(name = "i_15")
|
||||
private Double i15;
|
||||
|
||||
@Column(name = "i_16")
|
||||
private Double i16;
|
||||
|
||||
@Column(name = "i_17")
|
||||
private Double i17;
|
||||
|
||||
@Column(name = "i_18")
|
||||
private Double i18;
|
||||
|
||||
@Column(name = "i_19")
|
||||
private Double i19;
|
||||
|
||||
@Column(name = "i_20")
|
||||
private Double i20;
|
||||
|
||||
@Column(name = "i_21")
|
||||
private Double i21;
|
||||
|
||||
@Column(name = "i_22")
|
||||
private Double i22;
|
||||
|
||||
@Column(name = "i_23")
|
||||
private Double i23;
|
||||
|
||||
@Column(name = "i_24")
|
||||
private Double i24;
|
||||
|
||||
@Column(name = "i_25")
|
||||
private Double i25;
|
||||
|
||||
@Column(name = "i_26")
|
||||
private Double i26;
|
||||
|
||||
@Column(name = "i_27")
|
||||
private Double i27;
|
||||
|
||||
@Column(name = "i_28")
|
||||
private Double i28;
|
||||
|
||||
@Column(name = "i_29")
|
||||
private Double i29;
|
||||
|
||||
@Column(name = "i_30")
|
||||
private Double i30;
|
||||
|
||||
@Column(name = "i_31")
|
||||
private Double i31;
|
||||
|
||||
@Column(name = "i_32")
|
||||
private Double i32;
|
||||
|
||||
@Column(name = "i_33")
|
||||
private Double i33;
|
||||
|
||||
@Column(name = "i_34")
|
||||
private Double i34;
|
||||
|
||||
@Column(name = "i_35")
|
||||
private Double i35;
|
||||
|
||||
@Column(name = "i_36")
|
||||
private Double i36;
|
||||
|
||||
@Column(name = "i_37")
|
||||
private Double i37;
|
||||
|
||||
@Column(name = "i_38")
|
||||
private Double i38;
|
||||
|
||||
@Column(name = "i_39")
|
||||
private Double i39;
|
||||
|
||||
@Column(name = "i_40")
|
||||
private Double i40;
|
||||
|
||||
@Column(name = "i_41")
|
||||
private Double i41;
|
||||
|
||||
@Column(name = "i_42")
|
||||
private Double i42;
|
||||
|
||||
@Column(name = "i_43")
|
||||
private Double i43;
|
||||
|
||||
@Column(name = "i_44")
|
||||
private Double i44;
|
||||
|
||||
@Column(name = "i_45")
|
||||
private Double i45;
|
||||
|
||||
@Column(name = "i_46")
|
||||
private Double i46;
|
||||
|
||||
@Column(name = "i_47")
|
||||
private Double i47;
|
||||
|
||||
@Column(name = "i_48")
|
||||
private Double i48;
|
||||
|
||||
@Column(name = "i_49")
|
||||
private Double i49;
|
||||
|
||||
@Column(name = "i_50")
|
||||
private Double i50;
|
||||
|
||||
}
|
||||
@@ -1,185 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 9:13
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_harmphasic_v")
|
||||
public class DataHarmPhasicVPO {
|
||||
|
||||
@Column(name = "time")
|
||||
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;
|
||||
|
||||
@Column(name = "v_1")
|
||||
private Double v1;
|
||||
|
||||
@Column(name = "v_2")
|
||||
private Double v2;
|
||||
|
||||
@Column(name = "v_3")
|
||||
private Double v3;
|
||||
|
||||
@Column(name = "v_4")
|
||||
private Double v4;
|
||||
|
||||
@Column(name = "v_5")
|
||||
private Double v5;
|
||||
|
||||
@Column(name = "v_6")
|
||||
private Double v6;
|
||||
|
||||
@Column(name = "v_7")
|
||||
private Double v7;
|
||||
|
||||
@Column(name = "v_8")
|
||||
private Double v8;
|
||||
|
||||
@Column(name = "v_9")
|
||||
private Double v9;
|
||||
|
||||
@Column(name = "v_10")
|
||||
private Double v10;
|
||||
|
||||
@Column(name = "v_11")
|
||||
private Double v11;
|
||||
|
||||
@Column(name = "v_12")
|
||||
private Double v12;
|
||||
|
||||
@Column(name = "v_13")
|
||||
private Double v13;
|
||||
|
||||
@Column(name = "v_14")
|
||||
private Double v14;
|
||||
|
||||
@Column(name = "v_15")
|
||||
private Double v15;
|
||||
|
||||
@Column(name = "v_16")
|
||||
private Double v16;
|
||||
|
||||
@Column(name = "v_17")
|
||||
private Double v17;
|
||||
|
||||
@Column(name = "v_18")
|
||||
private Double v18;
|
||||
|
||||
@Column(name = "v_19")
|
||||
private Double v19;
|
||||
|
||||
@Column(name = "v_20")
|
||||
private Double v20;
|
||||
|
||||
@Column(name = "v_21")
|
||||
private Double v21;
|
||||
|
||||
@Column(name = "v_22")
|
||||
private Double v22;
|
||||
|
||||
@Column(name = "v_23")
|
||||
private Double v23;
|
||||
|
||||
@Column(name = "v_24")
|
||||
private Double v24;
|
||||
|
||||
@Column(name = "v_25")
|
||||
private Double v25;
|
||||
|
||||
@Column(name = "v_26")
|
||||
private Double v26;
|
||||
|
||||
@Column(name = "v_27")
|
||||
private Double v27;
|
||||
|
||||
@Column(name = "v_28")
|
||||
private Double v28;
|
||||
|
||||
@Column(name = "v_29")
|
||||
private Double v29;
|
||||
|
||||
@Column(name = "v_30")
|
||||
private Double v30;
|
||||
|
||||
@Column(name = "v_31")
|
||||
private Double v31;
|
||||
|
||||
@Column(name = "v_32")
|
||||
private Double v32;
|
||||
|
||||
@Column(name = "v_33")
|
||||
private Double v33;
|
||||
|
||||
@Column(name = "v_34")
|
||||
private Double v34;
|
||||
|
||||
@Column(name = "v_35")
|
||||
private Double v35;
|
||||
|
||||
@Column(name = "v_36")
|
||||
private Double v36;
|
||||
|
||||
@Column(name = "v_37")
|
||||
private Double v37;
|
||||
|
||||
@Column(name = "v_38")
|
||||
private Double v38;
|
||||
|
||||
@Column(name = "v_39")
|
||||
private Double v39;
|
||||
|
||||
@Column(name = "v_40")
|
||||
private Double v40;
|
||||
|
||||
@Column(name = "v_41")
|
||||
private Double v41;
|
||||
|
||||
@Column(name = "v_42")
|
||||
private Double v42;
|
||||
|
||||
@Column(name = "v_43")
|
||||
private Double v43;
|
||||
|
||||
@Column(name = "v_44")
|
||||
private Double v44;
|
||||
|
||||
@Column(name = "v_45")
|
||||
private Double v45;
|
||||
|
||||
@Column(name = "v_46")
|
||||
private Double v46;
|
||||
|
||||
@Column(name = "v_47")
|
||||
private Double v47;
|
||||
|
||||
@Column(name = "v_48")
|
||||
private Double v48;
|
||||
|
||||
@Column(name = "v_49")
|
||||
private Double v49;
|
||||
|
||||
@Column(name = "v_50")
|
||||
private Double v50;
|
||||
|
||||
}
|
||||
@@ -1,193 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 9:13
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_harmpower_p")
|
||||
public class DataHarmPowerPPO {
|
||||
|
||||
@Column(name = "time")
|
||||
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;
|
||||
|
||||
@Column(name = "df")
|
||||
private Double df;
|
||||
|
||||
@Column(name = "pf")
|
||||
private Double pf;
|
||||
|
||||
@Column(name = "p")
|
||||
private Double p;
|
||||
|
||||
@Column(name = "p_1")
|
||||
private Double p1;
|
||||
|
||||
@Column(name = "p_2")
|
||||
private Double p2;
|
||||
|
||||
@Column(name = "p_3")
|
||||
private Double p3;
|
||||
|
||||
@Column(name = "p_4")
|
||||
private Double p4;
|
||||
|
||||
@Column(name = "p_5")
|
||||
private Double p5;
|
||||
|
||||
@Column(name = "p_6")
|
||||
private Double p6;
|
||||
|
||||
@Column(name = "p_7")
|
||||
private Double p7;
|
||||
|
||||
@Column(name = "p_8")
|
||||
private Double p8;
|
||||
|
||||
@Column(name = "p_9")
|
||||
private Double p9;
|
||||
|
||||
@Column(name = "p_10")
|
||||
private Double p10;
|
||||
|
||||
@Column(name = "p_11")
|
||||
private Double p11;
|
||||
|
||||
@Column(name = "p_12")
|
||||
private Double p12;
|
||||
|
||||
@Column(name = "p_13")
|
||||
private Double p13;
|
||||
|
||||
@Column(name = "p_14")
|
||||
private Double p14;
|
||||
|
||||
@Column(name = "p_15")
|
||||
private Double p15;
|
||||
|
||||
@Column(name = "p_16")
|
||||
private Double p16;
|
||||
|
||||
@Column(name = "p_17")
|
||||
private Double p17;
|
||||
|
||||
@Column(name = "p_18")
|
||||
private Double p18;
|
||||
|
||||
@Column(name = "p_19")
|
||||
private Double p19;
|
||||
|
||||
@Column(name = "p_20")
|
||||
private Double p20;
|
||||
|
||||
@Column(name = "p_21")
|
||||
private Double p21;
|
||||
|
||||
@Column(name = "p_22")
|
||||
private Double p22;
|
||||
|
||||
@Column(name = "p_23")
|
||||
private Double p23;
|
||||
|
||||
@Column(name = "p_24")
|
||||
private Double p24;
|
||||
|
||||
@Column(name = "p_25")
|
||||
private Double p25;
|
||||
|
||||
@Column(name = "p_26")
|
||||
private Double p26;
|
||||
|
||||
@Column(name = "p_27")
|
||||
private Double p27;
|
||||
|
||||
@Column(name = "p_28")
|
||||
private Double p28;
|
||||
|
||||
@Column(name = "p_29")
|
||||
private Double p29;
|
||||
|
||||
@Column(name = "p_30")
|
||||
private Double p30;
|
||||
|
||||
@Column(name = "p_31")
|
||||
private Double p31;
|
||||
|
||||
@Column(name = "p_32")
|
||||
private Double p32;
|
||||
|
||||
@Column(name = "p_33")
|
||||
private Double p33;
|
||||
|
||||
@Column(name = "p_34")
|
||||
private Double p34;
|
||||
|
||||
@Column(name = "p_35")
|
||||
private Double p35;
|
||||
|
||||
@Column(name = "p_36")
|
||||
private Double p36;
|
||||
|
||||
@Column(name = "p_37")
|
||||
private Double p37;
|
||||
|
||||
@Column(name = "p_38")
|
||||
private Double p38;
|
||||
|
||||
@Column(name = "p_39")
|
||||
private Double p39;
|
||||
|
||||
@Column(name = "p_40")
|
||||
private Double p40;
|
||||
|
||||
@Column(name = "p_41")
|
||||
private Double p41;
|
||||
|
||||
@Column(name = "p_42")
|
||||
private Double p42;
|
||||
|
||||
@Column(name = "p_43")
|
||||
private Double p43;
|
||||
|
||||
@Column(name = "p_44")
|
||||
private Double p44;
|
||||
|
||||
@Column(name = "p_45")
|
||||
private Double p45;
|
||||
|
||||
@Column(name = "p_46")
|
||||
private Double p46;
|
||||
|
||||
@Column(name = "p_47")
|
||||
private Double p47;
|
||||
|
||||
@Column(name = "p_48")
|
||||
private Double p48;
|
||||
|
||||
@Column(name = "p_49")
|
||||
private Double p49;
|
||||
|
||||
@Column(name = "p_50")
|
||||
private Double p50;
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 9:13
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_harmpower_q")
|
||||
public class DataHarmPowerQPO {
|
||||
|
||||
@Column(name = "time")
|
||||
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;
|
||||
|
||||
@Column(name = "q")
|
||||
private Double q;
|
||||
|
||||
@Column(name = "q_1")
|
||||
private Double q1;
|
||||
|
||||
@Column(name = "q_2")
|
||||
private Double q2;
|
||||
|
||||
@Column(name = "q_3")
|
||||
private Double q3;
|
||||
|
||||
@Column(name = "q_4")
|
||||
private Double q4;
|
||||
|
||||
@Column(name = "q_5")
|
||||
private Double q5;
|
||||
|
||||
@Column(name = "q_6")
|
||||
private Double q6;
|
||||
|
||||
@Column(name = "q_7")
|
||||
private Double q7;
|
||||
|
||||
@Column(name = "q_8")
|
||||
private Double q8;
|
||||
|
||||
@Column(name = "q_9")
|
||||
private Double q9;
|
||||
|
||||
@Column(name = "q_10")
|
||||
private Double q10;
|
||||
|
||||
@Column(name = "q_11")
|
||||
private Double q11;
|
||||
|
||||
@Column(name = "q_12")
|
||||
private Double q12;
|
||||
|
||||
@Column(name = "q_13")
|
||||
private Double q13;
|
||||
|
||||
@Column(name = "q_14")
|
||||
private Double q14;
|
||||
|
||||
@Column(name = "q_15")
|
||||
private Double q15;
|
||||
|
||||
@Column(name = "q_16")
|
||||
private Double q16;
|
||||
|
||||
@Column(name = "q_17")
|
||||
private Double q17;
|
||||
|
||||
@Column(name = "q_18")
|
||||
private Double q18;
|
||||
|
||||
@Column(name = "q_19")
|
||||
private Double q19;
|
||||
|
||||
@Column(name = "q_20")
|
||||
private Double q20;
|
||||
|
||||
@Column(name = "q_21")
|
||||
private Double q21;
|
||||
|
||||
@Column(name = "q_22")
|
||||
private Double q22;
|
||||
|
||||
@Column(name = "q_23")
|
||||
private Double q23;
|
||||
|
||||
@Column(name = "q_24")
|
||||
private Double q24;
|
||||
|
||||
@Column(name = "q_25")
|
||||
private Double q25;
|
||||
|
||||
@Column(name = "q_26")
|
||||
private Double q26;
|
||||
|
||||
@Column(name = "q_27")
|
||||
private Double q27;
|
||||
|
||||
@Column(name = "q_28")
|
||||
private Double q28;
|
||||
|
||||
@Column(name = "q_29")
|
||||
private Double q29;
|
||||
|
||||
@Column(name = "q_30")
|
||||
private Double q30;
|
||||
|
||||
@Column(name = "q_31")
|
||||
private Double q31;
|
||||
|
||||
@Column(name = "q_32")
|
||||
private Double q32;
|
||||
|
||||
@Column(name = "q_33")
|
||||
private Double q33;
|
||||
|
||||
@Column(name = "q_34")
|
||||
private Double q34;
|
||||
|
||||
@Column(name = "q_35")
|
||||
private Double q35;
|
||||
|
||||
@Column(name = "q_36")
|
||||
private Double q36;
|
||||
|
||||
@Column(name = "q_37")
|
||||
private Double q37;
|
||||
|
||||
@Column(name = "q_38")
|
||||
private Double q38;
|
||||
|
||||
@Column(name = "q_39")
|
||||
private Double q39;
|
||||
|
||||
@Column(name = "q_40")
|
||||
private Double q40;
|
||||
|
||||
@Column(name = "q_41")
|
||||
private Double q41;
|
||||
|
||||
@Column(name = "q_42")
|
||||
private Double q42;
|
||||
|
||||
@Column(name = "q_43")
|
||||
private Double q43;
|
||||
|
||||
@Column(name = "q_44")
|
||||
private Double q44;
|
||||
|
||||
@Column(name = "q_45")
|
||||
private Double q45;
|
||||
|
||||
@Column(name = "q_46")
|
||||
private Double q46;
|
||||
|
||||
@Column(name = "q_47")
|
||||
private Double q47;
|
||||
|
||||
@Column(name = "q_48")
|
||||
private Double q48;
|
||||
|
||||
@Column(name = "q_49")
|
||||
private Double q49;
|
||||
|
||||
@Column(name = "q_50")
|
||||
private Double q50;
|
||||
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 9:13
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_harmpower_s")
|
||||
public class DataHarmPowerSPO {
|
||||
|
||||
@Column(name = "time")
|
||||
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;
|
||||
|
||||
@Column(name = "s")
|
||||
private Double s;
|
||||
|
||||
@Column(name = "s_1")
|
||||
private Double s1;
|
||||
|
||||
@Column(name = "s_2")
|
||||
private Double s2;
|
||||
|
||||
@Column(name = "s_3")
|
||||
private Double s3;
|
||||
|
||||
@Column(name = "s_4")
|
||||
private Double s4;
|
||||
|
||||
@Column(name = "s_5")
|
||||
private Double s5;
|
||||
|
||||
@Column(name = "s_6")
|
||||
private Double s6;
|
||||
|
||||
@Column(name = "s_7")
|
||||
private Double s7;
|
||||
|
||||
@Column(name = "s_8")
|
||||
private Double s8;
|
||||
|
||||
@Column(name = "s_9")
|
||||
private Double s9;
|
||||
|
||||
@Column(name = "s_10")
|
||||
private Double s10;
|
||||
|
||||
@Column(name = "s_11")
|
||||
private Double s11;
|
||||
|
||||
@Column(name = "s_12")
|
||||
private Double s12;
|
||||
|
||||
@Column(name = "s_13")
|
||||
private Double s13;
|
||||
|
||||
@Column(name = "s_14")
|
||||
private Double s14;
|
||||
|
||||
@Column(name = "s_15")
|
||||
private Double s15;
|
||||
|
||||
@Column(name = "s_16")
|
||||
private Double s16;
|
||||
|
||||
@Column(name = "s_17")
|
||||
private Double s17;
|
||||
|
||||
@Column(name = "s_18")
|
||||
private Double s18;
|
||||
|
||||
@Column(name = "s_19")
|
||||
private Double s19;
|
||||
|
||||
@Column(name = "s_20")
|
||||
private Double s20;
|
||||
|
||||
@Column(name = "s_21")
|
||||
private Double s21;
|
||||
|
||||
@Column(name = "s_22")
|
||||
private Double s22;
|
||||
|
||||
@Column(name = "s_23")
|
||||
private Double s23;
|
||||
|
||||
@Column(name = "s_24")
|
||||
private Double s24;
|
||||
|
||||
@Column(name = "s_25")
|
||||
private Double s25;
|
||||
|
||||
@Column(name = "s_26")
|
||||
private Double s26;
|
||||
|
||||
@Column(name = "s_27")
|
||||
private Double s27;
|
||||
|
||||
@Column(name = "s_28")
|
||||
private Double s28;
|
||||
|
||||
@Column(name = "s_29")
|
||||
private Double s29;
|
||||
|
||||
@Column(name = "s_30")
|
||||
private Double s30;
|
||||
|
||||
@Column(name = "s_31")
|
||||
private Double s31;
|
||||
|
||||
@Column(name = "s_32")
|
||||
private Double s32;
|
||||
|
||||
@Column(name = "s_33")
|
||||
private Double s33;
|
||||
|
||||
@Column(name = "s_34")
|
||||
private Double s34;
|
||||
|
||||
@Column(name = "s_35")
|
||||
private Double s35;
|
||||
|
||||
@Column(name = "s_36")
|
||||
private Double s36;
|
||||
|
||||
@Column(name = "s_37")
|
||||
private Double s37;
|
||||
|
||||
@Column(name = "s_38")
|
||||
private Double s38;
|
||||
|
||||
@Column(name = "s_39")
|
||||
private Double s39;
|
||||
|
||||
@Column(name = "s_40")
|
||||
private Double s40;
|
||||
|
||||
@Column(name = "s_41")
|
||||
private Double s41;
|
||||
|
||||
@Column(name = "s_42")
|
||||
private Double s42;
|
||||
|
||||
@Column(name = "s_43")
|
||||
private Double s43;
|
||||
|
||||
@Column(name = "s_44")
|
||||
private Double s44;
|
||||
|
||||
@Column(name = "s_45")
|
||||
private Double s45;
|
||||
|
||||
@Column(name = "s_46")
|
||||
private Double s46;
|
||||
|
||||
@Column(name = "s_47")
|
||||
private Double s47;
|
||||
|
||||
@Column(name = "s_48")
|
||||
private Double s48;
|
||||
|
||||
@Column(name = "s_49")
|
||||
private Double s49;
|
||||
|
||||
@Column(name = "s_50")
|
||||
private Double s50;
|
||||
|
||||
}
|
||||
@@ -1,185 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 9:13
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_harmrate_i")
|
||||
public class DataHarmRateIPO {
|
||||
|
||||
@Column(name = "time")
|
||||
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;
|
||||
|
||||
@Column(name = "i_1")
|
||||
private Double i1;
|
||||
|
||||
@Column(name = "i_2")
|
||||
private Double i2;
|
||||
|
||||
@Column(name = "i_3")
|
||||
private Double i3;
|
||||
|
||||
@Column(name = "i_4")
|
||||
private Double i4;
|
||||
|
||||
@Column(name = "i_5")
|
||||
private Double i5;
|
||||
|
||||
@Column(name = "i_6")
|
||||
private Double i6;
|
||||
|
||||
@Column(name = "i_7")
|
||||
private Double i7;
|
||||
|
||||
@Column(name = "i_8")
|
||||
private Double i8;
|
||||
|
||||
@Column(name = "i_9")
|
||||
private Double i9;
|
||||
|
||||
@Column(name = "i_10")
|
||||
private Double i10;
|
||||
|
||||
@Column(name = "i_11")
|
||||
private Double i11;
|
||||
|
||||
@Column(name = "i_12")
|
||||
private Double i12;
|
||||
|
||||
@Column(name = "i_13")
|
||||
private Double i13;
|
||||
|
||||
@Column(name = "i_14")
|
||||
private Double i14;
|
||||
|
||||
@Column(name = "i_15")
|
||||
private Double i15;
|
||||
|
||||
@Column(name = "i_16")
|
||||
private Double i16;
|
||||
|
||||
@Column(name = "i_17")
|
||||
private Double i17;
|
||||
|
||||
@Column(name = "i_18")
|
||||
private Double i18;
|
||||
|
||||
@Column(name = "i_19")
|
||||
private Double i19;
|
||||
|
||||
@Column(name = "i_20")
|
||||
private Double i20;
|
||||
|
||||
@Column(name = "i_21")
|
||||
private Double i21;
|
||||
|
||||
@Column(name = "i_22")
|
||||
private Double i22;
|
||||
|
||||
@Column(name = "i_23")
|
||||
private Double i23;
|
||||
|
||||
@Column(name = "i_24")
|
||||
private Double i24;
|
||||
|
||||
@Column(name = "i_25")
|
||||
private Double i25;
|
||||
|
||||
@Column(name = "i_26")
|
||||
private Double i26;
|
||||
|
||||
@Column(name = "i_27")
|
||||
private Double i27;
|
||||
|
||||
@Column(name = "i_28")
|
||||
private Double i28;
|
||||
|
||||
@Column(name = "i_29")
|
||||
private Double i29;
|
||||
|
||||
@Column(name = "i_30")
|
||||
private Double i30;
|
||||
|
||||
@Column(name = "i_31")
|
||||
private Double i31;
|
||||
|
||||
@Column(name = "i_32")
|
||||
private Double i32;
|
||||
|
||||
@Column(name = "i_33")
|
||||
private Double i33;
|
||||
|
||||
@Column(name = "i_34")
|
||||
private Double i34;
|
||||
|
||||
@Column(name = "i_35")
|
||||
private Double i35;
|
||||
|
||||
@Column(name = "i_36")
|
||||
private Double i36;
|
||||
|
||||
@Column(name = "i_37")
|
||||
private Double i37;
|
||||
|
||||
@Column(name = "i_38")
|
||||
private Double i38;
|
||||
|
||||
@Column(name = "i_39")
|
||||
private Double i39;
|
||||
|
||||
@Column(name = "i_40")
|
||||
private Double i40;
|
||||
|
||||
@Column(name = "i_41")
|
||||
private Double i41;
|
||||
|
||||
@Column(name = "i_42")
|
||||
private Double i42;
|
||||
|
||||
@Column(name = "i_43")
|
||||
private Double i43;
|
||||
|
||||
@Column(name = "i_44")
|
||||
private Double i44;
|
||||
|
||||
@Column(name = "i_45")
|
||||
private Double i45;
|
||||
|
||||
@Column(name = "i_46")
|
||||
private Double i46;
|
||||
|
||||
@Column(name = "i_47")
|
||||
private Double i47;
|
||||
|
||||
@Column(name = "i_48")
|
||||
private Double i48;
|
||||
|
||||
@Column(name = "i_49")
|
||||
private Double i49;
|
||||
|
||||
@Column(name = "i_50")
|
||||
private Double i50;
|
||||
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/10/18 11:24【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_harmrate_v")
|
||||
public class DataHarmRateVPO {
|
||||
|
||||
|
||||
@Column(name = "time")
|
||||
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;
|
||||
|
||||
@Column(name = "v_1")
|
||||
private Double v1;
|
||||
|
||||
@Column(name = "v_2")
|
||||
private Double v2;
|
||||
|
||||
@Column(name = "v_3")
|
||||
private Double v3;
|
||||
|
||||
@Column(name = "v_4")
|
||||
private Double v4;
|
||||
|
||||
@Column(name = "v_5")
|
||||
private Double v5;
|
||||
|
||||
@Column(name = "v_6")
|
||||
private Double v6;
|
||||
|
||||
@Column(name = "v_7")
|
||||
private Double v7;
|
||||
|
||||
@Column(name = "v_8")
|
||||
private Double v8;
|
||||
|
||||
@Column(name = "v_9")
|
||||
private Double v9;
|
||||
|
||||
@Column(name = "v_10")
|
||||
private Double v10;
|
||||
|
||||
@Column(name = "v_11")
|
||||
private Double v11;
|
||||
|
||||
@Column(name = "v_12")
|
||||
private Double v12;
|
||||
|
||||
@Column(name = "v_13")
|
||||
private Double v13;
|
||||
|
||||
@Column(name = "v_14")
|
||||
private Double v14;
|
||||
|
||||
@Column(name = "v_15")
|
||||
private Double v15;
|
||||
|
||||
@Column(name = "v_16")
|
||||
private Double v16;
|
||||
|
||||
@Column(name = "v_17")
|
||||
private Double v17;
|
||||
|
||||
@Column(name = "v_18")
|
||||
private Double v18;
|
||||
|
||||
@Column(name = "v_19")
|
||||
private Double v19;
|
||||
|
||||
@Column(name = "v_20")
|
||||
private Double v20;
|
||||
|
||||
@Column(name = "v_21")
|
||||
private Double v21;
|
||||
|
||||
@Column(name = "v_22")
|
||||
private Double v22;
|
||||
|
||||
@Column(name = "v_23")
|
||||
private Double v23;
|
||||
|
||||
@Column(name = "v_24")
|
||||
private Double v24;
|
||||
|
||||
@Column(name = "v_25")
|
||||
private Double v25;
|
||||
|
||||
@Column(name = "v_26")
|
||||
private Double v26;
|
||||
|
||||
@Column(name = "v_27")
|
||||
private Double v27;
|
||||
|
||||
@Column(name = "v_28")
|
||||
private Double v28;
|
||||
|
||||
@Column(name = "v_29")
|
||||
private Double v29;
|
||||
|
||||
@Column(name = "v_30")
|
||||
private Double v30;
|
||||
|
||||
@Column(name = "v_31")
|
||||
private Double v31;
|
||||
|
||||
@Column(name = "v_32")
|
||||
private Double v32;
|
||||
|
||||
@Column(name = "v_33")
|
||||
private Double v33;
|
||||
|
||||
@Column(name = "v_34")
|
||||
private Double v34;
|
||||
|
||||
@Column(name = "v_35")
|
||||
private Double v35;
|
||||
|
||||
@Column(name = "v_36")
|
||||
private Double v36;
|
||||
|
||||
@Column(name = "v_37")
|
||||
private Double v37;
|
||||
|
||||
@Column(name = "v_38")
|
||||
private Double v38;
|
||||
|
||||
@Column(name = "v_39")
|
||||
private Double v39;
|
||||
|
||||
@Column(name = "v_40")
|
||||
private Double v40;
|
||||
|
||||
@Column(name = "v_41")
|
||||
private Double v41;
|
||||
|
||||
@Column(name = "v_42")
|
||||
private Double v42;
|
||||
|
||||
@Column(name = "v_43")
|
||||
private Double v43;
|
||||
|
||||
@Column(name = "v_44")
|
||||
private Double v44;
|
||||
|
||||
@Column(name = "v_45")
|
||||
private Double v45;
|
||||
|
||||
@Column(name = "v_46")
|
||||
private Double v46;
|
||||
|
||||
@Column(name = "v_47")
|
||||
private Double v47;
|
||||
|
||||
@Column(name = "v_48")
|
||||
private Double v48;
|
||||
|
||||
@Column(name = "v_49")
|
||||
private Double v49;
|
||||
|
||||
@Column(name = "v_50")
|
||||
private Double v50;
|
||||
}
|
||||
@@ -1,196 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Data
|
||||
@Measurement(name = "data_i")
|
||||
public class DataIPO {
|
||||
|
||||
@Column(name = "time")
|
||||
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;
|
||||
|
||||
@Column(name = "i_neg")
|
||||
private Double iNeg;
|
||||
|
||||
@Column(name = "i_pos")
|
||||
private Double iPos;
|
||||
|
||||
@Column(name = "i_thd")
|
||||
private Double iThd;
|
||||
|
||||
@Column(name = "i_unbalance")
|
||||
private Double iUnbalance;
|
||||
|
||||
@Column(name = "i_zero")
|
||||
private Double iZero;
|
||||
|
||||
@Column(name = "rms")
|
||||
private Double rms;
|
||||
|
||||
@Column(name = "i_1")
|
||||
private Double i1;
|
||||
|
||||
@Column(name = "i_2")
|
||||
private Double i2;
|
||||
|
||||
@Column(name = "i_3")
|
||||
private Double i3;
|
||||
|
||||
@Column(name = "i_4")
|
||||
private Double i4;
|
||||
|
||||
@Column(name = "i_5")
|
||||
private Double i5;
|
||||
|
||||
@Column(name = "i_6")
|
||||
private Double i6;
|
||||
|
||||
@Column(name = "i_7")
|
||||
private Double i7;
|
||||
|
||||
@Column(name = "i_8")
|
||||
private Double i8;
|
||||
|
||||
@Column(name = "i_9")
|
||||
private Double i9;
|
||||
|
||||
@Column(name = "i_10")
|
||||
private Double i10;
|
||||
|
||||
@Column(name = "i_11")
|
||||
private Double i11;
|
||||
|
||||
@Column(name = "i_12")
|
||||
private Double i12;
|
||||
|
||||
@Column(name = "i_13")
|
||||
private Double i13;
|
||||
|
||||
@Column(name = "i_14")
|
||||
private Double i14;
|
||||
|
||||
@Column(name = "i_15")
|
||||
private Double i15;
|
||||
|
||||
@Column(name = "i_16")
|
||||
private Double i16;
|
||||
|
||||
@Column(name = "i_17")
|
||||
private Double i17;
|
||||
|
||||
@Column(name = "i_18")
|
||||
private Double i18;
|
||||
|
||||
@Column(name = "i_19")
|
||||
private Double i19;
|
||||
|
||||
@Column(name = "i_20")
|
||||
private Double i20;
|
||||
|
||||
@Column(name = "i_21")
|
||||
private Double i21;
|
||||
|
||||
@Column(name = "i_22")
|
||||
private Double i22;
|
||||
|
||||
@Column(name = "i_23")
|
||||
private Double i23;
|
||||
|
||||
@Column(name = "i_24")
|
||||
private Double i24;
|
||||
|
||||
@Column(name = "i_25")
|
||||
private Double i25;
|
||||
|
||||
@Column(name = "i_26")
|
||||
private Double i26;
|
||||
|
||||
@Column(name = "i_27")
|
||||
private Double i27;
|
||||
|
||||
@Column(name = "i_28")
|
||||
private Double i28;
|
||||
|
||||
@Column(name = "i_29")
|
||||
private Double i29;
|
||||
|
||||
@Column(name = "i_30")
|
||||
private Double i30;
|
||||
|
||||
@Column(name = "i_31")
|
||||
private Double i31;
|
||||
|
||||
@Column(name = "i_32")
|
||||
private Double i32;
|
||||
|
||||
@Column(name = "i_33")
|
||||
private Double i33;
|
||||
|
||||
@Column(name = "i_34")
|
||||
private Double i34;
|
||||
|
||||
@Column(name = "i_35")
|
||||
private Double i35;
|
||||
|
||||
@Column(name = "i_36")
|
||||
private Double i36;
|
||||
|
||||
@Column(name = "i_37")
|
||||
private Double i37;
|
||||
|
||||
@Column(name = "i_38")
|
||||
private Double i38;
|
||||
|
||||
@Column(name = "i_39")
|
||||
private Double i39;
|
||||
|
||||
@Column(name = "i_40")
|
||||
private Double i40;
|
||||
|
||||
@Column(name = "i_41")
|
||||
private Double i41;
|
||||
|
||||
@Column(name = "i_42")
|
||||
private Double i42;
|
||||
|
||||
@Column(name = "i_43")
|
||||
private Double i43;
|
||||
|
||||
@Column(name = "i_44")
|
||||
private Double i44;
|
||||
|
||||
@Column(name = "i_45")
|
||||
private Double i45;
|
||||
|
||||
@Column(name = "i_46")
|
||||
private Double i46;
|
||||
|
||||
@Column(name = "i_47")
|
||||
private Double i47;
|
||||
|
||||
@Column(name = "i_48")
|
||||
private Double i48;
|
||||
|
||||
@Column(name = "i_49")
|
||||
private Double i49;
|
||||
|
||||
@Column(name = "i_50")
|
||||
private Double i50;
|
||||
|
||||
}
|
||||
@@ -1,185 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 9:13
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_harmphasic_i")
|
||||
public class DataInHarmIPO {
|
||||
|
||||
@Column(name = "time")
|
||||
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;
|
||||
|
||||
@Column(name = "i_1")
|
||||
private Double i1;
|
||||
|
||||
@Column(name = "i_2")
|
||||
private Double i2;
|
||||
|
||||
@Column(name = "i_3")
|
||||
private Double i3;
|
||||
|
||||
@Column(name = "i_4")
|
||||
private Double i4;
|
||||
|
||||
@Column(name = "i_5")
|
||||
private Double i5;
|
||||
|
||||
@Column(name = "i_6")
|
||||
private Double i6;
|
||||
|
||||
@Column(name = "i_7")
|
||||
private Double i7;
|
||||
|
||||
@Column(name = "i_8")
|
||||
private Double i8;
|
||||
|
||||
@Column(name = "i_9")
|
||||
private Double i9;
|
||||
|
||||
@Column(name = "i_10")
|
||||
private Double i10;
|
||||
|
||||
@Column(name = "i_11")
|
||||
private Double i11;
|
||||
|
||||
@Column(name = "i_12")
|
||||
private Double i12;
|
||||
|
||||
@Column(name = "i_13")
|
||||
private Double i13;
|
||||
|
||||
@Column(name = "i_14")
|
||||
private Double i14;
|
||||
|
||||
@Column(name = "i_15")
|
||||
private Double i15;
|
||||
|
||||
@Column(name = "i_16")
|
||||
private Double i16;
|
||||
|
||||
@Column(name = "i_17")
|
||||
private Double i17;
|
||||
|
||||
@Column(name = "i_18")
|
||||
private Double i18;
|
||||
|
||||
@Column(name = "i_19")
|
||||
private Double i19;
|
||||
|
||||
@Column(name = "i_20")
|
||||
private Double i20;
|
||||
|
||||
@Column(name = "i_21")
|
||||
private Double i21;
|
||||
|
||||
@Column(name = "i_22")
|
||||
private Double i22;
|
||||
|
||||
@Column(name = "i_23")
|
||||
private Double i23;
|
||||
|
||||
@Column(name = "i_24")
|
||||
private Double i24;
|
||||
|
||||
@Column(name = "i_25")
|
||||
private Double i25;
|
||||
|
||||
@Column(name = "i_26")
|
||||
private Double i26;
|
||||
|
||||
@Column(name = "i_27")
|
||||
private Double i27;
|
||||
|
||||
@Column(name = "i_28")
|
||||
private Double i28;
|
||||
|
||||
@Column(name = "i_29")
|
||||
private Double i29;
|
||||
|
||||
@Column(name = "i_30")
|
||||
private Double i30;
|
||||
|
||||
@Column(name = "i_31")
|
||||
private Double i31;
|
||||
|
||||
@Column(name = "i_32")
|
||||
private Double i32;
|
||||
|
||||
@Column(name = "i_33")
|
||||
private Double i33;
|
||||
|
||||
@Column(name = "i_34")
|
||||
private Double i34;
|
||||
|
||||
@Column(name = "i_35")
|
||||
private Double i35;
|
||||
|
||||
@Column(name = "i_36")
|
||||
private Double i36;
|
||||
|
||||
@Column(name = "i_37")
|
||||
private Double i37;
|
||||
|
||||
@Column(name = "i_38")
|
||||
private Double i38;
|
||||
|
||||
@Column(name = "i_39")
|
||||
private Double i39;
|
||||
|
||||
@Column(name = "i_40")
|
||||
private Double i40;
|
||||
|
||||
@Column(name = "i_41")
|
||||
private Double i41;
|
||||
|
||||
@Column(name = "i_42")
|
||||
private Double i42;
|
||||
|
||||
@Column(name = "i_43")
|
||||
private Double i43;
|
||||
|
||||
@Column(name = "i_44")
|
||||
private Double i44;
|
||||
|
||||
@Column(name = "i_45")
|
||||
private Double i45;
|
||||
|
||||
@Column(name = "i_46")
|
||||
private Double i46;
|
||||
|
||||
@Column(name = "i_47")
|
||||
private Double i47;
|
||||
|
||||
@Column(name = "i_48")
|
||||
private Double i48;
|
||||
|
||||
@Column(name = "i_49")
|
||||
private Double i49;
|
||||
|
||||
@Column(name = "i_50")
|
||||
private Double i50;
|
||||
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/10/18 11:24【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_inharm_v")
|
||||
public class DataInHarmVPO {
|
||||
|
||||
@Column(name = "time")
|
||||
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;
|
||||
|
||||
@Column(name = "v_1")
|
||||
private Double v1;
|
||||
|
||||
@Column(name = "v_2")
|
||||
private Double v2;
|
||||
|
||||
@Column(name = "v_3")
|
||||
private Double v3;
|
||||
|
||||
@Column(name = "v_4")
|
||||
private Double v4;
|
||||
|
||||
@Column(name = "v_5")
|
||||
private Double v5;
|
||||
|
||||
@Column(name = "v_6")
|
||||
private Double v6;
|
||||
|
||||
@Column(name = "v_7")
|
||||
private Double v7;
|
||||
|
||||
@Column(name = "v_8")
|
||||
private Double v8;
|
||||
|
||||
@Column(name = "v_9")
|
||||
private Double v9;
|
||||
|
||||
@Column(name = "v_10")
|
||||
private Double v10;
|
||||
|
||||
@Column(name = "v_11")
|
||||
private Double v11;
|
||||
|
||||
@Column(name = "v_12")
|
||||
private Double v12;
|
||||
|
||||
@Column(name = "v_13")
|
||||
private Double v13;
|
||||
|
||||
@Column(name = "v_14")
|
||||
private Double v14;
|
||||
|
||||
@Column(name = "v_15")
|
||||
private Double v15;
|
||||
|
||||
@Column(name = "v_16")
|
||||
private Double v16;
|
||||
|
||||
@Column(name = "v_17")
|
||||
private Double v17;
|
||||
|
||||
@Column(name = "v_18")
|
||||
private Double v18;
|
||||
|
||||
@Column(name = "v_19")
|
||||
private Double v19;
|
||||
|
||||
@Column(name = "v_20")
|
||||
private Double v20;
|
||||
|
||||
@Column(name = "v_21")
|
||||
private Double v21;
|
||||
|
||||
@Column(name = "v_22")
|
||||
private Double v22;
|
||||
|
||||
@Column(name = "v_23")
|
||||
private Double v23;
|
||||
|
||||
@Column(name = "v_24")
|
||||
private Double v24;
|
||||
|
||||
@Column(name = "v_25")
|
||||
private Double v25;
|
||||
|
||||
@Column(name = "v_26")
|
||||
private Double v26;
|
||||
|
||||
@Column(name = "v_27")
|
||||
private Double v27;
|
||||
|
||||
@Column(name = "v_28")
|
||||
private Double v28;
|
||||
|
||||
@Column(name = "v_29")
|
||||
private Double v29;
|
||||
|
||||
@Column(name = "v_30")
|
||||
private Double v30;
|
||||
|
||||
@Column(name = "v_31")
|
||||
private Double v31;
|
||||
|
||||
@Column(name = "v_32")
|
||||
private Double v32;
|
||||
|
||||
@Column(name = "v_33")
|
||||
private Double v33;
|
||||
|
||||
@Column(name = "v_34")
|
||||
private Double v34;
|
||||
|
||||
@Column(name = "v_35")
|
||||
private Double v35;
|
||||
|
||||
@Column(name = "v_36")
|
||||
private Double v36;
|
||||
|
||||
@Column(name = "v_37")
|
||||
private Double v37;
|
||||
|
||||
@Column(name = "v_38")
|
||||
private Double v38;
|
||||
|
||||
@Column(name = "v_39")
|
||||
private Double v39;
|
||||
|
||||
@Column(name = "v_40")
|
||||
private Double v40;
|
||||
|
||||
@Column(name = "v_41")
|
||||
private Double v41;
|
||||
|
||||
@Column(name = "v_42")
|
||||
private Double v42;
|
||||
|
||||
@Column(name = "v_43")
|
||||
private Double v43;
|
||||
|
||||
@Column(name = "v_44")
|
||||
private Double v44;
|
||||
|
||||
@Column(name = "v_45")
|
||||
private Double v45;
|
||||
|
||||
@Column(name = "v_46")
|
||||
private Double v46;
|
||||
|
||||
@Column(name = "v_47")
|
||||
private Double v47;
|
||||
|
||||
@Column(name = "v_48")
|
||||
private Double v48;
|
||||
|
||||
@Column(name = "v_49")
|
||||
private Double v49;
|
||||
|
||||
@Column(name = "v_50")
|
||||
private Double v50;
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Data
|
||||
@Measurement(name = "data_plt")
|
||||
public class DataPltPO {
|
||||
|
||||
@Column(name = "time")
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type")
|
||||
private String phaseType;
|
||||
|
||||
@Column(name = "value_type")
|
||||
private String valueType;
|
||||
|
||||
@Column(name = "quality_flag")
|
||||
private String qualityFlag;
|
||||
|
||||
@Column(name = "plt")
|
||||
private Double plt;
|
||||
|
||||
//自定义字段-闪变总计算次数
|
||||
@Column(name = "flicker_all_time")
|
||||
private Integer flickerAllTime;
|
||||
|
||||
//自定义字段
|
||||
@Column(name = "mean")
|
||||
private Double mean;
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/10/21 13:45
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "harmonic_pollution")
|
||||
public class DataPolluctionPO {
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "time")
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "freq_dev")
|
||||
private Double freqDev;
|
||||
|
||||
@Column(name = "v_dev")
|
||||
private Double vDev;
|
||||
|
||||
@Column(name = "v_unbalance")
|
||||
private Double vUnbalance;
|
||||
|
||||
@Column(name = "v_all")
|
||||
private Double vAll;
|
||||
|
||||
@Column(name = "plt")
|
||||
private Double plt;
|
||||
|
||||
@Column(name = "i_all")
|
||||
private Double iAll;
|
||||
|
||||
@Column(name = "i_neg")
|
||||
private Double iNeg;
|
||||
|
||||
@Column(name = "v_inharm")
|
||||
private Double vInharm;
|
||||
|
||||
}
|
||||
@@ -1,225 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.njcn.common.utils.serializer.InstantDateSerializer;
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Data
|
||||
@Measurement(name = "data_v")
|
||||
public class DataVPO {
|
||||
|
||||
@Column(name = "time")
|
||||
@JsonSerialize(using = InstantDateSerializer.class)
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "freq")
|
||||
private Double freq;
|
||||
|
||||
@Column(name = "freq_dev")
|
||||
private Double freqDev;
|
||||
|
||||
@Column(name = "quality_flag")
|
||||
private String qualityFlag;
|
||||
|
||||
@Column(name = "rms")
|
||||
private Double rms;
|
||||
|
||||
@Column(name = "rms_lvr")
|
||||
private Double rmsLvr = 0.00;
|
||||
|
||||
@Column(name = "vl_dev")
|
||||
private Double vlDev;
|
||||
|
||||
@Column(name = "vu_dev")
|
||||
private Double vuDev;
|
||||
|
||||
@Column(name = "v_1")
|
||||
private Double v1;
|
||||
|
||||
@Column(name = "v_2")
|
||||
private Double v2;
|
||||
|
||||
@Column(name = "v_3")
|
||||
private Double v3;
|
||||
|
||||
@Column(name = "v_4")
|
||||
private Double v4;
|
||||
|
||||
@Column(name = "v_5")
|
||||
private Double v5;
|
||||
|
||||
@Column(name = "v_6")
|
||||
private Double v6;
|
||||
|
||||
@Column(name = "v_7")
|
||||
private Double v7;
|
||||
|
||||
@Column(name = "v_8")
|
||||
private Double v8;
|
||||
|
||||
@Column(name = "v_9")
|
||||
private Double v9;
|
||||
|
||||
@Column(name = "v_10")
|
||||
private Double v10;
|
||||
|
||||
@Column(name = "v_11")
|
||||
private Double v11;
|
||||
|
||||
@Column(name = "v_12")
|
||||
private Double v12;
|
||||
|
||||
@Column(name = "v_13")
|
||||
private Double v13;
|
||||
|
||||
@Column(name = "v_14")
|
||||
private Double v14;
|
||||
|
||||
@Column(name = "v_15")
|
||||
private Double v15;
|
||||
|
||||
@Column(name = "v_16")
|
||||
private Double v16;
|
||||
|
||||
@Column(name = "v_17")
|
||||
private Double v17;
|
||||
|
||||
@Column(name = "v_18")
|
||||
private Double v18;
|
||||
|
||||
@Column(name = "v_19")
|
||||
private Double v19;
|
||||
|
||||
@Column(name = "v_20")
|
||||
private Double v20;
|
||||
|
||||
@Column(name = "v_21")
|
||||
private Double v21;
|
||||
|
||||
@Column(name = "v_22")
|
||||
private Double v22;
|
||||
|
||||
@Column(name = "v_23")
|
||||
private Double v23;
|
||||
|
||||
@Column(name = "v_24")
|
||||
private Double v24;
|
||||
|
||||
@Column(name = "v_25")
|
||||
private Double v25;
|
||||
|
||||
@Column(name = "v_26")
|
||||
private Double v26;
|
||||
|
||||
@Column(name = "v_27")
|
||||
private Double v27;
|
||||
|
||||
@Column(name = "v_28")
|
||||
private Double v28;
|
||||
|
||||
@Column(name = "v_29")
|
||||
private Double v29;
|
||||
|
||||
@Column(name = "v_30")
|
||||
private Double v30;
|
||||
|
||||
@Column(name = "v_31")
|
||||
private Double v31;
|
||||
|
||||
@Column(name = "v_32")
|
||||
private Double v32;
|
||||
|
||||
@Column(name = "v_33")
|
||||
private Double v33;
|
||||
|
||||
@Column(name = "v_34")
|
||||
private Double v34;
|
||||
|
||||
@Column(name = "v_35")
|
||||
private Double v35;
|
||||
|
||||
@Column(name = "v_36")
|
||||
private Double v36;
|
||||
|
||||
@Column(name = "v_37")
|
||||
private Double v37;
|
||||
|
||||
@Column(name = "v_38")
|
||||
private Double v38;
|
||||
|
||||
@Column(name = "v_39")
|
||||
private Double v39;
|
||||
|
||||
@Column(name = "v_40")
|
||||
private Double v40;
|
||||
|
||||
@Column(name = "v_41")
|
||||
private Double v41;
|
||||
|
||||
@Column(name = "v_42")
|
||||
private Double v42;
|
||||
|
||||
@Column(name = "v_43")
|
||||
private Double v43;
|
||||
|
||||
@Column(name = "v_44")
|
||||
private Double v44;
|
||||
|
||||
@Column(name = "v_45")
|
||||
private Double v45;
|
||||
|
||||
@Column(name = "v_46")
|
||||
private Double v46;
|
||||
|
||||
@Column(name = "v_47")
|
||||
private Double v47;
|
||||
|
||||
@Column(name = "v_48")
|
||||
private Double v48;
|
||||
|
||||
@Column(name = "v_49")
|
||||
private Double v49;
|
||||
|
||||
@Column(name = "v_50")
|
||||
private Double v50;
|
||||
|
||||
@Column(name = "v_neg")
|
||||
private Double vNeg;
|
||||
|
||||
@Column(name = "v_pos")
|
||||
private Double vPos;
|
||||
|
||||
@Column(name = "v_thd")
|
||||
private Double vThd;
|
||||
|
||||
@Column(name = "v_unbalance")
|
||||
private Double vUnbalance;
|
||||
|
||||
@Column(name = "v_zero")
|
||||
private Double vZero;
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type")
|
||||
private String phaseType;
|
||||
|
||||
@Column(name = "value_type")
|
||||
private String valueType;
|
||||
|
||||
//自定义字段-总计算次数
|
||||
@Column(name = "all_time")
|
||||
private Integer allTime;
|
||||
|
||||
//自定义字段
|
||||
@Column(name = "mean")
|
||||
private Double mean;
|
||||
|
||||
//自定义字段
|
||||
@Column(name = "count")
|
||||
private Integer count;
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Data
|
||||
@Measurement(name = "day_harmrate_v")
|
||||
public class DayHarmrateVPO {
|
||||
|
||||
@Column(name = "time")
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type")
|
||||
private String phaseType;
|
||||
|
||||
@Column(name = "value_type")
|
||||
private String valueType;
|
||||
|
||||
@Column(name = "quality_flag")
|
||||
private String qualityFlag;
|
||||
|
||||
@Column(name = "v_1")
|
||||
private double v1;
|
||||
|
||||
@Column(name = "v_2")
|
||||
private double v2;
|
||||
|
||||
@Column(name = "v_3")
|
||||
private double v3;
|
||||
|
||||
@Column(name = "v_4")
|
||||
private double v4;
|
||||
|
||||
@Column(name = "v_5")
|
||||
private double v5;
|
||||
|
||||
@Column(name = "v_6")
|
||||
private double v6;
|
||||
|
||||
@Column(name = "v_7")
|
||||
private double v7;
|
||||
|
||||
@Column(name = "v_8")
|
||||
private double v8;
|
||||
|
||||
@Column(name = "v_9")
|
||||
private double v9;
|
||||
|
||||
@Column(name = "v_10")
|
||||
private double v10;
|
||||
|
||||
@Column(name = "v_11")
|
||||
private double v11;
|
||||
|
||||
@Column(name = "v_12")
|
||||
private double v12;
|
||||
|
||||
@Column(name = "v_13")
|
||||
private double v13;
|
||||
|
||||
@Column(name = "v_14")
|
||||
private double v14;
|
||||
|
||||
@Column(name = "v_15")
|
||||
private double v15;
|
||||
|
||||
@Column(name = "v_16")
|
||||
private double v16;
|
||||
|
||||
@Column(name = "v_17")
|
||||
private double v17;
|
||||
|
||||
@Column(name = "v_18")
|
||||
private double v18;
|
||||
|
||||
@Column(name = "v_19")
|
||||
private double v19;
|
||||
|
||||
@Column(name = "v_20")
|
||||
private double v20;
|
||||
|
||||
@Column(name = "v_21")
|
||||
private double v21;
|
||||
|
||||
@Column(name = "v_22")
|
||||
private double v22;
|
||||
|
||||
@Column(name = "v_23")
|
||||
private double v23;
|
||||
|
||||
@Column(name = "v_24")
|
||||
private double v24;
|
||||
|
||||
@Column(name = "v_25")
|
||||
private double v25;
|
||||
|
||||
@Column(name = "v_26")
|
||||
private double v26;
|
||||
|
||||
@Column(name = "v_27")
|
||||
private double v27;
|
||||
|
||||
@Column(name = "v_28")
|
||||
private double v28;
|
||||
|
||||
@Column(name = "v_29")
|
||||
private double v29;
|
||||
|
||||
@Column(name = "v_30")
|
||||
private double v30;
|
||||
|
||||
@Column(name = "v_31")
|
||||
private double v31;
|
||||
|
||||
@Column(name = "v_32")
|
||||
private double v32;
|
||||
|
||||
@Column(name = "v_33")
|
||||
private double v33;
|
||||
|
||||
@Column(name = "v_34")
|
||||
private double v34;
|
||||
|
||||
@Column(name = "v_35")
|
||||
private double v35;
|
||||
|
||||
@Column(name = "v_36")
|
||||
private double v36;
|
||||
|
||||
@Column(name = "v_37")
|
||||
private double v37;
|
||||
|
||||
@Column(name = "v_38")
|
||||
private double v38;
|
||||
|
||||
@Column(name = "v_39")
|
||||
private double v39;
|
||||
|
||||
@Column(name = "v_40")
|
||||
private double v40;
|
||||
|
||||
@Column(name = "v_41")
|
||||
private double v41;
|
||||
|
||||
@Column(name = "v_42")
|
||||
private double v42;
|
||||
|
||||
@Column(name = "v_43")
|
||||
private double v43;
|
||||
|
||||
@Column(name = "v_44")
|
||||
private double v44;
|
||||
|
||||
@Column(name = "v_45")
|
||||
private double v45;
|
||||
|
||||
@Column(name = "v_46")
|
||||
private double v46;
|
||||
|
||||
@Column(name = "v_47")
|
||||
private double v47;
|
||||
|
||||
@Column(name = "v_48")
|
||||
private double v48;
|
||||
|
||||
@Column(name = "v_49")
|
||||
private double v49;
|
||||
|
||||
@Column(name = "v_50")
|
||||
private double v50;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Measurement(name = "day_i")
|
||||
public class DayIPO extends DataIPO {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,178 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
@Data
|
||||
@Measurement(name = "day_inharm_v")
|
||||
public class DayInharmVPO {
|
||||
|
||||
@Column(name = "time")
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type")
|
||||
private String phaseType;
|
||||
|
||||
@Column(name = "value_type")
|
||||
private String valueType;
|
||||
|
||||
@Column(name = "quality_flag")
|
||||
private String qualityFlag;
|
||||
|
||||
@Column(name = "v_1")
|
||||
private double v1;
|
||||
|
||||
@Column(name = "v_2")
|
||||
private double v2;
|
||||
|
||||
@Column(name = "v_3")
|
||||
private double v3;
|
||||
|
||||
@Column(name = "v_4")
|
||||
private double v4;
|
||||
|
||||
@Column(name = "v_5")
|
||||
private double v5;
|
||||
|
||||
@Column(name = "v_6")
|
||||
private double v6;
|
||||
|
||||
@Column(name = "v_7")
|
||||
private double v7;
|
||||
|
||||
@Column(name = "v_8")
|
||||
private double v8;
|
||||
|
||||
@Column(name = "v_9")
|
||||
private double v9;
|
||||
|
||||
@Column(name = "v_10")
|
||||
private double v10;
|
||||
|
||||
@Column(name = "v_11")
|
||||
private double v11;
|
||||
|
||||
@Column(name = "v_12")
|
||||
private double v12;
|
||||
|
||||
@Column(name = "v_13")
|
||||
private double v13;
|
||||
|
||||
@Column(name = "v_14")
|
||||
private double v14;
|
||||
|
||||
@Column(name = "v_15")
|
||||
private double v15;
|
||||
|
||||
@Column(name = "v_16")
|
||||
private double v16;
|
||||
|
||||
@Column(name = "v_17")
|
||||
private double v17;
|
||||
|
||||
@Column(name = "v_18")
|
||||
private double v18;
|
||||
|
||||
@Column(name = "v_19")
|
||||
private double v19;
|
||||
|
||||
@Column(name = "v_20")
|
||||
private double v20;
|
||||
|
||||
@Column(name = "v_21")
|
||||
private double v21;
|
||||
|
||||
@Column(name = "v_22")
|
||||
private double v22;
|
||||
|
||||
@Column(name = "v_23")
|
||||
private double v23;
|
||||
|
||||
@Column(name = "v_24")
|
||||
private double v24;
|
||||
|
||||
@Column(name = "v_25")
|
||||
private double v25;
|
||||
|
||||
@Column(name = "v_26")
|
||||
private double v26;
|
||||
|
||||
@Column(name = "v_27")
|
||||
private double v27;
|
||||
|
||||
@Column(name = "v_28")
|
||||
private double v28;
|
||||
|
||||
@Column(name = "v_29")
|
||||
private double v29;
|
||||
|
||||
@Column(name = "v_30")
|
||||
private double v30;
|
||||
|
||||
@Column(name = "v_31")
|
||||
private double v31;
|
||||
|
||||
@Column(name = "v_32")
|
||||
private double v32;
|
||||
|
||||
@Column(name = "v_33")
|
||||
private double v33;
|
||||
|
||||
@Column(name = "v_34")
|
||||
private double v34;
|
||||
|
||||
@Column(name = "v_35")
|
||||
private double v35;
|
||||
|
||||
@Column(name = "v_36")
|
||||
private double v36;
|
||||
|
||||
@Column(name = "v_37")
|
||||
private double v37;
|
||||
|
||||
@Column(name = "v_38")
|
||||
private double v38;
|
||||
|
||||
@Column(name = "v_39")
|
||||
private double v39;
|
||||
|
||||
@Column(name = "v_40")
|
||||
private double v40;
|
||||
|
||||
@Column(name = "v_41")
|
||||
private double v41;
|
||||
|
||||
@Column(name = "v_42")
|
||||
private double v42;
|
||||
|
||||
@Column(name = "v_43")
|
||||
private double v43;
|
||||
|
||||
@Column(name = "v_44")
|
||||
private double v44;
|
||||
|
||||
@Column(name = "v_45")
|
||||
private double v45;
|
||||
|
||||
@Column(name = "v_46")
|
||||
private double v46;
|
||||
|
||||
@Column(name = "v_47")
|
||||
private double v47;
|
||||
|
||||
@Column(name = "v_48")
|
||||
private double v48;
|
||||
|
||||
@Column(name = "v_49")
|
||||
private double v49;
|
||||
|
||||
@Column(name = "v_50")
|
||||
private double v50;
|
||||
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Measurement(name = "day_plt")
|
||||
public class DayPltPO extends DataPltPO {
|
||||
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Measurement(name = "day_v")
|
||||
public class DayVPO extends DataVPO {
|
||||
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.influxdb.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* @author xiaoyao
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/10/27 10:08
|
||||
*/
|
||||
|
||||
@Data
|
||||
@Measurement(name = "pqs_communicate")
|
||||
public class PqsCommunicatePO {
|
||||
|
||||
@Column(name = "time")
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "dev_id")
|
||||
private String devId;
|
||||
|
||||
@Column(name = "type")
|
||||
private Integer type;
|
||||
|
||||
@Column(name = "description")
|
||||
private String description;
|
||||
}
|
||||
@@ -1,17 +1,8 @@
|
||||
package com.njcn.prepare.harmonic.pojo.mysql.po.line;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class AlarmPO implements Serializable {
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.njcn.prepare.harmonic.pojo.po;
|
||||
|
||||
import lombok.Data;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2023/1/12 11:31【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
@Measurement(
|
||||
name = "data_flicker"
|
||||
)
|
||||
@Data
|
||||
public class DataFlicker {
|
||||
@Column(
|
||||
name = "time"
|
||||
)
|
||||
private Instant time;
|
||||
@Column(
|
||||
name = "line_id"
|
||||
)
|
||||
private String lineId;
|
||||
@Column(
|
||||
name = "pst_count"
|
||||
)
|
||||
private Integer pstCount;
|
||||
@Column(
|
||||
name = "plt_count"
|
||||
)
|
||||
private Integer pltCount;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package com.njcn.prepare.harmonic.utils;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.common.utils.EnumUtils;
|
||||
import com.njcn.prepare.harmonic.enums.PrepareResponseEnum;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2021年05月26日 17:17
|
||||
*/
|
||||
public class PrepareEnumUtil {
|
||||
|
||||
/**
|
||||
* 获取PrepareResponseEnum实例
|
||||
*/
|
||||
public static PrepareResponseEnum getPrepareResponseEnumByMessage(@NotNull Object value) {
|
||||
PrepareResponseEnum prepareResponseEnum;
|
||||
try {
|
||||
String message = value.toString();
|
||||
if(message.indexOf(StrUtil.C_COMMA)>0){
|
||||
value = message.substring(message.indexOf(StrUtil.C_COMMA)+1);
|
||||
}
|
||||
prepareResponseEnum = EnumUtils.valueOf(PrepareResponseEnum.class, value, PrepareResponseEnum.class.getMethod(BusinessException.GET_MESSAGE_METHOD));
|
||||
return Objects.isNull(prepareResponseEnum) ? PrepareResponseEnum.PREPARE_INNER_ERROR : prepareResponseEnum;
|
||||
} catch (NoSuchMethodException e) {
|
||||
throw new BusinessException(CommonResponseEnum.INTERNAL_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static Enum<?> getExceptionEnum(HttpResult<Object> result){
|
||||
//如果返回错误,且为内部错误,则直接抛出异常
|
||||
CommonResponseEnum commonResponseEnum = EnumUtils.getCommonResponseEnumByCode(result.getCode());
|
||||
if (commonResponseEnum == CommonResponseEnum.PREPARE_RESPONSE_ENUM) {
|
||||
return getPrepareResponseEnumByMessage(result.getMessage());
|
||||
}
|
||||
return commonResponseEnum;
|
||||
}
|
||||
}
|
||||
@@ -2,15 +2,12 @@ package com.njcn.prepare.harmonic.utils;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.njcn.device.pq.constant.Param;
|
||||
import com.njcn.system.pojo.po.DictData;
|
||||
import com.njcn.common.pojo.constant.BizParamConstant;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.Month;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.TemporalAdjusters;
|
||||
import java.util.*;
|
||||
|
||||
public class PublicUtil {
|
||||
@@ -57,23 +54,24 @@ public class PublicUtil {
|
||||
*/
|
||||
public static Map<String,DateTime> getBeginAndEndByDate(Integer type, Date date)
|
||||
{
|
||||
String typeStr = String.valueOf(type);
|
||||
Map<String,DateTime> result = new HashMap<>();
|
||||
DateTime startTime = null;
|
||||
DateTime endTime = null;
|
||||
//年 季 月 周 日
|
||||
if (Param.YEAR.equals(type)){
|
||||
if (BizParamConstant.STAT_BIZ_YEAR.equals(typeStr)){
|
||||
startTime = DateUtil.beginOfYear(date);
|
||||
endTime = DateUtil.endOfYear(date);
|
||||
}else if(Param.QUARTER.equals(type)){
|
||||
}else if(BizParamConstant.STAT_BIZ_QUARTER.equals(typeStr)){
|
||||
startTime = DateUtil.beginOfQuarter(date);
|
||||
endTime = DateUtil.endOfQuarter(date);
|
||||
}else if(Param.MONTH.equals(type)){
|
||||
}else if(BizParamConstant.STAT_BIZ_MONTH.equals(typeStr)){
|
||||
startTime = DateUtil.beginOfMonth(date);
|
||||
endTime = DateUtil.endOfMonth(date);
|
||||
}else if(Param.WEEK.equals(type)){
|
||||
}else if(BizParamConstant.STAT_BIZ_WEEK.equals(typeStr)){
|
||||
startTime = DateUtil.beginOfWeek(date);
|
||||
endTime = DateUtil.endOfWeek(date);
|
||||
}else if(Param.DAY.equals(type)){
|
||||
}else if(BizParamConstant.STAT_BIZ_DAY.equals(typeStr)){
|
||||
startTime = DateUtil.beginOfDay(date);
|
||||
endTime = DateUtil.endOfDay(date);
|
||||
}
|
||||
@@ -81,6 +79,7 @@ public class PublicUtil {
|
||||
result.put("endTime",endTime);
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description: 返回当前季度
|
||||
* @Param: [datadate]时间格式yyyy-MM-dd
|
||||
@@ -204,22 +203,22 @@ public class PublicUtil {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Description: 根据电压字典获取电压等级
|
||||
* @Param: [id, dictDataList]
|
||||
* @return: java.lang.Double
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/23
|
||||
*/
|
||||
public static Double getVoltage(String id, List<DictData> dictDataList) {
|
||||
for (DictData dictData : dictDataList) {
|
||||
if (dictData.getId ( ).equals (id)) {
|
||||
Double result = Double.valueOf (dictData.getValue ( ));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
// /**
|
||||
// * @Description: 根据电压字典获取电压等级
|
||||
// * @Param: [id, dictDataList]
|
||||
// * @return: java.lang.Double
|
||||
// * @Author: clam
|
||||
// * @Date: 2023/2/23
|
||||
// */
|
||||
// public static Double getVoltage(String id, List<DictData> dictDataList) {
|
||||
// for (DictData dictData : dictDataList) {
|
||||
// if (dictData.getId ( ).equals (id)) {
|
||||
// Double result = Double.valueOf (dictData.getValue ( ));
|
||||
// return result;
|
||||
// }
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-influxDB</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.njcn</groupId>-->
|
||||
<!-- <artifactId>common-influxDB</artifactId>-->
|
||||
<!-- <version>${project.version}</version>-->
|
||||
<!-- <scope>compile</scope>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>common-web</artifactId>
|
||||
@@ -122,24 +122,44 @@
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
|
||||
<!--oracle驱动-->
|
||||
<!--pqs-influx-->
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.jdbc</groupId>
|
||||
<artifactId>ojdbc8</artifactId>
|
||||
<version>21.6.0.0</version>
|
||||
</dependency>
|
||||
<!-- 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK -->
|
||||
<dependency>
|
||||
<groupId>com.oracle.database.nls</groupId>
|
||||
<artifactId>orai18n</artifactId>
|
||||
<version>21.1.0.0</version>
|
||||
<groupId>com.njcn</groupId>
|
||||
<artifactId>pqs-influx</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.njcn</groupId>-->
|
||||
<!-- <artifactId>influxdb-springboot-starter</artifactId>-->
|
||||
<!-- <version>1.0.0</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <!–oracle驱动–>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.oracle.database.jdbc</groupId>-->
|
||||
<!-- <artifactId>ojdbc8</artifactId>-->
|
||||
<!-- <version>21.6.0.0</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <!– 不支持的字符集 (在类路径中添加 orai18n.jar): ZHS16GBK –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.oracle.database.nls</groupId>-->
|
||||
<!-- <artifactId>orai18n</artifactId>-->
|
||||
<!-- <version>21.1.0.0</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.njcn</groupId>-->
|
||||
<!-- <artifactId>influxdb-springboot-starter</artifactId>-->
|
||||
<!-- <version>1.0.0</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.yomahub</groupId>-->
|
||||
<!-- <artifactId>liteflow-spring-boot-starter</artifactId>-->
|
||||
<!-- <version>2.10.7</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.yomahub</groupId>-->
|
||||
<!-- <artifactId>liteflow-rule-nacos</artifactId>-->
|
||||
<!-- <version>2.10.7</version>-->
|
||||
<!-- </dependency>-->
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.annotation.DependsOn;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
@@ -13,6 +14,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
*/
|
||||
@Slf4j
|
||||
@MapperScan("com.njcn.**.mapper")
|
||||
@DependsOn("proxyMapperRegister")
|
||||
@EnableFeignClients(basePackages = "com.njcn")
|
||||
@SpringBootApplication(scanBasePackages = "com.njcn")
|
||||
public class PrepareApplication {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.pojo.mysql.po.line;
|
||||
package com.njcn.prepare.harmonic.bo;
|
||||
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.Communicate;
|
||||
import com.njcn.influx.pojo.po.PqsCommunicate;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -70,7 +70,7 @@ public class TopMsgPO extends BaseEntity {
|
||||
|
||||
private float onlineRateValue;
|
||||
|
||||
private List<Communicate> communicates;
|
||||
private List<PqsCommunicate> communicates;
|
||||
|
||||
/**
|
||||
* 状态 0.删除 1.正常
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.njcn.prepare.harmonic.constant;
|
||||
|
||||
import com.njcn.harmonic.pojo.po.*;
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.*;
|
||||
import com.njcn.influx.pojo.po.*;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.line.RMpFlickerReportDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.line.RMpInharmonicIMagReportDPO;
|
||||
import org.mapstruct.Mapper;
|
||||
@@ -23,7 +23,7 @@ public interface InfluxdbPOConverter {
|
||||
|
||||
InfluxdbPOConverter INFLUXDB_PO_CONVERTER = Mappers.getMapper (InfluxdbPOConverter.class);
|
||||
|
||||
/*DataHarmRateVPO*/
|
||||
/*DataHarmRateV*/
|
||||
@Mapping(source = "v1", target = "fundamentalVoltageMax" ,numberFormat = "#.000")
|
||||
@Mapping(source = "v2", target = "harmonicVoltageContent2Max" ,numberFormat = "#.000")
|
||||
@Mapping(source = "v3", target = "harmonicVoltageContent3Max" ,numberFormat = "#.000")
|
||||
@@ -75,7 +75,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "v49", target = "harmonicVoltageContent49Max" ,numberFormat = "#.000")
|
||||
@Mapping(source = "v50", target = "harmonicVoltageContent50Max" ,numberFormat = "#.000")
|
||||
|
||||
public RMpHarmonicVRateReportD dataVPOTORMpHarmonicPReportDPOMax(DataHarmRateVPO dataVPO);
|
||||
public RMpHarmonicVRateReportD dataVPOTORMpHarmonicPReportDPOMax(DataHarmRateV dataVPO);
|
||||
|
||||
@Mapping(source = "v1", target = "fundamentalVoltageMin",numberFormat = "#.000")
|
||||
@Mapping(source = "v2", target = "harmonicVoltageContent2Min",numberFormat = "#.000")
|
||||
@@ -127,7 +127,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "v48", target = "harmonicVoltageContent48Min",numberFormat = "#.000")
|
||||
@Mapping(source = "v49", target = "harmonicVoltageContent49Min",numberFormat = "#.000")
|
||||
@Mapping(source = "v50", target = "harmonicVoltageContent50Min",numberFormat = "#.000")
|
||||
public RMpHarmonicVRateReportD dataVPOTORMpHarmonicPReportDPOMin(DataHarmRateVPO dataVPO);
|
||||
public RMpHarmonicVRateReportD dataVPOTORMpHarmonicPReportDPOMin(DataHarmRateV dataVPO);
|
||||
|
||||
|
||||
@Mapping(source = "v1", target = "fundamentalVoltageAvg",numberFormat = "#.000")
|
||||
@@ -180,7 +180,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "v48", target = "harmonicVoltageContent48Avg",numberFormat = "#.000")
|
||||
@Mapping(source = "v49", target = "harmonicVoltageContent49Avg",numberFormat = "#.000")
|
||||
@Mapping(source = "v50", target = "harmonicVoltageContent50Avg",numberFormat = "#.000")
|
||||
public RMpHarmonicVRateReportD dataVPOTORMpHarmonicPReportDPOAvg(DataHarmRateVPO dataVPO);
|
||||
public RMpHarmonicVRateReportD dataVPOTORMpHarmonicPReportDPOAvg(DataHarmRateV dataVPO);
|
||||
|
||||
|
||||
@Mapping(source = "v1", target = "fundamentalVoltage95",numberFormat = "#.000")
|
||||
@@ -233,10 +233,10 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "v48", target = "harmonicVoltageContent4895",numberFormat = "#.000")
|
||||
@Mapping(source = "v49", target = "harmonicVoltageContent4995",numberFormat = "#.000")
|
||||
@Mapping(source = "v50", target = "harmonicVoltageContent5095",numberFormat = "#.000")
|
||||
public RMpHarmonicVRateReportD dataVPOTORMpHarmonicPReportDPO95(DataHarmRateVPO dataVPO);
|
||||
public RMpHarmonicVRateReportD dataVPOTORMpHarmonicPReportDPO95(DataHarmRateV dataVPO);
|
||||
|
||||
|
||||
/*DataIPO*/
|
||||
/*DataI*/
|
||||
@Mapping(source = "IThd", target = "harmonicCurrentThdMax")
|
||||
@Mapping(source = "i1", target = "fundamentalCurrentMax")
|
||||
@Mapping(source = "i2", target = "harmonicCurrentEffective2Max")
|
||||
@@ -288,7 +288,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "harmonicCurrentEffective48Max")
|
||||
@Mapping(source = "i49", target = "harmonicCurrentEffective49Max")
|
||||
@Mapping(source = "i50", target = "harmonicCurrentEffective50Max")
|
||||
public RMpHarmonicIMagReportD dataIPOTORMpHarmonicIMagReportDPOMax(DataIPO dataIPO);
|
||||
public RMpHarmonicIMagReportD dataIPOTORMpHarmonicIMagReportDPOMax(DataI dataIPO);
|
||||
|
||||
@Mapping(source = "IThd", target = "harmonicCurrentThdMin")
|
||||
@Mapping(source = "i1", target = "fundamentalCurrentMin")
|
||||
@@ -341,7 +341,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "harmonicCurrentEffective48Min")
|
||||
@Mapping(source = "i49", target = "harmonicCurrentEffective49Min")
|
||||
@Mapping(source = "i50", target = "harmonicCurrentEffective50Min")
|
||||
public RMpHarmonicIMagReportD dataIPOTORMpHarmonicIMagReportDPOMin(DataIPO dataIPO);
|
||||
public RMpHarmonicIMagReportD dataIPOTORMpHarmonicIMagReportDPOMin(DataI dataIPO);
|
||||
|
||||
|
||||
@Mapping(source = "IThd", target = "harmonicCurrentThdAvg")
|
||||
@@ -395,7 +395,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "harmonicCurrentEffective48Avg")
|
||||
@Mapping(source = "i49", target = "harmonicCurrentEffective49Avg")
|
||||
@Mapping(source = "i50", target = "harmonicCurrentEffective50Avg")
|
||||
public RMpHarmonicIMagReportD dataIPOTORMpHarmonicIMagReportDPOAvg(DataIPO dataIPO);
|
||||
public RMpHarmonicIMagReportD dataIPOTORMpHarmonicIMagReportDPOAvg(DataI dataIPO);
|
||||
|
||||
|
||||
@Mapping(source = "IThd", target = "harmonicCurrentThd95")
|
||||
@@ -449,25 +449,25 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "harmonicCurrentEffective4895")
|
||||
@Mapping(source = "i49", target = "harmonicCurrentEffective4995")
|
||||
@Mapping(source = "i50", target = "harmonicCurrentEffective5095")
|
||||
public RMpHarmonicIMagReportD dataIPOTORMpHarmonicIMagReportDPO95(DataIPO dataIPO);
|
||||
public RMpHarmonicIMagReportD dataIPOTORMpHarmonicIMagReportDPO95(DataI dataIPO);
|
||||
|
||||
|
||||
/*RMpFlickerReportDPO*/
|
||||
@Mapping(source = "fluc", target = "voltageFluctuationMax")
|
||||
@Mapping(source = "plt", target = "shortTermSeverityMax")
|
||||
public RMpFlickerReportDPO rMpFlickerReportDPOConverterMax(DataFlickerPO dataFlickerPO);
|
||||
public RMpFlickerReportDPO rMpFlickerReportDPOConverterMax(DataFlicker dataFlickerPO);
|
||||
|
||||
@Mapping(source = "fluc", target = "voltageFluctuationMin")
|
||||
@Mapping(source = "plt", target = "shortTermSeverityMin")
|
||||
public RMpFlickerReportDPO rMpFlickerReportDPOConverterMin(DataFlickerPO dataFlickerPO);
|
||||
public RMpFlickerReportDPO rMpFlickerReportDPOConverterMin(DataFlicker dataFlickerPO);
|
||||
|
||||
@Mapping(source = "fluc", target = "voltageFluctuationAvg")
|
||||
@Mapping(source = "plt", target = "shortTermSeverityAvg")
|
||||
public RMpFlickerReportDPO rMpFlickerReportDPOConverterAvg(DataFlickerPO dataFlickerPO);
|
||||
public RMpFlickerReportDPO rMpFlickerReportDPOConverterAvg(DataFlicker dataFlickerPO);
|
||||
|
||||
@Mapping(source = "fluc", target = "voltageFluctuation95")
|
||||
@Mapping(source = "plt", target = "shortTermSeverity95")
|
||||
public RMpFlickerReportDPO rMpFlickerReportDPOConverter95(DataFlickerPO dataFlickerPO);
|
||||
public RMpFlickerReportDPO rMpFlickerReportDPOConverter95(DataFlicker dataFlickerPO);
|
||||
|
||||
/*RMpHarmonicIRateReportDPO*/
|
||||
@Mapping(source = "i2", target = "i2Min")
|
||||
@@ -519,7 +519,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "i48Min")
|
||||
@Mapping(source = "i49", target = "i49Min")
|
||||
@Mapping(source = "i50", target = "i50Min")
|
||||
public RMpHarmonicIRateReportD RMpHarmonicIRateReportDPOConverterMin(DataHarmRateIPO dataHarmRateIPO);
|
||||
public RMpHarmonicIRateReportD RMpHarmonicIRateReportDPOConverterMin(DataHarmRateI dataHarmRateIPO);
|
||||
|
||||
@Mapping(source = "i2", target = "i2Max")
|
||||
@Mapping(source = "i3", target = "i3Max")
|
||||
@@ -570,7 +570,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "i48Max")
|
||||
@Mapping(source = "i49", target = "i49Max")
|
||||
@Mapping(source = "i50", target = "i50Max")
|
||||
public RMpHarmonicIRateReportD RMpHarmonicIRateReportDPOConverterMax(DataHarmRateIPO dataHarmRateIPO);
|
||||
public RMpHarmonicIRateReportD RMpHarmonicIRateReportDPOConverterMax(DataHarmRateI dataHarmRateIPO);
|
||||
|
||||
|
||||
@Mapping(source = "i2", target = "i2Avg")
|
||||
@@ -622,7 +622,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "i48Avg")
|
||||
@Mapping(source = "i49", target = "i49Avg")
|
||||
@Mapping(source = "i50", target = "i50Avg")
|
||||
public RMpHarmonicIRateReportD RMpHarmonicIRateReportDPOConverterAvg(DataHarmRateIPO dataHarmRateIPO);
|
||||
public RMpHarmonicIRateReportD RMpHarmonicIRateReportDPOConverterAvg(DataHarmRateI dataHarmRateIPO);
|
||||
|
||||
@Mapping(source = "i2", target = "i2Cp95")
|
||||
@Mapping(source = "i3", target = "i3Cp95")
|
||||
@@ -673,7 +673,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "i48Cp95")
|
||||
@Mapping(source = "i49", target = "i49Cp95")
|
||||
@Mapping(source = "i50", target = "i50Cp95")
|
||||
public RMpHarmonicIRateReportD RMpHarmonicIRateReportDPOConverter95(DataHarmRateIPO dataHarmRateIPO);
|
||||
public RMpHarmonicIRateReportD RMpHarmonicIRateReportDPOConverter95(DataHarmRateI dataHarmRateIPO);
|
||||
/*RMpInharmonicIRateReportDPO*/
|
||||
@Mapping(source = "i2", target = "inharmI2Min")
|
||||
@Mapping(source = "i3", target = "inharmI3Min")
|
||||
@@ -724,7 +724,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "inharmI48Min")
|
||||
@Mapping(source = "i49", target = "inharmI49Min")
|
||||
@Mapping(source = "i50", target = "inharmI50Min")
|
||||
public RMpInharmonicIRateReportD RMpInharmonicIRateReportDPOConverterMin(DataInHarmRateIPO temp);
|
||||
public RMpInharmonicIRateReportD RMpInharmonicIRateReportDPOConverterMin(DataInHarmRateI temp);
|
||||
|
||||
@Mapping(source = "i2", target = "inharmI2Max")
|
||||
@Mapping(source = "i3", target = "inharmI3Max")
|
||||
@@ -775,7 +775,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "inharmI48Max")
|
||||
@Mapping(source = "i49", target = "inharmI49Max")
|
||||
@Mapping(source = "i50", target = "inharmI50Max")
|
||||
public RMpInharmonicIRateReportD RMpInharmonicIRateReportDPOConverterMax(DataInHarmRateIPO temp);
|
||||
public RMpInharmonicIRateReportD RMpInharmonicIRateReportDPOConverterMax(DataInHarmRateI temp);
|
||||
|
||||
|
||||
@Mapping(source = "i2", target = "inharmI2Avg")
|
||||
@@ -827,7 +827,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "inharmI48Avg")
|
||||
@Mapping(source = "i49", target = "inharmI49Avg")
|
||||
@Mapping(source = "i50", target = "inharmI50Avg")
|
||||
public RMpInharmonicIRateReportD RMpInharmonicIRateReportDPOConverterAvg(DataInHarmRateIPO temp);
|
||||
public RMpInharmonicIRateReportD RMpInharmonicIRateReportDPOConverterAvg(DataInHarmRateI temp);
|
||||
|
||||
@Mapping(source = "i2", target = "inharmI2Cp95")
|
||||
@Mapping(source = "i3", target = "inharmI3Cp95")
|
||||
@@ -878,7 +878,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "inharmI48Cp95")
|
||||
@Mapping(source = "i49", target = "inharmI49Cp95")
|
||||
@Mapping(source = "i50", target = "inharmI50Cp95")
|
||||
public RMpInharmonicIRateReportD RMpInharmonicIRateReportDPOConverter95(DataInHarmRateIPO temp);
|
||||
public RMpInharmonicIRateReportD RMpInharmonicIRateReportDPOConverter95(DataInHarmRateI temp);
|
||||
|
||||
/*RMpInharmonicIMagReportDPO*/
|
||||
@Mapping(source = "i1", target = "simpleHarmonicCurrentEffective1Min")
|
||||
@@ -931,7 +931,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "simpleHarmonicCurrentEffective48Min")
|
||||
@Mapping(source = "i49", target = "simpleHarmonicCurrentEffective49Min")
|
||||
@Mapping(source = "i50", target = "simpleHarmonicCurrentEffective50Min")
|
||||
public RMpInharmonicIMagReportDPO RMpInharmonicIMagReportDPOConverterMin(DataInHarmIPO temp);
|
||||
public RMpInharmonicIMagReportDPO RMpInharmonicIMagReportDPOConverterMin(DataInHarmI temp);
|
||||
|
||||
@Mapping(source = "i1", target = "simpleHarmonicCurrentEffective1Max")
|
||||
@Mapping(source = "i2", target = "simpleHarmonicCurrentEffective2Max")
|
||||
@@ -983,7 +983,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "simpleHarmonicCurrentEffective48Max")
|
||||
@Mapping(source = "i49", target = "simpleHarmonicCurrentEffective49Max")
|
||||
@Mapping(source = "i50", target = "simpleHarmonicCurrentEffective50Max")
|
||||
public RMpInharmonicIMagReportDPO RMpInharmonicIMagReportDPOConverterMax(DataInHarmIPO temp);
|
||||
public RMpInharmonicIMagReportDPO RMpInharmonicIMagReportDPOConverterMax(DataInHarmI temp);
|
||||
|
||||
@Mapping(source = "i1", target = "simpleHarmonicCurrentEffective1Avg")
|
||||
@Mapping(source = "i2", target = "simpleHarmonicCurrentEffective2Avg")
|
||||
@@ -1035,7 +1035,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "simpleHarmonicCurrentEffective48Avg")
|
||||
@Mapping(source = "i49", target = "simpleHarmonicCurrentEffective49Avg")
|
||||
@Mapping(source = "i50", target = "simpleHarmonicCurrentEffective50Avg")
|
||||
public RMpInharmonicIMagReportDPO RMpInharmonicIMagReportDPOConverterAvg(DataInHarmIPO temp);
|
||||
public RMpInharmonicIMagReportDPO RMpInharmonicIMagReportDPOConverterAvg(DataInHarmI temp);
|
||||
|
||||
@Mapping(source = "i1", target = "simpleHarmonicCurrentEffective1Cp95")
|
||||
@Mapping(source = "i2", target = "simpleHarmonicCurrentEffective2Cp95")
|
||||
@@ -1087,7 +1087,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "i48", target = "simpleHarmonicCurrentEffective48Cp95")
|
||||
@Mapping(source = "i49", target = "simpleHarmonicCurrentEffective49Cp95")
|
||||
@Mapping(source = "i50", target = "simpleHarmonicCurrentEffective50Cp95")
|
||||
public RMpInharmonicIMagReportDPO RMpInharmonicIMagReportDPOConverter95(DataInHarmIPO temp);
|
||||
public RMpInharmonicIMagReportDPO RMpInharmonicIMagReportDPOConverter95(DataInHarmI temp);
|
||||
/*RMpInharmonicVRateReportDPO*/
|
||||
@Mapping(source = "v1", target = "centreHarmonicVoltageContent1Min")
|
||||
@Mapping(source = "v2", target = "centreHarmonicVoltageContent2Min")
|
||||
@@ -1139,7 +1139,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "v48", target = "centreHarmonicVoltageContent48Min")
|
||||
@Mapping(source = "v49", target = "centreHarmonicVoltageContent49Min")
|
||||
@Mapping(source = "v50", target = "centreHarmonicVoltageContent50Min")
|
||||
public RMpInharmonicVRateReportD RMpInharmonicVRateReportDPOConverterMin(DataInHarmRateVPO temp);
|
||||
public RMpInharmonicVRateReportD RMpInharmonicVRateReportDPOConverterMin(DataInHarmRateV temp);
|
||||
|
||||
@Mapping(source = "v1", target = "centreHarmonicVoltageContent1Max")
|
||||
@Mapping(source = "v2", target = "centreHarmonicVoltageContent2Max")
|
||||
@@ -1191,7 +1191,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "v48", target = "centreHarmonicVoltageContent48Max")
|
||||
@Mapping(source = "v49", target = "centreHarmonicVoltageContent49Max")
|
||||
@Mapping(source = "v50", target = "centreHarmonicVoltageContent50Max")
|
||||
public RMpInharmonicVRateReportD RMpInharmonicVRateReportDPOConverterMax(DataInHarmRateVPO temp);
|
||||
public RMpInharmonicVRateReportD RMpInharmonicVRateReportDPOConverterMax(DataInHarmRateV temp);
|
||||
|
||||
@Mapping(source = "v1", target = "centreHarmonicVoltageContent1Avg")
|
||||
@Mapping(source = "v2", target = "centreHarmonicVoltageContent2Avg")
|
||||
@@ -1243,7 +1243,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "v48", target = "centreHarmonicVoltageContent48Avg")
|
||||
@Mapping(source = "v49", target = "centreHarmonicVoltageContent49Avg")
|
||||
@Mapping(source = "v50", target = "centreHarmonicVoltageContent50Avg")
|
||||
public RMpInharmonicVRateReportD RMpInharmonicVRateReportDPOConverterAvg(DataInHarmRateVPO temp);
|
||||
public RMpInharmonicVRateReportD RMpInharmonicVRateReportDPOConverterAvg(DataInHarmRateV temp);
|
||||
|
||||
@Mapping(source = "v1", target = "centreHarmonicVoltageContent1Cp95")
|
||||
@Mapping(source = "v2", target = "centreHarmonicVoltageContent2Cp95")
|
||||
@@ -1295,7 +1295,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "v48", target = "centreHarmonicVoltageContent48Cp95")
|
||||
@Mapping(source = "v49", target = "centreHarmonicVoltageContent49Cp95")
|
||||
@Mapping(source = "v50", target = "centreHarmonicVoltageContent50Cp95")
|
||||
public RMpInharmonicVRateReportD RMpInharmonicVRateReportDPOConverter95(DataInHarmRateVPO temp);
|
||||
public RMpInharmonicVRateReportD RMpInharmonicVRateReportDPOConverter95(DataInHarmRateV temp);
|
||||
|
||||
/*RMpInharmonicVRateReportDPO*/
|
||||
@Mapping(source = "p1", target = "centreHarmonicVoltageContent1Min")
|
||||
@@ -1348,7 +1348,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "p48", target = "centreHarmonicVoltageContent48Min")
|
||||
@Mapping(source = "p49", target = "centreHarmonicVoltageContent49Min")
|
||||
@Mapping(source = "p50", target = "centreHarmonicVoltageContent50Min")
|
||||
public RMpInharmonicVRateReportD RMpHarmonicPReportDPOConverterMin(DataHarmPowerPPO temp);
|
||||
public RMpInharmonicVRateReportD RMpHarmonicPReportDPOConverterMin(DataHarmPowerP temp);
|
||||
|
||||
@Mapping(source = "p1", target = "centreHarmonicVoltageContent1Max")
|
||||
@Mapping(source = "p2", target = "centreHarmonicVoltageContent2Max")
|
||||
@@ -1400,7 +1400,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "p48", target = "centreHarmonicVoltageContent48Max")
|
||||
@Mapping(source = "p49", target = "centreHarmonicVoltageContent49Max")
|
||||
@Mapping(source = "p50", target = "centreHarmonicVoltageContent50Max")
|
||||
public RMpInharmonicVRateReportD RMpHarmonicPReportDPOConverterMax(DataHarmPowerPPO temp);
|
||||
public RMpInharmonicVRateReportD RMpHarmonicPReportDPOConverterMax(DataHarmPowerP temp);
|
||||
|
||||
@Mapping(source = "p1", target = "centreHarmonicVoltageContent1Avg")
|
||||
@Mapping(source = "p2", target = "centreHarmonicVoltageContent2Avg")
|
||||
@@ -1452,7 +1452,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "p48", target = "centreHarmonicVoltageContent48Avg")
|
||||
@Mapping(source = "p49", target = "centreHarmonicVoltageContent49Avg")
|
||||
@Mapping(source = "p50", target = "centreHarmonicVoltageContent50Avg")
|
||||
public RMpInharmonicVRateReportD RMpHarmonicPReportDPOConverterAvg(DataHarmPowerPPO temp);
|
||||
public RMpInharmonicVRateReportD RMpHarmonicPReportDPOConverterAvg(DataHarmPowerP temp);
|
||||
|
||||
|
||||
@Mapping(source = "p1", target = "centreHarmonicVoltageContent1Cp95")
|
||||
@@ -1505,7 +1505,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "p48", target = "centreHarmonicVoltageContent48Cp95")
|
||||
@Mapping(source = "p49", target = "centreHarmonicVoltageContent49Cp95")
|
||||
@Mapping(source = "p50", target = "centreHarmonicVoltageContent50Cp95")
|
||||
public RMpInharmonicVRateReportD RMpHarmonicPReportDPOConverter95(DataHarmPowerPPO temp);
|
||||
public RMpInharmonicVRateReportD RMpHarmonicPReportDPOConverter95(DataHarmPowerP temp);
|
||||
|
||||
/*RMpMeasurePhaseReportDPO*/
|
||||
@Mapping(source = "max.rms", target = "phaseVoltageEffectiveMax")
|
||||
@@ -1518,7 +1518,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "max3.s", target = "spApparentPowerMax")
|
||||
@Mapping(source = "max2.pf", target = "spPowerFactorMax")
|
||||
@Mapping(source = "max2.df", target = "spFundamentalPowerFactorMax")
|
||||
public RMpMeasurePhaseReportD RMpMeasurePhaseReportDPOConverterMax(DataVPO max, DataIPO max1, DataHarmPowerPPO max2, DataHarmPowerSPO max3, DataHarmPowerQPO max4);
|
||||
public RMpMeasurePhaseReportD RMpMeasurePhaseReportDPOConverterMax(DataV max, DataI max1, DataHarmPowerP max2, DataHarmPowerS max3, DataHarmPowerQ max4);
|
||||
|
||||
@Mapping(source = "min.rms", target = "phaseVoltageEffectiveMin")
|
||||
@Mapping(source = "min.rmsLvr", target = "lineVoltageEffectiveMin")
|
||||
@@ -1530,7 +1530,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "min3.s", target = "spApparentPowerMin")
|
||||
@Mapping(source = "min2.pf", target = "spPowerFactorMin")
|
||||
@Mapping(source = "min2.df", target = "spFundamentalPowerFactorMin")
|
||||
public RMpMeasurePhaseReportD RMpMeasurePhaseReportDPOConverterMin(DataVPO min, DataIPO min1, DataHarmPowerPPO min2, DataHarmPowerSPO min3, DataHarmPowerQPO min4);
|
||||
public RMpMeasurePhaseReportD RMpMeasurePhaseReportDPOConverterMin(DataV min, DataI min1, DataHarmPowerP min2, DataHarmPowerS min3, DataHarmPowerQ min4);
|
||||
|
||||
|
||||
@Mapping(source = "avg.rms", target = "phaseVoltageEffectiveAvg")
|
||||
@@ -1543,7 +1543,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "avg3.s", target = "spApparentPowerAvg")
|
||||
@Mapping(source = "avg2.pf", target = "spPowerFactorAvg")
|
||||
@Mapping(source = "avg2.df", target = "spFundamentalPowerFactorAvg")
|
||||
public RMpMeasurePhaseReportD RMpMeasurePhaseReportDPOConverterAVg(DataVPO avg, DataIPO avg1, DataHarmPowerPPO avg2, DataHarmPowerSPO avg3, DataHarmPowerQPO avg4);
|
||||
public RMpMeasurePhaseReportD RMpMeasurePhaseReportDPOConverterAVg(DataV avg, DataI avg1, DataHarmPowerP avg2, DataHarmPowerS avg3, DataHarmPowerQ avg4);
|
||||
|
||||
|
||||
@Mapping(source = "cp95.rms", target = "phaseVoltageEffective95")
|
||||
@@ -1556,7 +1556,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "cp953.s", target = "spApparentPower95")
|
||||
@Mapping(source = "cp952.pf", target = "spPowerFactor95")
|
||||
@Mapping(source = "cp952.df", target = "spFundamentalPowerFactor95")
|
||||
public RMpMeasurePhaseReportD RMpMeasurePhaseReportDPOConverterCp95(DataVPO cp95, DataIPO cp951, DataHarmPowerPPO cp952, DataHarmPowerSPO cp953, DataHarmPowerQPO cp954);
|
||||
public RMpMeasurePhaseReportD RMpMeasurePhaseReportDPOConverterCp95(DataV cp95, DataI cp951, DataHarmPowerP cp952, DataHarmPowerS cp953, DataHarmPowerQ cp954);
|
||||
|
||||
|
||||
/*RMpMeasureReportDPO*/
|
||||
@@ -1575,7 +1575,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "max2.df", target = "fundamentalPowerFactorMax")
|
||||
@Mapping(source = "max4.q", target = "totalReactivePowerMax")
|
||||
@Mapping(source = "max3.s", target = "totalApparentPowerMax")
|
||||
public RMpMeasureReportD RMpMeasureReportDPOConverterMax(DataVPO max, DataIPO max1, DataHarmPowerPPO max2, DataHarmPowerSPO max3, DataHarmPowerQPO max4);
|
||||
public RMpMeasureReportD RMpMeasureReportDPOConverterMax(DataV max, DataI max1, DataHarmPowerP max2, DataHarmPowerS max3, DataHarmPowerQ max4);
|
||||
|
||||
@Mapping(source = "min.freq", target = "frequencyMin")
|
||||
@Mapping(source = "min.freqDev", target = "frequencyDeviationMin")
|
||||
@@ -1592,7 +1592,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "min2.df", target = "fundamentalPowerFactorMin")
|
||||
@Mapping(source = "min4.q", target = "totalReactivePowerMin")
|
||||
@Mapping(source = "min3.s", target = "totalApparentPowerMin")
|
||||
public RMpMeasureReportD RMpMeasureReportDPOConverterMin(DataVPO min, DataIPO min1, DataHarmPowerPPO min2, DataHarmPowerSPO min3, DataHarmPowerQPO min4);
|
||||
public RMpMeasureReportD RMpMeasureReportDPOConverterMin(DataV min, DataI min1, DataHarmPowerP min2, DataHarmPowerS min3, DataHarmPowerQ min4);
|
||||
|
||||
@Mapping(source = "avg.freq", target = "frequencyAvg")
|
||||
@Mapping(source = "avg.freqDev", target = "frequencyDeviationAvg")
|
||||
@@ -1609,7 +1609,7 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "avg2.df", target = "fundamentalPowerFactorAvg")
|
||||
@Mapping(source = "avg4.q", target = "totalReactivePowerAvg")
|
||||
@Mapping(source = "avg3.s", target = "totalApparentPowerAvg")
|
||||
public RMpMeasureReportD RMpMeasureReportDPOConverterAVg(DataVPO avg, DataIPO avg1, DataHarmPowerPPO avg2, DataHarmPowerSPO avg3, DataHarmPowerQPO avg4);
|
||||
public RMpMeasureReportD RMpMeasureReportDPOConverterAVg(DataV avg, DataI avg1, DataHarmPowerP avg2, DataHarmPowerS avg3, DataHarmPowerQ avg4);
|
||||
|
||||
@Mapping(source = "cp95.freq", target = "frequency95")
|
||||
@Mapping(source = "cp95.freqDev", target = "frequencyDeviation95")
|
||||
@@ -1626,5 +1626,5 @@ public interface InfluxdbPOConverter {
|
||||
@Mapping(source = "cp952.df", target = "fundamentalPowerFactor95")
|
||||
@Mapping(source = "cp954.q", target = "totalReactivePower95")
|
||||
@Mapping(source = "cp953.s", target = "totalApparentPower95")
|
||||
public RMpMeasureReportD RMpMeasureReportDPOConverterCp95(DataVPO cp95, DataIPO cp951, DataHarmPowerPPO cp952, DataHarmPowerSPO cp953, DataHarmPowerQPO cp954);
|
||||
public RMpMeasureReportD RMpMeasureReportDPOConverterCp95(DataV cp95, DataI cp951, DataHarmPowerP cp952, DataHarmPowerS cp953, DataHarmPowerQ cp954);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.njcn.prepare.harmonic.mapper.mysql.device;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.line.AlarmPO;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.line.AlarmStrategyVO;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.line.TopMsgPO;
|
||||
import com.njcn.prepare.harmonic.bo.TopMsgPO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.njcn.prepare.harmonic.service.influxdb;
|
||||
import com.njcn.device.pq.pojo.po.DataV;
|
||||
import com.njcn.prepare.harmonic.pojo.po.DataFlicker;
|
||||
import com.njcn.influx.pojo.po.DataFlicker;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ package com.njcn.prepare.harmonic.service.influxdb.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.njcn.device.pq.pojo.po.DataV;
|
||||
import com.njcn.influxdb.param.InfluxDBPublicParam;
|
||||
import com.njcn.influxdb.param.InfluxDBSqlConstant;
|
||||
import com.njcn.influxdb.param.InfluxDBTableConstant;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDBPublicParam;
|
||||
import com.njcn.influx.deprecated.InfluxDBSqlConstant;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.influx.pojo.constant.InfluxDBTableConstant;
|
||||
import com.njcn.prepare.harmonic.service.influxdb.DataExceptionInfluxService;
|
||||
import com.njcn.prepare.harmonic.utils.PublicUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -2,11 +2,11 @@ package com.njcn.prepare.harmonic.service.influxdb.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.njcn.device.pq.pojo.po.DataV;
|
||||
import com.njcn.influxdb.param.InfluxDBPublicParam;
|
||||
import com.njcn.influxdb.param.InfluxDBSqlConstant;
|
||||
import com.njcn.influxdb.param.InfluxDBTableConstant;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.prepare.harmonic.pojo.po.DataFlicker;
|
||||
import com.njcn.influx.deprecated.InfluxDBPublicParam;
|
||||
import com.njcn.influx.deprecated.InfluxDBSqlConstant;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.influx.pojo.constant.InfluxDBTableConstant;
|
||||
import com.njcn.influx.pojo.po.DataFlicker;
|
||||
import com.njcn.prepare.harmonic.service.influxdb.DataIntegrityRateInfluxService;
|
||||
import com.njcn.prepare.harmonic.utils.PublicUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -4,8 +4,8 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import com.google.common.base.Objects;
|
||||
import com.njcn.common.utils.NjcnBeanUtil;
|
||||
import com.njcn.device.pq.pojo.po.DataV;
|
||||
import com.njcn.influxdb.param.InfluxDBPublicParam;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDBPublicParam;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.prepare.harmonic.pojo.dto.DataVFiveItemDTO;
|
||||
import com.njcn.prepare.harmonic.service.influxdb.DataVInfluxdbService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
@@ -2,11 +2,11 @@ package com.njcn.prepare.harmonic.service.influxdb.impl;
|
||||
|
||||
import com.njcn.device.pms.api.MonitorClient;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.influxdb.param.InfluxDBPublicParam;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDBPublicParam;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.influx.pojo.po.DataI;
|
||||
import com.njcn.influx.pojo.po.DataV;
|
||||
import com.njcn.prepare.harmonic.pojo.dto.OverLimitFlagDTO;
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.DataIPO;
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.DataVPO;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.service.influxdb.RStatWorkOrderCreateService;
|
||||
import com.njcn.process.api.RStatWorkOrderFeignClient;
|
||||
@@ -50,7 +50,7 @@ public class RStatWorkOrderCreateServiceImpl implements RStatWorkOrderCreateServ
|
||||
lineIds.stream ().forEach (lineId->{
|
||||
|
||||
Overlimit overlimit = monitorClient.getOverLimitData(lineId).getData ();
|
||||
List<DataVPO> dataV = getDataV(lineId,startTime,endTime);
|
||||
List<DataV> dataV = getDataV(lineId,startTime,endTime);
|
||||
List<OverLimitFlagDTO> checkResultV = checkOverLimitV(dataV,overlimit);
|
||||
/*Datav3分钟一条数据连续4个小时越限说明OverLimitFlagDTO.overLimtFlag要连续80个是1才生成工单*/
|
||||
List<OverLimitFlagDTO> workOrderV = checkOverLimitFlag (checkResultV);
|
||||
@@ -61,7 +61,7 @@ public class RStatWorkOrderCreateServiceImpl implements RStatWorkOrderCreateServ
|
||||
result.setOverLimtType (DicDataEnum.VOLTAGE_LIMIT.getCode ());
|
||||
overLimitFlagDTOList.add (result);
|
||||
}
|
||||
List<DataIPO> dataI = getDataI(lineId,startTime,endTime);
|
||||
List<DataI> dataI = getDataI(lineId,startTime,endTime);
|
||||
List<OverLimitFlagDTO> checkResultI = checkOverLimitI(dataI,overlimit);
|
||||
List<OverLimitFlagDTO> workOrderI= checkOverLimitFlag (checkResultI);
|
||||
for (OverLimitFlagDTO overLimitFlagDTO : workOrderI) {
|
||||
@@ -82,7 +82,7 @@ public class RStatWorkOrderCreateServiceImpl implements RStatWorkOrderCreateServ
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/13
|
||||
*/
|
||||
private List<OverLimitFlagDTO> checkOverLimitI(List<DataIPO> dataI, Overlimit overlimit) {
|
||||
private List<OverLimitFlagDTO> checkOverLimitI(List<DataI> dataI, Overlimit overlimit) {
|
||||
List<OverLimitFlagDTO> result = new ArrayList<> ();
|
||||
dataI.stream ().forEach (datai ->{
|
||||
Integer temp = 0;
|
||||
@@ -145,7 +145,7 @@ public class RStatWorkOrderCreateServiceImpl implements RStatWorkOrderCreateServ
|
||||
* @Author: clam
|
||||
* @Date: 2023/2/13
|
||||
*/
|
||||
private List<OverLimitFlagDTO> checkOverLimitV(List<DataVPO> dataV, Overlimit overlimit) {
|
||||
private List<OverLimitFlagDTO> checkOverLimitV(List<DataV> dataV, Overlimit overlimit) {
|
||||
List<OverLimitFlagDTO> result = new ArrayList<> ();
|
||||
dataV.stream ().forEach (datav ->{
|
||||
Integer temp = 0;
|
||||
@@ -182,8 +182,8 @@ public class RStatWorkOrderCreateServiceImpl implements RStatWorkOrderCreateServ
|
||||
* @date 2022/5/10 14:56
|
||||
* @return List<DataV>
|
||||
*/
|
||||
public List<DataVPO> getDataV(String lineIndex, String startTime, String endTime){
|
||||
List<DataVPO> result = new ArrayList<> ();
|
||||
public List<DataV> getDataV(String lineIndex, String startTime, String endTime){
|
||||
List<DataV> result = new ArrayList<> ();
|
||||
|
||||
//CP95值
|
||||
StringBuilder stringBuilder7 = new StringBuilder();
|
||||
@@ -200,7 +200,7 @@ public class RStatWorkOrderCreateServiceImpl implements RStatWorkOrderCreateServ
|
||||
String sql4 = "select "+stringBuilder7+" from "+ InfluxDBPublicParam.DATA_V+" where "+stringBuilder8;
|
||||
QueryResult sqlResult4 = influxDbUtils.query(sql4);
|
||||
InfluxDBResultMapper resultMapper4 = new InfluxDBResultMapper();
|
||||
List<DataVPO> list4 = resultMapper4.toPOJO(sqlResult4, DataVPO.class);
|
||||
List<DataV> list4 = resultMapper4.toPOJO(sqlResult4, DataV.class);
|
||||
list4.forEach(item->{
|
||||
item.setValueType("CP95");
|
||||
});
|
||||
@@ -215,10 +215,10 @@ public class RStatWorkOrderCreateServiceImpl implements RStatWorkOrderCreateServ
|
||||
* @param startTime 起始时间
|
||||
* @param endTime 结束时间
|
||||
* @date 2022/5/10 14:56
|
||||
* @return List<DataIPO>
|
||||
* @return List<DataI>
|
||||
*/
|
||||
public List<DataIPO> getDataI(String lineIndex, String startTime, String endTime){
|
||||
List<DataIPO> result = new ArrayList<>();
|
||||
public List<DataI> getDataI(String lineIndex, String startTime, String endTime){
|
||||
List<DataI> result = new ArrayList<>();
|
||||
|
||||
//CP95值
|
||||
StringBuilder stringBuilder7 = new StringBuilder();
|
||||
@@ -234,7 +234,7 @@ public class RStatWorkOrderCreateServiceImpl implements RStatWorkOrderCreateServ
|
||||
String sql4 = "select "+stringBuilder7+" from "+ InfluxDBPublicParam.DATA_I+" where "+stringBuilder8;
|
||||
QueryResult sqlResult4 = influxDbUtils.query(sql4);
|
||||
InfluxDBResultMapper resultMapper4 = new InfluxDBResultMapper();
|
||||
List<DataIPO> list4 = resultMapper4.toPOJO(sqlResult4, DataIPO.class);
|
||||
List<DataI> list4 = resultMapper4.toPOJO(sqlResult4, DataI.class);
|
||||
list4.forEach(item->{
|
||||
item.setValueType("CP95");
|
||||
});
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.device;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.njcn.influxdb.param.InfluxDBPublicParam;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDBPublicParam;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.influx.pojo.po.PqsCommunicate;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.device.DeviceAbnormaStatisticsMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.Communicate;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.line.AlarmPO;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.line.AlarmStrategyVO;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.line.TopMsgPO;
|
||||
import com.njcn.prepare.harmonic.bo.TopMsgPO;
|
||||
import com.njcn.prepare.harmonic.pojo.param.DeviceAbnormaStatisticsParam;
|
||||
import com.njcn.prepare.harmonic.service.mysql.device.DeviceAbnormalStatisticsService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
@@ -18,12 +17,7 @@ import org.influxdb.dto.QueryResult;
|
||||
import org.influxdb.impl.InfluxDBResultMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.*;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -81,7 +75,7 @@ public class DeviceAbnormaStatisticsServiceImpl implements DeviceAbnormalStatist
|
||||
deviceFlowMap = deviceFlow.stream().collect(Collectors.groupingBy(AlarmPO::getDeviceId));
|
||||
}
|
||||
// 获取通信中断信息
|
||||
List<TopMsgPO> comMsgs = getCommunicate(devIds, param.getTime());
|
||||
List<TopMsgPO> comMsgs = getPqsCommunicate(devIds, param.getTime());
|
||||
if (CollectionUtil.isNotEmpty(comMsgs)) {
|
||||
comMap = comMsgs.stream().collect(Collectors.groupingBy(TopMsgPO::getDevId));
|
||||
}
|
||||
@@ -133,10 +127,10 @@ public class DeviceAbnormaStatisticsServiceImpl implements DeviceAbnormalStatist
|
||||
|
||||
if (comMap.containsKey(devEntry.getKey())) {
|
||||
TopMsgPO comOutPO = comMap.get(devEntry.getKey()).get(0);
|
||||
List<Communicate> abnormals = comOutPO.getCommunicates().stream().filter(t -> t.getDuration() > alarmStrategyVO.getOffTimeValue()).collect(Collectors.toList());
|
||||
List<PqsCommunicate> abnormals = comOutPO.getCommunicates().stream().filter(t -> t.getDuration() > alarmStrategyVO.getOffTimeValue()).collect(Collectors.toList());
|
||||
topMsg.setOfftimeFlag(abnormals.size() > 0 ? 0 :1);
|
||||
topMsg.setComOutCount(abnormals.size());
|
||||
List<String> abnormalDesc = abnormals.stream().map(Communicate::getDesc).collect(Collectors.toList());
|
||||
List<String> abnormalDesc = abnormals.stream().map(PqsCommunicate::getDesc).collect(Collectors.toList());
|
||||
topMsg.setComOutDescription(String.join(",",abnormalDesc));
|
||||
} else {
|
||||
topMsg.setOfftimeFlag(1);
|
||||
@@ -151,7 +145,7 @@ public class DeviceAbnormaStatisticsServiceImpl implements DeviceAbnormalStatist
|
||||
return topMsgPOS.size()>0 ? deviceAbnormaStatisticsMapper.insertTopMsg(topMsgPOS) : true;
|
||||
}
|
||||
|
||||
public List<TopMsgPO> getCommunicate(List<String> devs, String time) {
|
||||
public List<TopMsgPO> getPqsCommunicate(List<String> devs, String time) {
|
||||
// 组装sql语句
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("time >= '").append(DateUtil.beginOfDay(DateUtil.parse(time))).append("' and ").append("time <= '").append(DateUtil.endOfDay(DateUtil.parse(time))).append("' and ");
|
||||
@@ -166,40 +160,40 @@ public class DeviceAbnormaStatisticsServiceImpl implements DeviceAbnormalStatist
|
||||
// 获取暂降事件
|
||||
QueryResult result = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper influxDBResultMapper = new InfluxDBResultMapper();
|
||||
List<Communicate> communicates = influxDBResultMapper.toPOJO(result, Communicate.class);
|
||||
List<PqsCommunicate> communicates = influxDBResultMapper.toPOJO(result, PqsCommunicate.class);
|
||||
// 通讯状态统计结果集
|
||||
List<TopMsgPO> comMsgs = new ArrayList<>();
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
||||
Map<String, List<Communicate>> comMap = communicates.stream().collect(Collectors.groupingBy(Communicate::getDevId));
|
||||
Map<String, List<PqsCommunicate>> comMap = communicates.stream().collect(Collectors.groupingBy(PqsCommunicate::getDevId));
|
||||
if (CollectionUtil.isNotEmpty(comMap)) {
|
||||
for (Map.Entry<String, List<Communicate>> entry : comMap.entrySet()) {
|
||||
for (Map.Entry<String, List<PqsCommunicate>> entry : comMap.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
List<Communicate> value = entry.getValue();
|
||||
List<PqsCommunicate> value = entry.getValue();
|
||||
TopMsgPO topMsgPO = new TopMsgPO();
|
||||
List<Communicate> comOuts = new ArrayList<>();
|
||||
List<PqsCommunicate> comOuts = new ArrayList<>();
|
||||
topMsgPO.setDevId(key);
|
||||
// 根据日期排序
|
||||
List<Communicate> sortedList = value.stream().sorted(Comparator.comparing(Communicate::getUpdateTime)).collect(Collectors.toList());
|
||||
List<PqsCommunicate> sortedList = value.stream().sorted(Comparator.comparing(PqsCommunicate::getTime)).collect(Collectors.toList());
|
||||
if (sortedList.get(0).getType() == 1) {
|
||||
Communicate communicate = new Communicate();
|
||||
int durationTime = (int) (Date.from(sortedList.get(0).getUpdateTime()).getTime() - DateUtil.beginOfDay(DateUtil.parse(time)).getTime())/1000/60;
|
||||
PqsCommunicate communicate = new PqsCommunicate();
|
||||
int durationTime = (int) (Date.from(sortedList.get(0).getTime()).getTime() - DateUtil.beginOfDay(DateUtil.parse(time)).getTime())/1000/60;
|
||||
communicate.setDuration(durationTime);
|
||||
communicate.setDesc((DateUtil.beginOfDay(DateUtil.parse(time))) + "至" + formatter.format(Date.from(sortedList.get(0).getUpdateTime())));
|
||||
communicate.setDesc((DateUtil.beginOfDay(DateUtil.parse(time))) + "至" + formatter.format(Date.from(sortedList.get(0).getTime())));
|
||||
comOuts.add(communicate);
|
||||
}
|
||||
for (int i = 0; i < sortedList.size(); i++) {
|
||||
if (sortedList.get(i).getType() == 0 && i < sortedList.size() - 1) {
|
||||
Communicate communicate = new Communicate();
|
||||
int durationTime = (int) (Date.from(sortedList.get(i + 1).getUpdateTime()).getTime() - Date.from(sortedList.get(i).getUpdateTime()).getTime())/1000/60;
|
||||
PqsCommunicate communicate = new PqsCommunicate();
|
||||
int durationTime = (int) (Date.from(sortedList.get(i + 1).getTime()).getTime() - Date.from(sortedList.get(i).getTime()).getTime())/1000/60;
|
||||
communicate.setDuration(durationTime);
|
||||
String comOut = formatter.format(Date.from(sortedList.get(i).getUpdateTime())) + "至" + formatter.format(Date.from(sortedList.get(i + 1).getUpdateTime()));
|
||||
String comOut = formatter.format(Date.from(sortedList.get(i).getTime())) + "至" + formatter.format(Date.from(sortedList.get(i + 1).getTime()));
|
||||
communicate.setDesc(comOut);
|
||||
comOuts.add(communicate);
|
||||
} else if (sortedList.get(i).getType() == 0 && i == sortedList.size() - 1) {
|
||||
Communicate communicate = new Communicate();
|
||||
int durationTime = (int) (DateUtil.endOfDay(DateUtil.parse(time)).getTime() - Date.from(sortedList.get(i).getUpdateTime()).getTime()) / 1000 / 60;
|
||||
PqsCommunicate communicate = new PqsCommunicate();
|
||||
int durationTime = (int) (DateUtil.endOfDay(DateUtil.parse(time)).getTime() - Date.from(sortedList.get(i).getTime()).getTime()) / 1000 / 60;
|
||||
communicate.setDuration(durationTime);
|
||||
String comOut = formatter.format(Date.from(sortedList.get(i).getUpdateTime())) + "至" + DateUtil.endOfDay(DateUtil.parse(time));
|
||||
String comOut = formatter.format(Date.from(sortedList.get(i).getTime())) + "至" + DateUtil.endOfDay(DateUtil.parse(time));
|
||||
communicate.setDesc(comOut);
|
||||
comOuts.add(communicate);
|
||||
}
|
||||
@@ -215,7 +209,7 @@ public class DeviceAbnormaStatisticsServiceImpl implements DeviceAbnormalStatist
|
||||
if (CollectionUtil.isNotEmpty(extraComs)) {
|
||||
for (String devId : extraComs) {
|
||||
TopMsgPO topMsgPO = new TopMsgPO();
|
||||
List<Communicate> comOuts = new ArrayList<>();
|
||||
List<PqsCommunicate> comOuts = new ArrayList<>();
|
||||
topMsgPO.setDevId(devId);
|
||||
// 组装sql语句
|
||||
StringBuilder builder = new StringBuilder();
|
||||
@@ -225,16 +219,16 @@ public class DeviceAbnormaStatisticsServiceImpl implements DeviceAbnormalStatist
|
||||
// 获取暂降事件
|
||||
QueryResult result1 = influxDbUtils.query(sql1);
|
||||
InfluxDBResultMapper influxDBResultMapper1 = new InfluxDBResultMapper();
|
||||
List<Communicate> earlyData = influxDBResultMapper1.toPOJO(result1, Communicate.class);
|
||||
List<PqsCommunicate> earlyData = influxDBResultMapper1.toPOJO(result1, PqsCommunicate.class);
|
||||
if (earlyData.size()==0){
|
||||
continue;
|
||||
}
|
||||
Communicate early = earlyData.get(0);
|
||||
Communicate communicate = new Communicate();
|
||||
PqsCommunicate early = earlyData.get(0);
|
||||
PqsCommunicate communicate = new PqsCommunicate();
|
||||
if (early.getType() == 0) {
|
||||
int durationTime = (int) (DateUtil.endOfDay(DateUtil.parse(time)).getTime() - Date.from(early.getUpdateTime()).getTime()) / 1000 / 60;
|
||||
int durationTime = (int) (DateUtil.endOfDay(DateUtil.parse(time)).getTime() - Date.from(early.getTime()).getTime()) / 1000 / 60;
|
||||
communicate.setDuration(durationTime);
|
||||
communicate.setDesc(formatter.format(Date.from(early.getUpdateTime())) + "至" + DateUtil.endOfDay(DateUtil.parse(time)));
|
||||
communicate.setDesc(formatter.format(Date.from(early.getTime())) + "至" + DateUtil.endOfDay(DateUtil.parse(time)));
|
||||
comOuts.add(communicate);
|
||||
}
|
||||
topMsgPO.setCommunicates(comOuts);
|
||||
|
||||
@@ -9,12 +9,11 @@ import com.njcn.device.pms.pojo.po.DistributionMonitor;
|
||||
import com.njcn.device.pms.pojo.po.Monitor;
|
||||
import com.njcn.device.pq.pojo.po.DataV;
|
||||
import com.njcn.device.pq.pojo.po.RMpIntegrityD;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.pojo.po.DataFlicker;
|
||||
import com.njcn.prepare.harmonic.constant.AlgorithmParam;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.line.RMpIntegrityDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.oracle.PqLinedetailPO;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.pojo.po.DataFlicker;
|
||||
import com.njcn.prepare.harmonic.pojo.vo.DataFlickerOracleVO;
|
||||
import com.njcn.prepare.harmonic.pojo.vo.DataVOracleVO;
|
||||
import com.njcn.prepare.harmonic.service.influxdb.DataIntegrityRateInfluxService;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5,10 +5,10 @@ import cn.hutool.core.date.LocalDateTimeUtil;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.harmonic.pojo.po.RMpVThd;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.influx.pojo.po.DataV;
|
||||
import com.njcn.prepare.harmonic.constant.AlgorithmParam;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.line.RMpVThdMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.DataVPO;
|
||||
import com.njcn.prepare.harmonic.pojo.oracle.PqLinedetailPO;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.service.mysql.line.DistortionRateService;
|
||||
@@ -59,7 +59,7 @@ public class DistortionRateServiceImpl implements DistortionRateService {
|
||||
}
|
||||
LocalDateTime local = LocalDateTimeUtil.parse (lineParam.getDataDate () + "T00:00:00");
|
||||
for (String lineId : lineIdOutList) {
|
||||
List<DataVPO> rateOut = getDistortionRateInfluxDb (lineId, lineParam.getDataDate());
|
||||
List<DataV> rateOut = getDistortionRateInfluxDb (lineId, lineParam.getDataDate());
|
||||
if (rateOut.size ( ) > 0) {
|
||||
Map<String, Object> inMap = new HashMap<> ( );
|
||||
inMap.put ("lineId", lineId);
|
||||
@@ -72,11 +72,11 @@ public class DistortionRateServiceImpl implements DistortionRateService {
|
||||
}
|
||||
|
||||
|
||||
private List<DataVPO> getDistortionRateInfluxDb(String lineId, String date) {
|
||||
private List<DataV> getDistortionRateInfluxDb(String lineId, String date) {
|
||||
String processParam = " and line_id = '" + lineId + "' and time >= '" + date + " 00:00:00' and time <= '" + date + " 23:59:59' tz('Asia/Shanghai')";
|
||||
QueryResult result = influxDbUtils.query ("SELECT line_id, max(v_thd) as v_thd FROM data_v WHERE phasic_type != 'T' and value_type = 'CP95'" + processParam);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper ( );
|
||||
return resultMapper.toPOJO (result, DataVPO.class);
|
||||
return resultMapper.toPOJO (result, DataV.class);
|
||||
}
|
||||
|
||||
private List<Overlimit> getAllLineOutData() {
|
||||
|
||||
@@ -6,10 +6,10 @@ import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatComassesDPO;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.influx.pojo.po.DataFlicker;
|
||||
import com.njcn.influx.pojo.po.DataV;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatComassesDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.DataFlickerPO;
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.DataVPO;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.service.mysql.line.HarmonicGeneralService;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -145,11 +145,11 @@ public class HarmonicGeneralServiceImpl extends MppServiceImpl<RStatComassesDMap
|
||||
QueryResult vuDevResult3 = influxDbUtils.query(vuDevSql + "vu_dev <7 and vu_dev >=4" + processParam);
|
||||
QueryResult vuDevResult4 = influxDbUtils.query(vuDevSql + "vu_dev <4 and vu_dev >=2" + processParam);
|
||||
QueryResult vuDevResult5 = influxDbUtils.query(vuDevSql + "vu_dev <2 and vu_dev >=0" + processParam);
|
||||
BigDecimal vuDev1 = BigDecimal.valueOf(mapper.toPOJO(vuDevResult1, DataVPO.class).size());
|
||||
BigDecimal vuDev2 = BigDecimal.valueOf(mapper.toPOJO(vuDevResult2, DataVPO.class).size());
|
||||
BigDecimal vuDev3 = BigDecimal.valueOf(mapper.toPOJO(vuDevResult3, DataVPO.class).size());
|
||||
BigDecimal vuDev4 = BigDecimal.valueOf(mapper.toPOJO(vuDevResult4, DataVPO.class).size());
|
||||
BigDecimal vuDev5 = BigDecimal.valueOf(mapper.toPOJO(vuDevResult5, DataVPO.class).size());
|
||||
BigDecimal vuDev1 = BigDecimal.valueOf(mapper.toPOJO(vuDevResult1, DataV.class).size());
|
||||
BigDecimal vuDev2 = BigDecimal.valueOf(mapper.toPOJO(vuDevResult2, DataV.class).size());
|
||||
BigDecimal vuDev3 = BigDecimal.valueOf(mapper.toPOJO(vuDevResult3, DataV.class).size());
|
||||
BigDecimal vuDev4 = BigDecimal.valueOf(mapper.toPOJO(vuDevResult4, DataV.class).size());
|
||||
BigDecimal vuDev5 = BigDecimal.valueOf(mapper.toPOJO(vuDevResult5, DataV.class).size());
|
||||
BigDecimal vuDevAll = vuDev1.add(vuDev2).add(vuDev3).add(vuDev4).add(vuDev5);
|
||||
if (vuDevAll.compareTo(BigDecimal.ZERO)!=0){
|
||||
outMap.put("vu_dev1",vuDev1.multiply(hundred).divide(vuDevAll,3, RoundingMode.HALF_UP));
|
||||
@@ -165,11 +165,11 @@ public class HarmonicGeneralServiceImpl extends MppServiceImpl<RStatComassesDMap
|
||||
QueryResult freqDevResult3 = influxDbUtils.query(freqDevSql + "freq_dev <0.2 and freq_dev >=0.1" + processParam);
|
||||
QueryResult freqDevResult4 = influxDbUtils.query(freqDevSql + "freq_dev <0.1 and freq_dev >=0.05" + processParam);
|
||||
QueryResult freqDevResult5 = influxDbUtils.query(freqDevSql + "freq_dev <0.05 and freq_dev >=0" + processParam);
|
||||
BigDecimal freqDev1 = BigDecimal.valueOf(mapper.toPOJO(freqDevResult1, DataVPO.class).size());
|
||||
BigDecimal freqDev2 = BigDecimal.valueOf(mapper.toPOJO(freqDevResult2, DataVPO.class).size());
|
||||
BigDecimal freqDev3 = BigDecimal.valueOf(mapper.toPOJO(freqDevResult3, DataVPO.class).size());
|
||||
BigDecimal freqDev4 = BigDecimal.valueOf(mapper.toPOJO(freqDevResult4, DataVPO.class).size());
|
||||
BigDecimal freqDev5 = BigDecimal.valueOf(mapper.toPOJO(freqDevResult5, DataVPO.class).size());
|
||||
BigDecimal freqDev1 = BigDecimal.valueOf(mapper.toPOJO(freqDevResult1, DataV.class).size());
|
||||
BigDecimal freqDev2 = BigDecimal.valueOf(mapper.toPOJO(freqDevResult2, DataV.class).size());
|
||||
BigDecimal freqDev3 = BigDecimal.valueOf(mapper.toPOJO(freqDevResult3, DataV.class).size());
|
||||
BigDecimal freqDev4 = BigDecimal.valueOf(mapper.toPOJO(freqDevResult4, DataV.class).size());
|
||||
BigDecimal freqDev5 = BigDecimal.valueOf(mapper.toPOJO(freqDevResult5, DataV.class).size());
|
||||
BigDecimal freqDevAll = freqDev1.add(freqDev2).add(freqDev3).add(freqDev4).add(freqDev5);
|
||||
if (freqDevAll.compareTo(BigDecimal.ZERO)!=0){
|
||||
outMap.put("freq_dev1",freqDev1.multiply(hundred).divide(freqDevAll,3, RoundingMode.HALF_UP));
|
||||
@@ -185,11 +185,11 @@ public class HarmonicGeneralServiceImpl extends MppServiceImpl<RStatComassesDMap
|
||||
QueryResult vThdResult3 = influxDbUtils.query(vThdSql + "v_thd <4 and v_thd >=2" + processParam);
|
||||
QueryResult vThdResult4 = influxDbUtils.query(vThdSql + "v_thd <2 and v_thd >=1" + processParam);
|
||||
QueryResult vThdResult5 = influxDbUtils.query(vThdSql + "v_thd <1 and v_thd >=0" + processParam);
|
||||
BigDecimal vThd1 = BigDecimal.valueOf(mapper.toPOJO(vThdResult1, DataVPO.class).size());
|
||||
BigDecimal vThd2 = BigDecimal.valueOf(mapper.toPOJO(vThdResult2, DataVPO.class).size());
|
||||
BigDecimal vThd3 = BigDecimal.valueOf(mapper.toPOJO(vThdResult3, DataVPO.class).size());
|
||||
BigDecimal vThd4 = BigDecimal.valueOf(mapper.toPOJO(vThdResult4, DataVPO.class).size());
|
||||
BigDecimal vThd5 = BigDecimal.valueOf(mapper.toPOJO(vThdResult5, DataVPO.class).size());
|
||||
BigDecimal vThd1 = BigDecimal.valueOf(mapper.toPOJO(vThdResult1, DataV.class).size());
|
||||
BigDecimal vThd2 = BigDecimal.valueOf(mapper.toPOJO(vThdResult2, DataV.class).size());
|
||||
BigDecimal vThd3 = BigDecimal.valueOf(mapper.toPOJO(vThdResult3, DataV.class).size());
|
||||
BigDecimal vThd4 = BigDecimal.valueOf(mapper.toPOJO(vThdResult4, DataV.class).size());
|
||||
BigDecimal vThd5 = BigDecimal.valueOf(mapper.toPOJO(vThdResult5, DataV.class).size());
|
||||
BigDecimal vThdAll = vThd1.add(vThd2).add(vThd3).add(vThd4).add(vThd5);
|
||||
if (vThdAll.compareTo(BigDecimal.ZERO)!=0){
|
||||
outMap.put("v_thd1",vThd1.multiply(hundred).divide(vThdAll,3, RoundingMode.HALF_UP));
|
||||
@@ -205,11 +205,11 @@ public class HarmonicGeneralServiceImpl extends MppServiceImpl<RStatComassesDMap
|
||||
QueryResult vUnbalanceResult3 = influxDbUtils.query(vUnbalanceSql + "v_unbalance <2 and v_unbalance >=1" + processParam);
|
||||
QueryResult vUnbalanceResult4 = influxDbUtils.query(vUnbalanceSql + "v_unbalance <1 and v_unbalance >=0.5" + processParam);
|
||||
QueryResult vUnbalanceResult5 = influxDbUtils.query(vUnbalanceSql + "v_unbalance <0.5 and v_unbalance >=0" + processParam);
|
||||
BigDecimal vUnbalance1 = BigDecimal.valueOf(mapper.toPOJO(vUnbalanceResult1, DataVPO.class).size());
|
||||
BigDecimal vUnbalance2 = BigDecimal.valueOf(mapper.toPOJO(vUnbalanceResult2, DataVPO.class).size());
|
||||
BigDecimal vUnbalance3 = BigDecimal.valueOf(mapper.toPOJO(vUnbalanceResult3, DataVPO.class).size());
|
||||
BigDecimal vUnbalance4 = BigDecimal.valueOf(mapper.toPOJO(vUnbalanceResult4, DataVPO.class).size());
|
||||
BigDecimal vUnbalance5 = BigDecimal.valueOf(mapper.toPOJO(vUnbalanceResult5, DataVPO.class).size());
|
||||
BigDecimal vUnbalance1 = BigDecimal.valueOf(mapper.toPOJO(vUnbalanceResult1, DataV.class).size());
|
||||
BigDecimal vUnbalance2 = BigDecimal.valueOf(mapper.toPOJO(vUnbalanceResult2, DataV.class).size());
|
||||
BigDecimal vUnbalance3 = BigDecimal.valueOf(mapper.toPOJO(vUnbalanceResult3, DataV.class).size());
|
||||
BigDecimal vUnbalance4 = BigDecimal.valueOf(mapper.toPOJO(vUnbalanceResult4, DataV.class).size());
|
||||
BigDecimal vUnbalance5 = BigDecimal.valueOf(mapper.toPOJO(vUnbalanceResult5, DataV.class).size());
|
||||
BigDecimal vUnbalanceAll = vUnbalance1.add(vUnbalance2).add(vUnbalance3).add(vUnbalance4).add(vUnbalance5);
|
||||
if (vUnbalanceAll.compareTo(BigDecimal.ZERO)!=0){
|
||||
outMap.put("v_unbalance1",vUnbalance1.multiply(hundred).divide(vUnbalanceAll,3, RoundingMode.HALF_UP));
|
||||
@@ -225,11 +225,11 @@ public class HarmonicGeneralServiceImpl extends MppServiceImpl<RStatComassesDMap
|
||||
QueryResult pstResult3 = influxDbUtils.query(pstSql + "pst <0.6 and pst >=0.4" + processParam);
|
||||
QueryResult pstResult4 = influxDbUtils.query(pstSql + "pst <0.4 and pst >=0.2" + processParam);
|
||||
QueryResult pstResult5 = influxDbUtils.query(pstSql + "pst <0.2 and pst >=0" + processParam);
|
||||
BigDecimal pst1 = BigDecimal.valueOf(mapper.toPOJO(pstResult1, DataFlickerPO.class).size());
|
||||
BigDecimal pst2 = BigDecimal.valueOf(mapper.toPOJO(pstResult2, DataFlickerPO.class).size());
|
||||
BigDecimal pst3 = BigDecimal.valueOf(mapper.toPOJO(pstResult3, DataFlickerPO.class).size());
|
||||
BigDecimal pst4 = BigDecimal.valueOf(mapper.toPOJO(pstResult4, DataFlickerPO.class).size());
|
||||
BigDecimal pst5 = BigDecimal.valueOf(mapper.toPOJO(pstResult5, DataFlickerPO.class).size());
|
||||
BigDecimal pst1 = BigDecimal.valueOf(mapper.toPOJO(pstResult1, DataFlicker.class).size());
|
||||
BigDecimal pst2 = BigDecimal.valueOf(mapper.toPOJO(pstResult2, DataFlicker.class).size());
|
||||
BigDecimal pst3 = BigDecimal.valueOf(mapper.toPOJO(pstResult3, DataFlicker.class).size());
|
||||
BigDecimal pst4 = BigDecimal.valueOf(mapper.toPOJO(pstResult4, DataFlicker.class).size());
|
||||
BigDecimal pst5 = BigDecimal.valueOf(mapper.toPOJO(pstResult5, DataFlicker.class).size());
|
||||
BigDecimal pstAll = pst1.add(pst2).add(pst3).add(pst4).add(pst5);
|
||||
if (pstAll.compareTo(BigDecimal.ZERO)!=0){
|
||||
outMap.put("data_plt1",pst1.multiply(hundred).divide(pstAll,3, RoundingMode.HALF_UP));
|
||||
|
||||
@@ -2,16 +2,15 @@ package com.njcn.prepare.harmonic.service.mysql.Impl.line;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatAssesDPO;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.influx.pojo.po.DataPlt;
|
||||
import com.njcn.influx.pojo.po.DataV;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatAssesDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.DataPltPO;
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.DataVPO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.line.HarmonicMetricService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -105,16 +104,16 @@ public class HarmonicMetricServiceImpl extends MppServiceImpl<RStatAssesDMapper,
|
||||
QueryResult vUnResult = influxDbUtils.query("select mean(v_unbalance) from data_v where phasic_type = 'T' and value_type = 'CP95'"+processParam);
|
||||
QueryResult pltResult = influxDbUtils.query("select mean(plt) from data_plt where phasic_type != 'T'"+processParam);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DataVPO> vuDev = resultMapper.toPOJO(vuDevResult, DataVPO.class);
|
||||
List<DataVPO> vThd = resultMapper.toPOJO(vThdResult, DataVPO.class);
|
||||
List<DataVPO> freqDev = resultMapper.toPOJO(freqDevResult, DataVPO.class);
|
||||
List<DataVPO> vUn = resultMapper.toPOJO(vUnResult, DataVPO.class);
|
||||
List<DataPltPO> plt = resultMapper.toPOJO(pltResult, DataPltPO.class);
|
||||
List<DataV> vuDev = resultMapper.toPOJO(vuDevResult, DataV.class);
|
||||
List<DataV> vThd = resultMapper.toPOJO(vThdResult, DataV.class);
|
||||
List<DataV> freqDev = resultMapper.toPOJO(freqDevResult, DataV.class);
|
||||
List<DataV> vUn = resultMapper.toPOJO(vUnResult, DataV.class);
|
||||
List<DataPlt> plt = resultMapper.toPOJO(pltResult, DataPlt.class);
|
||||
Map<String, Object> outMap = new HashMap<>();
|
||||
if(CollUtil.isNotEmpty(vuDev) || CollUtil.isNotEmpty(vThd) || CollUtil.isNotEmpty(freqDev) || CollUtil.isNotEmpty(vUn) || CollUtil.isNotEmpty(plt)){
|
||||
outMap.put("vu_dev",(vuDev.size()>0)?vuDev.stream().collect(Collectors.averagingDouble(DataVPO::getVuDev)):0.0);
|
||||
outMap.put("vu_dev",(vuDev.size()>0)?vuDev.stream().collect(Collectors.averagingDouble(DataV::getVuDev)):0.0);
|
||||
outMap.put("v_thd_cp95",(vThd.size()>0)?vThd.get(0).getMean():0.0);
|
||||
outMap.put("freq_dev",(freqDev.size()>0)?freqDev.stream().collect(Collectors.averagingDouble(DataVPO::getFreqDev)):0.0);
|
||||
outMap.put("freq_dev",(freqDev.size()>0)?freqDev.stream().collect(Collectors.averagingDouble(DataV::getFreqDev)):0.0);
|
||||
outMap.put("v_unbalance_cp95",(vUn.size()>0)?vUn.get(0).getMean():0.0);
|
||||
outMap.put("data_plt",(plt.size()>0)?plt.get(0).getMean():0.0);
|
||||
}
|
||||
|
||||
@@ -1,29 +1,23 @@
|
||||
package com.njcn.prepare.harmonic.service.mysql.Impl.line;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.common.pojo.enums.common.ServerEnum;
|
||||
import com.njcn.device.biz.commApi.CommTerminalGeneralClient;
|
||||
import com.njcn.device.biz.pojo.dto.DeptGetChildrenMoreDTO;
|
||||
import com.njcn.device.biz.pojo.dto.LineDevGetDTO;
|
||||
import com.njcn.device.biz.pojo.param.DeptGetLineParam;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.pojo.po.LineDetail;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.device.pq.pojo.po.RStatIntegrityD;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDBPublicParam;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.influx.pojo.po.DataV;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatIntegrityDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.DataVPO;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.service.mysql.line.IntegrityService;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.influxdb.InfluxDB;
|
||||
import org.influxdb.dto.BatchPoints;
|
||||
import org.influxdb.dto.Point;
|
||||
import org.influxdb.dto.QueryResult;
|
||||
import org.influxdb.impl.InfluxDBResultMapper;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
@@ -33,10 +27,7 @@ import org.springframework.util.CollectionUtils;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.njcn.influxdb.param.InfluxDBPublicParam.DAY_MINUTE;
|
||||
|
||||
/**
|
||||
* 数据完整性统计
|
||||
@@ -116,7 +107,7 @@ public class IntegrityServiceImpl extends MppServiceImpl<RStatIntegrityDMapper,
|
||||
RStatIntegrityD integrityDpo = new RStatIntegrityD();
|
||||
integrityDpo.setTimeId(dateTime);
|
||||
integrityDpo.setLineIndex(lineDetail.getPointId());
|
||||
integrityDpo.setDueTime(DAY_MINUTE/lineDetail.getInterval());
|
||||
integrityDpo.setDueTime(InfluxDBPublicParam.DAY_MINUTE/lineDetail.getInterval());
|
||||
integrityDpo.setRealTime(dataCount);
|
||||
list.add(integrityDpo);
|
||||
}
|
||||
@@ -126,7 +117,7 @@ public class IntegrityServiceImpl extends MppServiceImpl<RStatIntegrityDMapper,
|
||||
private int getDataCount(String lineId,String startTime,String endTime){
|
||||
QueryResult sqlResult = influxDbUtils.query("SELECT * FROM data_v WHERE time >= '" + startTime + "' and time <= '" + endTime + "' and line_id = '" + lineId + "' and phasic_type = 'T' and value_type = 'MAX' tz('Asia/Shanghai')");
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DataVPO> list = resultMapper.toPOJO(sqlResult, DataVPO.class);
|
||||
List<DataV> list = resultMapper.toPOJO(sqlResult, DataV.class);
|
||||
if (CollectionUtils.isEmpty(list)){
|
||||
return 0;
|
||||
} else {
|
||||
|
||||
@@ -8,10 +8,10 @@ import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.harmonic.pojo.po.LimitRate;
|
||||
import com.njcn.harmonic.pojo.po.LimitRatePO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||
import com.njcn.influxdb.param.InfluxDBPublicParam;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDBPublicParam;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.influx.pojo.po.*;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.line.LimitRatePOMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.*;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatLimitRateDService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
@@ -79,17 +79,17 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
continue;
|
||||
}
|
||||
// influxDbUtils.setDbName ("pqsbase");
|
||||
List<DataVPO> map1 = getAllTime(lineIndex,startTime,endTime);
|
||||
List<DataPltPO> map2 = getFlickerAllTime(lineIndex,startTime,endTime);
|
||||
List<DataHarmRateVPO> map3 = getDataHarmRateV(lineIndex,startTime,endTime);
|
||||
List<DataIPO> map4 = getDataI(lineIndex,startTime,endTime);
|
||||
List<DataInHarmVPO> map5 = getDataInHarmV(lineIndex,startTime,endTime);
|
||||
List<DataVPO> map6 = getDataV(lineIndex,startTime,endTime);
|
||||
List<DataVPO> map7 = getDataVUnbalance(lineIndex,startTime,endTime);
|
||||
List<DataIPO> map8 = getDataINeg(lineIndex,startTime,endTime);
|
||||
List<DataVPO> map9 = getDataVFreq(lineIndex,startTime,endTime);
|
||||
List<DataVPO> map10 = getDataVDev(lineIndex,startTime,endTime);
|
||||
List<DataPltPO> map11 = getDataPlt(lineIndex,startTime,endTime);
|
||||
List<DataV> map1 = getAllTime(lineIndex,startTime,endTime);
|
||||
List<DataPlt> map2 = getFlickerAllTime(lineIndex,startTime,endTime);
|
||||
List<DataHarmRateV> map3 = getDataHarmRateV(lineIndex,startTime,endTime);
|
||||
List<DataI> map4 = getDataI(lineIndex,startTime,endTime);
|
||||
List<DataInHarmV> map5 = getDataInHarmV(lineIndex,startTime,endTime);
|
||||
List<DataV> map6 = getDataV(lineIndex,startTime,endTime);
|
||||
List<DataV> map7 = getDataVUnbalance(lineIndex,startTime,endTime);
|
||||
List<DataI> map8 = getDataINeg(lineIndex,startTime,endTime);
|
||||
List<DataV> map9 = getDataVFreq(lineIndex,startTime,endTime);
|
||||
List<DataV> map10 = getDataVDev(lineIndex,startTime,endTime);
|
||||
List<DataPlt> map11 = getDataPlt(lineIndex,startTime,endTime);
|
||||
|
||||
List<LimitRate> result = getData(overlimit,map1,map2,map3,map4,map5,map6,map7,map8,map9,map10,map11);
|
||||
limitRateList.addAll (result);
|
||||
@@ -129,17 +129,17 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
if(!Optional.ofNullable (overlimit).isPresent ()){
|
||||
continue;
|
||||
}
|
||||
List<DataVPO> map1 = getAllTime(lineIndex,startTime,endTime);
|
||||
List<DataPltPO> map2 = getFlickerAllTime(lineIndex,startTime,endTime);
|
||||
List<DataHarmRateVPO> map3 = getDataHarmRateV(lineIndex,startTime,endTime);
|
||||
List<DataIPO> map4 = getDataI(lineIndex,startTime,endTime);
|
||||
List<DataInHarmVPO> map5 = getDataInHarmV(lineIndex,startTime,endTime);
|
||||
List<DataVPO> map6 = getDataV(lineIndex,startTime,endTime);
|
||||
List<DataVPO> map7 = getDataVUnbalance(lineIndex,startTime,endTime);
|
||||
List<DataIPO> map8 = getDataINeg(lineIndex,startTime,endTime);
|
||||
List<DataVPO> map9 = getDataVFreq(lineIndex,startTime,endTime);
|
||||
List<DataVPO> map10 = getDataVDev(lineIndex,startTime,endTime);
|
||||
List<DataPltPO> map11 = getDataPlt(lineIndex,startTime,endTime);
|
||||
List<DataV> map1 = getAllTime(lineIndex,startTime,endTime);
|
||||
List<DataPlt> map2 = getFlickerAllTime(lineIndex,startTime,endTime);
|
||||
List<DataHarmRateV> map3 = getDataHarmRateV(lineIndex,startTime,endTime);
|
||||
List<DataI> map4 = getDataI(lineIndex,startTime,endTime);
|
||||
List<DataInHarmV> map5 = getDataInHarmV(lineIndex,startTime,endTime);
|
||||
List<DataV> map6 = getDataV(lineIndex,startTime,endTime);
|
||||
List<DataV> map7 = getDataVUnbalance(lineIndex,startTime,endTime);
|
||||
List<DataI> map8 = getDataINeg(lineIndex,startTime,endTime);
|
||||
List<DataV> map9 = getDataVFreq(lineIndex,startTime,endTime);
|
||||
List<DataV> map10 = getDataVDev(lineIndex,startTime,endTime);
|
||||
List<DataPlt> map11 = getDataPlt(lineIndex,startTime,endTime);
|
||||
|
||||
List<LimitRate> result = getData(overlimit,map1,map2,map3,map4,map5,map6,map7,map8,map9,map10,map11);
|
||||
limitRateList.addAll (result);
|
||||
@@ -171,7 +171,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
* @return
|
||||
* @date 2022/5/23 10:51
|
||||
*/
|
||||
public List<DataVPO> getAllTime(String lineIndex, String startTime, String endTime) {
|
||||
public List<DataV> getAllTime(String lineIndex, String startTime, String endTime) {
|
||||
StringBuilder stringBuilder = new StringBuilder ( );
|
||||
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").append (startTime).
|
||||
append ("' and ").append (InfluxDBPublicParam.TIME).
|
||||
@@ -181,7 +181,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
String sql = "SELECT count(freq) AS all_time FROM " + InfluxDBPublicParam.DATA_V + " where " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query (sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper ( );
|
||||
List<DataVPO> list = resultMapper.toPOJO (sqlResult, DataVPO.class);
|
||||
List<DataV> list = resultMapper.toPOJO (sqlResult, DataV.class);
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -190,11 +190,11 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
/**
|
||||
* @Description: getFlickerAllTime
|
||||
* @Param: [lineIndex, startTime, endTime]
|
||||
* @return: java.util.Map<java.lang.String, java.util.List < com.njcn.prepare.harmonic.preprocessing.pojo.vo.DataPltPO>>
|
||||
* @return: java.util.Map<java.lang.String, java.util.List < com.njcn.prepare.harmonic.preprocessing.pojo.vo.DataPlt>>
|
||||
* @Author: clam
|
||||
* @Date: 2022/10/18
|
||||
*/
|
||||
public List<DataPltPO> getFlickerAllTime(String lineIndex, String startTime, String endTime) {
|
||||
public List<DataPlt> getFlickerAllTime(String lineIndex, String startTime, String endTime) {
|
||||
StringBuilder stringBuilder = new StringBuilder ( );
|
||||
|
||||
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").
|
||||
@@ -205,7 +205,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
String sql = "SELECT count(plt) AS flicker_all_time FROM " + InfluxDBPublicParam.DATA_PLT + " where " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query (sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper ( );
|
||||
List<DataPltPO> list = resultMapper.toPOJO (sqlResult, DataPltPO.class);
|
||||
List<DataPlt> list = resultMapper.toPOJO (sqlResult, DataPlt.class);
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -219,7 +219,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
* @return
|
||||
* @date 2022/5/23 10:51
|
||||
*/
|
||||
public List<DataHarmRateVPO> getDataHarmRateV(String lineIndex, String startTime, String endTime) {
|
||||
public List<DataHarmRateV> getDataHarmRateV(String lineIndex, String startTime, String endTime) {
|
||||
StringBuilder stringBuilder = new StringBuilder ( );
|
||||
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").append (startTime).append ("' and ").
|
||||
append (InfluxDBPublicParam.TIME).append (" <= '").
|
||||
@@ -229,7 +229,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
String sql = "SELECT * FROM " + InfluxDBPublicParam.DATA_HARM_RATE_V + " WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query (sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper ( );
|
||||
List<DataHarmRateVPO> list = resultMapper.toPOJO (sqlResult, DataHarmRateVPO.class);
|
||||
List<DataHarmRateV> list = resultMapper.toPOJO (sqlResult, DataHarmRateV.class);
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -242,7 +242,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
* @param endTime 结束时间
|
||||
* @Date: 2022/10/18
|
||||
*/
|
||||
public List<DataIPO> getDataI(String lineIndex, String startTime, String endTime) {
|
||||
public List<DataI> getDataI(String lineIndex, String startTime, String endTime) {
|
||||
StringBuilder stringBuilder = new StringBuilder ( );
|
||||
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").append (startTime).
|
||||
append ("' and ").append (InfluxDBPublicParam.TIME).append (" <= '").
|
||||
@@ -252,7 +252,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
String sql = "SELECT * FROM " + InfluxDBPublicParam.DATA_I + " WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query (sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper ( );
|
||||
List<DataIPO> list = resultMapper.toPOJO (sqlResult, DataIPO.class);
|
||||
List<DataI> list = resultMapper.toPOJO (sqlResult, DataI.class);
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -266,7 +266,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
* @return
|
||||
* @date 2022/5/23 10:51
|
||||
*/
|
||||
public List<DataInHarmVPO> getDataInHarmV(String lineIndex, String startTime, String endTime) {
|
||||
public List<DataInHarmV> getDataInHarmV(String lineIndex, String startTime, String endTime) {
|
||||
StringBuilder stringBuilder = new StringBuilder ( );
|
||||
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").append (startTime).
|
||||
append ("' and ").append (InfluxDBPublicParam.TIME).append (" <= '").append (endTime).
|
||||
@@ -275,7 +275,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
String sql = "SELECT * FROM " + InfluxDBPublicParam.DATA_IN_HARM_V + " WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query (sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper ( );
|
||||
List<DataInHarmVPO> list = resultMapper.toPOJO (sqlResult, DataInHarmVPO.class);
|
||||
List<DataInHarmV> list = resultMapper.toPOJO (sqlResult, DataInHarmV.class);
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -289,7 +289,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
* @return
|
||||
* @date 2022/5/23 10:51
|
||||
*/
|
||||
public List<DataVPO> getDataV(String lineIndex, String startTime, String endTime) {
|
||||
public List<DataV> getDataV(String lineIndex, String startTime, String endTime) {
|
||||
StringBuilder stringBuilder = new StringBuilder ( );
|
||||
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").append (startTime).
|
||||
append ("' and ").append (InfluxDBPublicParam.TIME).append (" <= '").append (endTime).
|
||||
@@ -298,7 +298,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
String sql = "SELECT * FROM " + InfluxDBPublicParam.DATA_V + " WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query (sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper ( );
|
||||
List<DataVPO> list = resultMapper.toPOJO (sqlResult, DataVPO.class);
|
||||
List<DataV> list = resultMapper.toPOJO (sqlResult, DataV.class);
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -312,7 +312,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
* @return
|
||||
* @date 2022/5/23 10:51
|
||||
*/
|
||||
public List<DataVPO> getDataVUnbalance(String lineIndex, String startTime, String endTime) {
|
||||
public List<DataV> getDataVUnbalance(String lineIndex, String startTime, String endTime) {
|
||||
|
||||
StringBuilder stringBuilder = new StringBuilder ( );
|
||||
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").append (startTime).
|
||||
@@ -322,7 +322,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
String sql = "SELECT * FROM " + InfluxDBPublicParam.DATA_V + " WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query (sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper ( );
|
||||
List<DataVPO> list = resultMapper.toPOJO (sqlResult, DataVPO.class);
|
||||
List<DataV> list = resultMapper.toPOJO (sqlResult, DataV.class);
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -336,8 +336,8 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
* @return
|
||||
* @date 2022/5/23 10:51
|
||||
*/
|
||||
public List<DataIPO> getDataINeg(String lineIndex, String startTime, String endTime) {
|
||||
Map<String, List<DataIPO>> map = new HashMap<> ( );
|
||||
public List<DataI> getDataINeg(String lineIndex, String startTime, String endTime) {
|
||||
Map<String, List<DataI>> map = new HashMap<> ( );
|
||||
StringBuilder stringBuilder = new StringBuilder ( );
|
||||
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").
|
||||
append (startTime).append ("' and ").append (InfluxDBPublicParam.TIME).append (" <= '").append (endTime).
|
||||
@@ -346,7 +346,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
String sql = "SELECT * FROM " + InfluxDBPublicParam.DATA_I + " WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query (sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper ( );
|
||||
List<DataIPO> list = resultMapper.toPOJO (sqlResult, DataIPO.class);
|
||||
List<DataI> list = resultMapper.toPOJO (sqlResult, DataI.class);
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -360,7 +360,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
* @return
|
||||
* @date 2022/5/23 10:51
|
||||
*/
|
||||
public List<DataVPO> getDataVFreq(String lineIndex, String startTime, String endTime) {
|
||||
public List<DataV> getDataVFreq(String lineIndex, String startTime, String endTime) {
|
||||
StringBuilder stringBuilder = new StringBuilder ( );
|
||||
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").append (startTime).append ("' and ").
|
||||
append (InfluxDBPublicParam.TIME).append (" <= '").
|
||||
@@ -370,7 +370,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
String sql = "SELECT * FROM " + InfluxDBPublicParam.DATA_V + " WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query (sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper ( );
|
||||
List<DataVPO> list = resultMapper.toPOJO (sqlResult, DataVPO.class);
|
||||
List<DataV> list = resultMapper.toPOJO (sqlResult, DataV.class);
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -384,7 +384,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
* @return
|
||||
* @date 2022/5/23 10:51
|
||||
*/
|
||||
public List<DataVPO> getDataVDev(String lineIndex, String startTime, String endTime) {
|
||||
public List<DataV> getDataVDev(String lineIndex, String startTime, String endTime) {
|
||||
StringBuilder stringBuilder = new StringBuilder ( );
|
||||
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").
|
||||
append (startTime).append ("' and ").append (InfluxDBPublicParam.TIME).append (" <= '").append (endTime).
|
||||
@@ -393,7 +393,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
String sql = "SELECT * FROM " + InfluxDBPublicParam.DATA_V + " WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query (sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper ( );
|
||||
List<DataVPO> list = resultMapper.toPOJO (sqlResult, DataVPO.class);
|
||||
List<DataV> list = resultMapper.toPOJO (sqlResult, DataV.class);
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -407,7 +407,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
* @return
|
||||
* @date 2022/5/23 10:51
|
||||
*/
|
||||
public List<DataPltPO> getDataPlt(String lineIndex, String startTime, String endTime) {
|
||||
public List<DataPlt> getDataPlt(String lineIndex, String startTime, String endTime) {
|
||||
StringBuilder stringBuilder = new StringBuilder ( );
|
||||
stringBuilder.append ("line_id='").append (lineIndex).append ("' and ").append (InfluxDBPublicParam.TIME + " >= '").append (startTime).
|
||||
append ("' and ").append (InfluxDBPublicParam.TIME).append (" <= '").append (endTime).
|
||||
@@ -416,7 +416,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
String sql = "SELECT * FROM " + InfluxDBPublicParam.DATA_PLT + " WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query (sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper ( );
|
||||
List<DataPltPO> list = resultMapper.toPOJO (sqlResult, DataPltPO.class);
|
||||
List<DataPlt> list = resultMapper.toPOJO (sqlResult, DataPlt.class);
|
||||
|
||||
return list;
|
||||
}
|
||||
@@ -428,28 +428,28 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
* @Author: clam
|
||||
* @Date: 2022/10/18
|
||||
*/
|
||||
private List<LimitRate> getData(Overlimit overlimit, List<DataVPO> allTimeList,
|
||||
List<DataPltPO> flickerAllTimeList, List<DataHarmRateVPO> dataHarmRateVPOList,
|
||||
List<DataIPO> dataIPOList, List<DataInHarmVPO> dataInHarmVPOList,
|
||||
List<DataVPO> dataVPOList, List<DataVPO> dataVPOUnbalanceList, List<DataIPO> dataIPONegList,
|
||||
List<DataVPO> dataVPOFreqList, List<DataVPO> dataVPODevList, List<DataPltPO> dataPltPOList) {
|
||||
private List<LimitRate> getData(Overlimit overlimit, List<DataV> allTimeList,
|
||||
List<DataPlt> flickerAllTimeList, List<DataHarmRateV> dataHarmRateVPOList,
|
||||
List<DataI> dataIPOList, List<DataInHarmV> dataInHarmVPOList,
|
||||
List<DataV> dataVPOList, List<DataV> dataVPOUnbalanceList, List<DataI> dataIPONegList,
|
||||
List<DataV> dataVPOFreqList, List<DataV> dataVPODevList, List<DataPlt> dataPltPOList) {
|
||||
List<LimitRate> result = new ArrayList<> ( );
|
||||
|
||||
Map<String, List<DataHarmRateVPO>> harmRateVByPhaseType = new HashMap<> ( );
|
||||
Map<String, List<DataIPO>> dataIByPhaseType = new HashMap<> ( );
|
||||
Map<String, List<DataInHarmVPO>> dataInHarmVPhaseType = new HashMap<> ( );
|
||||
Map<String, List<DataVPO>> dataVPhaseType = new HashMap<> ( );
|
||||
Map<String, List<DataVPO>> dataVDevPhaseType = new HashMap<> ( );
|
||||
Map<String, List<DataPltPO>> dataPltPhaseType = new HashMap<> ( );
|
||||
Map<Instant, List<DataHarmRateVPO>> harmRateVByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataIPO>> dataIByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataInHarmVPO>> dataInHarmVByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataVPO>> dataVByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataVPO>> dataVUnbalanceByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataIPO>> dataINegByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataVPO>> dataVFreqByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataVPO>> dataVDevByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataPltPO>> dataPltByTime = new HashMap<> ( );
|
||||
Map<String, List<DataHarmRateV>> harmRateVByPhaseType = new HashMap<> ( );
|
||||
Map<String, List<DataI>> dataIByPhaseType = new HashMap<> ( );
|
||||
Map<String, List<DataInHarmV>> dataInHarmVPhaseType = new HashMap<> ( );
|
||||
Map<String, List<DataV>> dataVPhaseType = new HashMap<> ( );
|
||||
Map<String, List<DataV>> dataVDevPhaseType = new HashMap<> ( );
|
||||
Map<String, List<DataPlt>> dataPltPhaseType = new HashMap<> ( );
|
||||
Map<Instant, List<DataHarmRateV>> harmRateVByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataI>> dataIByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataInHarmV>> dataInHarmVByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataV>> dataVByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataV>> dataVUnbalanceByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataI>> dataINegByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataV>> dataVFreqByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataV>> dataVDevByTime = new HashMap<> ( );
|
||||
Map<Instant, List<DataPlt>> dataPltByTime = new HashMap<> ( );
|
||||
Integer allTime = 0;
|
||||
Integer flickerAllTime = 0;
|
||||
if (!CollectionUtils.isEmpty (allTimeList)) {
|
||||
@@ -461,37 +461,37 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
|
||||
|
||||
if (!CollectionUtils.isEmpty (dataHarmRateVPOList)) {
|
||||
harmRateVByPhaseType = dataHarmRateVPOList.stream ( ).collect (Collectors.groupingBy (DataHarmRateVPO::getPhaseType));
|
||||
harmRateVByTime = dataHarmRateVPOList.stream ( ).collect (Collectors.groupingBy (DataHarmRateVPO::getTime));
|
||||
harmRateVByPhaseType = dataHarmRateVPOList.stream ( ).collect (Collectors.groupingBy (DataHarmRateV::getPhaseType));
|
||||
harmRateVByTime = dataHarmRateVPOList.stream ( ).collect (Collectors.groupingBy (DataHarmRateV::getTime));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty (dataIPOList)) {
|
||||
dataIByPhaseType = dataIPOList.stream ( ).collect (Collectors.groupingBy (DataIPO::getPhaseType));
|
||||
dataIByTime = dataIPOList.stream ( ).collect (Collectors.groupingBy (DataIPO::getTime));
|
||||
dataIByPhaseType = dataIPOList.stream ( ).collect (Collectors.groupingBy (DataI::getPhaseType));
|
||||
dataIByTime = dataIPOList.stream ( ).collect (Collectors.groupingBy (DataI::getTime));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty (dataInHarmVPOList)) {
|
||||
dataInHarmVPhaseType = dataInHarmVPOList.stream ( ).collect (Collectors.groupingBy (DataInHarmVPO::getPhaseType));
|
||||
dataInHarmVByTime = dataInHarmVPOList.stream ( ).collect (Collectors.groupingBy (DataInHarmVPO::getTime));
|
||||
dataInHarmVPhaseType = dataInHarmVPOList.stream ( ).collect (Collectors.groupingBy (DataInHarmV::getPhaseType));
|
||||
dataInHarmVByTime = dataInHarmVPOList.stream ( ).collect (Collectors.groupingBy (DataInHarmV::getTime));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty (dataVPOList)) {
|
||||
dataVPhaseType = dataVPOList.stream ( ).collect (Collectors.groupingBy (DataVPO::getPhaseType));
|
||||
dataVByTime = dataVPOList.stream ( ).collect (Collectors.groupingBy (DataVPO::getTime));
|
||||
dataVPhaseType = dataVPOList.stream ( ).collect (Collectors.groupingBy (DataV::getPhasicType));
|
||||
dataVByTime = dataVPOList.stream ( ).collect (Collectors.groupingBy (DataV::getTime));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty (dataVPOUnbalanceList)) {
|
||||
dataVUnbalanceByTime = dataVPOUnbalanceList.stream ( ).collect (Collectors.groupingBy (DataVPO::getTime));
|
||||
dataVUnbalanceByTime = dataVPOUnbalanceList.stream ( ).collect (Collectors.groupingBy (DataV::getTime));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty (dataIPONegList)) {
|
||||
dataINegByTime = dataIPONegList.stream ( ).collect (Collectors.groupingBy (DataIPO::getTime));
|
||||
dataINegByTime = dataIPONegList.stream ( ).collect (Collectors.groupingBy (DataI::getTime));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty (dataVPOFreqList)) {
|
||||
dataVFreqByTime = dataVPOFreqList.stream ( ).collect (Collectors.groupingBy (DataVPO::getTime));
|
||||
dataVFreqByTime = dataVPOFreqList.stream ( ).collect (Collectors.groupingBy (DataV::getTime));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty (dataVPODevList)) {
|
||||
dataVDevPhaseType = dataVPODevList.stream ( ).collect (Collectors.groupingBy (DataVPO::getPhaseType));
|
||||
dataVDevByTime = dataVPODevList.stream ( ).collect (Collectors.groupingBy (DataVPO::getTime));
|
||||
dataVDevPhaseType = dataVPODevList.stream ( ).collect (Collectors.groupingBy (DataV::getPhasicType));
|
||||
dataVDevByTime = dataVPODevList.stream ( ).collect (Collectors.groupingBy (DataV::getTime));
|
||||
}
|
||||
if (!CollectionUtils.isEmpty (dataPltPOList)) {
|
||||
dataPltPhaseType = dataPltPOList.stream ( ).collect (Collectors.groupingBy (DataPltPO::getPhaseType));
|
||||
dataPltByTime = dataPltPOList.stream ( ).collect (Collectors.groupingBy (DataPltPO::getTime));
|
||||
dataPltPhaseType = dataPltPOList.stream ( ).collect (Collectors.groupingBy (DataPlt::getPhaseType));
|
||||
dataPltByTime = dataPltPOList.stream ( ).collect (Collectors.groupingBy (DataPlt::getTime));
|
||||
}
|
||||
LimitRate a = limitRateData (overlimit, allTime, flickerAllTime, "A", overlimit.getId (), harmRateVByPhaseType.get ("A"), dataIByPhaseType.get ("A"), dataInHarmVPhaseType.get ("A"), dataVPhaseType.get ("A"), dataVDevPhaseType.get ("A"), dataPltPhaseType.get ("A"));
|
||||
LimitRate b = limitRateData (overlimit, allTime, flickerAllTime, "B", overlimit.getId (), harmRateVByPhaseType.get ("B"), dataIByPhaseType.get ("B"), dataInHarmVPhaseType.get ("B"), dataVPhaseType.get ("B"), dataVDevPhaseType.get ("B"), dataPltPhaseType.get ("B"));
|
||||
@@ -515,9 +515,9 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
*/
|
||||
public LimitRate limitRateData(Overlimit overlimit, Integer allTime, Integer
|
||||
flickerAllTime, String phasicType, String lineId,
|
||||
List<DataHarmRateVPO> dataHarmRateVPOList,
|
||||
List<DataIPO> dataIPOList, List<DataInHarmVPO> dataInHarmVPOList,
|
||||
List<DataVPO> dataVPOList, List<DataVPO> dataVPODevList, List<DataPltPO> dataPltPOList) {
|
||||
List<DataHarmRateV> dataHarmRateVPOList,
|
||||
List<DataI> dataIPOList, List<DataInHarmV> dataInHarmVPOList,
|
||||
List<DataV> dataVPOList, List<DataV> dataVPODevList, List<DataPlt> dataPltPOList) {
|
||||
LimitRate limitRate = new LimitRate ( );
|
||||
int v2 = 0, v3 = 0, v4 = 0, v5 = 0, v6 = 0, v7 = 0, v8 = 0, v9 = 0, v10 = 0, v11 = 0, v12 = 0, v13 = 0, v14 = 0, v15 = 0, v16 = 0, v17 = 0, v18 = 0, v19 = 0, v20 = 0, v21 = 0, v22 = 0, v23 = 0, v24 = 0, v25 = 0;
|
||||
int i2 = 0, i3 = 0, i4 = 0, i5 = 0, i6 = 0, i7 = 0, i8 = 0, i9 = 0, i10 = 0, i11 = 0, i12 = 0, i13 = 0, i14 = 0, i15 = 0, i16 = 0, i17 = 0, i18 = 0, i19 = 0, i20 = 0, i21 = 0, i22 = 0, i23 = 0, i24 = 0, i25 = 0;
|
||||
@@ -526,7 +526,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
//2-25次谐波电压含有率
|
||||
|
||||
if (!CollectionUtils.isEmpty (dataHarmRateVPOList)) {
|
||||
for (DataHarmRateVPO item : dataHarmRateVPOList) {
|
||||
for (DataHarmRateV item : dataHarmRateVPOList) {
|
||||
if (item.getV2 ( ) > overlimit.getUharm2 ( )) {
|
||||
v2++;
|
||||
}
|
||||
@@ -603,7 +603,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
}
|
||||
//2-25次谐波电流
|
||||
if (!CollectionUtils.isEmpty (dataIPOList)) {
|
||||
for (DataIPO item : dataIPOList) {
|
||||
for (DataI item : dataIPOList) {
|
||||
if (item.getI2 ( ) > overlimit.getIharm2 ( )) {
|
||||
i2++;
|
||||
}
|
||||
@@ -680,7 +680,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
}
|
||||
//0.5-15.5次间谐波电压含有率
|
||||
if (!CollectionUtils.isEmpty (dataInHarmVPOList)) {
|
||||
for (DataInHarmVPO item : dataInHarmVPOList) {
|
||||
for (DataInHarmV item : dataInHarmVPOList) {
|
||||
if (item.getV1 ( ) > overlimit.getInuharm1 ( )) {
|
||||
uHarm1++;
|
||||
}
|
||||
@@ -733,7 +733,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
}
|
||||
//电压总谐波畸变率
|
||||
if (!CollectionUtils.isEmpty (dataVPOList)) {
|
||||
for (DataVPO item : dataVPOList) {
|
||||
for (DataV item : dataVPOList) {
|
||||
if (item.getVThd ( ) > overlimit.getUaberrance ( )) {
|
||||
thd++;
|
||||
}
|
||||
@@ -741,7 +741,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
}
|
||||
//电压上偏差、电压下偏差(根据vl_dev的正负判断是用哪个值判断越限)
|
||||
if (!CollectionUtils.isEmpty (dataVPODevList)) {
|
||||
for (DataVPO item : dataVPODevList) {
|
||||
for (DataV item : dataVPODevList) {
|
||||
if (item.getVlDev() >= 0){
|
||||
if (item.getVlDev() > overlimit.getVoltageDev()){
|
||||
uDev++;
|
||||
@@ -755,7 +755,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
}
|
||||
//长时间闪变
|
||||
if (!CollectionUtils.isEmpty (dataPltPOList)) {
|
||||
for (DataPltPO item : dataPltPOList) {
|
||||
for (DataPlt item : dataPltPOList) {
|
||||
if (item.getPlt ( ) > overlimit.getFlicker ( )) {
|
||||
flicker++;
|
||||
}
|
||||
@@ -839,7 +839,7 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
}
|
||||
|
||||
|
||||
public LimitRate limitRateDataT(Overlimit overlimit, Integer allTime, Integer flickerAllTime, String lineId, Map<Instant,List<DataHarmRateVPO>> map1, Map<Instant,List<DataIPO>> map2, Map<Instant,List<DataInHarmVPO>> map3, Map<Instant,List<DataVPO>> map4, Map<Instant,List<DataVPO>> map5, Map<Instant,List<DataIPO>> map6, Map<Instant,List<DataVPO>> map7, Map<Instant,List<DataVPO>> map8, Map<Instant,List<DataPltPO>> map9){
|
||||
public LimitRate limitRateDataT(Overlimit overlimit, Integer allTime, Integer flickerAllTime, String lineId, Map<Instant,List<DataHarmRateV>> map1, Map<Instant,List<DataI>> map2, Map<Instant,List<DataInHarmV>> map3, Map<Instant,List<DataV>> map4, Map<Instant,List<DataV>> map5, Map<Instant,List<DataI>> map6, Map<Instant,List<DataV>> map7, Map<Instant,List<DataV>> map8, Map<Instant,List<DataPlt>> map9){
|
||||
LimitRate limitRate = new LimitRate();
|
||||
int v2 = 0,v3 = 0,v4 = 0,v5 = 0,v6 = 0,v7 = 0,v8 = 0,v9 = 0,v10 = 0,v11 = 0,v12 = 0,v13 = 0,v14 = 0,v15 = 0,v16 = 0,v17 = 0,v18 = 0,v19 = 0,v20 = 0,v21 = 0,v22 = 0,v23 = 0,v24 = 0,v25 = 0;
|
||||
int i2 = 0,i3 = 0,i4 = 0,i5 = 0,i6 = 0,i7 = 0,i8 = 0,i9 = 0,i10 = 0,i11 = 0,i12 = 0,i13 = 0,i14 = 0,i15 = 0,i16 = 0,i17 = 0,i18 = 0,i19 = 0,i20 = 0,i21 = 0,i22 = 0,i23 = 0,i24 = 0,i25 = 0;
|
||||
@@ -847,317 +847,317 @@ public class LimitRateService extends MppServiceImpl<LimitRatePOMapper, LimitRa
|
||||
int thd = 0,uDev = 0,flicker = 0,freqDev = 0,uAberrance = 0,iNeg = 0;
|
||||
//2-25次谐波电压含有率
|
||||
for (Instant time:map1.keySet()) {
|
||||
List<DataHarmRateVPO> list = map1.get(time);
|
||||
List<DataHarmRateVPO> l2 = list.stream().filter(s->s.getV2()>overlimit.getUharm2()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> list = map1.get(time);
|
||||
List<DataHarmRateV> l2 = list.stream().filter(s->s.getV2()>overlimit.getUharm2()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l2)){
|
||||
v2++;
|
||||
}
|
||||
List<DataHarmRateVPO> l3 = list.stream().filter(s->s.getV3()>overlimit.getUharm3()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l3 = list.stream().filter(s->s.getV3()>overlimit.getUharm3()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l3)){
|
||||
v3++;
|
||||
}
|
||||
List<DataHarmRateVPO> l4 = list.stream().filter(s->s.getV4()>overlimit.getUharm4()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l4 = list.stream().filter(s->s.getV4()>overlimit.getUharm4()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l4)){
|
||||
v4++;
|
||||
}
|
||||
List<DataHarmRateVPO> l5 = list.stream().filter(s->s.getV5()>overlimit.getUharm5()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l5 = list.stream().filter(s->s.getV5()>overlimit.getUharm5()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l5)){
|
||||
v5++;
|
||||
}
|
||||
List<DataHarmRateVPO> l6 = list.stream().filter(s->s.getV6()>overlimit.getUharm6()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l6 = list.stream().filter(s->s.getV6()>overlimit.getUharm6()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l6)){
|
||||
v6++;
|
||||
}
|
||||
List<DataHarmRateVPO> l7 = list.stream().filter(s->s.getV7()>overlimit.getUharm7()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l7 = list.stream().filter(s->s.getV7()>overlimit.getUharm7()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l7)){
|
||||
v7++;
|
||||
}
|
||||
List<DataHarmRateVPO> l8 = list.stream().filter(s->s.getV8()>overlimit.getUharm8()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l8 = list.stream().filter(s->s.getV8()>overlimit.getUharm8()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l8)){
|
||||
v8++;
|
||||
}
|
||||
List<DataHarmRateVPO> l9 = list.stream().filter(s->s.getV9()>overlimit.getUharm9()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l9 = list.stream().filter(s->s.getV9()>overlimit.getUharm9()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l9)){
|
||||
v9++;
|
||||
}
|
||||
List<DataHarmRateVPO> l10 = list.stream().filter(s->s.getV10()>overlimit.getUharm10()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l10 = list.stream().filter(s->s.getV10()>overlimit.getUharm10()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l10)){
|
||||
v10++;
|
||||
}
|
||||
List<DataHarmRateVPO> l11 = list.stream().filter(s->s.getV11()>overlimit.getUharm11()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l11 = list.stream().filter(s->s.getV11()>overlimit.getUharm11()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l11)){
|
||||
v11++;
|
||||
}
|
||||
List<DataHarmRateVPO> l12 = list.stream().filter(s->s.getV12()>overlimit.getUharm12()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l12 = list.stream().filter(s->s.getV12()>overlimit.getUharm12()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l12)){
|
||||
v12++;
|
||||
}
|
||||
List<DataHarmRateVPO> l13 = list.stream().filter(s->s.getV13()>overlimit.getUharm13()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l13 = list.stream().filter(s->s.getV13()>overlimit.getUharm13()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l13)){
|
||||
v13++;
|
||||
}
|
||||
List<DataHarmRateVPO> l14 = list.stream().filter(s->s.getV14()>overlimit.getUharm14()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l14 = list.stream().filter(s->s.getV14()>overlimit.getUharm14()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l14)){
|
||||
v14++;
|
||||
}
|
||||
List<DataHarmRateVPO> l15 = list.stream().filter(s->s.getV15()>overlimit.getUharm15()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l15 = list.stream().filter(s->s.getV15()>overlimit.getUharm15()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l15)){
|
||||
v15++;
|
||||
}
|
||||
List<DataHarmRateVPO> l16 = list.stream().filter(s->s.getV16()>overlimit.getUharm16()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l16 = list.stream().filter(s->s.getV16()>overlimit.getUharm16()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l16)){
|
||||
v16++;
|
||||
}
|
||||
List<DataHarmRateVPO> l17 = list.stream().filter(s->s.getV17()>overlimit.getUharm17()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l17 = list.stream().filter(s->s.getV17()>overlimit.getUharm17()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l17)){
|
||||
v17++;
|
||||
}
|
||||
List<DataHarmRateVPO> l18 = list.stream().filter(s->s.getV18()>overlimit.getUharm18()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l18 = list.stream().filter(s->s.getV18()>overlimit.getUharm18()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l18)){
|
||||
v18++;
|
||||
}
|
||||
List<DataHarmRateVPO> l19 = list.stream().filter(s->s.getV19()>overlimit.getUharm19()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l19 = list.stream().filter(s->s.getV19()>overlimit.getUharm19()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l19)){
|
||||
v19++;
|
||||
}
|
||||
List<DataHarmRateVPO> l20 = list.stream().filter(s->s.getV20()>overlimit.getUharm20()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l20 = list.stream().filter(s->s.getV20()>overlimit.getUharm20()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l20)){
|
||||
v20++;
|
||||
}
|
||||
List<DataHarmRateVPO> l21 = list.stream().filter(s->s.getV21()>overlimit.getUharm21()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l21 = list.stream().filter(s->s.getV21()>overlimit.getUharm21()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l21)){
|
||||
v21++;
|
||||
}
|
||||
List<DataHarmRateVPO> l22 = list.stream().filter(s->s.getV22()>overlimit.getUharm22()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l22 = list.stream().filter(s->s.getV22()>overlimit.getUharm22()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l22)){
|
||||
v22++;
|
||||
}
|
||||
List<DataHarmRateVPO> l23 = list.stream().filter(s->s.getV23()>overlimit.getUharm23()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l23 = list.stream().filter(s->s.getV23()>overlimit.getUharm23()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l23)){
|
||||
v23++;
|
||||
}
|
||||
List<DataHarmRateVPO> l24 = list.stream().filter(s->s.getV24()>overlimit.getUharm24()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l24 = list.stream().filter(s->s.getV24()>overlimit.getUharm24()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l24)){
|
||||
v24++;
|
||||
}
|
||||
List<DataHarmRateVPO> l25 = list.stream().filter(s->s.getV25()>overlimit.getUharm25()).collect(Collectors.toList());
|
||||
List<DataHarmRateV> l25 = list.stream().filter(s->s.getV25()>overlimit.getUharm25()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l25)){
|
||||
v25++;
|
||||
}
|
||||
}
|
||||
//2-25次谐波电流
|
||||
for (Instant time:map2.keySet()) {
|
||||
List<DataIPO> list = map2.get(time);
|
||||
List<DataIPO> l2 = list.stream().filter(s->s.getI2()>overlimit.getIharm2()).collect(Collectors.toList());
|
||||
List<DataI> list = map2.get(time);
|
||||
List<DataI> l2 = list.stream().filter(s->s.getI2()>overlimit.getIharm2()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l2)){
|
||||
i2++;
|
||||
}
|
||||
List<DataIPO> l3 = list.stream().filter(s->s.getI3()>overlimit.getIharm3()).collect(Collectors.toList());
|
||||
List<DataI> l3 = list.stream().filter(s->s.getI3()>overlimit.getIharm3()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l3)){
|
||||
i3++;
|
||||
}
|
||||
List<DataIPO> l4 = list.stream().filter(s->s.getI4()>overlimit.getIharm4()).collect(Collectors.toList());
|
||||
List<DataI> l4 = list.stream().filter(s->s.getI4()>overlimit.getIharm4()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l4)){
|
||||
i4++;
|
||||
}
|
||||
List<DataIPO> l5 = list.stream().filter(s->s.getI5()>overlimit.getIharm5()).collect(Collectors.toList());
|
||||
List<DataI> l5 = list.stream().filter(s->s.getI5()>overlimit.getIharm5()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l5)){
|
||||
i5++;
|
||||
}
|
||||
List<DataIPO> l6 = list.stream().filter(s->s.getI6()>overlimit.getIharm6()).collect(Collectors.toList());
|
||||
List<DataI> l6 = list.stream().filter(s->s.getI6()>overlimit.getIharm6()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l6)){
|
||||
i6++;
|
||||
}
|
||||
List<DataIPO> l7 = list.stream().filter(s->s.getI7()>overlimit.getIharm7()).collect(Collectors.toList());
|
||||
List<DataI> l7 = list.stream().filter(s->s.getI7()>overlimit.getIharm7()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l7)){
|
||||
i7++;
|
||||
}
|
||||
List<DataIPO> l8 = list.stream().filter(s->s.getI8()>overlimit.getIharm8()).collect(Collectors.toList());
|
||||
List<DataI> l8 = list.stream().filter(s->s.getI8()>overlimit.getIharm8()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l8)){
|
||||
i8++;
|
||||
}
|
||||
List<DataIPO> l9 = list.stream().filter(s->s.getI9()>overlimit.getIharm9()).collect(Collectors.toList());
|
||||
List<DataI> l9 = list.stream().filter(s->s.getI9()>overlimit.getIharm9()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l9)){
|
||||
i9++;
|
||||
}
|
||||
List<DataIPO> l10 = list.stream().filter(s->s.getI10()>overlimit.getIharm10()).collect(Collectors.toList());
|
||||
List<DataI> l10 = list.stream().filter(s->s.getI10()>overlimit.getIharm10()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l10)){
|
||||
i10++;
|
||||
}
|
||||
List<DataIPO> l11 = list.stream().filter(s->s.getI11()>overlimit.getIharm11()).collect(Collectors.toList());
|
||||
List<DataI> l11 = list.stream().filter(s->s.getI11()>overlimit.getIharm11()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l11)){
|
||||
i11++;
|
||||
}
|
||||
List<DataIPO> l12 = list.stream().filter(s->s.getI12()>overlimit.getIharm12()).collect(Collectors.toList());
|
||||
List<DataI> l12 = list.stream().filter(s->s.getI12()>overlimit.getIharm12()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l12)){
|
||||
i12++;
|
||||
}
|
||||
List<DataIPO> l13 = list.stream().filter(s->s.getI13()>overlimit.getIharm13()).collect(Collectors.toList());
|
||||
List<DataI> l13 = list.stream().filter(s->s.getI13()>overlimit.getIharm13()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l13)){
|
||||
i13++;
|
||||
}
|
||||
List<DataIPO> l14 = list.stream().filter(s->s.getI14()>overlimit.getIharm14()).collect(Collectors.toList());
|
||||
List<DataI> l14 = list.stream().filter(s->s.getI14()>overlimit.getIharm14()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l14)){
|
||||
i14++;
|
||||
}
|
||||
List<DataIPO> l15 = list.stream().filter(s->s.getI15()>overlimit.getIharm15()).collect(Collectors.toList());
|
||||
List<DataI> l15 = list.stream().filter(s->s.getI15()>overlimit.getIharm15()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l15)){
|
||||
i15++;
|
||||
}
|
||||
List<DataIPO> l16 = list.stream().filter(s->s.getI16()>overlimit.getIharm16()).collect(Collectors.toList());
|
||||
List<DataI> l16 = list.stream().filter(s->s.getI16()>overlimit.getIharm16()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l16)){
|
||||
i16++;
|
||||
}
|
||||
List<DataIPO> l17 = list.stream().filter(s->s.getI17()>overlimit.getIharm17()).collect(Collectors.toList());
|
||||
List<DataI> l17 = list.stream().filter(s->s.getI17()>overlimit.getIharm17()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l17)){
|
||||
i17++;
|
||||
}
|
||||
List<DataIPO> l18 = list.stream().filter(s->s.getI18()>overlimit.getIharm18()).collect(Collectors.toList());
|
||||
List<DataI> l18 = list.stream().filter(s->s.getI18()>overlimit.getIharm18()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l18)){
|
||||
i18++;
|
||||
}
|
||||
List<DataIPO> l19 = list.stream().filter(s->s.getI19()>overlimit.getIharm19()).collect(Collectors.toList());
|
||||
List<DataI> l19 = list.stream().filter(s->s.getI19()>overlimit.getIharm19()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l19)){
|
||||
i19++;
|
||||
}
|
||||
List<DataIPO> l20 = list.stream().filter(s->s.getI20()>overlimit.getIharm20()).collect(Collectors.toList());
|
||||
List<DataI> l20 = list.stream().filter(s->s.getI20()>overlimit.getIharm20()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l20)){
|
||||
i20++;
|
||||
}
|
||||
List<DataIPO> l21 = list.stream().filter(s->s.getI21()>overlimit.getIharm21()).collect(Collectors.toList());
|
||||
List<DataI> l21 = list.stream().filter(s->s.getI21()>overlimit.getIharm21()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l21)){
|
||||
i21++;
|
||||
}
|
||||
List<DataIPO> l22 = list.stream().filter(s->s.getI22()>overlimit.getIharm22()).collect(Collectors.toList());
|
||||
List<DataI> l22 = list.stream().filter(s->s.getI22()>overlimit.getIharm22()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l22)){
|
||||
i22++;
|
||||
}
|
||||
List<DataIPO> l23 = list.stream().filter(s->s.getI23()>overlimit.getIharm23()).collect(Collectors.toList());
|
||||
List<DataI> l23 = list.stream().filter(s->s.getI23()>overlimit.getIharm23()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l23)){
|
||||
i23++;
|
||||
}
|
||||
List<DataIPO> l24 = list.stream().filter(s->s.getI24()>overlimit.getIharm24()).collect(Collectors.toList());
|
||||
List<DataI> l24 = list.stream().filter(s->s.getI24()>overlimit.getIharm24()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l24)){
|
||||
i24++;
|
||||
}
|
||||
List<DataIPO> l25 = list.stream().filter(s->s.getI25()>overlimit.getIharm25()).collect(Collectors.toList());
|
||||
List<DataI> l25 = list.stream().filter(s->s.getI25()>overlimit.getIharm25()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l25)){
|
||||
i25++;
|
||||
}
|
||||
}
|
||||
//0.5-15.5次间谐波电压含有率
|
||||
for (Instant time:map3.keySet()) {
|
||||
List<DataInHarmVPO> list3 = map3.get(time);
|
||||
List<DataInHarmVPO> l2 = list3.stream().filter(s->s.getV1()>overlimit.getInuharm1()).collect(Collectors.toList());
|
||||
List<DataInHarmV> list3 = map3.get(time);
|
||||
List<DataInHarmV> l2 = list3.stream().filter(s->s.getV1()>overlimit.getInuharm1()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l2)){
|
||||
uHarm1++;
|
||||
}
|
||||
List<DataInHarmVPO> l3 = list3.stream().filter(s->s.getV2()>overlimit.getInuharm2()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l3 = list3.stream().filter(s->s.getV2()>overlimit.getInuharm2()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l3)){
|
||||
uHarm2++;
|
||||
}
|
||||
List<DataInHarmVPO> l4 = list3.stream().filter(s->s.getV3()>overlimit.getInuharm3()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l4 = list3.stream().filter(s->s.getV3()>overlimit.getInuharm3()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l4)){
|
||||
uHarm3++;
|
||||
}
|
||||
List<DataInHarmVPO> l5 = list3.stream().filter(s->s.getV4()>overlimit.getInuharm4()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l5 = list3.stream().filter(s->s.getV4()>overlimit.getInuharm4()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l5)){
|
||||
uHarm4++;
|
||||
}
|
||||
List<DataInHarmVPO> l6 = list3.stream().filter(s->s.getV5()>overlimit.getInuharm5()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l6 = list3.stream().filter(s->s.getV5()>overlimit.getInuharm5()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l6)){
|
||||
uHarm5++;
|
||||
}
|
||||
List<DataInHarmVPO> l7 = list3.stream().filter(s->s.getV6()>overlimit.getInuharm6()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l7 = list3.stream().filter(s->s.getV6()>overlimit.getInuharm6()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l7)){
|
||||
uHarm6++;
|
||||
}
|
||||
List<DataInHarmVPO> l8 = list3.stream().filter(s->s.getV7()>overlimit.getInuharm7()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l8 = list3.stream().filter(s->s.getV7()>overlimit.getInuharm7()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l8)){
|
||||
uHarm7++;
|
||||
}
|
||||
List<DataInHarmVPO> l9 = list3.stream().filter(s->s.getV8()>overlimit.getInuharm8()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l9 = list3.stream().filter(s->s.getV8()>overlimit.getInuharm8()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l9)){
|
||||
uHarm8++;
|
||||
}
|
||||
List<DataInHarmVPO> l10 = list3.stream().filter(s->s.getV9()>overlimit.getInuharm9()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l10 = list3.stream().filter(s->s.getV9()>overlimit.getInuharm9()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l10)){
|
||||
uHarm9++;
|
||||
}
|
||||
List<DataInHarmVPO> l11 = list3.stream().filter(s->s.getV10()>overlimit.getInuharm10()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l11 = list3.stream().filter(s->s.getV10()>overlimit.getInuharm10()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l11)){
|
||||
uHarm10++;
|
||||
}
|
||||
List<DataInHarmVPO> l12 = list3.stream().filter(s->s.getV11()>overlimit.getInuharm11()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l12 = list3.stream().filter(s->s.getV11()>overlimit.getInuharm11()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l12)){
|
||||
uHarm11++;
|
||||
}
|
||||
List<DataInHarmVPO> l13 = list3.stream().filter(s->s.getV12()>overlimit.getInuharm12()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l13 = list3.stream().filter(s->s.getV12()>overlimit.getInuharm12()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l13)){
|
||||
uHarm12++;
|
||||
}
|
||||
List<DataInHarmVPO> l14 = list3.stream().filter(s->s.getV13()>overlimit.getInuharm13()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l14 = list3.stream().filter(s->s.getV13()>overlimit.getInuharm13()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l14)){
|
||||
uHarm13++;
|
||||
}
|
||||
List<DataInHarmVPO> l15 = list3.stream().filter(s->s.getV14()>overlimit.getInuharm14()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l15 = list3.stream().filter(s->s.getV14()>overlimit.getInuharm14()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l15)){
|
||||
uHarm14++;
|
||||
}
|
||||
List<DataInHarmVPO> l16 = list3.stream().filter(s->s.getV15()>overlimit.getInuharm15()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l16 = list3.stream().filter(s->s.getV15()>overlimit.getInuharm15()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l16)){
|
||||
uHarm15++;
|
||||
}
|
||||
List<DataInHarmVPO> l17 = list3.stream().filter(s->s.getV16()>overlimit.getInuharm16()).collect(Collectors.toList());
|
||||
List<DataInHarmV> l17 = list3.stream().filter(s->s.getV16()>overlimit.getInuharm16()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l17)){
|
||||
uHarm16++;
|
||||
}
|
||||
}
|
||||
//电压总谐波畸变率
|
||||
for (Instant time:map4.keySet()) {
|
||||
List<DataVPO> list = map4.get(time);
|
||||
List<DataVPO> l = list.stream().filter(s->s.getVThd()>overlimit.getUaberrance()).collect(Collectors.toList());
|
||||
List<DataV> list = map4.get(time);
|
||||
List<DataV> l = list.stream().filter(s->s.getVThd()>overlimit.getUaberrance()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l)){
|
||||
thd++;
|
||||
}
|
||||
}
|
||||
//三相电压不平衡度
|
||||
for (Instant time:map5.keySet()) {
|
||||
List<DataVPO> list = map5.get(time);
|
||||
List<DataVPO> l = list.stream().filter(s->s.getVUnbalance()>overlimit.getUbalance()).collect(Collectors.toList());
|
||||
List<DataV> list = map5.get(time);
|
||||
List<DataV> l = list.stream().filter(s->s.getVUnbalance()>overlimit.getUbalance()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l)){
|
||||
uAberrance++;
|
||||
}
|
||||
}
|
||||
//负序电流
|
||||
for (Instant time:map6.keySet()) {
|
||||
List<DataIPO> list = map6.get(time);
|
||||
List<DataIPO> l = list.stream().filter(s->s.getINeg()>overlimit.getINeg()).collect(Collectors.toList());
|
||||
List<DataI> list = map6.get(time);
|
||||
List<DataI> l = list.stream().filter(s->s.getINeg()>overlimit.getINeg()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l)){
|
||||
iNeg++;
|
||||
}
|
||||
}
|
||||
//频率偏差
|
||||
for (Instant time:map7.keySet()) {
|
||||
List<DataVPO> list = map7.get(time);
|
||||
List<DataVPO> l = list.stream().filter(s->s.getFreqDev()>overlimit.getFreqDev()).collect(Collectors.toList());
|
||||
List<DataV> list = map7.get(time);
|
||||
List<DataV> l = list.stream().filter(s->s.getFreqDev()>overlimit.getFreqDev()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l)){
|
||||
freqDev++;
|
||||
}
|
||||
}
|
||||
//电压上偏差、电压下偏差
|
||||
for (Instant time:map8.keySet()) {
|
||||
List<DataVPO> list = map8.get(time);
|
||||
List<DataVPO> l1 = list.stream().filter(s->s.getVlDev()>=0&&s.getVlDev()>overlimit.getVoltageDev()).collect(Collectors.toList());
|
||||
List<DataVPO> l2 = list.stream().filter(s->s.getVlDev()<0&&Math.abs(s.getVlDev())>Math.abs(overlimit.getUvoltageDev())).collect(Collectors.toList());
|
||||
List<DataV> list = map8.get(time);
|
||||
List<DataV> l1 = list.stream().filter(s->s.getVlDev()>=0&&s.getVlDev()>overlimit.getVoltageDev()).collect(Collectors.toList());
|
||||
List<DataV> l2 = list.stream().filter(s->s.getVlDev()<0&&Math.abs(s.getVlDev())>Math.abs(overlimit.getUvoltageDev())).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l1) || !CollectionUtils.isEmpty(l2)){
|
||||
uDev++;
|
||||
}
|
||||
}
|
||||
//长时间闪变
|
||||
for (Instant time:map9.keySet()) {
|
||||
List<DataPltPO> list = map9.get(time);
|
||||
List<DataPltPO> l = list.stream().filter(s->s.getPlt()>overlimit.getFlicker()).collect(Collectors.toList());
|
||||
List<DataPlt> list = map9.get(time);
|
||||
List<DataPlt> l = list.stream().filter(s->s.getPlt()>overlimit.getFlicker()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l)){
|
||||
flicker++;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.harmonic.pojo.po.LimitRate;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatLimitRateDPO;
|
||||
import com.njcn.harmonic.pojo.po.day.RStatLimitTargetDPO;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatLimitTargetDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
import com.njcn.prepare.harmonic.service.mysql.day.IRStatLimitRateDService;
|
||||
|
||||
@@ -4,18 +4,12 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.TimeInterval;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.common.pojo.dto.SimpleDTO;
|
||||
import com.njcn.common.pojo.enums.common.ServerEnum;
|
||||
import com.njcn.device.pq.api.GeneralDeviceInfoClient;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.api.OverLimitClient;
|
||||
import com.njcn.device.pq.pojo.dto.GeneralDeviceDTO;
|
||||
import com.njcn.device.pq.pojo.param.DeviceInfoParam;
|
||||
import com.njcn.device.biz.pojo.po.Overlimit;
|
||||
import com.njcn.harmonic.pojo.po.RStatDataVD;
|
||||
import com.njcn.harmonic.pojo.po.day.*;
|
||||
import com.njcn.influxdb.param.InfluxDBPublicParam;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDBPublicParam;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.*;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.line.AbnormalMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.po.line.MpSurplusAbnormalD;
|
||||
@@ -25,7 +19,6 @@ import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.po.Dept;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
|
||||
@@ -7,12 +7,13 @@ import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||
import com.njcn.device.pq.api.LineFeignClient;
|
||||
import com.njcn.device.pq.pojo.po.RStatOnlinerateD;
|
||||
import com.njcn.energy.pojo.constant.ModelState;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDBPublicParam;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.influx.pojo.po.PqsCommunicate;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.day.RStatOnlineRateDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.dto.OnLineRateDTO;
|
||||
import com.njcn.prepare.harmonic.pojo.param.LineParam;
|
||||
|
||||
import com.njcn.prepare.harmonic.pojo.influxdb.po.PqsCommunicatePO;
|
||||
import com.njcn.prepare.harmonic.service.mysql.line.OnlineRateService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -31,7 +32,6 @@ import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import static com.njcn.influxdb.param.InfluxDBPublicParam.DAY_MINUTE;
|
||||
|
||||
/**
|
||||
* 生成在线率数据
|
||||
@@ -56,14 +56,14 @@ public class OnlineRateServiceImpl extends MppServiceImpl<RStatOnlineRateDMapper
|
||||
if (CollUtil.isEmpty(lineParam.getLineIds())){
|
||||
lineIdList = lineFeignClient.getDeviceList().getData();
|
||||
}
|
||||
List<PqsCommunicatePO> outCommunicateData = new ArrayList<>();
|
||||
List<PqsCommunicate> outCommunicateData = new ArrayList<>();
|
||||
for (String lineId : lineIdList){
|
||||
List<PqsCommunicatePO> communicateData = getCommunicateData(lineId);
|
||||
List<PqsCommunicate> communicateData = getCommunicateData(lineId);
|
||||
outCommunicateData.addAll(communicateData);
|
||||
}
|
||||
List<String> records = new ArrayList<>();
|
||||
Date dateOut = DateUtil.parse(lineParam.getDataDate());
|
||||
for (PqsCommunicatePO pqsCommunicate : outCommunicateData){
|
||||
for (PqsCommunicate pqsCommunicate : outCommunicateData){
|
||||
Map<String, String> tags = new HashMap<>();
|
||||
Map<String, Object> fields = new HashMap<>();
|
||||
Date newDate = Date.from(pqsCommunicate.getTime());
|
||||
@@ -90,14 +90,14 @@ public class OnlineRateServiceImpl extends MppServiceImpl<RStatOnlineRateDMapper
|
||||
if (CollUtil.isEmpty(lineParam.getLineIds())){
|
||||
lineIdList = lineFeignClient.getDeviceList().getData();
|
||||
}
|
||||
List<PqsCommunicatePO> outCommunicateData = new ArrayList<>();
|
||||
List<PqsCommunicate> outCommunicateData = new ArrayList<>();
|
||||
for (String lineId : lineIdList){
|
||||
List<PqsCommunicatePO> communicateData = getCommunicateData(lineId);
|
||||
List<PqsCommunicate> communicateData = getCommunicateData(lineId);
|
||||
outCommunicateData.addAll(communicateData);
|
||||
}
|
||||
List<RStatOnlinerateD> list = new ArrayList<>();
|
||||
Date dateOut = DateUtil.parse(time);
|
||||
for (PqsCommunicatePO pqsCommunicate : outCommunicateData){
|
||||
for (PqsCommunicate pqsCommunicate : outCommunicateData){
|
||||
RStatOnlinerateD onlineRateDpo = new RStatOnlinerateD();
|
||||
Date newDate = Date.from(pqsCommunicate.getTime());
|
||||
OnLineRateDTO onLineRate = onLineMinute(newDate,dateOut,pqsCommunicate.getType(),pqsCommunicate.getDevId(),time);
|
||||
@@ -113,25 +113,25 @@ public class OnlineRateServiceImpl extends MppServiceImpl<RStatOnlineRateDMapper
|
||||
/**
|
||||
* 获取pqs_communicate数据
|
||||
*/
|
||||
private List<PqsCommunicatePO> getCommunicateData(String lineId){
|
||||
private List<PqsCommunicate> getCommunicateData(String lineId){
|
||||
QueryResult sqlResult = influxDbUtils.query("SELECT * FROM pqs_communicate where dev_id = '" + lineId +"' order by time desc limit 1 tz('Asia/Shanghai')");
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
return resultMapper.toPOJO(sqlResult, PqsCommunicatePO.class);
|
||||
return resultMapper.toPOJO(sqlResult, PqsCommunicate.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取范围时间内的pqs_communicate数据
|
||||
*/
|
||||
private List<PqsCommunicatePO> getCommunicateData(String lineId, String date){
|
||||
private List<PqsCommunicate> getCommunicateData(String lineId, String date){
|
||||
QueryResult sqlResult = influxDbUtils.query("SELECT * FROM pqs_communicate where time >= '" + date + " 00:00:00' and time <= '" + date + " 23:59:59' and dev_id = '" + lineId +"' order by time asc tz('Asia/Shanghai')");
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
return resultMapper.toPOJO(sqlResult, PqsCommunicatePO.class);
|
||||
return resultMapper.toPOJO(sqlResult, PqsCommunicate.class);
|
||||
}
|
||||
|
||||
private List<PqsCommunicatePO> getCommunicateDataOld(String lineId, String date){
|
||||
private List<PqsCommunicate> getCommunicateDataOld(String lineId, String date){
|
||||
QueryResult sqlResult = influxDbUtils.query("SELECT * FROM pqs_communicate where time <= '" + date + " 23:59:59' and dev_id = '" + lineId +"' order by time desc limit 1 tz('Asia/Shanghai')");
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
return resultMapper.toPOJO(sqlResult, PqsCommunicatePO.class);
|
||||
return resultMapper.toPOJO(sqlResult, PqsCommunicate.class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -151,12 +151,12 @@ public class OnlineRateServiceImpl extends MppServiceImpl<RStatOnlineRateDMapper
|
||||
minute = processData(newDate, date, null, lineId, dateStr);
|
||||
}else {
|
||||
if (ModelState.online.equals(type)){
|
||||
minute = DAY_MINUTE;
|
||||
minute = InfluxDBPublicParam.DAY_MINUTE;
|
||||
}
|
||||
}
|
||||
}
|
||||
onLineRate.setOnLineMinute(minute);
|
||||
onLineRate.setOffLineMinute(DAY_MINUTE - minute);
|
||||
onLineRate.setOffLineMinute(InfluxDBPublicParam.DAY_MINUTE - minute);
|
||||
BigDecimal onLine = BigDecimal.valueOf(onLineRate.getOnLineMinute());
|
||||
BigDecimal offLine = BigDecimal.valueOf(onLineRate.getOffLineMinute());
|
||||
double rate = onLine.divide(onLine.add(offLine),4, RoundingMode.HALF_UP).doubleValue();
|
||||
@@ -166,7 +166,7 @@ public class OnlineRateServiceImpl extends MppServiceImpl<RStatOnlineRateDMapper
|
||||
|
||||
private Integer processData(Date newDate, Date date, Integer type,String lineId,String dateStr){
|
||||
int minute = 0;
|
||||
List<PqsCommunicatePO> communicateData = getCommunicateData(lineId,dateStr);
|
||||
List<PqsCommunicate> communicateData = getCommunicateData(lineId,dateStr);
|
||||
/*当前统计时间内存在多条数据*/
|
||||
if (communicateData.size() > 1){
|
||||
Date lastTime = null;
|
||||
@@ -189,7 +189,7 @@ public class OnlineRateServiceImpl extends MppServiceImpl<RStatOnlineRateDMapper
|
||||
lastTime = Date.from(communicateData.get(i).getTime());
|
||||
}
|
||||
if (ModelState.online.equals(communicateData.get(communicateData.size()-1).getType())){
|
||||
minute = DAY_MINUTE - (int)offlineTime;
|
||||
minute = InfluxDBPublicParam.DAY_MINUTE - (int)offlineTime;
|
||||
}else {
|
||||
minute = (int)onlineTime;
|
||||
}
|
||||
@@ -198,13 +198,13 @@ public class OnlineRateServiceImpl extends MppServiceImpl<RStatOnlineRateDMapper
|
||||
/*当前统计时间内仅有一条数据*/
|
||||
long differ = DateUtil.between(date,newDate,DateUnit.MINUTE);
|
||||
if (ModelState.online.equals(type)){
|
||||
minute = DAY_MINUTE - (int)differ;
|
||||
minute = InfluxDBPublicParam.DAY_MINUTE - (int)differ;
|
||||
}
|
||||
}else {
|
||||
List<PqsCommunicatePO> communicateDataOld = getCommunicateDataOld(lineId,dateStr);
|
||||
List<PqsCommunicate> communicateDataOld = getCommunicateDataOld(lineId,dateStr);
|
||||
if (communicateDataOld.size() > 0){
|
||||
if (ModelState.online.equals(communicateDataOld.get(0).getType())){
|
||||
minute = DAY_MINUTE;
|
||||
minute = InfluxDBPublicParam.DAY_MINUTE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,11 +8,12 @@ import com.njcn.device.biz.commApi.CommLineClient;
|
||||
import com.njcn.device.biz.pojo.dto.LineDTO;
|
||||
import com.njcn.device.pq.constant.Param;
|
||||
import com.njcn.device.pq.pojo.po.PmsAbnormalRules;
|
||||
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
||||
import com.njcn.influx.pojo.po.DataFlicker;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.line.PmsAbnormalRulesMapper;
|
||||
import com.njcn.prepare.harmonic.mapper.mysql.line.RMpMonitorEvaluateDMapper;
|
||||
import com.njcn.prepare.harmonic.pojo.dto.DataVFiveItemDTO;
|
||||
import com.njcn.prepare.harmonic.pojo.mysql.RMpMonitorEvaluateDPO;
|
||||
import com.njcn.prepare.harmonic.pojo.po.DataFlicker;
|
||||
import com.njcn.prepare.harmonic.service.influxdb.DataIntegrityRateInfluxService;
|
||||
import com.njcn.prepare.harmonic.service.influxdb.DataVInfluxdbService;
|
||||
import com.njcn.prepare.harmonic.service.mysql.line.RMpMonitorEvaluateDService;
|
||||
|
||||
@@ -21,9 +21,9 @@ import com.njcn.harmonic.pojo.dto.ReportTemplateDTO;
|
||||
import com.njcn.harmonic.pojo.po.ExcelRpt;
|
||||
import com.njcn.harmonic.pojo.po.ExcelRptTemp;
|
||||
import com.njcn.harmonic.pojo.po.SysDeptTemp;
|
||||
import com.njcn.influxdb.param.InfluxDBSqlConstant;
|
||||
import com.njcn.influxdb.param.InfluxDBTableConstant;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.njcn.influx.deprecated.InfluxDBSqlConstant;
|
||||
import com.njcn.influx.deprecated.InfluxDbUtils;
|
||||
import com.njcn.influx.pojo.constant.InfluxDBTableConstant;
|
||||
import com.njcn.oss.constant.OssPath;
|
||||
import com.njcn.oss.utils.FileStorageUtil;
|
||||
import com.njcn.prepare.harmonic.constant.AlgorithmParam;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user