Compare commits
4 Commits
2025-11
...
6a6f7c2f77
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a6f7c2f77 | ||
|
|
b0972ba896 | ||
|
|
5afb860467 | ||
|
|
2624d7d495 |
@@ -18,6 +18,7 @@ import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
|||||||
import com.njcn.dataProcess.pojo.dto.*;
|
import com.njcn.dataProcess.pojo.dto.*;
|
||||||
import com.njcn.dataProcess.pojo.po.PqDataVerify;
|
import com.njcn.dataProcess.pojo.po.PqDataVerify;
|
||||||
import com.njcn.dataProcess.pojo.po.PqDataVerifyBak;
|
import com.njcn.dataProcess.pojo.po.PqDataVerifyBak;
|
||||||
|
import com.njcn.dataProcess.pojo.po.PqDataVerifyCount;
|
||||||
import com.njcn.dataProcess.util.DataCommonUtils;
|
import com.njcn.dataProcess.util.DataCommonUtils;
|
||||||
import com.njcn.dataProcess.util.TimeUtils;
|
import com.njcn.dataProcess.util.TimeUtils;
|
||||||
import com.njcn.device.pq.api.LineFeignClient;
|
import com.njcn.device.pq.api.LineFeignClient;
|
||||||
@@ -25,6 +26,10 @@ import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
|||||||
import com.njcn.device.pq.pojo.vo.LineDetailVO;
|
import com.njcn.device.pq.pojo.vo.LineDetailVO;
|
||||||
import com.njcn.oss.constant.OssPath;
|
import com.njcn.oss.constant.OssPath;
|
||||||
import com.njcn.oss.utils.FileStorageUtil;
|
import com.njcn.oss.utils.FileStorageUtil;
|
||||||
|
import com.njcn.system.api.DicDataFeignClient;
|
||||||
|
import com.njcn.system.enums.DicDataEnum;
|
||||||
|
import com.njcn.system.enums.DicDataTypeEnum;
|
||||||
|
import com.njcn.system.pojo.po.DictData;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.apache.commons.collections4.ListUtils;
|
import org.apache.commons.collections4.ListUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@@ -100,7 +105,11 @@ public class DataCleanServiceImpl implements IDataCleanService {
|
|||||||
@Resource
|
@Resource
|
||||||
private PqDataVerifyNewFeignClient pqDataVerifyNewFeignClient;
|
private PqDataVerifyNewFeignClient pqDataVerifyNewFeignClient;
|
||||||
@Resource
|
@Resource
|
||||||
|
private PqDataVerifyCountFeignClient pqDataVerifyCountFeignClient;
|
||||||
|
@Resource
|
||||||
private FileStorageUtil fileStorageUtil;
|
private FileStorageUtil fileStorageUtil;
|
||||||
|
@Resource
|
||||||
|
private DicDataFeignClient dicDataFeignClient;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@@ -293,6 +302,8 @@ public class DataCleanServiceImpl implements IDataCleanService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dataCleanHandler(CalculatedParam calculatedParam) {
|
public void dataCleanHandler(CalculatedParam calculatedParam) {
|
||||||
|
DictData dip = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.VOLTAGE_DIP.getCode(), DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
||||||
|
DictData rise = dicDataFeignClient.getDicDataByCodeAndType(DicDataEnum.VOLTAGE_RISE.getCode(), DicDataTypeEnum.EVENT_STATIS.getCode()).getData();
|
||||||
MemorySizeUtil.getNowMemory();
|
MemorySizeUtil.getNowMemory();
|
||||||
logger.info("{},原始表数据清洗=====》", LocalDateTime.now());
|
logger.info("{},原始表数据清洗=====》", LocalDateTime.now());
|
||||||
//获取标准
|
//获取标准
|
||||||
@@ -523,7 +534,7 @@ public class DataCleanServiceImpl implements IDataCleanService {
|
|||||||
Map<String, PqReasonableRangeDto> pqReasonableRangeDtoMap = list.stream().collect(Collectors.toMap(PqReasonableRangeDto::getIndexCode, Function.identity()));
|
Map<String, PqReasonableRangeDto> pqReasonableRangeDtoMap = list.stream().collect(Collectors.toMap(PqReasonableRangeDto::getIndexCode, Function.identity()));
|
||||||
eventList.forEach(data -> {
|
eventList.forEach(data -> {
|
||||||
data.setFeatureAmplitude(data.getFeatureAmplitude() * 100.0);
|
data.setFeatureAmplitude(data.getFeatureAmplitude() * 100.0);
|
||||||
List<PqDataVerify> pqDataVerifies = judgeDataEvent(pqReasonableRangeDtoMap,data);
|
List<PqDataVerify> pqDataVerifies = judgeDataEvent(pqReasonableRangeDtoMap, data, dip, rise);
|
||||||
result.addAll(pqDataVerifies);
|
result.addAll(pqDataVerifies);
|
||||||
});
|
});
|
||||||
if (CollUtil.isNotEmpty(result)) {
|
if (CollUtil.isNotEmpty(result)) {
|
||||||
@@ -538,7 +549,79 @@ public class DataCleanServiceImpl implements IDataCleanService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(allTimeSet)) {
|
if (CollUtil.isNotEmpty(allTimeSet)) {
|
||||||
Map<String,Object> dtoMap = new HashMap<>();
|
PqDataVerifyCount verifyCount = new PqDataVerifyCount();
|
||||||
|
verifyCount.setLineId(item.getLineId());
|
||||||
|
verifyCount.setTime(LocalDate.parse(calculatedParam.getDataDate(), DateTimeFormatter.ofPattern(DatePattern.NORM_DATE_PATTERN)));
|
||||||
|
verifyCount.setTotalAll(data1.size());
|
||||||
|
verifyCount.setFlickerAll(data9.size());
|
||||||
|
|
||||||
|
List<DataVDto> dataV = data1.stream()
|
||||||
|
.filter(item1 -> allTimeSet.contains(item1.getMinTime().substring(11, 19)))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (CollUtil.isNotEmpty(dataV)) {
|
||||||
|
verifyCount.setTotal(dataV.size());
|
||||||
|
// dataV.forEach(item1-> item1.setAbnormalFlag(1));
|
||||||
|
// dataVFeignClient.addInfluxDbList(dataV);
|
||||||
|
}
|
||||||
|
// List<DataIDto> dataI = data2.stream()
|
||||||
|
// .filter(item1 -> allTimeSet.contains(item1.getMinTime().substring(11, 19)))
|
||||||
|
// .collect(Collectors.toList());
|
||||||
|
// if (CollUtil.isNotEmpty(dataI)) {
|
||||||
|
// dataI.forEach(item1-> item1.setAbnormalFlag(1));
|
||||||
|
// dataIFeignClient.addInfluxDbList(dataI);
|
||||||
|
// }
|
||||||
|
// List<DataPltDto> dataPlt = data3.stream()
|
||||||
|
// .filter(item1 -> allTimeSet.contains(item1.getMinTime().substring(11, 19)))
|
||||||
|
// .collect(Collectors.toList());
|
||||||
|
// if (CollUtil.isNotEmpty(dataPlt)) {
|
||||||
|
// dataPlt.forEach(item1-> item1.setAbnormalFlag(1));
|
||||||
|
// dataPltFeignClient.addInfluxDbList(dataPlt);
|
||||||
|
// }
|
||||||
|
// List<DataHarmDto> dataInHarmV = data4.stream()
|
||||||
|
// .filter(item1 -> allTimeSet.contains(item1.getMinTime().substring(11, 19)))
|
||||||
|
// .collect(Collectors.toList());
|
||||||
|
// if (CollUtil.isNotEmpty(dataInHarmV)) {
|
||||||
|
// dataInHarmV.forEach(item1-> item1.setAbnormalFlag(1));
|
||||||
|
// dataInharmVFeignClient.addInfluxDbList(dataInHarmV);
|
||||||
|
// }
|
||||||
|
// List<DataHarmDto> dataHarmRateV = data5.stream()
|
||||||
|
// .filter(item1 -> allTimeSet.contains(item1.getMinTime().substring(11, 19)))
|
||||||
|
// .collect(Collectors.toList());
|
||||||
|
// if (CollUtil.isNotEmpty(dataHarmRateV)) {
|
||||||
|
// dataHarmRateV.forEach(item1-> item1.setAbnormalFlag(1));
|
||||||
|
// dataHarmRateVFeignClient.addInfluxDbList(dataHarmRateV);
|
||||||
|
// }
|
||||||
|
// List<DataPowerPDto> dataHarmPowerP = data6.stream()
|
||||||
|
// .filter(item1 -> allTimeSet.contains(item1.getMinTime().substring(11, 19)))
|
||||||
|
// .collect(Collectors.toList());
|
||||||
|
// if (CollUtil.isNotEmpty(dataHarmPowerP)) {
|
||||||
|
// dataHarmPowerP.forEach(item1-> item1.setAbnormalFlag(1));
|
||||||
|
// dataHarmpowerPFeignClient.addInfluxDbList(dataHarmPowerP);
|
||||||
|
// }
|
||||||
|
// List<DataHarmDto> dataHarmPhasicV = data7.stream()
|
||||||
|
// .filter(item1 -> allTimeSet.contains(item1.getMinTime().substring(11, 19)))
|
||||||
|
// .collect(Collectors.toList());
|
||||||
|
// if (CollUtil.isNotEmpty(dataHarmPhasicV)) {
|
||||||
|
// dataHarmPhasicV.forEach(item1-> item1.setAbnormalFlag(1));
|
||||||
|
// dataHarmphasicVFeignClient.addInfluxDbList(dataHarmPhasicV);
|
||||||
|
// }
|
||||||
|
// List<DataFlucDto> dataFluc = data8.stream()
|
||||||
|
// .filter(item1 -> allTimeSet.contains(item1.getMinTime().substring(11, 19)))
|
||||||
|
// .collect(Collectors.toList());
|
||||||
|
// if (CollUtil.isNotEmpty(dataFluc)) {
|
||||||
|
// dataFluc.forEach(item1-> item1.setAbnormalFlag(1));
|
||||||
|
// dataFlucFeignClient.addInfluxDbList(dataFluc);
|
||||||
|
// }
|
||||||
|
List<DataFlickerDto> dataFlicker = data9.stream()
|
||||||
|
.filter(item1 -> allTimeSet.contains(item1.getMinTime().substring(11, 19)))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (CollUtil.isNotEmpty(dataFlicker)) {
|
||||||
|
verifyCount.setFlicker(dataFlicker.size());
|
||||||
|
// dataFlicker.forEach(item1-> item1.setAbnormalFlag(1));
|
||||||
|
// dataFlickerFeignClient.addInfluxDbList(dataFlicker);
|
||||||
|
}
|
||||||
|
pqDataVerifyCountFeignClient.insertData(verifyCount);
|
||||||
|
Map<String, Object> dtoMap = new HashMap<>(1);
|
||||||
dtoMap.put("lineErrorTimes", allTimeSet.size() * item.getTimeInterval());
|
dtoMap.put("lineErrorTimes", allTimeSet.size() * item.getTimeInterval());
|
||||||
resultData.add(dtoMap);
|
resultData.add(dtoMap);
|
||||||
}
|
}
|
||||||
@@ -1815,10 +1898,11 @@ public class DataCleanServiceImpl implements IDataCleanService {
|
|||||||
/**
|
/**
|
||||||
* 获取数据的标准范围,进行数据比对
|
* 获取数据的标准范围,进行数据比对
|
||||||
*/
|
*/
|
||||||
public List<PqDataVerify> judgeDataEvent(Map<String, PqReasonableRangeDto> map, RmpEventDetailDTO dto) {
|
public List<PqDataVerify> judgeDataEvent(Map<String, PqReasonableRangeDto> map, RmpEventDetailDTO dto, DictData dip, DictData rise) {
|
||||||
List<PqDataVerify> list = new ArrayList<>();
|
List<PqDataVerify> list = new ArrayList<>();
|
||||||
|
if (ObjectUtil.isNotNull(dip)) {
|
||||||
PqReasonableRangeDto pqReasonableRangeDto = map.get(DataCleanEnum.VoltageDip.getCode());
|
PqReasonableRangeDto pqReasonableRangeDto = map.get(DataCleanEnum.VoltageDip.getCode());
|
||||||
if(ObjectUtil.isNotNull(dto.getFeatureAmplitude())){
|
if (ObjectUtil.isNotNull(dto.getFeatureAmplitude()) && dip.getId().equals(dto.getEventType())) {
|
||||||
if (dto.getFeatureAmplitude() < pqReasonableRangeDto.getMinValue() || dto.getFeatureAmplitude() > pqReasonableRangeDto.getMaxValue()) {
|
if (dto.getFeatureAmplitude() < pqReasonableRangeDto.getMinValue() || dto.getFeatureAmplitude() > pqReasonableRangeDto.getMaxValue()) {
|
||||||
PqDataVerify pqDataVerify = getPqDataVerify(dto.getMeasurementPointId()
|
PqDataVerify pqDataVerify = getPqDataVerify(dto.getMeasurementPointId()
|
||||||
, dto.getStartTime().format(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_MS_PATTERN))
|
, dto.getStartTime().format(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_MS_PATTERN))
|
||||||
@@ -1833,8 +1917,10 @@ public class DataCleanServiceImpl implements IDataCleanService {
|
|||||||
list.add(pqDataVerify);
|
list.add(pqDataVerify);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotNull(rise)) {
|
||||||
PqReasonableRangeDto pqReasonableRangeDto2 = map.get(DataCleanEnum.VoltageRise.getCode());
|
PqReasonableRangeDto pqReasonableRangeDto2 = map.get(DataCleanEnum.VoltageRise.getCode());
|
||||||
if(ObjectUtil.isNotNull(dto.getFeatureAmplitude())){
|
if (ObjectUtil.isNotNull(dto.getFeatureAmplitude()) && rise.getId().equals(dto.getEventType())) {
|
||||||
if (dto.getFeatureAmplitude() < pqReasonableRangeDto2.getMinValue() || dto.getFeatureAmplitude() > pqReasonableRangeDto2.getMaxValue()) {
|
if (dto.getFeatureAmplitude() < pqReasonableRangeDto2.getMinValue() || dto.getFeatureAmplitude() > pqReasonableRangeDto2.getMaxValue()) {
|
||||||
PqDataVerify pqDataVerify = getPqDataVerify(dto.getMeasurementPointId()
|
PqDataVerify pqDataVerify = getPqDataVerify(dto.getMeasurementPointId()
|
||||||
, dto.getStartTime().format(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_MS_PATTERN))
|
, dto.getStartTime().format(DateTimeFormatter.ofPattern(DatePattern.NORM_DATETIME_MS_PATTERN))
|
||||||
@@ -1849,6 +1935,7 @@ public class DataCleanServiceImpl implements IDataCleanService {
|
|||||||
list.add(pqDataVerify);
|
list.add(pqDataVerify);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class IDataCrossingServiceImpl implements IDataCrossingService {
|
|||||||
lineParam.setType(calculatedParam.getType());
|
lineParam.setType(calculatedParam.getType());
|
||||||
List<String> lineIds = calculatedParam.getIdList();
|
List<String> lineIds = calculatedParam.getIdList();
|
||||||
//获取所有监测点的限值
|
//获取所有监测点的限值
|
||||||
List<Overlimit> overLimitList = csLineFeignClient.getOverLimitData(lineIds).getData();
|
List<Overlimit> overLimitList = commTerminalGeneralClient.getOverLimitDataByIds(lineIds).getData();
|
||||||
Map<String, Overlimit> overLimitMap = overLimitList.stream().collect(Collectors.toMap(Overlimit::getId, Function.identity()));
|
Map<String, Overlimit> overLimitMap = overLimitList.stream().collect(Collectors.toMap(Overlimit::getId, Function.identity()));
|
||||||
//添加异常数据时间点
|
//添加异常数据时间点
|
||||||
getAbnormalData(lineParam);
|
getAbnormalData(lineParam);
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ liteflow:
|
|||||||
logging:
|
logging:
|
||||||
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
|
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
|
||||||
level:
|
level:
|
||||||
root:
|
root: error
|
||||||
|
|
||||||
|
|
||||||
#mybatis配置信息
|
#mybatis配置信息
|
||||||
@@ -66,7 +66,7 @@ mybatis-plus:
|
|||||||
#别名扫描
|
#别名扫描
|
||||||
type-aliases-package: com.njcn.harmonic.pojo
|
type-aliases-package: com.njcn.harmonic.pojo
|
||||||
line:
|
line:
|
||||||
num: 20
|
num: 10
|
||||||
|
|
||||||
mqtt:
|
mqtt:
|
||||||
client-id: @artifactId@${random.value}
|
client-id: @artifactId@${random.value}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.njcn.dataProcess.api;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.constant.ServerInfo;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.dataProcess.api.fallback.PqDataVerifyNewFeignClientFallbackFactory;
|
||||||
|
import com.njcn.dataProcess.pojo.po.PqDataVerifyBak;
|
||||||
|
import com.njcn.dataProcess.pojo.po.PqDataVerifyCount;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2025年02月13日 20:11
|
||||||
|
*/
|
||||||
|
@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/pqDataVerifyCount", fallbackFactory = PqDataVerifyNewFeignClientFallbackFactory.class, contextId = "pqDataVerifyNew")
|
||||||
|
public interface PqDataVerifyCountFeignClient {
|
||||||
|
|
||||||
|
@PostMapping("/insertDataBatch")
|
||||||
|
HttpResult<List<String>> insertDataBatch(@RequestBody List<PqDataVerifyCount> list);
|
||||||
|
|
||||||
|
@PostMapping("/insertData")
|
||||||
|
HttpResult<List<String>> insertData(@RequestBody PqDataVerifyCount pqDataVerifyCount);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.njcn.dataProcess.api.fallback;
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.dataProcess.api.PqDataVerifyCountFeignClient;
|
||||||
|
import com.njcn.dataProcess.api.PqDataVerifyNewFeignClient;
|
||||||
|
import com.njcn.dataProcess.pojo.po.PqDataVerifyBak;
|
||||||
|
import com.njcn.dataProcess.pojo.po.PqDataVerifyCount;
|
||||||
|
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||||
|
import feign.hystrix.FallbackFactory;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xy
|
||||||
|
* @version 1.0.0
|
||||||
|
* @date 2025年02月13日 20:13
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class PqDataVerifyCountFeignClientFallbackFactory implements FallbackFactory<PqDataVerifyCountFeignClient> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 输出远程请求接口异常日志
|
||||||
|
* @param cause RPC请求异常
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public PqDataVerifyCountFeignClient create(Throwable cause) {
|
||||||
|
//判断抛出异常是否为解码器抛出的业务异常
|
||||||
|
Enum<?> exceptionEnum = CommonResponseEnum.SERVICE_FALLBACK;
|
||||||
|
if(cause.getCause() instanceof BusinessException){
|
||||||
|
BusinessException businessException = (BusinessException) cause.getCause();
|
||||||
|
exceptionEnum = DataProcessingEnumUtil.getExceptionEnum(businessException.getResult());
|
||||||
|
}
|
||||||
|
Enum<?> finalExceptionEnum = exceptionEnum;
|
||||||
|
return new PqDataVerifyCountFeignClient() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<String>> insertDataBatch(List<PqDataVerifyCount> list) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","批量存储清洗的异常数据",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HttpResult<List<String>> insertData(PqDataVerifyCount pqDataVerifyCount) {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}","单监测点存储清洗的异常数据",cause.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package com.njcn.dataProcess.pojo.po;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
*
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-02-17
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("pq_data_verify_count")
|
||||||
|
public class PqDataVerifyCount implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 监测点id
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "line_id")
|
||||||
|
private String lineId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据时间
|
||||||
|
*/
|
||||||
|
@MppMultiId
|
||||||
|
@TableField(value = "time_id")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private LocalDate time;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常指标数量
|
||||||
|
*/
|
||||||
|
@TableField(value = "total")
|
||||||
|
private Integer total = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 总指标数量
|
||||||
|
*/
|
||||||
|
@TableField(value = "total_all")
|
||||||
|
private Integer totalAll = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常短时闪变数量
|
||||||
|
*/
|
||||||
|
@TableField(value = "flicker")
|
||||||
|
private Integer flicker = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 短时闪变总数量
|
||||||
|
*/
|
||||||
|
@TableField(value = "flicker_all")
|
||||||
|
private Integer flickerAll = 0;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
package com.njcn.dataProcess.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.njcn.common.pojo.annotation.OperateInfo;
|
||||||
|
import com.njcn.common.pojo.constant.OperateType;
|
||||||
|
import com.njcn.common.pojo.enums.common.LogEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
|
import com.njcn.common.pojo.response.HttpResult;
|
||||||
|
import com.njcn.common.utils.HttpResultUtil;
|
||||||
|
import com.njcn.dataProcess.pojo.po.PqDataVerifyBak;
|
||||||
|
import com.njcn.dataProcess.pojo.po.PqDataVerifyCount;
|
||||||
|
import com.njcn.dataProcess.service.IPqDataVerifyCountService;
|
||||||
|
import com.njcn.dataProcess.service.IPqDataVerifyNewService;
|
||||||
|
import com.njcn.web.controller.BaseController;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 前端控制器
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-02-17
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pqDataVerifyCount")
|
||||||
|
public class PqDataVerifyCountController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IPqDataVerifyCountService pqDataVerifyNewService;
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@PostMapping("/insertDataBatch")
|
||||||
|
@ApiOperation("存储清洗的异常数据数量")
|
||||||
|
public HttpResult<List<String>> insertDataBatch(@RequestBody List<PqDataVerifyCount> list) {
|
||||||
|
String methodDescribe = getMethodDescribe("insertDataBatch");
|
||||||
|
pqDataVerifyNewService.insertDataBatch(list);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD)
|
||||||
|
@PostMapping("/insertData")
|
||||||
|
@ApiOperation("存储清洗的异常数据数量")
|
||||||
|
public HttpResult<List<String>> insertData(@RequestBody PqDataVerifyCount pqDataVerifyCount) {
|
||||||
|
String methodDescribe = getMethodDescribe("insertData");
|
||||||
|
pqDataVerifyNewService.insertData(pqDataVerifyCount);
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.njcn.dataProcess.dao.relation.mapper;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
|
||||||
|
import com.njcn.dataProcess.pojo.po.PqDataVerifyCount;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* Mapper 接口
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-02-17
|
||||||
|
*/
|
||||||
|
public interface PqDataVerifyCountMapper extends MppBaseMapper<PqDataVerifyCount> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.njcn.dataProcess.service;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.IMppService;
|
||||||
|
import com.njcn.dataProcess.pojo.po.PqDataVerifyCount;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-02-17
|
||||||
|
*/
|
||||||
|
public interface IPqDataVerifyCountService extends IMppService<PqDataVerifyCount> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常数据插入
|
||||||
|
* @param list
|
||||||
|
*/
|
||||||
|
void insertDataBatch(List<PqDataVerifyCount> list);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 异常数据插入
|
||||||
|
*/
|
||||||
|
void insertData(PqDataVerifyCount pqDataVerifyCount);
|
||||||
|
}
|
||||||
@@ -200,7 +200,7 @@ public class InfluxdbDataHarmRateIImpl extends MppServiceImpl<RStatDataHarmRateI
|
|||||||
List<DataHarmrateI> dataList;
|
List<DataHarmrateI> dataList;
|
||||||
List<DataHarmrateI> result = new ArrayList<>();
|
List<DataHarmrateI> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataHarmrateI::getLineId, lineList)
|
influxQueryWrapper.regular(DataHarmrateI::getLineId, lineList)
|
||||||
.select(DataHarmrateI::getLineId)
|
.select(DataHarmrateI::getLineId)
|
||||||
.select(DataHarmrateI::getPhasicType)
|
.select(DataHarmrateI::getPhasicType)
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ public class InfluxdbDataHarmRateVImpl extends MppServiceImpl<RStatDataHarmRateV
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmDto> getGroupByTimeHarmRateV(LineCountEvaluateParam lineParam) {
|
public List<DataHarmDto> getGroupByTimeHarmRateV(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper harmRateVQueryWrapper = new InfluxQueryWrapper(DataHarmrateV.class);
|
InfluxQueryWrapper harmRateVQueryWrapper = new InfluxQueryWrapper(DataHarmrateV.class);
|
||||||
harmRateVQueryWrapper.maxSamePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(2, 50, 1));
|
harmRateVQueryWrapper.maxSamePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(2, 50, 1));
|
||||||
harmRateVQueryWrapper.regular(DataV::getLineId, lineParam.getLineId())
|
harmRateVQueryWrapper.regular(DataV::getLineId, lineParam.getLineId())
|
||||||
.eq(DataHarmrateV::getValueType, InfluxDbSqlConstant.CP95)
|
.eq(DataHarmrateV::getValueType, InfluxDbSqlConstant.CP95)
|
||||||
.ne(DataHarmrateV::getPhasicType, InfluxDBTableConstant.PHASE_TYPE_T)
|
.ne(DataHarmrateV::getPhasicType, InfluxDBTableConstant.PHASE_TYPE_T)
|
||||||
@@ -266,7 +266,7 @@ public class InfluxdbDataHarmRateVImpl extends MppServiceImpl<RStatDataHarmRateV
|
|||||||
List<DataHarmrateV> dataList;
|
List<DataHarmrateV> dataList;
|
||||||
List<DataHarmrateV> result = new ArrayList<>();
|
List<DataHarmrateV> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataHarmrateV::getLineId, lineParam.getLineId())
|
influxQueryWrapper.regular(DataHarmrateV::getLineId, lineParam.getLineId())
|
||||||
.select(DataHarmrateV::getLineId)
|
.select(DataHarmrateV::getLineId)
|
||||||
.select(DataHarmrateV::getPhasicType)
|
.select(DataHarmrateV::getPhasicType)
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ public class InfluxdbDataHarmphasicIImpl extends MppServiceImpl<RStatDataHarmPha
|
|||||||
List<DataHarmphasicI> dataList;
|
List<DataHarmphasicI> dataList;
|
||||||
List<DataHarmphasicI> result = new ArrayList<>();
|
List<DataHarmphasicI> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataHarmphasicI::getLineId, lineList)
|
influxQueryWrapper.regular(DataHarmphasicI::getLineId, lineList)
|
||||||
.select(DataHarmphasicI::getLineId)
|
.select(DataHarmphasicI::getLineId)
|
||||||
.select(DataHarmphasicI::getPhasicType)
|
.select(DataHarmphasicI::getPhasicType)
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ public class InfluxdbDataHarmphasicVImpl extends MppServiceImpl<RStatDataHarmPha
|
|||||||
List<DataHarmphasicV> dataList;
|
List<DataHarmphasicV> dataList;
|
||||||
List<DataHarmphasicV> result = new ArrayList<>();
|
List<DataHarmphasicV> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataHarmphasicV::getLineId, lineList)
|
influxQueryWrapper.regular(DataHarmphasicV::getLineId, lineList)
|
||||||
.select(DataHarmphasicV::getLineId)
|
.select(DataHarmphasicV::getLineId)
|
||||||
.select(DataHarmphasicV::getPhasicType)
|
.select(DataHarmphasicV::getPhasicType)
|
||||||
|
|||||||
@@ -233,7 +233,7 @@ public class InfluxdbDataHarmpowerPImpl extends MppServiceImpl<RStatDataHarmPowe
|
|||||||
List<DataHarmpowerP> dataList;
|
List<DataHarmpowerP> dataList;
|
||||||
List<DataHarmpowerP> result = new ArrayList<>();
|
List<DataHarmpowerP> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerP.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerP.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.P, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.P, InfluxDbSqlConstant.P, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataHarmpowerP::getLineId, lineList)
|
influxQueryWrapper.regular(DataHarmpowerP::getLineId, lineList)
|
||||||
.select(DataHarmpowerP::getLineId)
|
.select(DataHarmpowerP::getLineId)
|
||||||
.select(DataHarmpowerP::getPhasicType)
|
.select(DataHarmpowerP::getPhasicType)
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ public class InfluxdbDataHarmpowerQImpl extends MppServiceImpl<RStatDataHarmPowe
|
|||||||
List<DataHarmpowerQ> dataList;
|
List<DataHarmpowerQ> dataList;
|
||||||
List<DataHarmpowerQ> result = new ArrayList<>();
|
List<DataHarmpowerQ> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerQ.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerQ.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.Q, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.Q, InfluxDbSqlConstant.Q, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataHarmpowerQ::getLineId, lineList)
|
influxQueryWrapper.regular(DataHarmpowerQ::getLineId, lineList)
|
||||||
.select(DataHarmpowerQ::getLineId)
|
.select(DataHarmpowerQ::getLineId)
|
||||||
.select(DataHarmpowerQ::getPhasicType)
|
.select(DataHarmpowerQ::getPhasicType)
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ public class InfluxdbDataHarmpowerSImpl extends MppServiceImpl<RStatDataHarmPowe
|
|||||||
List<DataHarmpowerS> dataList;
|
List<DataHarmpowerS> dataList;
|
||||||
List<DataHarmpowerS> result = new ArrayList<>();
|
List<DataHarmpowerS> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerS.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerS.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.S, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.S, InfluxDbSqlConstant.S, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataHarmpowerS::getLineId, lineList)
|
influxQueryWrapper.regular(DataHarmpowerS::getLineId, lineList)
|
||||||
.select(DataHarmpowerS::getLineId)
|
.select(DataHarmpowerS::getLineId)
|
||||||
.select(DataHarmpowerS::getPhasicType)
|
.select(DataHarmpowerS::getPhasicType)
|
||||||
|
|||||||
@@ -232,7 +232,7 @@ public class InfluxdbDataIImpl extends MppServiceImpl<RStatDataIRelationMapper,
|
|||||||
@Override
|
@Override
|
||||||
public List<DataIDto> getGroupByTimeDataI(LineCountEvaluateParam lineParam) {
|
public List<DataIDto> getGroupByTimeDataI(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class);
|
||||||
influxQueryWrapper.maxSamePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(2, 50, 1));
|
influxQueryWrapper.maxSamePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(2, 50, 1));
|
||||||
influxQueryWrapper.regular(DataI::getLineId, lineParam.getLineId())
|
influxQueryWrapper.regular(DataI::getLineId, lineParam.getLineId())
|
||||||
.eq(DataI::getValueType, InfluxDbSqlConstant.CP95)
|
.eq(DataI::getValueType, InfluxDbSqlConstant.CP95)
|
||||||
.ne(DataI::getPhasicType, InfluxDBTableConstant.PHASE_TYPE_T)
|
.ne(DataI::getPhasicType, InfluxDBTableConstant.PHASE_TYPE_T)
|
||||||
@@ -260,7 +260,7 @@ public class InfluxdbDataIImpl extends MppServiceImpl<RStatDataIRelationMapper,
|
|||||||
List<DataI> dataList;
|
List<DataI> dataList;
|
||||||
List<DataI> result = new ArrayList<>();
|
List<DataI> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataI::getLineId, lineParam.getLineId())
|
influxQueryWrapper.regular(DataI::getLineId, lineParam.getLineId())
|
||||||
.select(DataI::getLineId)
|
.select(DataI::getLineId)
|
||||||
.select(DataI::getPhasicType)
|
.select(DataI::getPhasicType)
|
||||||
|
|||||||
@@ -224,7 +224,7 @@ public class InfluxdbDataInharmIImpl extends MppServiceImpl<RStatDataInHarmIRela
|
|||||||
List<DataInharmI> dataList;
|
List<DataInharmI> dataList;
|
||||||
List<DataInharmI> result = new ArrayList<>();
|
List<DataInharmI> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataInharmI::getLineId, lineList)
|
influxQueryWrapper.regular(DataInharmI::getLineId, lineList)
|
||||||
.select(DataInharmI::getLineId)
|
.select(DataInharmI::getLineId)
|
||||||
.select(DataInharmI::getPhasicType)
|
.select(DataInharmI::getPhasicType)
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ public class InfluxdbDataInharmVImpl extends MppServiceImpl<RStatDataInHarmVRela
|
|||||||
List<DataInharmV> dataList;
|
List<DataInharmV> dataList;
|
||||||
List<DataInharmV> result = new ArrayList<>();
|
List<DataInharmV> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataInharmV::getLineId, lineParam.getLineId())
|
influxQueryWrapper.regular(DataInharmV::getLineId, lineParam.getLineId())
|
||||||
.select(DataInharmV::getLineId)
|
.select(DataInharmV::getLineId)
|
||||||
.select(DataInharmV::getPhasicType)
|
.select(DataInharmV::getPhasicType)
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ public class InfluxdbDataVImpl extends MppServiceImpl<RStatDataVRelationMapper,
|
|||||||
@Override
|
@Override
|
||||||
public Integer getCountRawData(LineCountEvaluateParam lineParam) {
|
public Integer getCountRawData(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper.regular(DataV::getLineId, lineParam.getLineId())
|
influxQueryWrapper.regular(DataV::getLineId, lineParam.getLineId())
|
||||||
.select(DataV::getLineId)
|
.select(DataV::getLineId)
|
||||||
.select(DataV::getPhasicType)
|
.select(DataV::getPhasicType)
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package com.njcn.dataProcess.service.impl.relation;
|
||||||
|
|
||||||
|
import com.github.jeffreyning.mybatisplus.service.MppServiceImpl;
|
||||||
|
import com.njcn.dataProcess.dao.relation.mapper.PqDataVerifyCountMapper;
|
||||||
|
import com.njcn.dataProcess.dao.relation.mapper.PqDataVerifyNewMapper;
|
||||||
|
import com.njcn.dataProcess.pojo.po.PqDataVerifyBak;
|
||||||
|
import com.njcn.dataProcess.pojo.po.PqDataVerifyCount;
|
||||||
|
import com.njcn.dataProcess.service.IPqDataVerifyCountService;
|
||||||
|
import com.njcn.dataProcess.service.IPqDataVerifyNewService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
*
|
||||||
|
* @author xy
|
||||||
|
* @since 2025-02-17
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class PqDataVerifyCountServiceImpl extends MppServiceImpl<PqDataVerifyCountMapper, PqDataVerifyCount> implements IPqDataVerifyCountService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertDataBatch(List<PqDataVerifyCount> list) {
|
||||||
|
this.saveOrUpdateBatchByMultiId(list,1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertData(PqDataVerifyCount pqDataVerifyCount) {
|
||||||
|
this.saveOrUpdateByMultiId(pqDataVerifyCount);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -31,7 +31,7 @@ public class InsertDataHarmRateIImpl implements InsertIDataHarmRateI {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmrateI> listDataHarmrateI(LineCountEvaluateParam lineParam) {
|
public List<DataHarmrateI> listDataHarmrateI(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmrateI::getLineId)
|
.select(DataHarmrateI::getLineId)
|
||||||
.select(DataHarmrateI::getPhasicType)
|
.select(DataHarmrateI::getPhasicType)
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ public class InsertDataHarmRateVImpl implements InsertIDataHarmRateV {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmrateV> listDataHarmrateV(LineCountEvaluateParam lineParam) {
|
public List<DataHarmrateV> listDataHarmrateV(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmrateV::getLineId)
|
.select(DataHarmrateV::getLineId)
|
||||||
.select(DataHarmrateV::getPhasicType)
|
.select(DataHarmrateV::getPhasicType)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class InsertDataHarmphasicIImpl implements InsertIDataHarmphasicI {
|
|||||||
public List<DataHarmphasicI> listDataHarmphasicI(LineCountEvaluateParam lineParam) {
|
public List<DataHarmphasicI> listDataHarmphasicI(LineCountEvaluateParam lineParam) {
|
||||||
List<DataHarmphasicI> result = new ArrayList<>();
|
List<DataHarmphasicI> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmphasicI::getLineId)
|
.select(DataHarmphasicI::getLineId)
|
||||||
.select(DataHarmphasicI::getPhasicType)
|
.select(DataHarmphasicI::getPhasicType)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class InsertDataHarmphasicVImpl implements InsertIDataHarmphasicV {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmphasicV> listDataHarmphasicV(LineCountEvaluateParam lineParam) {
|
public List<DataHarmphasicV> listDataHarmphasicV(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmphasicV::getLineId)
|
.select(DataHarmphasicV::getLineId)
|
||||||
.select(DataHarmphasicV::getPhasicType)
|
.select(DataHarmphasicV::getPhasicType)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class InsertDataHarmpowerPImpl implements InsertIDataHarmpowerP {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmpowerP> listDataHarmpowerP(LineCountEvaluateParam lineParam) {
|
public List<DataHarmpowerP> listDataHarmpowerP(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerP.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerP.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.P, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.P, InfluxDbSqlConstant.P, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmpowerP::getLineId)
|
.select(DataHarmpowerP::getLineId)
|
||||||
.select(DataHarmpowerP::getPhasicType)
|
.select(DataHarmpowerP::getPhasicType)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class InsertDataHarmpowerQImpl implements InsertIDataHarmpowerQ {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmpowerQ> listDataHarmpowerQ(LineCountEvaluateParam lineParam) {
|
public List<DataHarmpowerQ> listDataHarmpowerQ(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerQ.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerQ.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.Q, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.Q, InfluxDbSqlConstant.Q, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmpowerQ::getLineId)
|
.select(DataHarmpowerQ::getLineId)
|
||||||
.select(DataHarmpowerQ::getPhasicType)
|
.select(DataHarmpowerQ::getPhasicType)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class InsertDataHarmpowerSImpl implements InsertIDataHarmpowerS {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmpowerS> listDataHarmpowerS(LineCountEvaluateParam lineParam) {
|
public List<DataHarmpowerS> listDataHarmpowerS(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerS.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerS.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.S, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.S, InfluxDbSqlConstant.S, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmpowerS::getLineId)
|
.select(DataHarmpowerS::getLineId)
|
||||||
.select(DataHarmpowerS::getPhasicType)
|
.select(DataHarmpowerS::getPhasicType)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class InsertDataIImpl implements InsertIDataI {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataI> listDataI(LineCountEvaluateParam lineParam) {
|
public List<DataI> listDataI(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataI::getLineId)
|
.select(DataI::getLineId)
|
||||||
.select(DataI::getPhasicType)
|
.select(DataI::getPhasicType)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class InsertDataInharmIImpl implements InsertIDataInharmI {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataInharmI> listDataInharmI(LineCountEvaluateParam lineParam) {
|
public List<DataInharmI> listDataInharmI(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataInharmI::getLineId)
|
.select(DataInharmI::getLineId)
|
||||||
.select(DataInharmI::getPhasicType)
|
.select(DataInharmI::getPhasicType)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class InsertDataInharmVImpl implements InsertIDataInharmV {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataInharmV> listDataInharmV(LineCountEvaluateParam lineParam) {
|
public List<DataInharmV> listDataInharmV(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataInharmV::getLineId)
|
.select(DataInharmV::getLineId)
|
||||||
.select(DataInharmV::getPhasicType)
|
.select(DataInharmV::getPhasicType)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class InsertDataVImpl implements InsertIDataV {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataV> listDataV(LineCountEvaluateParam lineParam) {
|
public List<DataV> listDataV(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataV::getLineId)
|
.select(DataV::getLineId)
|
||||||
.select(DataV::getPhasicType)
|
.select(DataV::getPhasicType)
|
||||||
@@ -66,7 +66,7 @@ public class InsertDataVImpl implements InsertIDataV {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataV> listDataVDesc(LineCountEvaluateParam lineParam) {
|
public List<DataV> listDataVDesc(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataV::getLineId)
|
.select(DataV::getLineId)
|
||||||
.select(DataV::getPhasicType)
|
.select(DataV::getPhasicType)
|
||||||
|
|||||||
@@ -82,14 +82,14 @@ public class MigrationInfluxDBController {
|
|||||||
long betweenDay = LocalDateTimeUtil.between(startDate, endDate, ChronoUnit.HOURS);
|
long betweenDay = LocalDateTimeUtil.between(startDate, endDate, ChronoUnit.HOURS);
|
||||||
param.setStartTime(startDate.format(dateTimeFormatter));
|
param.setStartTime(startDate.format(dateTimeFormatter));
|
||||||
param.setEndTime(startDate.with(LocalTime.of(startDate.getHour(), 59, 59)).format(dateTimeFormatter));
|
param.setEndTime(startDate.with(LocalTime.of(startDate.getHour(), 59, 59)).format(dateTimeFormatter));
|
||||||
migrationService.hourseLineEventBacthSysc(param);
|
migrationService.hourseDevDataBacthSysc(param);
|
||||||
for (int i = 0; i <betweenDay; i++) {
|
for (int i = 0; i <betweenDay; i++) {
|
||||||
LineCountEvaluateParam countEvaluateParam=new LineCountEvaluateParam();
|
LineCountEvaluateParam countEvaluateParam=new LineCountEvaluateParam();
|
||||||
countEvaluateParam.setIsManual(true);
|
countEvaluateParam.setIsManual(true);
|
||||||
startDate = LocalDateTimeUtil.offset(startDate, 1, ChronoUnit.HOURS);
|
startDate = LocalDateTimeUtil.offset(startDate, 1, ChronoUnit.HOURS);
|
||||||
countEvaluateParam.setStartTime(startDate.format(dateTimeFormatter));
|
countEvaluateParam.setStartTime(startDate.format(dateTimeFormatter));
|
||||||
countEvaluateParam.setEndTime(startDate.with(LocalTime.of(startDate.getHour(), 59, 59)).format(dateTimeFormatter));
|
countEvaluateParam.setEndTime(startDate.with(LocalTime.of(startDate.getHour(), 59, 59)).format(dateTimeFormatter));
|
||||||
migrationService.hourseLineEventBacthSysc(countEvaluateParam);
|
migrationService.hourseDevDataBacthSysc(countEvaluateParam);
|
||||||
}
|
}
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
exception.printStackTrace();
|
exception.printStackTrace();
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class DataHarmRateIImpl implements IDataHarmRateI {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmrateI> listDataHarmrateI(LineCountEvaluateParam lineParam) {
|
public List<DataHarmrateI> listDataHarmrateI(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmrateI::getLineId)
|
.select(DataHarmrateI::getLineId)
|
||||||
.select(DataHarmrateI::getPhasicType)
|
.select(DataHarmrateI::getPhasicType)
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public class DataHarmRateVImpl implements IDataHarmRateV {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmrateV> listDataHarmrateV(LineCountEvaluateParam lineParam) {
|
public List<DataHarmrateV> listDataHarmrateV(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmrateV::getLineId)
|
.select(DataHarmrateV::getLineId)
|
||||||
.select(DataHarmrateV::getPhasicType)
|
.select(DataHarmrateV::getPhasicType)
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class DataHarmphasicIImpl implements IDataHarmphasicI {
|
|||||||
public List<DataHarmphasicI> listDataHarmphasicI(LineCountEvaluateParam lineParam) {
|
public List<DataHarmphasicI> listDataHarmphasicI(LineCountEvaluateParam lineParam) {
|
||||||
List<DataHarmphasicI> result = new ArrayList<>();
|
List<DataHarmphasicI> result = new ArrayList<>();
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmphasicI::getLineId)
|
.select(DataHarmphasicI::getLineId)
|
||||||
.select(DataHarmphasicI::getPhasicType)
|
.select(DataHarmphasicI::getPhasicType)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class DataHarmphasicVImpl implements IDataHarmphasicV {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmphasicV> listDataHarmphasicV(LineCountEvaluateParam lineParam) {
|
public List<DataHarmphasicV> listDataHarmphasicV(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmphasicV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmphasicV::getLineId)
|
.select(DataHarmphasicV::getLineId)
|
||||||
.select(DataHarmphasicV::getPhasicType)
|
.select(DataHarmphasicV::getPhasicType)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class DataHarmpowerPImpl implements IDataHarmpowerP {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmpowerP> listDataHarmpowerP(LineCountEvaluateParam lineParam) {
|
public List<DataHarmpowerP> listDataHarmpowerP(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerP.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerP.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.P, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.P, InfluxDbSqlConstant.P, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmpowerP::getLineId)
|
.select(DataHarmpowerP::getLineId)
|
||||||
.select(DataHarmpowerP::getPhasicType)
|
.select(DataHarmpowerP::getPhasicType)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class DataHarmpowerQImpl implements IDataHarmpowerQ {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmpowerQ> listDataHarmpowerQ(LineCountEvaluateParam lineParam) {
|
public List<DataHarmpowerQ> listDataHarmpowerQ(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerQ.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerQ.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.Q, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.Q, InfluxDbSqlConstant.Q, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmpowerQ::getLineId)
|
.select(DataHarmpowerQ::getLineId)
|
||||||
.select(DataHarmpowerQ::getPhasicType)
|
.select(DataHarmpowerQ::getPhasicType)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class DataHarmpowerSImpl implements IDataHarmpowerS {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataHarmpowerS> listDataHarmpowerS(LineCountEvaluateParam lineParam) {
|
public List<DataHarmpowerS> listDataHarmpowerS(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerS.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmpowerS.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.S, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.S, InfluxDbSqlConstant.S, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataHarmpowerS::getLineId)
|
.select(DataHarmpowerS::getLineId)
|
||||||
.select(DataHarmpowerS::getPhasicType)
|
.select(DataHarmpowerS::getPhasicType)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class DataIImpl implements IDataI {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataI> listDataI(LineCountEvaluateParam lineParam) {
|
public List<DataI> listDataI(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataI::getLineId)
|
.select(DataI::getLineId)
|
||||||
.select(DataI::getPhasicType)
|
.select(DataI::getPhasicType)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class DataInharmIImpl implements IDataInharmI {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataInharmI> listDataInharmI(LineCountEvaluateParam lineParam) {
|
public List<DataInharmI> listDataInharmI(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmI.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmI.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.I, InfluxDbSqlConstant.I, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataInharmI::getLineId)
|
.select(DataInharmI::getLineId)
|
||||||
.select(DataInharmI::getPhasicType)
|
.select(DataInharmI::getPhasicType)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class DataInharmVImpl implements IDataInharmV {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataInharmV> listDataInharmV(LineCountEvaluateParam lineParam) {
|
public List<DataInharmV> listDataInharmV(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataInharmV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataInharmV::getLineId)
|
.select(DataInharmV::getLineId)
|
||||||
.select(DataInharmV::getPhasicType)
|
.select(DataInharmV::getPhasicType)
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class DataVImpl implements IDataV {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataV> listDataV(LineCountEvaluateParam lineParam) {
|
public List<DataV> listDataV(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataV::getLineId)
|
.select(DataV::getLineId)
|
||||||
.select(DataV::getPhasicType)
|
.select(DataV::getPhasicType)
|
||||||
@@ -71,7 +71,7 @@ public class DataVImpl implements IDataV {
|
|||||||
@Override
|
@Override
|
||||||
public List<DataV> listDataVDesc(LineCountEvaluateParam lineParam) {
|
public List<DataV> listDataVDesc(LineCountEvaluateParam lineParam) {
|
||||||
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class);
|
||||||
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, InfluxDbSqlConstant.V, HarmonicTimesUtil.harmonicTimesList(1, 50, 1));
|
||||||
influxQueryWrapper
|
influxQueryWrapper
|
||||||
.select(DataV::getLineId)
|
.select(DataV::getLineId)
|
||||||
.select(DataV::getPhasicType)
|
.select(DataV::getPhasicType)
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ public class BaseJunitTest {
|
|||||||
lineParam.setStartTime("2025-04-23 00:00:00");
|
lineParam.setStartTime("2025-04-23 00:00:00");
|
||||||
lineParam.setEndTime("2025-04-23 23:59:00");
|
lineParam.setEndTime("2025-04-23 23:59:00");
|
||||||
lineParam.setIsManual(true);
|
lineParam.setIsManual(true);
|
||||||
migrationService.hourseLineDataBacthSysc(lineParam);
|
// migrationService.hourseLineDataBacthSysc(lineParam);
|
||||||
|
|
||||||
System.out.println("");
|
System.out.println("");
|
||||||
|
|
||||||
|
|||||||
45
pom.xml
45
pom.xml
@@ -33,11 +33,46 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<!--内网-->
|
<!--内网-->
|
||||||
<middle.server.url>192.168.1.22</middle.server.url>
|
<!-- <middle.server.url>192.168.1.22</middle.server.url>-->
|
||||||
<service.server.url>192.168.1.121</service.server.url>
|
<!-- <service.server.url>192.168.1.121</service.server.url>-->
|
||||||
<docker.server.url>192.168.1.22</docker.server.url>
|
<!-- <docker.server.url>192.168.1.22</docker.server.url>-->
|
||||||
<nacos.url>${middle.server.url}:18848</nacos.url>
|
<!-- <nacos.url>${middle.server.url}:18848</nacos.url>-->
|
||||||
<nacos.namespace>07ec981d-1377-4920-8760-b5a98ff7e668</nacos.namespace>
|
<!-- <nacos.namespace>07ec981d-1377-4920-8760-b5a98ff7e668</nacos.namespace>-->
|
||||||
|
|
||||||
|
<!-- <middle.server.url>192.168.21.129</middle.server.url>-->
|
||||||
|
<!-- <service.server.url>192.168.21.1</service.server.url>-->
|
||||||
|
<!-- <docker.server.url>192.168.1.22</docker.server.url>-->
|
||||||
|
<!-- <nacos.url>${middle.server.url}:18848</nacos.url>-->
|
||||||
|
<!-- <nacos.namespace>0c19477c-444e-413c-9782-e6ebc2eedac1</nacos.namespace>-->
|
||||||
|
|
||||||
|
<!-- <middle.server.url>127.0.0.1</middle.server.url>-->
|
||||||
|
<!-- <!–微服务模块发布地址–>-->
|
||||||
|
<!-- <service.server.url>127.0.0.1</service.server.url>-->
|
||||||
|
<!-- <!–docker仓库地址–>-->
|
||||||
|
<!-- <docker.server.url>127.0.0.1</docker.server.url>-->
|
||||||
|
<!-- <!–nacos的ip:port–>-->
|
||||||
|
<!-- <nacos.url>${middle.server.url}:8848</nacos.url>-->
|
||||||
|
<!-- <nacos.namespace>37a0e99f-eb96-4d2f-9b47-75bffa765827</nacos.namespace>-->
|
||||||
|
<!-- <middle.server.url>24.43.102.139</middle.server.url>-->
|
||||||
|
<!-- <service.server.url>24.43.102.139</service.server.url>-->
|
||||||
|
<!-- <docker.server.url>24.43.102.139</docker.server.url>-->
|
||||||
|
<!-- <nacos.url>${middle.server.url}:18848</nacos.url>-->
|
||||||
|
<!-- <nacos.namespace></nacos.namespace>-->
|
||||||
|
|
||||||
|
<middle.server.url>127.0.0.1</middle.server.url>
|
||||||
|
<service.server.url>127.0.0.1</service.server.url>
|
||||||
|
<docker.server.url>127.0.0.1</docker.server.url>
|
||||||
|
<nacos.url>${middle.server.url}:8848</nacos.url>
|
||||||
|
<nacos.namespace>37a0e99f-eb96-4d2f-9b47-75bffa765827</nacos.namespace>
|
||||||
|
|
||||||
|
<!-- <middle.server.url>192.168.21.129</middle.server.url>-->
|
||||||
|
<!-- <!–微服务模块发布地址–>-->
|
||||||
|
<!-- <service.server.url>192.168.21.1</service.server.url>-->
|
||||||
|
<!-- <!–docker仓库地址–>-->
|
||||||
|
<!-- <docker.server.url>192.168.1.22</docker.server.url>-->
|
||||||
|
<!-- <nacos.url>${middle.server.url}:18848</nacos.url>-->
|
||||||
|
<!-- <nacos.namespace>0c19477c-444e-413c-9782-e6ebc2eedac1</nacos.namespace>-->
|
||||||
|
|
||||||
<!--sentinel:port-->
|
<!--sentinel:port-->
|
||||||
<sentinel.url>${middle.server.url}:8080</sentinel.url>
|
<sentinel.url>${middle.server.url}:8080</sentinel.url>
|
||||||
<!--网关地址,主要用于配置swagger中认证token-->
|
<!--网关地址,主要用于配置swagger中认证token-->
|
||||||
|
|||||||
Reference in New Issue
Block a user