初始化
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package com.njcn.executor;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2022年03月22日 10:07
|
||||
*/
|
||||
@Slf4j
|
||||
@MapperScan("com.njcn.**.mapper")
|
||||
@EnableFeignClients(basePackages = "com.njcn")
|
||||
@SpringBootApplication(scanBasePackages = "com.njcn")
|
||||
public class JobExecutorApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(JobExecutorApplication.class);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.njcn.executor.config;
|
||||
|
||||
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* xxl-job config
|
||||
*
|
||||
* @author xuxueli 2017-04-28
|
||||
*/
|
||||
@Configuration
|
||||
public class XxlJobConfig {
|
||||
private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
|
||||
|
||||
@Value("${xxl.job.admin.addresses}")
|
||||
private String adminAddresses;
|
||||
|
||||
@Value("${xxl.job.accessToken}")
|
||||
private String accessToken;
|
||||
|
||||
@Value("${xxl.job.executor.appname}")
|
||||
private String appname;
|
||||
|
||||
@Value("${xxl.job.executor.address}")
|
||||
private String address;
|
||||
|
||||
@Value("${xxl.job.executor.ip}")
|
||||
private String ip;
|
||||
|
||||
@Value("${xxl.job.executor.port}")
|
||||
private int port;
|
||||
|
||||
@Value("${xxl.job.executor.logpath}")
|
||||
private String logPath;
|
||||
|
||||
@Value("${xxl.job.executor.logretentiondays}")
|
||||
private int logRetentionDays;
|
||||
|
||||
|
||||
@Bean
|
||||
public XxlJobSpringExecutor xxlJobExecutor() {
|
||||
logger.info(">>>>>>>>>>> xxl-job config init.");
|
||||
XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
|
||||
xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
|
||||
xxlJobSpringExecutor.setAppname(appname);
|
||||
xxlJobSpringExecutor.setAddress(address);
|
||||
xxlJobSpringExecutor.setIp(ip);
|
||||
xxlJobSpringExecutor.setPort(port);
|
||||
xxlJobSpringExecutor.setAccessToken(accessToken);
|
||||
xxlJobSpringExecutor.setLogPath(logPath);
|
||||
xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
|
||||
|
||||
return xxlJobSpringExecutor;
|
||||
}
|
||||
|
||||
/**
|
||||
* 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
|
||||
*
|
||||
* 1、引入依赖:
|
||||
* <dependency>
|
||||
* <groupId>org.springframework.cloud</groupId>
|
||||
* <artifactId>spring-cloud-commons</artifactId>
|
||||
* <version>${version}</version>
|
||||
* </dependency>
|
||||
*
|
||||
* 2、配置文件,或者容器启动变量
|
||||
* spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
|
||||
*
|
||||
* 3、获取IP
|
||||
* String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
|
||||
*/
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.njcn.executor.handler;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.njcn.energy.pojo.api.EleAirStrategyFeignClient;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 空调策略
|
||||
* @author cdf
|
||||
* @date 2022/4/21
|
||||
*/
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class AirStrategyJob {
|
||||
|
||||
private final EleAirStrategyFeignClient eleAirStrategyFeignClient;
|
||||
|
||||
|
||||
|
||||
@XxlJob("airStrategyJob")
|
||||
public void airStrategyJob() {
|
||||
|
||||
try {
|
||||
|
||||
String command = XxlJobHelper.getJobParam();
|
||||
//获取所有策略监测点
|
||||
String[] arr = command.split(StrUtil.COMMA);
|
||||
eleAirStrategyFeignClient.dealAirStrategyId(arr[1], arr[0]);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,165 @@
|
||||
package com.njcn.executor.handler;
|
||||
|
||||
import com.njcn.energy.pojo.api.EleIntegrityFeignClient;
|
||||
import com.njcn.executor.pojo.dto.HarmonicDTO;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
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.springframework.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/4/13 15:19
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class EleIntegrityJob {
|
||||
|
||||
private final Integer POWER_DATA_DUE = 96;
|
||||
|
||||
private final Integer AIR_DATA_DUE = 288;
|
||||
|
||||
private final String DATABASE = "pqsbase";
|
||||
|
||||
private final InfluxDbUtils influxDbUtils;
|
||||
|
||||
private final EleIntegrityFeignClient eleIntegrityFeignClient;
|
||||
|
||||
@XxlJob("eleIntegrityJobHandler")
|
||||
public void eleIntegrityJobHandler() {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)-1, 0, 0, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
Calendar calendar2 = Calendar.getInstance();
|
||||
calendar2.set(calendar2.get(Calendar.YEAR), calendar2.get(Calendar.MONTH), calendar2.get(Calendar.DAY_OF_MONTH)-1, 23, 59, 59);
|
||||
calendar2.set(Calendar.MILLISECOND, 0);
|
||||
String startTime = format.format(calendar.getTime());
|
||||
String endTime = format.format(calendar2.getTime());
|
||||
|
||||
List<HarmonicDTO> powerData = getPowerData(startTime,endTime);
|
||||
if(!CollectionUtils.isEmpty(powerData)){
|
||||
createMeasurement(powerData,calendar.getTimeInMillis());
|
||||
} else {
|
||||
List<HarmonicDTO> result = new ArrayList<>();
|
||||
//查询当前网关下所有监测点id
|
||||
List<String> lineList = eleIntegrityFeignClient.getPowerLineId().getData();
|
||||
lineList.forEach(item->{
|
||||
HarmonicDTO harmonicDTO = new HarmonicDTO();
|
||||
harmonicDTO.setId(item);
|
||||
harmonicDTO.setReal(0);
|
||||
harmonicDTO.setDue(96);
|
||||
result.add(harmonicDTO);
|
||||
});
|
||||
createMeasurement(result,calendar.getTimeInMillis());
|
||||
}
|
||||
List<HarmonicDTO> airData = getAirData(startTime,endTime);
|
||||
if(!CollectionUtils.isEmpty(airData)){
|
||||
powerData = new ArrayList<>(airData);
|
||||
createMeasurement(powerData,calendar.getTimeInMillis());
|
||||
} else {
|
||||
List<HarmonicDTO> result = new ArrayList<>();
|
||||
//查询当前网关下所有监测点id
|
||||
List<String> lineList = eleIntegrityFeignClient.getAirLineId().getData();
|
||||
lineList.forEach(item->{
|
||||
HarmonicDTO harmonicDTO = new HarmonicDTO();
|
||||
harmonicDTO.setId(item);
|
||||
harmonicDTO.setReal(0);
|
||||
harmonicDTO.setDue(288);
|
||||
result.add(harmonicDTO);
|
||||
});
|
||||
createMeasurement(result,calendar.getTimeInMillis());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成power_data数据
|
||||
*/
|
||||
private List<HarmonicDTO> getPowerData(String startTime, String endTime){
|
||||
List<HarmonicDTO> list = new ArrayList<>();
|
||||
String sql = "SELECT count(FundWattHr) FROM power_data where time >= '"+startTime+"' and time <= '"+endTime+"' group by LineId";
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
//处理结果集
|
||||
List<QueryResult.Series> seriesList = sqlResult.getResults().get(0).getSeries();
|
||||
if (!CollectionUtils.isEmpty(seriesList)){
|
||||
seriesList.forEach(po -> {
|
||||
HarmonicDTO harmonicDTO = new HarmonicDTO();
|
||||
String lineId = po.getTags().get("LineId");
|
||||
List<List<Object>> countList = po.getValues();
|
||||
for (List<Object> value : countList) {
|
||||
//当日实际数据
|
||||
Integer count = new BigDecimal(value.get(1).toString()).intValue();
|
||||
harmonicDTO.setId(lineId);
|
||||
harmonicDTO.setReal(count);
|
||||
harmonicDTO.setDue(POWER_DATA_DUE);
|
||||
}
|
||||
list.add(harmonicDTO);
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成air_data数据
|
||||
*/
|
||||
private List<HarmonicDTO> getAirData(String startTime, String endTime){
|
||||
List<HarmonicDTO> list = new ArrayList<>();
|
||||
String sql = "SELECT count(ACInMode),count(ACOutMode) FROM air_data where time >='"+startTime+"' and time <= '"+endTime+"' group by LineId";
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
//处理结果集
|
||||
List<QueryResult.Series> seriesList = sqlResult.getResults().get(0).getSeries();
|
||||
if (!CollectionUtils.isEmpty(seriesList)){
|
||||
seriesList.forEach(po -> {
|
||||
HarmonicDTO harmonicDTO = new HarmonicDTO();
|
||||
String lineId = po.getTags().get("LineId");
|
||||
List<List<Object>> countList = po.getValues();
|
||||
for (List<Object> value : countList) {
|
||||
//当日实际数据
|
||||
if (!Objects.isNull(value.get(1))){
|
||||
harmonicDTO.setReal(new BigDecimal(value.get(1).toString()).intValue());
|
||||
} else {
|
||||
harmonicDTO.setReal(new BigDecimal(value.get(2).toString()).intValue());
|
||||
}
|
||||
harmonicDTO.setId(lineId);
|
||||
harmonicDTO.setDue(AIR_DATA_DUE);
|
||||
}
|
||||
list.add(harmonicDTO);
|
||||
});
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成用能数据完整性表
|
||||
*/
|
||||
private void createMeasurement(List<HarmonicDTO> list, long time){
|
||||
List<String> records = new ArrayList<String>();
|
||||
list.forEach(item->{
|
||||
Map<String, String> tags = new HashMap<>();
|
||||
Map<String, Object> fields = new HashMap<>();
|
||||
tags.put("line_id",item.getId());
|
||||
fields.put("real",item.getReal());
|
||||
fields.put("due",item.getDue());
|
||||
Point point = influxDbUtils.pointBuilder("ele_integrity", time, TimeUnit.MILLISECONDS, tags, fields);
|
||||
BatchPoints batchPoints = BatchPoints.database(DATABASE).tag("line_id", item.getId()).retentionPolicy("").consistency(InfluxDB.ConsistencyLevel.ALL).build();
|
||||
batchPoints.point(point);
|
||||
records.add(batchPoints.lineProtocol());
|
||||
});
|
||||
influxDbUtils.batchInsert(DATABASE,"", InfluxDB.ConsistencyLevel.ALL, records);
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.njcn.executor.handler;
|
||||
|
||||
import com.njcn.energy.pojo.api.EleOnlineRateFeignClient;
|
||||
import com.njcn.energy.pojo.dto.OnlineRateDTO;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.influxdb.InfluxDB;
|
||||
import org.influxdb.dto.BatchPoints;
|
||||
import org.influxdb.dto.Point;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/4/15 15:57
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class EleOnlineRateJob {
|
||||
|
||||
private final String DATABASE = "pqsbase";
|
||||
|
||||
private final InfluxDbUtils influxDbUtils;
|
||||
|
||||
private final EleOnlineRateFeignClient eleOnlineRateFeignClient;
|
||||
|
||||
@XxlJob("eleOnlineRateJobHandler")
|
||||
public void eleOnlineRateJobHandler() {
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)-1, 0, 0, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
Calendar calendar2 = Calendar.getInstance();
|
||||
calendar2.set(calendar2.get(Calendar.YEAR), calendar2.get(Calendar.MONTH), calendar2.get(Calendar.DAY_OF_MONTH)-1, 23, 59, 59);
|
||||
calendar2.set(Calendar.MILLISECOND, 0);
|
||||
String startTime = format.format(calendar.getTime());
|
||||
String endTime = format.format(calendar2.getTime());
|
||||
List<OnlineRateDTO> list = eleOnlineRateFeignClient.getDeviceTime(startTime,endTime).getData();
|
||||
createMeasurement(list,calendar.getTimeInMillis());
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成用能终端在线率表
|
||||
*/
|
||||
private void createMeasurement(List<OnlineRateDTO> list, long time){
|
||||
List<String> records = new ArrayList<String>();
|
||||
list.forEach(item->{
|
||||
Map<String, String> tags = new HashMap<>();
|
||||
Map<String, Object> fields = new HashMap<>();
|
||||
tags.put("device_id",item.getDeviceId());
|
||||
fields.put("online_rate",item.getOnlineRate());
|
||||
Point point = influxDbUtils.pointBuilder("ele_online_rate", time, TimeUnit.MILLISECONDS, tags, fields);
|
||||
BatchPoints batchPoints = BatchPoints.database(DATABASE).tag("device_id", item.getDeviceId()).retentionPolicy("").consistency(InfluxDB.ConsistencyLevel.ALL).build();
|
||||
batchPoints.point(point);
|
||||
records.add(batchPoints.lineProtocol());
|
||||
});
|
||||
influxDbUtils.batchInsert(DATABASE,"", InfluxDB.ConsistencyLevel.ALL, records);
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.njcn.executor.handler;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.influxdb.dto.BatchPoints;
|
||||
import org.influxdb.dto.Point;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.Instant;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* pqs
|
||||
* 电能量增量数据处理 10分钟执行一轮
|
||||
*
|
||||
* @author cdf
|
||||
* @date 2022/4/7
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class ElectricCalJob {
|
||||
|
||||
private final InfluxDbUtils influxDbUtils;
|
||||
|
||||
@XxlJob("ElectricCalJob")
|
||||
public void ElectricCalJob() {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar startTime = Calendar.getInstance();
|
||||
|
||||
startTime.add(Calendar.MINUTE, -40);
|
||||
String start = sdf.format(startTime.getTime());
|
||||
|
||||
Calendar endTime = Calendar.getInstance();
|
||||
//endTime.add(Calendar.DAY_OF_MONTH,-8);
|
||||
String end = sdf.format(endTime.getTime());
|
||||
|
||||
String sql = "select * from power_data where time > '" + start + "' and time < '" + end + "' order by time";
|
||||
List<Map<String, Object>> list = influxDbUtils.getResult(sql);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
Map lineTemMap = new HashMap<>();
|
||||
List<Map<String, Object>> insertObj = new ArrayList<>();
|
||||
list.stream().collect(Collectors.groupingBy((item) -> item.get("LineId"), Collectors.toList())).forEach(lineTemMap::put);
|
||||
lineTemMap.forEach((lineId, mapList) -> {
|
||||
List<Map<String, Object>> tmpList = (List) mapList;
|
||||
if (CollectionUtil.isNotEmpty(tmpList)) {
|
||||
for (int i = 0; i < tmpList.size(); i++) {
|
||||
if (i != 0) {
|
||||
Map<String, Object> mapEnd = tmpList.get(i);
|
||||
Map<String, Object> mapStart = tmpList.get(i - 1);
|
||||
Long endT = (Long) mapEnd.get("time") + 28800;
|
||||
Long startT = (Long) mapStart.get("time") + 28800;
|
||||
if (endT > startT) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if (endT - startT == 60 * 15) {
|
||||
for (Entry<String, Object> entry : tmpList.get(i).entrySet()) {
|
||||
if (entry.getKey().equals("Phase") || entry.getKey().equals("LineId") || entry.getKey().equals("Stat_Method")) {
|
||||
map.put(entry.getKey(), entry.getValue());
|
||||
} else if (entry.getKey().equals("time")) {
|
||||
map.put(entry.getKey(), endT);
|
||||
} else {
|
||||
//定义 float最大值
|
||||
Float endThis = Float.parseFloat(entry.getValue().toString());
|
||||
Float startThis = Float.parseFloat(mapStart.get(entry.getKey()).toString());
|
||||
if (-1000000f == endThis || -1000000f == startThis) {
|
||||
map.put(entry.getKey(), -1000000f);
|
||||
} else {
|
||||
map.put(entry.getKey(), endThis - startThis);
|
||||
}
|
||||
}
|
||||
}
|
||||
insertObj.add(map);
|
||||
} else {
|
||||
//缺少数据处理
|
||||
|
||||
}
|
||||
} else {
|
||||
log.error("时间起始顺序错误!");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (CollectionUtil.isNotEmpty(insertObj)) {
|
||||
BatchPoints batchPoints = BatchPoints.database("pqsbase").build();
|
||||
for (Map<String, Object> it : insertObj) {
|
||||
Point.Builder point = Point.measurement("power_data_add");
|
||||
it.forEach((key, val) -> {
|
||||
if (key.equals("LineId")) {
|
||||
point.tag(key, val.toString());
|
||||
} else if (key.equals("time")) {
|
||||
point.time((Long) val, TimeUnit.SECONDS);
|
||||
} else if (key.equals("Phase") || key.equals("Stat_Method")) {
|
||||
point.addField(key, val.toString());
|
||||
} else {
|
||||
point.addField(key, (Float) val);
|
||||
}
|
||||
});
|
||||
Point p = point.build();
|
||||
batchPoints.point(p);
|
||||
}
|
||||
|
||||
try {
|
||||
influxDbUtils.batchInsert(batchPoints, TimeUnit.SECONDS);
|
||||
HashMap<String, Map<String, Object>> hashMap = new HashMap<>();
|
||||
for (int j = 0; j < insertObj.size(); j++) {
|
||||
hashMap.put(insertObj.get(j).get("LineId").toString(), insertObj.get(j));
|
||||
}
|
||||
hashMap.forEach((key, val) -> {
|
||||
Long t = (Long) val.get("time") * 1000 - 28800000;
|
||||
String tt = Instant.ofEpochMilli((Long) val.get("time") * 1000).toString();
|
||||
String sqlQs = "delete from power_data_add_Real where time< '" + tt + "' and LineId ='" + key + "'";
|
||||
influxDbUtils.deleteMeasurementData(sqlQs);
|
||||
Map<String, Object> filedss = new HashMap<>();
|
||||
Map<String, String> tagss = new HashMap<>();
|
||||
val.forEach((keytem, valtem) -> {
|
||||
if (keytem.equals("time")) {
|
||||
|
||||
} else if (keytem.equals("LineId")) {
|
||||
tagss.put(keytem, valtem.toString());
|
||||
} else {
|
||||
filedss.put(keytem, valtem);
|
||||
}
|
||||
});
|
||||
influxDbUtils.insert("power_data_add_Real", tagss, filedss, t, TimeUnit.MILLISECONDS);
|
||||
});
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
log.error(start + "——————" + end + "数据为空");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,984 @@
|
||||
package com.njcn.executor.handler;
|
||||
|
||||
import com.njcn.common.pojo.constant.PatternRegex;
|
||||
import com.njcn.device.api.LineFeignClient;
|
||||
import com.njcn.device.pojo.dto.PollutionParamDTO;
|
||||
import com.njcn.device.pojo.po.Overlimit;
|
||||
import com.njcn.executor.pojo.vo.*;
|
||||
import com.njcn.harmonic.constant.Param;
|
||||
import com.njcn.harmonic.pojo.po.LimitTarget;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
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.stereotype.Component;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/17 14:34
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class LimitTargetJob {
|
||||
|
||||
private final String DATABASE = "pqsbase";
|
||||
|
||||
private final InfluxDbUtils influxDbUtils;
|
||||
|
||||
private final LineFeignClient lineFeignClient;
|
||||
|
||||
@XxlJob("limitTargetJobHandler")
|
||||
public void getLimitTarget() throws ParseException {
|
||||
List<String> list = new ArrayList<>(),paramList = new ArrayList<>();;
|
||||
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)-1, 0, 0, 0);
|
||||
calendar.set(Calendar.MILLISECOND, 0);
|
||||
Calendar calendar2 = Calendar.getInstance();
|
||||
calendar2.set(calendar2.get(Calendar.YEAR), calendar2.get(Calendar.MONTH), calendar2.get(Calendar.DAY_OF_MONTH)-1, 23, 59, 59);
|
||||
calendar2.set(Calendar.MILLISECOND, 0);
|
||||
String startTime = format.format(calendar.getTime());
|
||||
String endTime = format.format(calendar2.getTime());
|
||||
String command = XxlJobHelper.getJobParam();
|
||||
if (!StringUtils.isEmpty(command)){
|
||||
paramList = Arrays.asList(command.split(","));
|
||||
startTime = paramList.get(0);
|
||||
endTime = paramList.get(1);
|
||||
list = paramList.subList(2,paramList.size());
|
||||
if (CollectionUtils.isEmpty(list)){
|
||||
log.info("补招未传入监测点,默认使用系统查询的监测点");
|
||||
list = lineFeignClient.getLineList().getData();
|
||||
}
|
||||
boolean s1 = Pattern.matches(PatternRegex.TIME_FORMAT,startTime);
|
||||
boolean e1 = Pattern.matches(PatternRegex.TIME_FORMAT,endTime);
|
||||
if (!s1 || !e1){
|
||||
log.error("补招时间格式错误");
|
||||
return;
|
||||
} else {
|
||||
startTime = startTime + " 00:00:00";
|
||||
endTime = endTime + " 23:59:59";
|
||||
}
|
||||
} else {
|
||||
list = lineFeignClient.getLineList().getData();
|
||||
}
|
||||
long diff,diffDays,a,b = 0;
|
||||
Date d1 = format.parse(startTime);
|
||||
Date d2 = format.parse(endTime);
|
||||
diff = d2.getTime() - d1.getTime();
|
||||
diffDays = diff / (24 * 60 * 60 * 1000-1000);
|
||||
int days = (int) diffDays;
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
Map<String,List<Overlimit>> overLimitMap = new HashMap<>();
|
||||
PollutionParamDTO pollutionParamDTO = new PollutionParamDTO();
|
||||
pollutionParamDTO.setLineList(list);
|
||||
List<Overlimit> overLimitList = lineFeignClient.getOverLimitByList(pollutionParamDTO).getData();
|
||||
if (!CollectionUtils.isEmpty(overLimitList)){
|
||||
overLimitMap = overLimitList.stream().collect(Collectors.groupingBy(Overlimit::getId));
|
||||
}
|
||||
for (int i = 1; i <= days; i++) {
|
||||
a = d1.getTime() + (long)(i-1)*(24 * 60 * 60) * 1000;
|
||||
b = d1.getTime() + (long)i*(24 * 60 * 60) * 1000-1000;
|
||||
startTime = format.format(a);
|
||||
endTime = format.format(b);
|
||||
Map<String,List<DayV>> map1 = getAllTime(list,startTime,endTime);
|
||||
Map<String,List<DayPlt>> map2 = getFlickerAllTime(list,startTime,endTime);
|
||||
Map<String,List<DayHarmrateV>> map3 = getDayHarmrateV(list,startTime,endTime);
|
||||
Map<String,List<DayI>> map4 = getDayI(list,startTime,endTime);
|
||||
Map<String,List<DayInharmV>> map5 = getDayInharmV(list,startTime,endTime);
|
||||
Map<String,List<DayV>> map6 = getDayV(list,startTime,endTime);
|
||||
Map<String,List<DayV>> map7 = getDayVUnbalance(list,startTime,endTime);
|
||||
Map<String,List<DayI>> map8 = getDayINeg(list,startTime,endTime);
|
||||
Map<String,List<DayV>> map9 = getDayVFreq(list,startTime,endTime);
|
||||
Map<String,List<DayV>> map10 = getDayVDev(list,startTime,endTime);
|
||||
Map<String,List<DayPlt>> map11 = getDayPlt(list,startTime,endTime);
|
||||
List<LimitTarget> result = getData(overLimitMap,map1,map2,map3,map4,map5,map6,map7,map8,map9,map10,map11);
|
||||
//入库
|
||||
if (!CollectionUtils.isEmpty(result)){
|
||||
insert(result,a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 组装T项数据
|
||||
*/
|
||||
private List<LimitTarget> getData(Map<String,List<Overlimit>> limitMap, Map<String,List<DayV>> map1, Map<String,List<DayPlt>> map2, Map<String,List<DayHarmrateV>> map3,Map<String,List<DayI>> map4,Map<String,List<DayInharmV>> map5,Map<String,List<DayV>> map6,Map<String,List<DayV>> map7,Map<String,List<DayI>> map8,Map<String,List<DayV>> map9,Map<String,List<DayV>> map10,Map<String,List<DayPlt>> map11){
|
||||
List<LimitTarget> result = new ArrayList<>();
|
||||
for (String item:limitMap.keySet()){
|
||||
Integer allTime = 0;
|
||||
Integer flickerAllTime = 0;
|
||||
Overlimit overlimit = limitMap.get(item).get(0);
|
||||
if (!CollectionUtils.isEmpty(map1.get(item))){
|
||||
allTime = map1.get(item).get(0).getAllTime();
|
||||
if (allTime > 0){
|
||||
allTime = 1;
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(map2.get(item))){
|
||||
flickerAllTime = map2.get(item).get(0).getFlickerAllTime();
|
||||
if (flickerAllTime > 0){
|
||||
flickerAllTime = 1;
|
||||
}
|
||||
}
|
||||
List<DayHarmrateV> list1 = map3.get(item);
|
||||
List<DayI> list2 = map4.get(item);
|
||||
List<DayInharmV> list3 = map5.get(item);
|
||||
List<DayV> list4 = map6.get(item);
|
||||
List<DayV> list5 = map7.get(item);
|
||||
List<DayI> list6 = map8.get(item);
|
||||
List<DayV> list7 = map9.get(item);
|
||||
List<DayV> list8 = map10.get(item);
|
||||
List<DayPlt> list9 = map11.get(item);
|
||||
LimitTarget t = limitTargetDataT(overlimit,allTime,flickerAllTime,item,list1,list2,list3,list4,list5,list6,list7,list8,list9);
|
||||
result.add(t);
|
||||
};
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* T项指标统计
|
||||
*/
|
||||
public LimitTarget limitTargetDataT(Overlimit overlimit, Integer allTime, Integer flickerAllTime, String lineId, List<DayHarmrateV> list1, List<DayI> list2, List<DayInharmV> list3 ,List<DayV> list4 ,List<DayV> list5, List<DayI> list6, List<DayV> list7, List<DayV> list8, List<DayPlt> list9){
|
||||
LimitTarget limitTarget = new LimitTarget();
|
||||
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;
|
||||
int uHarm1 = 0,uHarm2 = 0,uHarm3 = 0,uHarm4 = 0,uHarm5 = 0,uHarm6 = 0,uHarm7 = 0,uHarm8 = 0,uHarm9 = 0,uHarm10 = 0,uHarm11 = 0,uHarm12 = 0,uHarm13 = 0,uHarm14 = 0,uHarm15 = 0,uHarm16 = 0;
|
||||
int thd = 0,uDev = 0,flicker = 0,freqDev = 0,uAberrance = 0,iNeg = 0;
|
||||
//2-25次谐波电压含有率
|
||||
if (!CollectionUtils.isEmpty(list1)){
|
||||
List<DayHarmrateV> l2 = list1.stream().filter(s->s.getV2()>overlimit.getUharm2()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l2)){
|
||||
v2 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l3 = list1.stream().filter(s->s.getV3()>overlimit.getUharm3()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l3)){
|
||||
v3 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l4 = list1.stream().filter(s->s.getV4()>overlimit.getUharm4()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l4)){
|
||||
v4 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l5 = list1.stream().filter(s->s.getV5()>overlimit.getUharm5()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l5)){
|
||||
v5 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l6 = list1.stream().filter(s->s.getV6()>overlimit.getUharm6()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l6)){
|
||||
v6 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l7 = list1.stream().filter(s->s.getV7()>overlimit.getUharm7()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l7)){
|
||||
v7 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l8 = list1.stream().filter(s->s.getV8()>overlimit.getUharm8()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l8)){
|
||||
v8 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l9 = list1.stream().filter(s->s.getV9()>overlimit.getUharm9()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l9)){
|
||||
v9 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l10 = list1.stream().filter(s->s.getV10()>overlimit.getUharm10()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l10)){
|
||||
v10 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l11 = list1.stream().filter(s->s.getV11()>overlimit.getUharm11()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l11)){
|
||||
v11 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l12 = list1.stream().filter(s->s.getV12()>overlimit.getUharm12()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l12)){
|
||||
v12 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l13 = list1.stream().filter(s->s.getV13()>overlimit.getUharm13()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l13)){
|
||||
v13 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l14 = list1.stream().filter(s->s.getV14()>overlimit.getUharm14()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l14)){
|
||||
v14 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l15 = list1.stream().filter(s->s.getV15()>overlimit.getUharm15()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l15)){
|
||||
v15 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l16 = list1.stream().filter(s->s.getV16()>overlimit.getUharm16()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l16)){
|
||||
v16 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l17 = list1.stream().filter(s->s.getV17()>overlimit.getUharm17()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l17)){
|
||||
v17 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l18 = list1.stream().filter(s->s.getV18()>overlimit.getUharm18()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l18)){
|
||||
v18 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l19 = list1.stream().filter(s->s.getV19()>overlimit.getUharm19()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l19)){
|
||||
v19 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l20 = list1.stream().filter(s->s.getV20()>overlimit.getUharm20()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l20)){
|
||||
v20 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l21 = list1.stream().filter(s->s.getV21()>overlimit.getUharm21()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l21)){
|
||||
v21 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l22 = list1.stream().filter(s->s.getV22()>overlimit.getUharm22()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l22)){
|
||||
v22 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l23 = list1.stream().filter(s->s.getV23()>overlimit.getUharm23()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l23)){
|
||||
v23 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l24 = list1.stream().filter(s->s.getV24()>overlimit.getUharm24()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l24)){
|
||||
v24 = 1;
|
||||
}
|
||||
List<DayHarmrateV> l25 = list1.stream().filter(s->s.getV25()>overlimit.getUharm25()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l25)){
|
||||
v25 = 1;
|
||||
}
|
||||
}
|
||||
//2-25次谐波电流
|
||||
if (!CollectionUtils.isEmpty(list2)){
|
||||
List<DayI> l2 = list2.stream().filter(s->s.getI2()>overlimit.getIharm2()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l2)){
|
||||
i2 = 1;
|
||||
}
|
||||
List<DayI> l3 = list2.stream().filter(s->s.getI3()>overlimit.getIharm3()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l3)){
|
||||
i3 = 1;
|
||||
}
|
||||
List<DayI> l4 = list2.stream().filter(s->s.getI4()>overlimit.getIharm4()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l4)){
|
||||
i4 = 1;
|
||||
}
|
||||
List<DayI> l5 = list2.stream().filter(s->s.getI5()>overlimit.getIharm5()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l5)){
|
||||
i5 = 1;
|
||||
}
|
||||
List<DayI> l6 = list2.stream().filter(s->s.getI6()>overlimit.getIharm6()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l6)){
|
||||
i6 = 1;
|
||||
}
|
||||
List<DayI> l7 = list2.stream().filter(s->s.getI7()>overlimit.getIharm7()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l7)){
|
||||
i7 = 1;
|
||||
}
|
||||
List<DayI> l8 = list2.stream().filter(s->s.getI8()>overlimit.getIharm8()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l8)){
|
||||
i8 = 1;
|
||||
}
|
||||
List<DayI> l9 = list2.stream().filter(s->s.getI9()>overlimit.getIharm9()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l9)){
|
||||
i9 = 1;
|
||||
}
|
||||
List<DayI> l10 = list2.stream().filter(s->s.getI10()>overlimit.getIharm10()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l10)){
|
||||
i10 = 1;
|
||||
}
|
||||
List<DayI> l11 = list2.stream().filter(s->s.getI11()>overlimit.getIharm11()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l11)){
|
||||
i11 = 1;
|
||||
}
|
||||
List<DayI> l12 = list2.stream().filter(s->s.getI12()>overlimit.getIharm12()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l12)){
|
||||
i12 = 1;
|
||||
}
|
||||
List<DayI> l13 = list2.stream().filter(s->s.getI13()>overlimit.getIharm13()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l13)){
|
||||
i13 = 1;
|
||||
}
|
||||
List<DayI> l14 = list2.stream().filter(s->s.getI14()>overlimit.getIharm14()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l14)){
|
||||
i14 = 1;
|
||||
}
|
||||
List<DayI> l15 = list2.stream().filter(s->s.getI15()>overlimit.getIharm15()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l15)){
|
||||
i15 = 1;
|
||||
}
|
||||
List<DayI> l16 = list2.stream().filter(s->s.getI16()>overlimit.getIharm16()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l16)){
|
||||
i16 = 1;
|
||||
}
|
||||
List<DayI> l17 = list2.stream().filter(s->s.getI17()>overlimit.getIharm17()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l17)){
|
||||
i17 = 1;
|
||||
}
|
||||
List<DayI> l18 = list2.stream().filter(s->s.getI18()>overlimit.getIharm18()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l18)){
|
||||
i18 = 1;
|
||||
}
|
||||
List<DayI> l19 = list2.stream().filter(s->s.getI19()>overlimit.getIharm19()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l19)){
|
||||
i19 = 1;
|
||||
}
|
||||
List<DayI> l20 = list2.stream().filter(s->s.getI20()>overlimit.getIharm20()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l20)){
|
||||
i20 = 1;
|
||||
}
|
||||
List<DayI> l21 = list2.stream().filter(s->s.getI21()>overlimit.getIharm21()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l21)){
|
||||
i21 = 1;
|
||||
}
|
||||
List<DayI> l22 = list2.stream().filter(s->s.getI22()>overlimit.getIharm22()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l22)){
|
||||
i22 = 1;
|
||||
}
|
||||
List<DayI> l23 = list2.stream().filter(s->s.getI23()>overlimit.getIharm23()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l23)){
|
||||
i23 = 1;
|
||||
}
|
||||
List<DayI> l24 = list2.stream().filter(s->s.getI24()>overlimit.getIharm24()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l24)){
|
||||
i24 = 1;
|
||||
}
|
||||
List<DayI> l25 = list2.stream().filter(s->s.getI25()>overlimit.getIharm25()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l25)){
|
||||
i25 = 1;
|
||||
}
|
||||
}
|
||||
//0.5-15.5次间谐波电压含有率
|
||||
if (!CollectionUtils.isEmpty(list3)){
|
||||
List<DayInharmV> l2 = list3.stream().filter(s->s.getV1()>overlimit.getInuharm1()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l2)){
|
||||
uHarm1 = 1;
|
||||
}
|
||||
List<DayInharmV> l3 = list3.stream().filter(s->s.getV2()>overlimit.getInuharm2()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l3)){
|
||||
uHarm2 = 1;
|
||||
}
|
||||
List<DayInharmV> l4 = list3.stream().filter(s->s.getV3()>overlimit.getInuharm3()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l4)){
|
||||
uHarm3 = 1;
|
||||
}
|
||||
List<DayInharmV> l5 = list3.stream().filter(s->s.getV4()>overlimit.getInuharm4()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l5)){
|
||||
uHarm4 = 1;
|
||||
}
|
||||
List<DayInharmV> l6 = list3.stream().filter(s->s.getV5()>overlimit.getInuharm5()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l6)){
|
||||
uHarm5 = 1;
|
||||
}
|
||||
List<DayInharmV> l7 = list3.stream().filter(s->s.getV6()>overlimit.getInuharm6()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l7)){
|
||||
uHarm6 = 1;
|
||||
}
|
||||
List<DayInharmV> l8 = list3.stream().filter(s->s.getV7()>overlimit.getInuharm7()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l8)){
|
||||
uHarm7 = 1;
|
||||
}
|
||||
List<DayInharmV> l9 = list3.stream().filter(s->s.getV8()>overlimit.getInuharm8()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l9)){
|
||||
uHarm8 = 1;
|
||||
}
|
||||
List<DayInharmV> l10 = list3.stream().filter(s->s.getV9()>overlimit.getInuharm9()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l10)){
|
||||
uHarm9 = 1;
|
||||
}
|
||||
List<DayInharmV> l11 = list3.stream().filter(s->s.getV10()>overlimit.getInuharm10()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l11)){
|
||||
uHarm10 = 1;
|
||||
}
|
||||
List<DayInharmV> l12 = list3.stream().filter(s->s.getV11()>overlimit.getInuharm11()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l12)){
|
||||
uHarm11 = 1;
|
||||
}
|
||||
List<DayInharmV> l13 = list3.stream().filter(s->s.getV12()>overlimit.getInuharm12()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l13)){
|
||||
uHarm12 = 1;
|
||||
}
|
||||
List<DayInharmV> l14 = list3.stream().filter(s->s.getV13()>overlimit.getInuharm13()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l14)){
|
||||
uHarm13 = 1;
|
||||
}
|
||||
List<DayInharmV> l15 = list3.stream().filter(s->s.getV14()>overlimit.getInuharm14()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l15)){
|
||||
uHarm14 = 1;
|
||||
}
|
||||
List<DayInharmV> l16 = list3.stream().filter(s->s.getV15()>overlimit.getInuharm15()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l16)){
|
||||
uHarm15 = 1;
|
||||
}
|
||||
List<DayInharmV> l17 = list3.stream().filter(s->s.getV16()>overlimit.getInuharm16()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l17)){
|
||||
uHarm16 = 1;
|
||||
}
|
||||
}
|
||||
//电压总谐波畸变率
|
||||
if (!CollectionUtils.isEmpty(list4)){
|
||||
List<DayV> l = list4.stream().filter(s->s.getVThd()>overlimit.getUaberrance()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l)){
|
||||
thd = 1;
|
||||
}
|
||||
}
|
||||
//三相电压不平衡度
|
||||
if (!CollectionUtils.isEmpty(list5)){
|
||||
List<DayV> l = list5.stream().filter(s->s.getVUnbalance()>overlimit.getUbalance()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l)){
|
||||
uAberrance = 1;
|
||||
}
|
||||
}
|
||||
//负序电流
|
||||
if (!CollectionUtils.isEmpty(list6)){
|
||||
List<DayI> l = list6.stream().filter(s->s.getINeg()>overlimit.getINeg()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l)){
|
||||
iNeg = 1;
|
||||
}
|
||||
}
|
||||
//频率偏差
|
||||
if (!CollectionUtils.isEmpty(list7)){
|
||||
List<DayV> l = list7.stream().filter(s->s.getFreqDev()>overlimit.getFreqDev()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l)){
|
||||
freqDev = 1;
|
||||
}
|
||||
}
|
||||
//电压上偏差、电压下偏差
|
||||
if (!CollectionUtils.isEmpty(list8)){
|
||||
Map<String,List<DayV>> devMap = list8.stream().collect(Collectors.groupingBy(DayV::getValueType));
|
||||
List<DayV> maxList = devMap.get("MAX");
|
||||
List<DayV> minList = devMap.get("MIN");
|
||||
List<DayV> l1 = maxList.stream().filter(s->s.getVuDev()>overlimit.getVoltageDev()).collect(Collectors.toList());
|
||||
List<DayV> l2 = minList.stream().filter(s->s.getVlDev()>overlimit.getUvoltageDev()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l1) || !CollectionUtils.isEmpty(l2)){
|
||||
uDev = 1;
|
||||
}
|
||||
}
|
||||
//长时间闪变
|
||||
if (!CollectionUtils.isEmpty(list9)){
|
||||
List<DayPlt> l = list9.stream().filter(s->s.getPlt()>overlimit.getFlicker()).collect(Collectors.toList());
|
||||
if (!CollectionUtils.isEmpty(l)){
|
||||
flicker = 1;
|
||||
}
|
||||
}
|
||||
limitTarget.setLineId(lineId);
|
||||
limitTarget.setPhasicType("T");
|
||||
limitTarget.setAllTime(allTime);
|
||||
limitTarget.setFlickerAllTime(flickerAllTime);
|
||||
limitTarget.setUAberranceOverTime(uAberrance);
|
||||
limitTarget.setINegOverTime(iNeg);
|
||||
limitTarget.setFreqDevOverTime(freqDev);
|
||||
limitTarget.setUHarm2OverTime(v2);
|
||||
limitTarget.setUHarm3OverTime(v3);
|
||||
limitTarget.setUHarm4OverTime(v4);
|
||||
limitTarget.setUHarm5OverTime(v5);
|
||||
limitTarget.setUHarm6OverTime(v6);
|
||||
limitTarget.setUHarm7OverTime(v7);
|
||||
limitTarget.setUHarm8OverTime(v8);
|
||||
limitTarget.setUHarm9OverTime(v9);
|
||||
limitTarget.setUHarm10OverTime(v10);
|
||||
limitTarget.setUHarm11OverTime(v11);
|
||||
limitTarget.setUHarm12OverTime(v12);
|
||||
limitTarget.setUHarm13OverTime(v13);
|
||||
limitTarget.setUHarm14OverTime(v14);
|
||||
limitTarget.setUHarm15OverTime(v15);
|
||||
limitTarget.setUHarm16OverTime(v16);
|
||||
limitTarget.setUHarm17OverTime(v17);
|
||||
limitTarget.setUHarm18OverTime(v18);
|
||||
limitTarget.setUHarm19OverTime(v19);
|
||||
limitTarget.setUHarm20OverTime(v20);
|
||||
limitTarget.setUHarm21OverTime(v21);
|
||||
limitTarget.setUHarm22OverTime(v22);
|
||||
limitTarget.setUHarm23OverTime(v23);
|
||||
limitTarget.setUHarm24OverTime(v24);
|
||||
limitTarget.setUHarm25OverTime(v25);
|
||||
limitTarget.setIHarm2OverTime(i2);
|
||||
limitTarget.setIHarm3OverTime(i3);
|
||||
limitTarget.setIHarm4OverTime(i4);
|
||||
limitTarget.setIHarm5OverTime(i5);
|
||||
limitTarget.setIHarm6OverTime(i6);
|
||||
limitTarget.setIHarm7OverTime(i7);
|
||||
limitTarget.setIHarm8OverTime(i8);
|
||||
limitTarget.setIHarm9OverTime(i9);
|
||||
limitTarget.setIHarm10OverTime(i10);
|
||||
limitTarget.setIHarm11OverTime(i11);
|
||||
limitTarget.setIHarm12OverTime(i12);
|
||||
limitTarget.setIHarm13OverTime(i13);
|
||||
limitTarget.setIHarm14OverTime(i14);
|
||||
limitTarget.setIHarm15OverTime(i15);
|
||||
limitTarget.setIHarm16OverTime(i16);
|
||||
limitTarget.setIHarm17OverTime(i17);
|
||||
limitTarget.setIHarm18OverTime(i18);
|
||||
limitTarget.setIHarm19OverTime(i19);
|
||||
limitTarget.setIHarm20OverTime(i20);
|
||||
limitTarget.setIHarm21OverTime(i21);
|
||||
limitTarget.setIHarm22OverTime(i22);
|
||||
limitTarget.setIHarm23OverTime(i23);
|
||||
limitTarget.setIHarm24OverTime(i24);
|
||||
limitTarget.setIHarm25OverTime(i25);
|
||||
limitTarget.setInuHarm1OverTime(uHarm1);
|
||||
limitTarget.setInuHarm2OverTime(uHarm2);
|
||||
limitTarget.setInuHarm3OverTime(uHarm3);
|
||||
limitTarget.setInuHarm4OverTime(uHarm4);
|
||||
limitTarget.setInuHarm5OverTime(uHarm5);
|
||||
limitTarget.setInuHarm6OverTime(uHarm6);
|
||||
limitTarget.setInuHarm7OverTime(uHarm7);
|
||||
limitTarget.setInuHarm8OverTime(uHarm8);
|
||||
limitTarget.setInuHarm9OverTime(uHarm9);
|
||||
limitTarget.setInuHarm10OverTime(uHarm10);
|
||||
limitTarget.setInuHarm11OverTime(uHarm11);
|
||||
limitTarget.setInuHarm12OverTime(uHarm12);
|
||||
limitTarget.setInuHarm13OverTime(uHarm13);
|
||||
limitTarget.setInuHarm14OverTime(uHarm14);
|
||||
limitTarget.setInuHarm15OverTime(uHarm15);
|
||||
limitTarget.setInuHarm16OverTime(uHarm16);
|
||||
limitTarget.setUBalanceOverTime(thd);
|
||||
limitTarget.setVoltageDevOverTime(uDev);
|
||||
limitTarget.setFlickerOverTime(flicker);
|
||||
return limitTarget;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:获取influxDB -> DayV -> 总计算次数(用DayV中phasic_type=A,quality_flag=0来参与统计)
|
||||
* @author xy
|
||||
* @param line 监测点集合
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @date 2022/5/23 10:51
|
||||
* @return
|
||||
*/
|
||||
public Map<String,List<DayV>> getAllTime(List<String> line, String startTime, String endTime){
|
||||
Map<String,List<DayV>> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("(");
|
||||
for (int i = 0; i < line.size(); i++) {
|
||||
if (line.size() - i != 1) {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("') and ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(Param.TIME + " >= '").append(startTime).append("' and ").append(Param.TIME).append(" <= '").append(endTime).append("' and phasic_type = 'A' and value_type = 'AVG' and quality_flag = '1' group by line_id tz('Asia/Shanghai')");
|
||||
String sql = "SELECT count(freq) AS all_time FROM day_v where " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DayV> list = resultMapper.toPOJO(sqlResult, DayV.class);
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
map = list.stream().collect(Collectors.groupingBy(DayV::getLineId));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:获取influxDB ->DayPlt -> 闪变总次数(用DayPlt中phasic_type=A,quality_flag=0来参与统计)
|
||||
* @author xy
|
||||
* @param line 监测点集合
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @date 2022/5/23 10:51
|
||||
* @return
|
||||
*/
|
||||
public Map<String,List<DayPlt>> getFlickerAllTime(List<String> line, String startTime, String endTime){
|
||||
Map<String,List<DayPlt>> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("(");
|
||||
for (int i = 0; i < line.size(); i++) {
|
||||
if (line.size() - i != 1) {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("') and ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(Param.TIME + " >= '").append(startTime).append("' and ").append(Param.TIME).append(" <= '").append(endTime).append("' and phasic_type = 'A' and value_type = 'AVG' and quality_flag = '1' group by line_id tz('Asia/Shanghai')");
|
||||
String sql = "SELECT count(plt) AS flicker_all_time FROM day_plt where " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DayPlt> list = resultMapper.toPOJO(sqlResult, DayPlt.class);
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
map = list.stream().collect(Collectors.groupingBy(DayPlt::getLineId));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:获取influxDB -> DayHarmrateV -> 2-25次谐波电压含有率 -> 日95%概率值
|
||||
* @author xy
|
||||
* @param line 监测点集合
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @date 2022/5/23 10:51
|
||||
* @return
|
||||
*/
|
||||
public Map<String,List<DayHarmrateV>> getDayHarmrateV(List<String> line, String startTime, String endTime){
|
||||
Map<String,List<DayHarmrateV>> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("(");
|
||||
for (int i = 0; i < line.size(); i++) {
|
||||
if (line.size() - i != 1) {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("') and ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(Param.TIME + " >= '").append(startTime).append("' and ").append(Param.TIME).append(" <= '").append(endTime).append("' and (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') and value_type = 'CP95' and quality_flag = '1' tz('Asia/Shanghai')");
|
||||
String sql = "SELECT * FROM day_harmrate_v WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DayHarmrateV> list = resultMapper.toPOJO(sqlResult, DayHarmrateV.class);
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
map = list.stream().collect(Collectors.groupingBy(DayHarmrateV::getLineId));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:获取influxDB -> DayI -> 2-25次谐波电流 -> 日95%概率值
|
||||
* @author xy
|
||||
* @param line 监测点集合
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @date 2022/5/23 10:51
|
||||
* @return
|
||||
*/
|
||||
public Map<String,List<DayI>> getDayI(List<String> line, String startTime, String endTime){
|
||||
Map<String,List<DayI>> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("(");
|
||||
for (int i = 0; i < line.size(); i++) {
|
||||
if (line.size() - i != 1) {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("') and ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(Param.TIME + " >= '").append(startTime).append("' and ").append(Param.TIME).append(" <= '").append(endTime).append("' and (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') and value_type = 'CP95' and quality_flag = '1' tz('Asia/Shanghai')");
|
||||
String sql = "SELECT * FROM day_i WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DayI> list = resultMapper.toPOJO(sqlResult, DayI.class);
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
map = list.stream().collect(Collectors.groupingBy(DayI::getLineId));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:获取influxDB -> DayInharmV -> 0.5-15.5次间谐波电压含有率 -> 日95%概率值
|
||||
* @author xy
|
||||
* @param line 监测点集合
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @date 2022/5/23 10:51
|
||||
* @return
|
||||
*/
|
||||
public Map<String,List<DayInharmV>> getDayInharmV(List<String> line, String startTime, String endTime){
|
||||
Map<String,List<DayInharmV>> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("(");
|
||||
for (int i = 0; i < line.size(); i++) {
|
||||
if (line.size() - i != 1) {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("') and ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(Param.TIME + " >= '").append(startTime).append("' and ").append(Param.TIME).append(" <= '").append(endTime).append("' and (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') and value_type = 'CP95' and quality_flag = '1' tz('Asia/Shanghai')");
|
||||
String sql = "SELECT * FROM day_inharm_v WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DayInharmV> list = resultMapper.toPOJO(sqlResult, DayInharmV.class);
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
map = list.stream().collect(Collectors.groupingBy(DayInharmV::getLineId));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:获取influxDB -> DayV -> 电压总谐波畸变率 -> 日95%概率值
|
||||
* @author xy
|
||||
* @param line 监测点集合
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @date 2022/5/23 10:51
|
||||
* @return
|
||||
*/
|
||||
public Map<String,List<DayV>> getDayV(List<String> line, String startTime, String endTime){
|
||||
Map<String,List<DayV>> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("(");
|
||||
for (int i = 0; i < line.size(); i++) {
|
||||
if (line.size() - i != 1) {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("') and ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(Param.TIME + " >= '").append(startTime).append("' and ").append(Param.TIME).append(" <= '").append(endTime).append("' and (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') and value_type = 'CP95' and quality_flag = '1' tz('Asia/Shanghai')");
|
||||
String sql = "SELECT * FROM day_v WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DayV> list = resultMapper.toPOJO(sqlResult, DayV.class);
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
map = list.stream().collect(Collectors.groupingBy(DayV::getLineId));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 功能描述:获取influxDB -> DayV -> 负序电压不平衡度 -> 最大值 && 日95%概率值
|
||||
* @author xy
|
||||
* @param line 监测点集合
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @date 2022/5/23 10:51
|
||||
* @return
|
||||
*/
|
||||
public Map<String,List<DayV>> getDayVUnbalance(List<String> line, String startTime, String endTime){
|
||||
Map<String,List<DayV>> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("(");
|
||||
for (int i = 0; i < line.size(); i++) {
|
||||
if (line.size() - i != 1) {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("') and ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(Param.TIME + " >= '").append(startTime).append("' and ").append(Param.TIME).append(" <= '").append(endTime).append("' and phasic_type = 'T' and (value_type = 'CP95' or value_type = 'MAX') and quality_flag = '1' tz('Asia/Shanghai')");
|
||||
String sql = "SELECT * FROM day_v WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DayV> list = resultMapper.toPOJO(sqlResult, DayV.class);
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
map = list.stream().collect(Collectors.groupingBy(DayV::getLineId));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:获取influxDB -> DayI -> 负序电流 -> 最大值 && 日95%概率值
|
||||
* @author xy
|
||||
* @param line 监测点集合
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @date 2022/5/23 10:51
|
||||
* @return
|
||||
*/
|
||||
public Map<String,List<DayI>> getDayINeg(List<String> line, String startTime, String endTime){
|
||||
Map<String,List<DayI>> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("(");
|
||||
for (int i = 0; i < line.size(); i++) {
|
||||
if (line.size() - i != 1) {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("') and ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(Param.TIME + " >= '").append(startTime).append("' and ").append(Param.TIME).append(" <= '").append(endTime).append("' and phasic_type = 'T' and (value_type = 'CP95' or value_type = 'MAX') and quality_flag = '1' tz('Asia/Shanghai')");
|
||||
String sql = "SELECT * FROM day_i WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DayI> list = resultMapper.toPOJO(sqlResult, DayI.class);
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
map = list.stream().collect(Collectors.groupingBy(DayI::getLineId));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:获取influxDB -> DayV -> 频率偏差 -> 最大值 && 最小值
|
||||
* @author xy
|
||||
* @param line 监测点集合
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @date 2022/5/23 10:51
|
||||
* @return
|
||||
*/
|
||||
public Map<String,List<DayV>> getDayVFreq(List<String> line, String startTime, String endTime){
|
||||
Map<String,List<DayV>> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("(");
|
||||
for (int i = 0; i < line.size(); i++) {
|
||||
if (line.size() - i != 1) {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("') and ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(Param.TIME + " >= '").append(startTime).append("' and ").append(Param.TIME).append(" <= '").append(endTime).append("' and phasic_type = 'T' and (value_type = 'MIN' or value_type = 'MAX') and quality_flag = '1' tz('Asia/Shanghai')");
|
||||
String sql = "SELECT * FROM day_v WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DayV> list = resultMapper.toPOJO(sqlResult, DayV.class);
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
map = list.stream().collect(Collectors.groupingBy(DayV::getLineId));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:获取influxDB -> DayV -> 电压偏差 -> 最大值 && 最小值
|
||||
* @author xy
|
||||
* @param line 监测点集合
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @date 2022/5/23 10:51
|
||||
* @return
|
||||
*/
|
||||
public Map<String,List<DayV>> getDayVDev(List<String> line, String startTime, String endTime){
|
||||
Map<String,List<DayV>> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("(");
|
||||
for (int i = 0; i < line.size(); i++) {
|
||||
if (line.size() - i != 1) {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("') and ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(Param.TIME + " >= '").append(startTime).append("' and ").append(Param.TIME).append(" <= '").append(endTime).append("' and (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') and (value_type = 'MIN' or value_type = 'MAX') and quality_flag = '1' tz('Asia/Shanghai')");
|
||||
String sql = "SELECT * FROM day_v WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DayV> list = resultMapper.toPOJO(sqlResult, DayV.class);
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
map = list.stream().collect(Collectors.groupingBy(DayV::getLineId));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* 功能描述:获取influxDB -> DayPlt -> 长时间闪变 -> 最大值
|
||||
* @author xy
|
||||
* @param line 监测点集合
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @date 2022/5/23 10:51
|
||||
* @return
|
||||
*/
|
||||
public Map<String,List<DayPlt>> getDayPlt(List<String> line, String startTime, String endTime){
|
||||
Map<String,List<DayPlt>> map = new HashMap<>();
|
||||
StringBuilder stringBuilder = new StringBuilder();
|
||||
stringBuilder.append("(");
|
||||
for (int i = 0; i < line.size(); i++) {
|
||||
if (line.size() - i != 1) {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("' or ");
|
||||
} else {
|
||||
stringBuilder.append("line_id='").append(line.get(i)).append("') and ");
|
||||
}
|
||||
}
|
||||
stringBuilder.append(Param.TIME + " >= '").append(startTime).append("' and ").append(Param.TIME).append(" <= '").append(endTime).append("' and (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') and value_type = 'MAX' and quality_flag = '1' tz('Asia/Shanghai')");
|
||||
String sql = "SELECT * FROM day_plt WHERE " + stringBuilder;
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<DayPlt> list = resultMapper.toPOJO(sqlResult, DayPlt.class);
|
||||
if (!CollectionUtils.isEmpty(list)){
|
||||
map = list.stream().collect(Collectors.groupingBy(DayPlt::getLineId));
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
private void insert(List<LimitTarget> list, long time){
|
||||
List<String> records = new ArrayList<>();
|
||||
list.forEach(item->{
|
||||
Map<String, String> tags = new HashMap<>();
|
||||
Map<String, Object> fields = new HashMap<>();
|
||||
tags.put("line_id",item.getLineId());
|
||||
tags.put("phasic_type",item.getPhasicType());
|
||||
fields.put("all_time",item.getAllTime());
|
||||
fields.put("flicker_all_time",item.getFlickerAllTime());
|
||||
fields.put("flicker_overtime",item.getFlickerOverTime());
|
||||
fields.put("freq_dev_overtime",item.getFreqDevOverTime());
|
||||
fields.put("ubalance_overtime",item.getUBalanceOverTime());
|
||||
fields.put("uaberrance_overtime",item.getUAberranceOverTime());
|
||||
fields.put("i_neg_overtime",item.getINegOverTime());
|
||||
fields.put("voltage_dev_overtime",item.getVoltageDevOverTime());
|
||||
fields.put("uharm_2_overtime",item.getUHarm2OverTime());
|
||||
fields.put("uharm_3_overtime",item.getUHarm3OverTime());
|
||||
fields.put("uharm_4_overtime",item.getUHarm4OverTime());
|
||||
fields.put("uharm_5_overtime",item.getUHarm5OverTime());
|
||||
fields.put("uharm_6_overtime",item.getUHarm6OverTime());
|
||||
fields.put("uharm_7_overtime",item.getUHarm7OverTime());
|
||||
fields.put("uharm_8_overtime",item.getUHarm8OverTime());
|
||||
fields.put("uharm_9_overtime",item.getUHarm9OverTime());
|
||||
fields.put("uharm_10_overtime",item.getUHarm10OverTime());
|
||||
fields.put("uharm_11_overtime",item.getUHarm11OverTime());
|
||||
fields.put("uharm_12_overtime",item.getUHarm12OverTime());
|
||||
fields.put("uharm_13_overtime",item.getUHarm13OverTime());
|
||||
fields.put("uharm_14_overtime",item.getUHarm14OverTime());
|
||||
fields.put("uharm_15_overtime",item.getUHarm15OverTime());
|
||||
fields.put("uharm_16_overtime",item.getUHarm16OverTime());
|
||||
fields.put("uharm_17_overtime",item.getUHarm17OverTime());
|
||||
fields.put("uharm_18_overtime",item.getUHarm18OverTime());
|
||||
fields.put("uharm_19_overtime",item.getUHarm19OverTime());
|
||||
fields.put("uharm_20_overtime",item.getUHarm20OverTime());
|
||||
fields.put("uharm_21_overtime",item.getUHarm21OverTime());
|
||||
fields.put("uharm_22_overtime",item.getUHarm22OverTime());
|
||||
fields.put("uharm_23_overtime",item.getUHarm23OverTime());
|
||||
fields.put("uharm_24_overtime",item.getUHarm24OverTime());
|
||||
fields.put("uharm_25_overtime",item.getUHarm25OverTime());
|
||||
fields.put("iharm_2_overtime",item.getIHarm2OverTime());
|
||||
fields.put("iharm_3_overtime",item.getIHarm3OverTime());
|
||||
fields.put("iharm_4_overtime",item.getIHarm4OverTime());
|
||||
fields.put("iharm_5_overtime",item.getIHarm5OverTime());
|
||||
fields.put("iharm_6_overtime",item.getIHarm6OverTime());
|
||||
fields.put("iharm_7_overtime",item.getIHarm7OverTime());
|
||||
fields.put("iharm_8_overtime",item.getIHarm8OverTime());
|
||||
fields.put("iharm_9_overtime",item.getIHarm9OverTime());
|
||||
fields.put("iharm_10_overtime",item.getIHarm10OverTime());
|
||||
fields.put("iharm_11_overtime",item.getIHarm11OverTime());
|
||||
fields.put("iharm_12_overtime",item.getIHarm12OverTime());
|
||||
fields.put("iharm_13_overtime",item.getIHarm13OverTime());
|
||||
fields.put("iharm_14_overtime",item.getIHarm14OverTime());
|
||||
fields.put("iharm_15_overtime",item.getIHarm15OverTime());
|
||||
fields.put("iharm_16_overtime",item.getIHarm16OverTime());
|
||||
fields.put("iharm_17_overtime",item.getIHarm17OverTime());
|
||||
fields.put("iharm_18_overtime",item.getIHarm18OverTime());
|
||||
fields.put("iharm_19_overtime",item.getIHarm19OverTime());
|
||||
fields.put("iharm_20_overtime",item.getIHarm20OverTime());
|
||||
fields.put("iharm_21_overtime",item.getIHarm21OverTime());
|
||||
fields.put("iharm_22_overtime",item.getIHarm22OverTime());
|
||||
fields.put("iharm_23_overtime",item.getIHarm23OverTime());
|
||||
fields.put("iharm_24_overtime",item.getIHarm24OverTime());
|
||||
fields.put("iharm_25_overtime",item.getIHarm25OverTime());
|
||||
fields.put("inuharm_1_overtime",item.getInuHarm1OverTime());
|
||||
fields.put("inuharm_2_overtime",item.getInuHarm2OverTime());
|
||||
fields.put("inuharm_3_overtime",item.getInuHarm3OverTime());
|
||||
fields.put("inuharm_4_overtime",item.getInuHarm4OverTime());
|
||||
fields.put("inuharm_5_overtime",item.getInuHarm5OverTime());
|
||||
fields.put("inuharm_6_overtime",item.getInuHarm6OverTime());
|
||||
fields.put("inuharm_7_overtime",item.getInuHarm7OverTime());
|
||||
fields.put("inuharm_8_overtime",item.getInuHarm8OverTime());
|
||||
fields.put("inuharm_9_overtime",item.getInuHarm9OverTime());
|
||||
fields.put("inuharm_10_overtime",item.getInuHarm10OverTime());
|
||||
fields.put("inuharm_11_overtime",item.getInuHarm11OverTime());
|
||||
fields.put("inuharm_12_overtime",item.getInuHarm12OverTime());
|
||||
fields.put("inuharm_13_overtime",item.getInuHarm13OverTime());
|
||||
fields.put("inuharm_14_overtime",item.getInuHarm14OverTime());
|
||||
fields.put("inuharm_15_overtime",item.getInuHarm15OverTime());
|
||||
fields.put("inuharm_16_overtime",item.getInuHarm16OverTime());
|
||||
Point point = influxDbUtils.pointBuilder("limit_target", time, TimeUnit.MILLISECONDS, tags, fields);
|
||||
BatchPoints batchPoints = BatchPoints.database(DATABASE).tag("line_id", item.getLineId()).tag("phasic_type",item.getPhasicType()).retentionPolicy("").consistency(InfluxDB.ConsistencyLevel.ALL).build();
|
||||
batchPoints.point(point);
|
||||
records.add(batchPoints.lineProtocol());
|
||||
});
|
||||
influxDbUtils.batchInsert(DATABASE,"", InfluxDB.ConsistencyLevel.ALL, records);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,551 @@
|
||||
package com.njcn.executor.handler;
|
||||
|
||||
import com.njcn.device.api.LineFeignClient;
|
||||
import com.njcn.device.pojo.po.Overlimit;
|
||||
import com.njcn.executor.pojo.dto.PollutionDTO;
|
||||
import com.njcn.executor.pojo.vo.*;
|
||||
import com.njcn.harmonic.pojo.dto.PublicDTO;
|
||||
import com.njcn.influxdb.utils.InfluxDbUtils;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
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.stereotype.Component;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.function.BinaryOperator;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* @author xuy
|
||||
* @version 1.0.0
|
||||
* @date 2022年04月07日 09:54
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class PollutionJob {
|
||||
|
||||
private final String DATABASE = "pqsbase";
|
||||
|
||||
private final InfluxDbUtils influxDbUtils;
|
||||
|
||||
private final LineFeignClient lineFeignClient;
|
||||
|
||||
/**
|
||||
* 监测点污染指标
|
||||
*/
|
||||
@XxlJob("pollutionJobHandler")
|
||||
public void pollutionJobHandler() {
|
||||
List<PublicDTO> list = new ArrayList<>();
|
||||
//谐波电压
|
||||
List<PublicDTO> uaberranceList = new ArrayList<>();
|
||||
//谐波电流
|
||||
List<PublicDTO> iHarmList = new ArrayList<>();
|
||||
//频率偏差
|
||||
List<PublicDTO> freqList = new ArrayList<>();
|
||||
//电压偏差
|
||||
List<PublicDTO> devList = new ArrayList<>();
|
||||
//三相电压不平衡度
|
||||
List<PublicDTO> uBalanceList = new ArrayList<>();
|
||||
//负序电流
|
||||
List<PublicDTO> iNegList = new ArrayList<>();
|
||||
//间谐波电压含有率
|
||||
List<PublicDTO> iNuharmList = new ArrayList<>();
|
||||
//长时电压闪变
|
||||
List<PublicDTO> flickerList = new ArrayList<>();
|
||||
List<String> lineList = getAllLinesLimitData().stream().map(Overlimit::getId).collect(Collectors.toList());
|
||||
List<PollutionDTO> pollutionList = new ArrayList<>();
|
||||
lineList.forEach(item->{
|
||||
PollutionDTO pollutionDTO = new PollutionDTO();
|
||||
pollutionDTO.setId(item);
|
||||
pollutionList.add(pollutionDTO);
|
||||
});
|
||||
//谐波电压污染数值
|
||||
Map<String, Optional<PublicDTO>> map1 = getDistortionData();
|
||||
for (String key : map1.keySet()) {
|
||||
list.add(map1.get(key).get());
|
||||
}
|
||||
Map<String, Optional<PublicDTO>> map2 = getContentData();
|
||||
for (String key : map2.keySet()) {
|
||||
list.add(map2.get(key).get());
|
||||
}
|
||||
Comparator<PublicDTO> comparator = Comparator.comparing(PublicDTO::getData);
|
||||
Map<String, Optional<PublicDTO>> result = list.stream().collect(Collectors.groupingBy(PublicDTO::getId,Collectors.reducing(BinaryOperator.maxBy(comparator))));
|
||||
for (String key : result.keySet()) {
|
||||
uaberranceList.add(result.get(key).get());
|
||||
}
|
||||
//谐波电流污染数值
|
||||
Map<String, Optional<PublicDTO>> map3 = getIharm();
|
||||
for (String key : map3.keySet()) {
|
||||
iHarmList.add(map3.get(key).get());
|
||||
}
|
||||
//频率偏差污染数值
|
||||
Map<String, Optional<PublicDTO>> map4 = getFreq();
|
||||
for (String key : map4.keySet()) {
|
||||
freqList.add(map4.get(key).get());
|
||||
}
|
||||
//电压偏差
|
||||
Map<String, Optional<PublicDTO>> map5 = getDev();
|
||||
for (String key : map5.keySet()) {
|
||||
devList.add(map5.get(key).get());
|
||||
}
|
||||
//三相电压不平衡度
|
||||
Map<String, Optional<PublicDTO>> map6 = getUbalance();
|
||||
for (String key : map6.keySet()) {
|
||||
uBalanceList.add(map6.get(key).get());
|
||||
}
|
||||
//负序电流
|
||||
Map<String, Optional<PublicDTO>> map7 = getIneg();
|
||||
for (String key : map7.keySet()) {
|
||||
iNegList.add(map7.get(key).get());
|
||||
}
|
||||
//间谐波电压含有率
|
||||
Map<String, Optional<PublicDTO>> map8 = getInuharm();
|
||||
for (String key : map8.keySet()) {
|
||||
iNuharmList.add(map8.get(key).get());
|
||||
}
|
||||
//长时电压闪变
|
||||
Map<String, Optional<PublicDTO>> map9 = getFlicker();
|
||||
for (String key : map9.keySet()) {
|
||||
flickerList.add(map8.get(key).get());
|
||||
}
|
||||
//组装数据
|
||||
for (PollutionDTO item1 : pollutionList) {
|
||||
for (PublicDTO item2 : uaberranceList) {
|
||||
if (Objects.equals(item1.getId(),item2.getId())){
|
||||
item1.setData5(BigDecimal.valueOf(item2.getData()).setScale(4, RoundingMode.HALF_UP).doubleValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (PollutionDTO item1 : pollutionList) {
|
||||
for (PublicDTO item2 : iHarmList) {
|
||||
if (Objects.equals(item1.getId(),item2.getId())){
|
||||
item1.setData6(BigDecimal.valueOf(item2.getData()).setScale(4, RoundingMode.HALF_UP).doubleValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (PollutionDTO item1 : pollutionList) {
|
||||
for (PublicDTO item2 : freqList) {
|
||||
if (Objects.equals(item1.getId(),item2.getId())){
|
||||
item1.setData1(BigDecimal.valueOf(item2.getData()).setScale(4, RoundingMode.HALF_UP).doubleValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (PollutionDTO item1 : pollutionList) {
|
||||
for (PublicDTO item2 : devList) {
|
||||
if (Objects.equals(item1.getId(),item2.getId())){
|
||||
item1.setData2(BigDecimal.valueOf(item2.getData()).setScale(4, RoundingMode.HALF_UP).doubleValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (PollutionDTO item1 : pollutionList) {
|
||||
for (PublicDTO item2 : uBalanceList) {
|
||||
if (Objects.equals(item1.getId(),item2.getId())){
|
||||
item1.setData3(BigDecimal.valueOf(item2.getData()).setScale(4, RoundingMode.HALF_UP).doubleValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (PollutionDTO item1 : pollutionList) {
|
||||
for (PublicDTO item2 : iNegList) {
|
||||
if (Objects.equals(item1.getId(),item2.getId())){
|
||||
item1.setData4(BigDecimal.valueOf(item2.getData()).setScale(4, RoundingMode.HALF_UP).doubleValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (PollutionDTO item1 : pollutionList) {
|
||||
for (PublicDTO item2 : iNuharmList) {
|
||||
if (Objects.equals(item1.getId(),item2.getId())){
|
||||
item1.setData7(BigDecimal.valueOf(item2.getData()).setScale(4, RoundingMode.HALF_UP).doubleValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
for (PollutionDTO item1 : pollutionList) {
|
||||
for (PublicDTO item2 : flickerList) {
|
||||
if (Objects.equals(item1.getId(),item2.getId())){
|
||||
item1.setData8(BigDecimal.valueOf(item2.getData()).setScale(4, RoundingMode.HALF_UP).doubleValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
//将处理好的数据存入influxDB表中
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)-1, 0, 0, 0);
|
||||
calendar.set(Calendar.MILLISECOND,0);
|
||||
createMeasurement(pollutionList,calendar.getTimeInMillis());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取限值表中的所有监测点信息
|
||||
*/
|
||||
private List<Overlimit> getAllLinesLimitData() {
|
||||
return lineFeignClient.getAllLineOverLimit("harmonic-boot","").getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 谐波电压 -> 电压总谐波畸变率
|
||||
* 各监测点最新的A、B、C三相数据
|
||||
* 按照监测点分组,每个监测点取最大
|
||||
*/
|
||||
private Map<String, Optional<PublicDTO>> getDistortionData(){
|
||||
String sql = "SELECT * FROM day_v where value_type = 'CP95' and (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') group by line_id order by time desc limit 3";
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<Double> data;
|
||||
PublicDTO publicDTO;
|
||||
List<PublicDTO> lineData = new ArrayList<>();
|
||||
List<DayV> list = resultMapper.toPOJO(sqlResult, DayV.class);
|
||||
List<Overlimit> overLimitList = getAllLinesLimitData();
|
||||
for (DayV item1 : list) {
|
||||
for (Overlimit item2 : overLimitList) {
|
||||
if (Objects.equals(item1.getLineId(),item2.getId())){
|
||||
double vUnbalance = item1.getVUnbalance()/item2.getUaberrance();
|
||||
data = Stream.of(vUnbalance).collect(Collectors.toList());
|
||||
double result = data.stream().max(Comparator.comparing(Double::doubleValue)).get();
|
||||
publicDTO = new PublicDTO();
|
||||
publicDTO.setId(item1.getLineId());
|
||||
publicDTO.setData(result);
|
||||
lineData.add(publicDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
Comparator<PublicDTO> comparator = Comparator.comparing(PublicDTO::getData);
|
||||
return lineData.stream().collect(Collectors.groupingBy(PublicDTO::getId,Collectors.reducing(BinaryOperator.maxBy(comparator))));
|
||||
}
|
||||
|
||||
/**
|
||||
* 谐波电压 -> 各次谐波电压含有率(2~25次)
|
||||
* 各监测点最新的A、B、C三相数据
|
||||
*/
|
||||
private Map<String, Optional<PublicDTO>> getContentData(){
|
||||
String sql = "SELECT * FROM day_harmrate_v where value_type = 'CP95' and (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') group by line_id order by time desc limit 3";
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<Double> data;
|
||||
PublicDTO publicDTO;
|
||||
List<PublicDTO> lineData = new ArrayList<>();
|
||||
List<DayHarmrateV> list = resultMapper.toPOJO(sqlResult, DayHarmrateV.class);
|
||||
List<Overlimit> overLimitList = getAllLinesLimitData();
|
||||
for (DayHarmrateV dayHarmrateV : list) {
|
||||
for (Overlimit overlimit : overLimitList) {
|
||||
if (Objects.equals(dayHarmrateV.getLineId(),overlimit.getId())){
|
||||
double v2 = dayHarmrateV.getV2()/overlimit.getUharm2();
|
||||
double v3 = dayHarmrateV.getV3()/overlimit.getUharm3();
|
||||
double v4 = dayHarmrateV.getV4()/overlimit.getUharm4();
|
||||
double v5 = dayHarmrateV.getV5()/overlimit.getUharm5();
|
||||
double v6 = dayHarmrateV.getV6()/overlimit.getUharm6();
|
||||
double v7 = dayHarmrateV.getV7()/overlimit.getUharm7();
|
||||
double v8 = dayHarmrateV.getV8()/overlimit.getUharm8();
|
||||
double v9 = dayHarmrateV.getV9()/overlimit.getUharm9();
|
||||
double v10 = dayHarmrateV.getV10()/overlimit.getUharm10();
|
||||
double v11 = dayHarmrateV.getV11()/overlimit.getUharm11();
|
||||
double v12 = dayHarmrateV.getV12()/overlimit.getUharm12();
|
||||
double v13 = dayHarmrateV.getV13()/overlimit.getUharm13();
|
||||
double v14 = dayHarmrateV.getV14()/overlimit.getUharm14();
|
||||
double v15 = dayHarmrateV.getV15()/overlimit.getUharm15();
|
||||
double v16 = dayHarmrateV.getV16()/overlimit.getUharm16();
|
||||
double v17 = dayHarmrateV.getV17()/overlimit.getUharm17();
|
||||
double v18 = dayHarmrateV.getV18()/overlimit.getUharm18();
|
||||
double v19 = dayHarmrateV.getV19()/overlimit.getUharm19();
|
||||
double v20 = dayHarmrateV.getV20()/overlimit.getUharm20();
|
||||
double v21 = dayHarmrateV.getV21()/overlimit.getUharm21();
|
||||
double v22 = dayHarmrateV.getV22()/overlimit.getUharm22();
|
||||
double v23 = dayHarmrateV.getV23()/overlimit.getUharm23();
|
||||
double v24 = dayHarmrateV.getV24()/overlimit.getUharm24();
|
||||
double v25 = dayHarmrateV.getV25()/overlimit.getUharm25();
|
||||
data = Stream.of(v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25).collect(Collectors.toList());
|
||||
double result = data.stream().max(Comparator.comparing(Double::doubleValue)).get();
|
||||
publicDTO = new PublicDTO();
|
||||
publicDTO.setId(dayHarmrateV.getLineId());
|
||||
publicDTO.setData(result);
|
||||
lineData.add(publicDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
Comparator<PublicDTO> comparator = Comparator.comparing(PublicDTO::getData);
|
||||
return lineData.stream().collect(Collectors.groupingBy(PublicDTO::getId,Collectors.reducing(BinaryOperator.maxBy(comparator))));
|
||||
}
|
||||
|
||||
/**
|
||||
* 谐波电流 -> 各次谐波电流(2~25次)
|
||||
* 各监测点最新的A、B、C三相数据
|
||||
*/
|
||||
private Map<String, Optional<PublicDTO>> getIharm(){
|
||||
String sql = "SELECT * FROM day_i where value_type = 'CP95' and (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') group by line_id order by time desc limit 3";
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<Double> data;
|
||||
PublicDTO publicDTO;
|
||||
List<PublicDTO> lineData = new ArrayList<>();
|
||||
List<DayI> list = resultMapper.toPOJO(sqlResult, DayI.class);
|
||||
List<Overlimit> overLimitList = getAllLinesLimitData();
|
||||
for (DayI dayI : list) {
|
||||
for (Overlimit overlimit : overLimitList) {
|
||||
if (Objects.equals(dayI.getLineId(),overlimit.getId())){
|
||||
double v2 = dayI.getI2()/overlimit.getIharm2();
|
||||
double v3 = dayI.getI3()/overlimit.getIharm3();
|
||||
double v4 = dayI.getI4()/overlimit.getIharm4();
|
||||
double v5 = dayI.getI5()/overlimit.getIharm5();
|
||||
double v6 = dayI.getI6()/overlimit.getIharm6();
|
||||
double v7 = dayI.getI7()/overlimit.getIharm7();
|
||||
double v8 = dayI.getI8()/overlimit.getIharm8();
|
||||
double v9 = dayI.getI9()/overlimit.getIharm9();
|
||||
double v10 = dayI.getI10()/overlimit.getIharm10();
|
||||
double v11 = dayI.getI11()/overlimit.getIharm11();
|
||||
double v12 = dayI.getI12()/overlimit.getIharm12();
|
||||
double v13 = dayI.getI13()/overlimit.getIharm13();
|
||||
double v14 = dayI.getI14()/overlimit.getIharm14();
|
||||
double v15 = dayI.getI15()/overlimit.getIharm15();
|
||||
double v16 = dayI.getI16()/overlimit.getIharm16();
|
||||
double v17 = dayI.getI17()/overlimit.getIharm17();
|
||||
double v18 = dayI.getI18()/overlimit.getIharm18();
|
||||
double v19 = dayI.getI19()/overlimit.getIharm19();
|
||||
double v20 = dayI.getI20()/overlimit.getIharm20();
|
||||
double v21 = dayI.getI21()/overlimit.getIharm21();
|
||||
double v22 = dayI.getI22()/overlimit.getIharm22();
|
||||
double v23 = dayI.getI23()/overlimit.getIharm23();
|
||||
double v24 = dayI.getI24()/overlimit.getIharm24();
|
||||
double v25 = dayI.getI25()/overlimit.getIharm25();
|
||||
data = Stream.of(v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17,v18,v19,v20,v21,v22,v23,v24,v25).collect(Collectors.toList());
|
||||
double result = data.stream().max(Comparator.comparing(Double::doubleValue)).get();
|
||||
publicDTO = new PublicDTO();
|
||||
publicDTO.setId(dayI.getLineId());
|
||||
publicDTO.setData(result);
|
||||
lineData.add(publicDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
Comparator<PublicDTO> comparator = Comparator.comparing(PublicDTO::getData);
|
||||
return lineData.stream().collect(Collectors.groupingBy(PublicDTO::getId,Collectors.reducing(BinaryOperator.maxBy(comparator))));
|
||||
}
|
||||
|
||||
/**
|
||||
* 频率偏差 -> 绝对值
|
||||
* 各监测点最新的T相数据
|
||||
*/
|
||||
private Map<String, Optional<PublicDTO>> getFreq(){
|
||||
String sql = "SELECT line_id,abs(freq_dev) AS freq_dev FROM day_v where phasic_type = 'T' and (value_type = 'MIN' or value_type = 'MAX') group by line_id order by time desc limit 2";
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<Double> data;
|
||||
PublicDTO publicDTO;
|
||||
List<PublicDTO> lineData = new ArrayList<>();
|
||||
List<DayV> list = resultMapper.toPOJO(sqlResult, DayV.class);
|
||||
List<Overlimit> overLimitList = getAllLinesLimitData();
|
||||
for (DayV dayV : list) {
|
||||
for (Overlimit overlimit : overLimitList) {
|
||||
if (Objects.equals(dayV.getLineId(),overlimit.getId())){
|
||||
double freqDev = dayV.getFreqDev()/overlimit.getFreqDev();
|
||||
data = Stream.of(freqDev).collect(Collectors.toList());
|
||||
double result = data.stream().max(Comparator.comparing(Double::doubleValue)).get();
|
||||
publicDTO = new PublicDTO();
|
||||
publicDTO.setId(dayV.getLineId());
|
||||
publicDTO.setData(result);
|
||||
lineData.add(publicDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
Comparator<PublicDTO> comparator = Comparator.comparing(PublicDTO::getData);
|
||||
return lineData.stream().collect(Collectors.groupingBy(PublicDTO::getId,Collectors.reducing(BinaryOperator.maxBy(comparator))));
|
||||
}
|
||||
|
||||
/**
|
||||
* 电压偏差 -> 绝对值
|
||||
* 各监测点最新的A、B、C三相数据
|
||||
*/
|
||||
private Map<String, Optional<PublicDTO>> getDev(){
|
||||
String sql = "SELECT line_id,vu_dev,vl_dev,value_type FROM day_v where (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') and (value_type = 'MIN' or value_type = 'MAX') group by line_id order by time desc limit 6";
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<Double> data;
|
||||
PublicDTO publicDTO;
|
||||
List<PublicDTO> lineData = new ArrayList<>();
|
||||
List<DayV> list = resultMapper.toPOJO(sqlResult, DayV.class);
|
||||
List<Overlimit> overLimitList = getAllLinesLimitData();
|
||||
for (DayV dayV : list) {
|
||||
for (Overlimit overlimit : overLimitList) {
|
||||
if (Objects.equals(dayV.getLineId(),overlimit.getId())){
|
||||
double vlDev = Math.abs(dayV.getVlDev()/overlimit.getUvoltageDev());
|
||||
double vuDev = Math.abs(dayV.getVuDev()/overlimit.getVoltageDev());
|
||||
data = Stream.of(vuDev,vlDev).collect(Collectors.toList());
|
||||
double result = data.stream().max(Comparator.comparing(Double::doubleValue)).get();
|
||||
publicDTO = new PublicDTO();
|
||||
publicDTO.setId(dayV.getLineId());
|
||||
publicDTO.setData(result);
|
||||
lineData.add(publicDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
Comparator<PublicDTO> comparator = Comparator.comparing(PublicDTO::getData);
|
||||
return lineData.stream().collect(Collectors.groupingBy(PublicDTO::getId,Collectors.reducing(BinaryOperator.maxBy(comparator))));
|
||||
}
|
||||
|
||||
/**
|
||||
* 三相电压不平衡度
|
||||
* 各监测点最新的T相数据
|
||||
*/
|
||||
private Map<String, Optional<PublicDTO>> getUbalance(){
|
||||
String sql = "SELECT line_id,v_unbalance,value_type FROM day_v where phasic_type = 'T' and (value_type = 'CP95' or value_type = 'MAX') group by line_id order by time desc limit 2";
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<Double> data;
|
||||
PublicDTO publicDTO;
|
||||
List<PublicDTO> lineData = new ArrayList<>();
|
||||
List<DayV> list = resultMapper.toPOJO(sqlResult, DayV.class);
|
||||
List<Overlimit> overLimitList = getAllLinesLimitData();
|
||||
for (DayV dayV : list) {
|
||||
for (Overlimit overlimit : overLimitList) {
|
||||
if (Objects.equals(dayV.getLineId(),overlimit.getId())){
|
||||
double vUnbalance = Math.abs(dayV.getVUnbalance()/overlimit.getUbalance());
|
||||
data = Stream.of(vUnbalance).collect(Collectors.toList());
|
||||
double result = data.stream().max(Comparator.comparing(Double::doubleValue)).get();
|
||||
publicDTO = new PublicDTO();
|
||||
publicDTO.setId(dayV.getLineId());
|
||||
publicDTO.setData(result);
|
||||
lineData.add(publicDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
Comparator<PublicDTO> comparator = Comparator.comparing(PublicDTO::getData);
|
||||
return lineData.stream().collect(Collectors.groupingBy(PublicDTO::getId,Collectors.reducing(BinaryOperator.maxBy(comparator))));
|
||||
}
|
||||
|
||||
/**
|
||||
* 负序电流
|
||||
* 各监测点最新的T相数据
|
||||
*/
|
||||
private Map<String, Optional<PublicDTO>> getIneg(){
|
||||
String sql = "SELECT line_id,i_neg,value_type FROM day_i where phasic_type = 'T' and (value_type = 'CP95' or value_type = 'MAX') group by line_id order by time desc limit 2";
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<Double> data;
|
||||
PublicDTO publicDTO;
|
||||
List<PublicDTO> lineData = new ArrayList<>();
|
||||
List<DayI> list = resultMapper.toPOJO(sqlResult, DayI.class);
|
||||
List<Overlimit> overLimitList = getAllLinesLimitData();
|
||||
for (DayI dayI : list) {
|
||||
for (Overlimit overlimit : overLimitList) {
|
||||
if (Objects.equals(dayI.getLineId(),overlimit.getId())){
|
||||
double iNeg = Math.abs(dayI.getINeg()/overlimit.getINeg());
|
||||
data = Stream.of(iNeg).collect(Collectors.toList());
|
||||
double result = data.stream().max(Comparator.comparing(Double::doubleValue)).get();
|
||||
publicDTO = new PublicDTO();
|
||||
publicDTO.setId(dayI.getLineId());
|
||||
publicDTO.setData(result);
|
||||
lineData.add(publicDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
Comparator<PublicDTO> comparator = Comparator.comparing(PublicDTO::getData);
|
||||
return lineData.stream().collect(Collectors.groupingBy(PublicDTO::getId,Collectors.reducing(BinaryOperator.maxBy(comparator))));
|
||||
}
|
||||
|
||||
/**
|
||||
* 间谐波电压含有率
|
||||
* 各监测点最新的A、B、C三相数据
|
||||
*/
|
||||
private Map<String, Optional<PublicDTO>> getInuharm(){
|
||||
String sql = "SELECT * FROM day_inharm_v where (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') and value_type = 'CP95' group by line_id order by time desc limit 3";
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<Double> data;
|
||||
PublicDTO publicDTO;
|
||||
List<PublicDTO> lineData = new ArrayList<>();
|
||||
List<DayInharmV> list = resultMapper.toPOJO(sqlResult, DayInharmV.class);
|
||||
List<Overlimit> overLimitList = getAllLinesLimitData();
|
||||
for (DayInharmV dayInharmV : list) {
|
||||
for (Overlimit overlimit : overLimitList) {
|
||||
if (Objects.equals(dayInharmV.getLineId(),overlimit.getId())){
|
||||
double v1 = Math.abs(dayInharmV.getV1()/overlimit.getInuharm1());
|
||||
double v2 = Math.abs(dayInharmV.getV2()/overlimit.getInuharm2());
|
||||
double v3 = Math.abs(dayInharmV.getV3()/overlimit.getInuharm3());
|
||||
double v4 = Math.abs(dayInharmV.getV4()/overlimit.getInuharm4());
|
||||
double v5 = Math.abs(dayInharmV.getV5()/overlimit.getInuharm5());
|
||||
double v6 = Math.abs(dayInharmV.getV6()/overlimit.getInuharm6());
|
||||
double v7 = Math.abs(dayInharmV.getV7()/overlimit.getInuharm7());
|
||||
double v8 = Math.abs(dayInharmV.getV8()/overlimit.getInuharm8());
|
||||
double v9 = Math.abs(dayInharmV.getV9()/overlimit.getInuharm9());
|
||||
double v10 = Math.abs(dayInharmV.getV10()/overlimit.getInuharm10());
|
||||
double v11 = Math.abs(dayInharmV.getV11()/overlimit.getInuharm11());
|
||||
double v12 = Math.abs(dayInharmV.getV12()/overlimit.getInuharm12());
|
||||
double v13 = Math.abs(dayInharmV.getV13()/overlimit.getInuharm13());
|
||||
double v14 = Math.abs(dayInharmV.getV14()/overlimit.getInuharm14());
|
||||
double v15 = Math.abs(dayInharmV.getV15()/overlimit.getInuharm15());
|
||||
double v16 = Math.abs(dayInharmV.getV16()/overlimit.getInuharm16());
|
||||
data = Stream.of(v1,v2,v3,v4,v5,v6,v7,v8,v9,v10,v11,v12,v13,v14,v15,v16).collect(Collectors.toList());
|
||||
double result = data.stream().max(Comparator.comparing(Double::doubleValue)).get();
|
||||
publicDTO = new PublicDTO();
|
||||
publicDTO.setId(dayInharmV.getLineId());
|
||||
publicDTO.setData(result);
|
||||
lineData.add(publicDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
Comparator<PublicDTO> comparator = Comparator.comparing(PublicDTO::getData);
|
||||
return lineData.stream().collect(Collectors.groupingBy(PublicDTO::getId,Collectors.reducing(BinaryOperator.maxBy(comparator))));
|
||||
}
|
||||
|
||||
/**
|
||||
* 长时电压闪变
|
||||
* 各监测点最新的A、B、C三相数据
|
||||
*/
|
||||
private Map<String, Optional<PublicDTO>> getFlicker(){
|
||||
String sql = "SELECT * FROM day_plt where (phasic_type = 'A' or phasic_type = 'B' or phasic_type = 'C') and value_type = 'CP95' group by line_id order by time desc limit 3";
|
||||
QueryResult sqlResult = influxDbUtils.query(sql);
|
||||
InfluxDBResultMapper resultMapper = new InfluxDBResultMapper();
|
||||
List<Double> data;
|
||||
PublicDTO publicDTO;
|
||||
List<PublicDTO> lineData = new ArrayList<>();
|
||||
List<DayPlt> list = resultMapper.toPOJO(sqlResult, DayPlt.class);
|
||||
List<Overlimit> overLimitList = getAllLinesLimitData();
|
||||
for (DayPlt dayPlt : list) {
|
||||
for (Overlimit overlimit : overLimitList) {
|
||||
if (Objects.equals(dayPlt.getLineId(),overlimit.getId())){
|
||||
double plt = Math.abs(dayPlt.getPlt()/overlimit.getFlicker());
|
||||
data = Stream.of(plt).collect(Collectors.toList());
|
||||
double result = data.stream().max(Comparator.comparing(Double::doubleValue)).get();
|
||||
publicDTO = new PublicDTO();
|
||||
publicDTO.setId(dayPlt.getLineId());
|
||||
publicDTO.setData(result);
|
||||
lineData.add(publicDTO);
|
||||
}
|
||||
}
|
||||
}
|
||||
Comparator<PublicDTO> comparator = Comparator.comparing(PublicDTO::getData);
|
||||
return lineData.stream().collect(Collectors.groupingBy(PublicDTO::getId,Collectors.reducing(BinaryOperator.maxBy(comparator))));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成谐波污区图污染指标表
|
||||
*/
|
||||
private void createMeasurement(List<PollutionDTO> list, long time){
|
||||
List<String> records = new ArrayList<String>();
|
||||
list.forEach(item->{
|
||||
Map<String, String> tags = new HashMap<>();
|
||||
Map<String, Object> fields = new HashMap<>();
|
||||
tags.put("line_id",item.getId());
|
||||
fields.put("freq",item.getData1());
|
||||
fields.put("freq_dev",item.getData2());
|
||||
fields.put("unbalance",item.getData3());
|
||||
fields.put("ineg",item.getData4());
|
||||
fields.put("harmonic_v",item.getData5());
|
||||
fields.put("harmonic_i",item.getData6());
|
||||
fields.put("inuharm",item.getData7());
|
||||
fields.put("flicker",item.getData8());
|
||||
Point point = influxDbUtils.pointBuilder("harmonic_pollution", time, TimeUnit.MILLISECONDS,tags, fields);
|
||||
BatchPoints batchPoints = BatchPoints.database(DATABASE).tag("line_id", item.getId()).retentionPolicy("").consistency(InfluxDB.ConsistencyLevel.ALL).build();
|
||||
batchPoints.point(point);
|
||||
records.add(batchPoints.lineProtocol());
|
||||
});
|
||||
influxDbUtils.batchInsert(DATABASE,"", InfluxDB.ConsistencyLevel.ALL, records);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.njcn.executor.handler;
|
||||
|
||||
import com.njcn.user.api.UserFeignClient;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2022年03月22日 16:44
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class TestJob {
|
||||
|
||||
private final UserFeignClient userFeignClient;
|
||||
|
||||
|
||||
/**
|
||||
* 1、简单任务示例(Bean模式)
|
||||
*/
|
||||
@XxlJob("demoJobHandler")
|
||||
public void demoJobHandler() {
|
||||
String command = XxlJobHelper.getJobParam();
|
||||
System.out.println("前台传递的参数:" + command);
|
||||
// HttpResult<UserDTO> root = userFeignClient.getUserByName("root");
|
||||
// log.error(root.getData().toString());
|
||||
// System.out.println(root);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.executor.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/4/13 16:57
|
||||
*/
|
||||
@Data
|
||||
public class HarmonicDTO {
|
||||
|
||||
private String id;
|
||||
|
||||
private Integer real;
|
||||
|
||||
private Integer due;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.njcn.executor.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/4/11 16:29
|
||||
*/
|
||||
@Data
|
||||
public class PollutionDTO {
|
||||
|
||||
/**
|
||||
* 监测点id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 频率偏差污染值
|
||||
*/
|
||||
private Double data1 = 0.0;
|
||||
|
||||
/**
|
||||
* 电压偏差污染值
|
||||
*/
|
||||
private Double data2 = 0.0;
|
||||
|
||||
/**
|
||||
* 三相电压不平衡度污染值
|
||||
*/
|
||||
private Double data3 = 0.0;
|
||||
|
||||
/**
|
||||
* 负序电流污染值
|
||||
*/
|
||||
private Double data4 = 0.0;
|
||||
|
||||
/**
|
||||
* 谐波电压污染值
|
||||
*/
|
||||
private Double data5 = 0.0;
|
||||
|
||||
/**
|
||||
* 谐波电流污染值
|
||||
*/
|
||||
private Double data6 = 0.0;
|
||||
|
||||
/**
|
||||
* 间谐波电压含有率污染值
|
||||
*/
|
||||
private Double data7 = 0.0;
|
||||
|
||||
/**
|
||||
* 长时电压闪变污染值
|
||||
*/
|
||||
private Double data8 = 0.0;
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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:08
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_flicker")
|
||||
public class DataFlicker {
|
||||
|
||||
@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 = "plt")
|
||||
private Double plt;
|
||||
|
||||
@Column(name = "pst")
|
||||
private Double pst;
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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 DataFluc {
|
||||
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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 DataHarmPhasicI {
|
||||
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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 DataHarmPhasicV {
|
||||
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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 DataHarmPowerP {
|
||||
|
||||
@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;
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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 DataHarmPowerQ {
|
||||
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,188 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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 DataHarmPowerS {
|
||||
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 11:27
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Measurement(name = "data_harmrate_i")
|
||||
public class DataHarmRateI extends DataHarmPhasicI{
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 11:27
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Measurement(name = "data_harmrate_v")
|
||||
public class DataHarmRateV extends DataHarmPhasicV{
|
||||
}
|
||||
@@ -0,0 +1,203 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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 15:13
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_i")
|
||||
public class DataI {
|
||||
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 11:27
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Measurement(name = "data_inharm_i")
|
||||
public class DataInHarmI extends DataHarmPhasicI{
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 11:27
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Measurement(name = "data_inharmrate_i")
|
||||
public class DataInHarmRateI extends DataHarmPhasicI{
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 11:27
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Measurement(name = "data_inharmrate_v")
|
||||
public class DataInHarmRateV extends DataHarmPhasicV{
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/5/12 11:27
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_inharm_v")
|
||||
public class DataInHarmV {
|
||||
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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/4/12 16:01
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_plt")
|
||||
public class DataPlt {
|
||||
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,221 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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/4/7 10:00
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "data_v")
|
||||
public class DataV{
|
||||
|
||||
@Column(name = "time")
|
||||
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;
|
||||
|
||||
@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;
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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/4/8 11:56
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "day_harmrate_v")
|
||||
public class DayHarmrateV {
|
||||
|
||||
@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;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/4/11 17:08
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Measurement(name = "day_i")
|
||||
public class DayI extends DataI{
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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/4/12 15:42
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "day_inharm_v")
|
||||
public class DayInharmV {
|
||||
|
||||
@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;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/4/12 16:01
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Measurement(name = "day_plt")
|
||||
public class DayPlt extends DataPlt{
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.influxdb.annotation.Column;
|
||||
import org.influxdb.annotation.Measurement;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
/**
|
||||
* 类的介绍:
|
||||
*
|
||||
* @author xuyang
|
||||
* @version 1.0.0
|
||||
* @createTime 2022/4/7 10:00
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Measurement(name = "day_v")
|
||||
public class DayV extends DataV{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,244 @@
|
||||
package com.njcn.executor.pojo.vo;
|
||||
|
||||
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/4/21 20:20
|
||||
*/
|
||||
@Data
|
||||
@Measurement(name = "limit_rate")
|
||||
public class LimitRate {
|
||||
|
||||
@Column(name = "time")
|
||||
private Instant time;
|
||||
|
||||
@Column(name = "line_id")
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type")
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "all_time")
|
||||
private Integer allTime;
|
||||
|
||||
@Column(name = "flicker_overtime")
|
||||
private Integer flickerOverTime;
|
||||
|
||||
@Column(name = "flicker_all_time")
|
||||
private Integer flickerAllTime;
|
||||
|
||||
@Column(name = "freq_dev_overtime")
|
||||
private Integer freqDevOverTime;
|
||||
|
||||
@Column(name = "voltage_dev_overtime")
|
||||
private Integer voltageDevOverTime;
|
||||
|
||||
@Column(name = "ubalance_overtime")
|
||||
private Integer uBalanceOverTime;
|
||||
|
||||
@Column(name = "uaberrance_overtime")
|
||||
private Integer uAberranceOverTime;
|
||||
|
||||
@Column(name = "i_neg_overtime")
|
||||
private Integer iNegOverTime;
|
||||
|
||||
@Column(name = "uharm_2_overtime")
|
||||
private Integer uHarm2OverTime;
|
||||
|
||||
@Column(name = "uharm_3_overtime")
|
||||
private Integer uHarm3OverTime;
|
||||
|
||||
@Column(name = "uharm_4_overtime")
|
||||
private Integer uHarm4OverTime;
|
||||
|
||||
@Column(name = "uharm_5_overtime")
|
||||
private Integer uHarm5OverTime;
|
||||
|
||||
@Column(name = "uharm_6_overtime")
|
||||
private Integer uHarm6OverTime;
|
||||
|
||||
@Column(name = "uharm_7_overtime")
|
||||
private Integer uHarm7OverTime;
|
||||
|
||||
@Column(name = "uharm_8_overtime")
|
||||
private Integer uHarm8OverTime;
|
||||
|
||||
@Column(name = "uharm_9_overtime")
|
||||
private Integer uHarm9OverTime;
|
||||
|
||||
@Column(name = "uharm_10_overtime")
|
||||
private Integer uHarm10OverTime;
|
||||
|
||||
@Column(name = "uharm_11_overtime")
|
||||
private Integer uHarm11OverTime;
|
||||
|
||||
@Column(name = "uharm_12_overtime")
|
||||
private Integer uHarm12OverTime;
|
||||
|
||||
@Column(name = "uharm_13_overtime")
|
||||
private Integer uHarm13OverTime;
|
||||
|
||||
@Column(name = "uharm_14_overtime")
|
||||
private Integer uHarm14OverTime;
|
||||
|
||||
@Column(name = "uharm_15_overtime")
|
||||
private Integer uHarm15OverTime;
|
||||
|
||||
@Column(name = "uharm_16_overtime")
|
||||
private Integer uHarm16OverTime;
|
||||
|
||||
@Column(name = "uharm_17_overtime")
|
||||
private Integer uHarm17OverTime;
|
||||
|
||||
@Column(name = "uharm_18_overtime")
|
||||
private Integer uHarm18OverTime;
|
||||
|
||||
@Column(name = "uharm_19_overtime")
|
||||
private Integer uHarm19OverTime;
|
||||
|
||||
@Column(name = "uharm_20_overtime")
|
||||
private Integer uHarm20OverTime;
|
||||
|
||||
@Column(name = "uharm_21_overtime")
|
||||
private Integer uHarm21OverTime;
|
||||
|
||||
@Column(name = "uharm_22_overtime")
|
||||
private Integer uHarm22OverTime;
|
||||
|
||||
@Column(name = "uharm_23_overtime")
|
||||
private Integer uHarm23OverTime;
|
||||
|
||||
@Column(name = "uharm_24_overtime")
|
||||
private Integer uHarm24OverTime;
|
||||
|
||||
@Column(name = "uharm_25_overtime")
|
||||
private Integer uHarm25OverTime;
|
||||
|
||||
@Column(name = "iharm_2_overtime")
|
||||
private Integer iHarm2OverTime;
|
||||
|
||||
@Column(name = "iharm_3_overtime")
|
||||
private Integer iHarm3OverTime;
|
||||
|
||||
@Column(name = "iharm_4_overtime")
|
||||
private Integer iHarm4OverTime;
|
||||
|
||||
@Column(name = "iharm_5_overtime")
|
||||
private Integer iHarm5OverTime;
|
||||
|
||||
@Column(name = "iharm_6_overtime")
|
||||
private Integer iHarm6OverTime;
|
||||
|
||||
@Column(name = "iharm_7_overtime")
|
||||
private Integer iHarm7OverTime;
|
||||
|
||||
@Column(name = "iharm_8_overtime")
|
||||
private Integer iHarm8OverTime;
|
||||
|
||||
@Column(name = "iharm_9_overtime")
|
||||
private Integer iHarm9OverTime;
|
||||
|
||||
@Column(name = "iharm_10_overtime")
|
||||
private Integer iHarm10OverTime;
|
||||
|
||||
@Column(name = "iharm_11_overtime")
|
||||
private Integer iHarm11OverTime;
|
||||
|
||||
@Column(name = "iharm_12_overtime")
|
||||
private Integer iHarm12OverTime;
|
||||
|
||||
@Column(name = "iharm_13_overtime")
|
||||
private Integer iHarm13OverTime;
|
||||
|
||||
@Column(name = "iharm_14_overtime")
|
||||
private Integer iHarm14OverTime;
|
||||
|
||||
@Column(name = "iharm_15_overtime")
|
||||
private Integer iHarm15OverTime;
|
||||
|
||||
@Column(name = "iharm_16_overtime")
|
||||
private Integer iHarm16OverTime;
|
||||
|
||||
@Column(name = "iharm_17_overtime")
|
||||
private Integer iHarm17OverTime;
|
||||
|
||||
@Column(name = "iharm_18_overtime")
|
||||
private Integer iHarm18OverTime;
|
||||
|
||||
@Column(name = "iharm_19_overtime")
|
||||
private Integer iHarm19OverTime;
|
||||
|
||||
@Column(name = "iharm_20_overtime")
|
||||
private Integer iHarm20OverTime;
|
||||
|
||||
@Column(name = "iharm_21_overtime")
|
||||
private Integer iHarm21OverTime;
|
||||
|
||||
@Column(name = "iharm_22_overtime")
|
||||
private Integer iHarm22OverTime;
|
||||
|
||||
@Column(name = "iharm_23_overtime")
|
||||
private Integer iHarm23OverTime;
|
||||
|
||||
@Column(name = "iharm_24_overtime")
|
||||
private Integer iHarm24OverTime;
|
||||
|
||||
@Column(name = "iharm_25_overtime")
|
||||
private Integer iHarm25OverTime;
|
||||
|
||||
@Column(name = "inuharm_1_overtime")
|
||||
private Integer inuHarm1OverTime;
|
||||
|
||||
@Column(name = "inuharm_2_overtime")
|
||||
private Integer inuHarm2OverTime;
|
||||
|
||||
@Column(name = "inuharm_3_overtime")
|
||||
private Integer inuHarm3OverTime;
|
||||
|
||||
@Column(name = "inuharm_4_overtime")
|
||||
private Integer inuHarm4OverTime;
|
||||
|
||||
@Column(name = "inuharm_5_overtime")
|
||||
private Integer inuHarm5OverTime;
|
||||
|
||||
@Column(name = "inuharm_6_overtime")
|
||||
private Integer inuHarm6OverTime;
|
||||
|
||||
@Column(name = "inuharm_7_overtime")
|
||||
private Integer inuHarm7OverTime;
|
||||
|
||||
@Column(name = "inuharm_8_overtime")
|
||||
private Integer inuHarm8OverTime;
|
||||
|
||||
@Column(name = "inuharm_9_overtime")
|
||||
private Integer inuHarm9OverTime;
|
||||
|
||||
@Column(name = "inuharm_10_overtime")
|
||||
private Integer inuHarm10OverTime;
|
||||
|
||||
@Column(name = "inuharm_11_overtime")
|
||||
private Integer inuHarm11OverTime;
|
||||
|
||||
@Column(name = "inuharm_12_overtime")
|
||||
private Integer inuHarm12OverTime;
|
||||
|
||||
@Column(name = "inuharm_13_overtime")
|
||||
private Integer inuHarm13OverTime;
|
||||
|
||||
@Column(name = "inuharm_14_overtime")
|
||||
private Integer inuHarm14OverTime;
|
||||
|
||||
@Column(name = "inuharm_15_overtime")
|
||||
private Integer inuHarm15OverTime;
|
||||
|
||||
@Column(name = "inuharm_16_overtime")
|
||||
private Integer inuHarm16OverTime;
|
||||
}
|
||||
60
pqs-job/job-executor/src/main/resources/bootstrap.yml
Normal file
60
pqs-job/job-executor/src/main/resources/bootstrap.yml
Normal file
@@ -0,0 +1,60 @@
|
||||
#当前服务的基本信息
|
||||
microservice:
|
||||
ename: @artifactId@
|
||||
name: '@name@'
|
||||
version: @version@
|
||||
server:
|
||||
port: 10218
|
||||
#feign接口开启服务熔断降级处理
|
||||
feign:
|
||||
sentinel:
|
||||
enabled: true
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
#nacos注册中心以及配置中心的指定
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
server-addr: @nacos.url@
|
||||
namespace: @nacos.namespace@
|
||||
config:
|
||||
server-addr: @nacos.url@
|
||||
namespace: @nacos.namespace@
|
||||
file-extension: yaml
|
||||
shared-configs:
|
||||
- data-id: share-config.yaml
|
||||
refresh: true
|
||||
- data-Id: share-config-datasource-db.yaml
|
||||
refresh: true
|
||||
main:
|
||||
allow-bean-definition-overriding: true
|
||||
|
||||
|
||||
#项目日志的配置
|
||||
logging:
|
||||
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
|
||||
level:
|
||||
root: info
|
||||
|
||||
#调度中心部署跟地址 [选填]:如调度中心集群部署存在多个地址则用逗号分隔。执行器将会使用该地址进行"执行器心跳注册"和"任务结果回调";为空则关闭自动注册;
|
||||
xxl:
|
||||
job:
|
||||
admin:
|
||||
addresses: http://@server.url@:10217/job-admin
|
||||
#执行器通讯TOKEN [选填]:非空时启用;
|
||||
accessToken:
|
||||
executor:
|
||||
#执行器AppName [选填]:执行器心跳注册分组依据;为空则关闭自动注册
|
||||
appname: executor
|
||||
#执行器注册 [选填]:优先使用该配置作为注册地址,为空时使用内嵌服务 ”IP:PORT“ 作为注册地址。从而更灵活的支持容器类型执行器动态IP和动态映射端口问题。
|
||||
address:
|
||||
#执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务";
|
||||
ip: @server.url@
|
||||
#执行器端口号 [选填]:小于等于0则自动获取;默认端口为9999,单机部署多个执行器时,注意要配置不同执行器端口;
|
||||
port: 10219
|
||||
#执行器运行日志文件存储磁盘路径 [选填] :需要对该路径拥有读写权限;为空则使用默认路径;
|
||||
logpath: /data/applogs/xxl-job/jobhandler
|
||||
#执行器日志文件保存天数 [选填] : 过期日志自动清理, 限制值大于等于3时生效; 否则, 如-1, 关闭自动清理功能;
|
||||
logretentiondays: 30
|
||||
|
||||
Reference in New Issue
Block a user