数据清洗算法
This commit is contained in:
@@ -2,9 +2,10 @@ 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.DataFlickerFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.dto.DataFlickerDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataFlickerDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -24,4 +25,6 @@ public interface DataFlickerFeignClient {
|
||||
@PostMapping("/batchInsertion")
|
||||
HttpResult<String> batchInsertion(@RequestBody List<DataFlickerDTO> dataFlickerDTOList);
|
||||
|
||||
@PostMapping("/getRawData")
|
||||
HttpResult<List<DataFlickerDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam);
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@ 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.DataFlucFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.dto.DataFlucDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataFlucDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -24,4 +25,6 @@ public interface DataFlucFeignClient {
|
||||
@PostMapping("/batchInsertion")
|
||||
HttpResult<String> batchInsertion(@RequestBody List<DataFlucDTO> dataFlucDTOList);
|
||||
|
||||
@PostMapping("/getRawData")
|
||||
HttpResult<List<DataFlucDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
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.DataHarmRateVFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||
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
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/dataHarmRateV", fallbackFactory = DataHarmRateVFeignClientFallbackFactory.class, contextId = "dataHarmRateV")
|
||||
public interface DataHarmRateVFeignClient {
|
||||
|
||||
@PostMapping("/getRawData")
|
||||
HttpResult<List<DataHarmDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam);
|
||||
|
||||
}
|
||||
@@ -2,9 +2,10 @@ 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.DataIFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.api.fallback.DataHarmphasicVFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -16,7 +17,7 @@ import java.util.List;
|
||||
* @version 1.0.0
|
||||
* @date 2022年01月05日 15:11
|
||||
*/
|
||||
@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/dataHarmphasicV", fallbackFactory = DataIFeignClientFallbackFactory.class, contextId = "dataHarmphasicV")
|
||||
@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/dataHarmphasicV", fallbackFactory = DataHarmphasicVFeignClientFallbackFactory.class, contextId = "dataHarmphasicV")
|
||||
public interface DataHarmphasicVFeignClient {
|
||||
|
||||
|
||||
@@ -24,4 +25,7 @@ public interface DataHarmphasicVFeignClient {
|
||||
@PostMapping("/batchInsertion")
|
||||
HttpResult<String> batchInsertion(@RequestBody List<DataHarmphasicVDTO> dataHarmphasicVDTOList);
|
||||
|
||||
@PostMapping("/getRawData")
|
||||
HttpResult<List<DataHarmDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@ 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.DataHarmpowerPFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerPDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataPowerPDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -19,9 +20,9 @@ import java.util.List;
|
||||
@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/dataHarmpowerP", fallbackFactory = DataHarmpowerPFeignClientFallbackFactory.class, contextId = "dataHarmpowerP")
|
||||
public interface DataHarmpowerPFeignClient {
|
||||
|
||||
|
||||
|
||||
@PostMapping("/batchInsertion")
|
||||
HttpResult<String> batchInsertion(@RequestBody List<DataHarmpowerPDTO> dataHarmpowerPDTOList);
|
||||
|
||||
@PostMapping("/getRawData")
|
||||
HttpResult<List<DataPowerPDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam);
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@ 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.DataIFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.dto.DataIDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -19,9 +20,10 @@ import java.util.List;
|
||||
@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/dataI", fallbackFactory = DataIFeignClientFallbackFactory.class, contextId = "dataI")
|
||||
public interface DataIFeignClient {
|
||||
|
||||
|
||||
|
||||
@PostMapping("/batchInsertion")
|
||||
HttpResult<String> batchInsertion(@RequestBody List<DataIDTO> dataIDTOList);
|
||||
|
||||
@PostMapping("/getRawData")
|
||||
HttpResult<List<DataIDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam);
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
|
||||
import com.njcn.dataProcess.api.fallback.DataInharmVFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.dto.DataInharmVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -24,4 +26,7 @@ public interface DataInharmVFeignClient {
|
||||
@PostMapping("/batchInsertion")
|
||||
HttpResult<String> batchInsertion(@RequestBody List<DataInharmVDTO> dataInharmVDTOList);
|
||||
|
||||
@PostMapping("/getRawData")
|
||||
HttpResult<List<DataHarmDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam);
|
||||
|
||||
}
|
||||
|
||||
@@ -2,9 +2,10 @@ 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.DataPltFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.dto.DataPltDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataPltDto;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -24,4 +25,7 @@ public interface DataPltFeignClient {
|
||||
@PostMapping("/batchInsertion")
|
||||
HttpResult<String> batchInsertion(@RequestBody List<DataPltDTO> dataPltDTOList);
|
||||
|
||||
@PostMapping("/getRawData")
|
||||
HttpResult<List<DataPltDto>> getRawData(@RequestBody LineCountEvaluateParam lineParam);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
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.PqDataVerifyFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.po.PqDataVerify;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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 = "/pqDataVerify", fallbackFactory = PqDataVerifyFeignClientFallbackFactory.class, contextId = "pqDataVerify")
|
||||
public interface PqDataVerifyFeignClient {
|
||||
|
||||
@PostMapping("/insertData")
|
||||
@ApiOperation("存储清洗的异常数据")
|
||||
HttpResult<List<PqDataVerify>> insertData(@RequestBody List<PqDataVerify> list);
|
||||
|
||||
@PostMapping("/queryData")
|
||||
@ApiOperation("查询清洗的异常数据")
|
||||
HttpResult<List<PqDataVerify>> queryData(@RequestBody LineCountEvaluateParam param);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
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.PqReasonableRangeFeignClientFallbackFactory;
|
||||
import com.njcn.dataProcess.param.DataCleanParam;
|
||||
import com.njcn.dataProcess.pojo.dto.PqReasonableRangeDto;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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 = "/pqReasonableRange", fallbackFactory = PqReasonableRangeFeignClientFallbackFactory.class, contextId = "pqReasonableRange")
|
||||
public interface PqReasonableRangeFeignClient {
|
||||
|
||||
@PostMapping("/getData")
|
||||
@ApiOperation("按条件获取数据合理范围")
|
||||
HttpResult<List<PqReasonableRangeDto>> getData(@RequestBody DataCleanParam param);
|
||||
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import com.njcn.common.pojo.response.HttpResult;
|
||||
|
||||
import com.njcn.dataProcess.api.DataFlickerFeignClient;
|
||||
import com.njcn.dataProcess.dto.DataFlickerDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataFlickerDto;
|
||||
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -44,6 +46,12 @@ public class DataFlickerFeignClientFallbackFactory implements FallbackFactory<Da
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DataFlickerDto>> getRawData(LineCountEvaluateParam lineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取原始数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,10 @@ 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.DataFlucFeignClient;
|
||||
import com.njcn.dataProcess.dto.DataFlucDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataFlucDto;
|
||||
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -40,10 +41,17 @@ public class DataFlucFeignClientFallbackFactory implements FallbackFactory<DataF
|
||||
|
||||
@Override
|
||||
public HttpResult<String> batchInsertion(List<DataFlucDTO> dataFlucDTOList) {
|
||||
|
||||
log.error("{}异常,降级处理,异常为:{}","批量插入数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DataFlucDto>> getRawData(LineCountEvaluateParam lineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取原始数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
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.DataHarmRateVFeignClient;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||
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
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DataHarmRateVFeignClientFallbackFactory implements FallbackFactory<DataHarmRateVFeignClient> {
|
||||
|
||||
/**
|
||||
* 输出远程请求接口异常日志
|
||||
* @param cause RPC请求异常
|
||||
*/
|
||||
@Override
|
||||
public DataHarmRateVFeignClient 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 DataHarmRateVFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DataHarmDto>> getRawData(LineCountEvaluateParam lineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取原始数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
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.DataHarmphasicVFeignClient;
|
||||
import com.njcn.dataProcess.dto.DataHarmphasicVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||
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 denghuajun
|
||||
* @version 1.0.0
|
||||
* @date 2022年01月05日 15:08
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class DataHarmphasicVFeignClientFallbackFactory implements FallbackFactory<DataHarmphasicVFeignClient> {
|
||||
|
||||
|
||||
/**
|
||||
* 输出远程请求接口异常日志
|
||||
* @param cause RPC请求异常
|
||||
*/
|
||||
@Override
|
||||
public DataHarmphasicVFeignClient 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 DataHarmphasicVFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<String> batchInsertion(List<DataHarmphasicVDTO> dataHarmphasicVDTOList) {
|
||||
log.error("{}异常,降级处理,异常为:{}","批量插入数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DataHarmDto>> getRawData(LineCountEvaluateParam lineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取原始数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.dataProcess.api.DataHarmpowerPFeignClient;
|
||||
import com.njcn.dataProcess.dto.DataHarmpowerPDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataPowerPDto;
|
||||
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -43,6 +45,12 @@ public class DataHarmpowerPFeignClientFallbackFactory implements FallbackFactory
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DataPowerPDto>> getRawData(LineCountEvaluateParam lineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取原始数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,8 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.dataProcess.api.DataIFeignClient;
|
||||
import com.njcn.dataProcess.dto.DataIDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataIDto;
|
||||
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||
import com.njcn.system.utils.SystemEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
@@ -44,6 +46,12 @@ public class DataIFeignClientFallbackFactory implements FallbackFactory<DataIFei
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DataIDto>> getRawData(LineCountEvaluateParam lineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取原始数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.dataProcess.api.DataInharmVFeignClient;
|
||||
import com.njcn.dataProcess.dto.DataInharmVDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataHarmDto;
|
||||
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||
import com.njcn.system.utils.SystemEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -44,6 +45,12 @@ public class DataInharmVFeignClientFallbackFactory implements FallbackFactory<Da
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DataHarmDto>> getRawData(LineCountEvaluateParam lineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取原始数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@ import com.njcn.common.pojo.exception.BusinessException;
|
||||
import com.njcn.common.pojo.response.HttpResult;
|
||||
import com.njcn.dataProcess.api.DataPltFeignClient;
|
||||
import com.njcn.dataProcess.dto.DataPltDTO;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.dto.DataPltDto;
|
||||
import com.njcn.dataProcess.util.DataProcessingEnumUtil;
|
||||
import com.njcn.system.utils.SystemEnumUtil;
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -44,6 +45,12 @@ public class DataPltFeignClientFallbackFactory implements FallbackFactory<DataPl
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<DataPltDto>> getRawData(LineCountEvaluateParam lineParam) {
|
||||
log.error("{}异常,降级处理,异常为:{}","获取原始数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
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.PqDataVerifyFeignClient;
|
||||
import com.njcn.dataProcess.param.LineCountEvaluateParam;
|
||||
import com.njcn.dataProcess.pojo.po.PqDataVerify;
|
||||
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 PqDataVerifyFeignClientFallbackFactory implements FallbackFactory<PqDataVerifyFeignClient> {
|
||||
|
||||
/**
|
||||
* 输出远程请求接口异常日志
|
||||
* @param cause RPC请求异常
|
||||
*/
|
||||
@Override
|
||||
public PqDataVerifyFeignClient 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 PqDataVerifyFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<List<PqDataVerify>> insertData(List<PqDataVerify> list) {
|
||||
log.error("{}异常,降级处理,异常为:{}","存储清洗的异常数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<PqDataVerify>> queryData(LineCountEvaluateParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","查询清洗的异常数据",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
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.PqReasonableRangeFeignClient;
|
||||
import com.njcn.dataProcess.param.DataCleanParam;
|
||||
import com.njcn.dataProcess.pojo.dto.PqReasonableRangeDto;
|
||||
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 PqReasonableRangeFeignClientFallbackFactory implements FallbackFactory<PqReasonableRangeFeignClient> {
|
||||
|
||||
/**
|
||||
* 输出远程请求接口异常日志
|
||||
* @param cause RPC请求异常
|
||||
*/
|
||||
@Override
|
||||
public PqReasonableRangeFeignClient 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 PqReasonableRangeFeignClient() {
|
||||
|
||||
@Override
|
||||
public HttpResult<List<PqReasonableRangeDto>> getData(DataCleanParam param) {
|
||||
log.error("{}异常,降级处理,异常为:{}","按条件获取数据合理范围",cause.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
package com.njcn.dataProcess.enums;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 数据清洗枚举值
|
||||
*
|
||||
* @author xy
|
||||
* @version 1.0
|
||||
* @data 2025/2/13 15:08
|
||||
*/
|
||||
@Getter
|
||||
public enum DataCleanEnum {
|
||||
|
||||
/**
|
||||
* 所属系统
|
||||
*/
|
||||
Pqs("pqs","数据中心"),
|
||||
Govern("govern","治理"),
|
||||
|
||||
/**
|
||||
* 数据来源
|
||||
*/
|
||||
InfluxDB("InfluxDB","时序数据库"),
|
||||
MySql("MySql","关系型数据库"),
|
||||
|
||||
/**
|
||||
* 数据表名
|
||||
*/
|
||||
DataV("DataV","电压表"),
|
||||
DataHarmPhasicV("DataHarmPhasicV","谐波电压相角表"),
|
||||
DataI("DataI","电路表"),
|
||||
DataFlicker("DataFlicker","短闪表"),
|
||||
DataPlt("DataPlt","长闪表"),
|
||||
DataFluc("DataFluc","电压波动"),
|
||||
DataInHarmV("DataInHarmV","间谐波电压含有率表"),
|
||||
DataHarmRateV("DataHarmRateV","谐波电压含有率表"),
|
||||
DataHarmPowerP("DataHarmPowerP","功率因数表"),
|
||||
RMpEventDetail("r_mp_event_detail","暂降表"),
|
||||
|
||||
/**
|
||||
* 指标名称
|
||||
*/
|
||||
//DataFlicker
|
||||
Pst("pst","短时闪变"),
|
||||
|
||||
//DataFluc
|
||||
Fluc("fluc","电压波动"),
|
||||
|
||||
//DataHarmPhasicV
|
||||
V("v","次谐波电压基波相角"),
|
||||
|
||||
//DataHarmRateV
|
||||
V_Rate("v","次谐波电压含有率"),
|
||||
|
||||
//DataHarmPowerP
|
||||
Pf("pf","视在功率因素"),
|
||||
|
||||
//DataI
|
||||
RmsI("rms","电流有效值"),
|
||||
|
||||
//DataInHarmV
|
||||
V_InHarm("v","次间谐波电压含有率"),
|
||||
|
||||
//DataPlt
|
||||
Plt("plt","长时闪变"),
|
||||
|
||||
//DataV
|
||||
FreqDev("freq_dev","频率偏差"),
|
||||
Freq("freq","频率"),
|
||||
RmsV("rms","相电压有效值"),
|
||||
VPos("v_pos","正序电压"),
|
||||
VNeg("v_neg","负序电压"),
|
||||
VZero("v_zero","零序电压"),
|
||||
VUnbalance("v_unbalance","电压不平衡度"),
|
||||
RmsLvr("rms_lvr","线电压有效值"),
|
||||
VuDev("vu_dev","线电压正偏差"),
|
||||
VlDev("vl_dev","线电压负偏差"),
|
||||
VThd("v_thd","电压总谐波畸变率"),
|
||||
V_Data("v_1","相(线)电压基波有效值"),
|
||||
|
||||
//r_mp_event_detail
|
||||
VoltageDip("Voltage_Dip","相(线)电压基波有效值"),
|
||||
VoltageRise("Voltage_Rise","相(线)电压基波有效值");
|
||||
|
||||
private String code;
|
||||
|
||||
private String desc;
|
||||
|
||||
DataCleanEnum(String code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.njcn.dataProcess.param;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class DataCleanParam implements Serializable {
|
||||
|
||||
@ApiModelProperty("系统类型")
|
||||
private String systemType;
|
||||
|
||||
@ApiModelProperty("数据来源")
|
||||
private String dataSource;
|
||||
|
||||
@ApiModelProperty("表名")
|
||||
private String tableName;
|
||||
|
||||
}
|
||||
@@ -3,7 +3,9 @@ package com.njcn.dataProcess.param;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 监测点有效数值统计数据评估入参
|
||||
@@ -19,4 +21,15 @@ public class LineCountEvaluateParam extends BaseParam implements Serializable {
|
||||
*/
|
||||
private List<String> lineId;
|
||||
|
||||
/**
|
||||
* 表名
|
||||
*/
|
||||
private String tableName;
|
||||
|
||||
/**
|
||||
* 异常数据时间集合
|
||||
* Map<String,List<String>> key:监测点id value:异常时间集合
|
||||
*/
|
||||
private Map<String,List<String>> abnormalTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class DataFlicker {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "fluc")
|
||||
private Double fluc=0.00;
|
||||
@@ -56,7 +56,7 @@ public class DataFlicker {
|
||||
|
||||
influxDBDataFlicker.setTime(instant);
|
||||
influxDBDataFlicker.setLineId(dataFlicker.getLineid());
|
||||
influxDBDataFlicker.setPhaseType(dataFlicker.getPhasicType());
|
||||
influxDBDataFlicker.setPhasicType(dataFlicker.getPhasicType());
|
||||
influxDBDataFlicker.setFluc(Objects.isNull(dataFlicker.getFluc())?0.00:dataFlicker.getFluc());
|
||||
influxDBDataFlicker.setPlt(Objects.isNull(dataFlicker.getPst())?0.00:dataFlicker.getPst());
|
||||
influxDBDataFlicker.setPst(Objects.isNull(dataFlicker.getPlt())?0.00:dataFlicker.getPlt());
|
||||
|
||||
@@ -31,7 +31,7 @@ public class DataFluc {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "fluc")
|
||||
private Double fluc=0.00;
|
||||
@@ -53,7 +53,7 @@ public class DataFluc {
|
||||
|
||||
influxDBDataFluc.setTime(instant);
|
||||
influxDBDataFluc.setLineId(dataFluc.getLineid());
|
||||
influxDBDataFluc.setPhaseType(dataFluc.getPhasicType());
|
||||
influxDBDataFluc.setPhasicType(dataFluc.getPhasicType());
|
||||
influxDBDataFluc.setFluc(Objects.isNull(dataFluc.getFluc())?0.00:dataFluc.getFluc());
|
||||
influxDBDataFluc.setFluccf(Objects.isNull(dataFluc.getFluccf())?0.00:dataFluc.getFluccf());
|
||||
influxDBDataFluc.setQualityFlag(dataFluc.getQualityflag()+"");
|
||||
|
||||
@@ -35,7 +35,7 @@ public class DataHarmphasicI {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "quality_flag",tag = true)
|
||||
private String qualityFlag;
|
||||
@@ -206,7 +206,7 @@ public class DataHarmphasicI {
|
||||
|
||||
influxDBDataHarmPhasicI.setTime(instant);
|
||||
influxDBDataHarmPhasicI.setLineId(dataHarmphasicI.getLineid());
|
||||
influxDBDataHarmPhasicI.setPhaseType(dataHarmphasicI.getPhasicType());
|
||||
influxDBDataHarmPhasicI.setPhasicType(dataHarmphasicI.getPhasicType());
|
||||
influxDBDataHarmPhasicI.setQualityFlag(dataHarmphasicI.getQualityflag()+"");
|
||||
influxDBDataHarmPhasicI.setValueType(valueType);
|
||||
if (valueType.equals("AVG")) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class DataHarmphasicV {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "quality_flag",tag = true)
|
||||
private String qualityFlag;
|
||||
@@ -206,7 +206,7 @@ public class DataHarmphasicV {
|
||||
|
||||
InfluxDBDataHarmphasicV.setTime(instant);
|
||||
InfluxDBDataHarmphasicV.setLineId(dataHarmphasicV.getLineid());
|
||||
InfluxDBDataHarmphasicV.setPhaseType(dataHarmphasicV.getPhasicType());
|
||||
InfluxDBDataHarmphasicV.setPhasicType(dataHarmphasicV.getPhasicType());
|
||||
InfluxDBDataHarmphasicV.setQualityFlag(dataHarmphasicV.getQualityflag()+"");
|
||||
InfluxDBDataHarmphasicV.setValueType(valueType);
|
||||
if (valueType.equals("AVG")) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class DataHarmpowerP {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "quality_flag",tag = true)
|
||||
private String qualityFlag;
|
||||
@@ -215,7 +215,7 @@ public class DataHarmpowerP {
|
||||
|
||||
influxDBDataHarmpowerP.setTime(instant);
|
||||
influxDBDataHarmpowerP.setLineId(dataHarmpowerP.getLineid());
|
||||
influxDBDataHarmpowerP.setPhaseType(dataHarmpowerP.getPhasicType());
|
||||
influxDBDataHarmpowerP.setPhasicType(dataHarmpowerP.getPhasicType());
|
||||
influxDBDataHarmpowerP.setQualityFlag(dataHarmpowerP.getQualityflag()+"");
|
||||
influxDBDataHarmpowerP.setValueType(valueType);
|
||||
if (valueType.equals("AVG")) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class DataHarmpowerQ {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "quality_flag",tag = true)
|
||||
private String qualityFlag;
|
||||
@@ -209,7 +209,7 @@ public class DataHarmpowerQ {
|
||||
|
||||
influxDBDataHarmpowerQ.setTime(instant);
|
||||
influxDBDataHarmpowerQ.setLineId(dataHarmpowerQ.getLineid());
|
||||
influxDBDataHarmpowerQ.setPhaseType(dataHarmpowerQ.getPhasicType());
|
||||
influxDBDataHarmpowerQ.setPhasicType(dataHarmpowerQ.getPhasicType());
|
||||
influxDBDataHarmpowerQ.setQualityFlag(dataHarmpowerQ.getQualityflag()+"");
|
||||
influxDBDataHarmpowerQ.setValueType(valueType);
|
||||
if (valueType.equals("AVG")) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class DataHarmpowerS {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "quality_flag",tag = true)
|
||||
private String qualityFlag;
|
||||
@@ -209,7 +209,7 @@ public class DataHarmpowerS {
|
||||
|
||||
influxDBDataHarmpowerS.setTime(instant);
|
||||
influxDBDataHarmpowerS.setLineId(dataHarmpowerS.getLineid());
|
||||
influxDBDataHarmpowerS.setPhaseType(dataHarmpowerS.getPhasicType());
|
||||
influxDBDataHarmpowerS.setPhasicType(dataHarmpowerS.getPhasicType());
|
||||
influxDBDataHarmpowerS.setQualityFlag(dataHarmpowerS.getQualityflag()+"");
|
||||
influxDBDataHarmpowerS.setValueType(valueType);
|
||||
if (valueType.equals("AVG")) {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class DataHarmrateI {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "quality_flag",tag = true)
|
||||
private String qualityFlag;
|
||||
@@ -205,7 +205,7 @@ public class DataHarmrateI {
|
||||
|
||||
influxDBDataHarmRateI.setTime(instant);
|
||||
influxDBDataHarmRateI.setLineId(dataHarmrateI.getLineid());
|
||||
influxDBDataHarmRateI.setPhaseType(dataHarmrateI.getPhasicType());
|
||||
influxDBDataHarmRateI.setPhasicType(dataHarmrateI.getPhasicType());
|
||||
influxDBDataHarmRateI.setQualityFlag(dataHarmrateI.getQualityflag()+"");
|
||||
influxDBDataHarmRateI.setValueType(valueType);
|
||||
if (valueType.equals("AVG")) {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class DataHarmrateV {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "quality_flag",tag = true)
|
||||
private String qualityFlag;
|
||||
@@ -205,7 +205,7 @@ public class DataHarmrateV {
|
||||
|
||||
influxDBDataHarmRateV.setTime(instant);
|
||||
influxDBDataHarmRateV.setLineId(dataHarmrateV.getLineid());
|
||||
influxDBDataHarmRateV.setPhaseType(dataHarmrateV.getPhasicType());
|
||||
influxDBDataHarmRateV.setPhasicType(dataHarmrateV.getPhasicType());
|
||||
influxDBDataHarmRateV.setQualityFlag(dataHarmrateV.getQualityflag()+"");
|
||||
influxDBDataHarmRateV.setValueType(valueType);
|
||||
if (valueType.equals("AVG")) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class DataI {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "quality_flag",tag = true)
|
||||
private String qualityFlag;
|
||||
@@ -224,7 +224,7 @@ public class DataI {
|
||||
|
||||
influxDBDataI.setTime(instant);
|
||||
influxDBDataI.setLineId(dataI.getLineid());
|
||||
influxDBDataI.setPhaseType(dataI.getPhasicType());
|
||||
influxDBDataI.setPhasicType(dataI.getPhasicType());
|
||||
influxDBDataI.setQualityFlag(dataI.getQualityflag()+"");
|
||||
influxDBDataI.setValueType(valueType);
|
||||
if (valueType.equals("AVG")) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class DataInharmI {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "quality_flag",tag = true)
|
||||
private String qualityFlag;
|
||||
@@ -207,7 +207,7 @@ public class DataInharmI {
|
||||
|
||||
influxDBDataInHarmI.setTime(instant);
|
||||
influxDBDataInHarmI.setLineId(dataInharmI.getLineid());
|
||||
influxDBDataInHarmI.setPhaseType(dataInharmI.getPhasicType());
|
||||
influxDBDataInHarmI.setPhasicType(dataInharmI.getPhasicType());
|
||||
influxDBDataInHarmI.setQualityFlag(dataInharmI.getQualityflag()+"");
|
||||
influxDBDataInHarmI.setValueType(valueType);
|
||||
if (valueType.equals("AVG")) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class DataInharmV {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "quality_flag",tag = true)
|
||||
private String qualityFlag;
|
||||
@@ -206,7 +206,7 @@ public class DataInharmV {
|
||||
|
||||
influxDBDataInHarmV.setTime(instant);
|
||||
influxDBDataInHarmV.setLineId(dataInharmV.getLineid());
|
||||
influxDBDataInHarmV.setPhaseType(dataInharmV.getPhasicType());
|
||||
influxDBDataInHarmV.setPhasicType(dataInharmV.getPhasicType());
|
||||
influxDBDataInHarmV.setQualityFlag(dataInharmV.getQualityflag()+"");
|
||||
influxDBDataInHarmV.setValueType(valueType);
|
||||
if (valueType.equals("AVG")) {
|
||||
|
||||
@@ -32,7 +32,7 @@ public class DataPlt {
|
||||
private String lineId;
|
||||
|
||||
@Column(name = "phasic_type",tag = true)
|
||||
private String phaseType;
|
||||
private String phasicType;
|
||||
|
||||
@Column(name = "quality_flag",tag = true)
|
||||
private String qualityFlag;
|
||||
@@ -50,7 +50,7 @@ public class DataPlt {
|
||||
|
||||
influxDBDataPlt.setTime(instant);
|
||||
influxDBDataPlt.setLineId(dataPlt.getLineid());
|
||||
influxDBDataPlt.setPhaseType(dataPlt.getPhasicType());
|
||||
influxDBDataPlt.setPhasicType(dataPlt.getPhasicType());
|
||||
influxDBDataPlt.setPlt(Objects.isNull(dataPlt.getPlt())?0.00:dataPlt.getPlt());
|
||||
influxDBDataPlt.setQualityFlag(dataPlt.getQualityflag()+"");
|
||||
|
||||
|
||||
@@ -20,6 +20,9 @@ public class CommonMinuteDto implements Serializable {
|
||||
@ApiModelProperty("监测点Id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty("数据质量 0:正常 1:异常")
|
||||
private String qualityFlag;
|
||||
|
||||
private List<PhasicType> phasicTypeList;
|
||||
|
||||
@Data
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.njcn.dataProcess.pojo.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class DataFlickerDto implements Serializable {
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private String time;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String minTime;
|
||||
|
||||
@ApiModelProperty("监测点Id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty("相别,'A'表示A相,'B'表示B相,'C'表示C相,'T'表示总, 'M'表示无相别")
|
||||
private String phasicType;
|
||||
|
||||
@ApiModelProperty("数据类型 最大值:max、最小值:min、平均值:avg、95值:cp95")
|
||||
private String valueType;
|
||||
|
||||
@ApiModelProperty("数据质量标志(0-表示是正常数据、1-表示是错误数据、2-表示是有事件的数据)数据库默认是0,污染数据不参与报表统计")
|
||||
private String qualityFlag;
|
||||
|
||||
@ApiModelProperty("数据清洗标识 0:正常 1:异常")
|
||||
private Integer abnormalFlag;
|
||||
|
||||
@ApiModelProperty("电压波动")
|
||||
private Double fluc;
|
||||
|
||||
@ApiModelProperty("短时闪变")
|
||||
private Double pst;
|
||||
|
||||
@ApiModelProperty("长时闪变")
|
||||
private Double plt;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.njcn.dataProcess.pojo.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class DataFlucDto implements Serializable {
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private String time;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String minTime;
|
||||
|
||||
@ApiModelProperty("监测点Id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty("相别,'A'表示A相,'B'表示B相,'C'表示C相,'T'表示总, 'M'表示无相别")
|
||||
private String phasicType;
|
||||
|
||||
@ApiModelProperty("数据类型 最大值:max、最小值:min、平均值:avg、95值:cp95")
|
||||
private String valueType;
|
||||
|
||||
@ApiModelProperty("数据质量标志(0-表示是正常数据、1-表示是错误数据、2-表示是有事件的数据)数据库默认是0,污染数据不参与报表统计")
|
||||
private String qualityFlag;
|
||||
|
||||
@ApiModelProperty("数据清洗标识 0:正常 1:异常")
|
||||
private Integer abnormalFlag;
|
||||
|
||||
@ApiModelProperty("电压波动")
|
||||
private Double fluc;
|
||||
|
||||
@ApiModelProperty("电压波动频度")
|
||||
private Double fluccf;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.njcn.dataProcess.pojo.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class DataHarmDto implements Serializable {
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private String time;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String minTime;
|
||||
|
||||
@ApiModelProperty("监测点Id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty("相别,'A'表示A相,'B'表示B相,'C'表示C相,'T'表示总, 'M'表示无相别")
|
||||
private String phasicType;
|
||||
|
||||
@ApiModelProperty("数据类型 最大值:max、最小值:min、平均值:avg、95值:cp95")
|
||||
private String valueType;
|
||||
|
||||
@ApiModelProperty("数据质量标志(0-表示是正常数据、1-表示是错误数据、2-表示是有事件的数据)数据库默认是0,污染数据不参与报表统计")
|
||||
private String qualityFlag;
|
||||
|
||||
@ApiModelProperty("数据清洗标识 0:正常 1:异常")
|
||||
private Integer abnormalFlag;
|
||||
|
||||
@ApiModelProperty("0.5次间谐波电压含有率")
|
||||
private Double v1;
|
||||
|
||||
@ApiModelProperty("1.5次间谐波电压含有率(2次谐波电压含有率)")
|
||||
private Double v2;
|
||||
|
||||
@ApiModelProperty("2.5次间谐波电压含有率(3次谐波电压含有率)")
|
||||
private Double v3;
|
||||
|
||||
@ApiModelProperty("3.5次间谐波电压含有率(4次谐波电压含有率)")
|
||||
private Double v4;
|
||||
|
||||
@ApiModelProperty("4.5次间谐波电压含有率(5次谐波电压含有率)")
|
||||
private Double v5;
|
||||
|
||||
@ApiModelProperty("5.5次间谐波电压含有率(6次谐波电压含有率)")
|
||||
private Double v6;
|
||||
|
||||
@ApiModelProperty("6.5次间谐波电压含有率(7次谐波电压含有率)")
|
||||
private Double v7;
|
||||
|
||||
@ApiModelProperty("7.5次间谐波电压含有率(8次谐波电压含有率)")
|
||||
private Double v8;
|
||||
|
||||
private Double v9;
|
||||
|
||||
private Double v10;
|
||||
|
||||
private Double v11;
|
||||
|
||||
private Double v12;
|
||||
|
||||
private Double v13;
|
||||
|
||||
private Double v14;
|
||||
|
||||
private Double v15;
|
||||
|
||||
private Double v16;
|
||||
|
||||
private Double v17;
|
||||
|
||||
private Double v18;
|
||||
|
||||
private Double v19;
|
||||
|
||||
private Double v20;
|
||||
|
||||
private Double v21;
|
||||
|
||||
private Double v22;
|
||||
|
||||
private Double v23;
|
||||
|
||||
private Double v24;
|
||||
|
||||
private Double v25;
|
||||
|
||||
private Double v26;
|
||||
|
||||
private Double v27;
|
||||
|
||||
private Double v28;
|
||||
|
||||
private Double v29;
|
||||
|
||||
private Double v30;
|
||||
|
||||
private Double v31;
|
||||
|
||||
private Double v32;
|
||||
|
||||
private Double v33;
|
||||
|
||||
private Double v34;
|
||||
|
||||
private Double v35;
|
||||
|
||||
private Double v36;
|
||||
|
||||
private Double v37;
|
||||
|
||||
private Double v38;
|
||||
|
||||
private Double v39;
|
||||
|
||||
private Double v40;
|
||||
|
||||
private Double v41;
|
||||
|
||||
private Double v42;
|
||||
|
||||
private Double v43;
|
||||
|
||||
private Double v44;
|
||||
|
||||
private Double v45;
|
||||
|
||||
private Double v46;
|
||||
|
||||
private Double v47;
|
||||
|
||||
private Double v48;
|
||||
|
||||
private Double v49;
|
||||
|
||||
@ApiModelProperty("49.5次间谐波电压含有率(50次谐波电压含有率)")
|
||||
private Double v50;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
package com.njcn.dataProcess.pojo.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class DataIDto implements Serializable {
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private String time;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String minTime;
|
||||
|
||||
@ApiModelProperty("监测点Id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty("相别,'A'表示A相,'B'表示B相,'C'表示C相,'T'表示总, 'M'表示无相别")
|
||||
private String phasicType;
|
||||
|
||||
@ApiModelProperty("数据类型 最大值:max、最小值:min、平均值:avg、95值:cp95")
|
||||
private String valueType;
|
||||
|
||||
@ApiModelProperty("数据质量标志(0-表示是正常数据、1-表示是错误数据、2-表示是有事件的数据)数据库默认是0,污染数据不参与报表统计")
|
||||
private String qualityFlag;
|
||||
|
||||
@ApiModelProperty("数据清洗标识 0:正常 1:异常")
|
||||
private Integer abnormalFlag;
|
||||
|
||||
@ApiModelProperty("负序电流")
|
||||
private Double iNeg;
|
||||
|
||||
@ApiModelProperty("正序电流")
|
||||
private Double iPos;
|
||||
|
||||
@ApiModelProperty("电流总谐波畸变率")
|
||||
private Double iThd;
|
||||
|
||||
@ApiModelProperty("三相电流不平衡度")
|
||||
private Double iUnbalance;
|
||||
|
||||
@ApiModelProperty("零序电流")
|
||||
private Double iZero;
|
||||
|
||||
@ApiModelProperty("电流有效值")
|
||||
private Double rms;
|
||||
|
||||
@ApiModelProperty("基波电流幅值")
|
||||
private Double i1;
|
||||
|
||||
@ApiModelProperty("2次谐波电流幅值")
|
||||
private Double i2;
|
||||
|
||||
@ApiModelProperty("3次谐波电流幅值")
|
||||
private Double i3;
|
||||
|
||||
@ApiModelProperty("4次谐波电流幅值")
|
||||
private Double i4;
|
||||
|
||||
@ApiModelProperty("5次谐波电流幅值")
|
||||
private Double i5;
|
||||
|
||||
@ApiModelProperty("6次谐波电流幅值")
|
||||
private Double i6;
|
||||
|
||||
@ApiModelProperty("7次谐波电流幅值")
|
||||
private Double i7;
|
||||
|
||||
@ApiModelProperty("8次谐波电流幅值")
|
||||
private Double i8;
|
||||
|
||||
private Double i9;
|
||||
|
||||
private Double i10;
|
||||
|
||||
private Double i11;
|
||||
|
||||
private Double i12;
|
||||
|
||||
private Double i13;
|
||||
|
||||
private Double i14;
|
||||
|
||||
private Double i15;
|
||||
|
||||
private Double i16;
|
||||
|
||||
private Double i17;
|
||||
|
||||
private Double i18;
|
||||
|
||||
private Double i19;
|
||||
|
||||
private Double i20;
|
||||
|
||||
private Double i21;
|
||||
|
||||
private Double i22;
|
||||
|
||||
private Double i23;
|
||||
|
||||
private Double i24;
|
||||
|
||||
private Double i25;
|
||||
|
||||
private Double i26;
|
||||
|
||||
private Double i27;
|
||||
|
||||
private Double i28;
|
||||
|
||||
private Double i29;
|
||||
|
||||
private Double i30;
|
||||
|
||||
private Double i31;
|
||||
|
||||
private Double i32;
|
||||
|
||||
private Double i33;
|
||||
|
||||
private Double i34;
|
||||
|
||||
private Double i35;
|
||||
|
||||
private Double i36;
|
||||
|
||||
private Double i37;
|
||||
|
||||
private Double i38;
|
||||
|
||||
private Double i39;
|
||||
|
||||
private Double i40;
|
||||
|
||||
private Double i41;
|
||||
|
||||
private Double i42;
|
||||
|
||||
private Double i43;
|
||||
|
||||
private Double i44;
|
||||
|
||||
private Double i45;
|
||||
|
||||
private Double i46;
|
||||
|
||||
private Double i47;
|
||||
|
||||
private Double i48;
|
||||
|
||||
private Double i49;
|
||||
|
||||
@ApiModelProperty("50次谐波电流幅值")
|
||||
private Double i50;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.njcn.dataProcess.pojo.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class DataPltDto implements Serializable {
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private String time;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String minTime;
|
||||
|
||||
@ApiModelProperty("监测点Id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty("相别,'A'表示A相,'B'表示B相,'C'表示C相,'T'表示总, 'M'表示无相别")
|
||||
private String phasicType;
|
||||
|
||||
@ApiModelProperty("数据类型 最大值:max、最小值:min、平均值:avg、95值:cp95")
|
||||
private String valueType;
|
||||
|
||||
@ApiModelProperty("数据质量标志(0-表示是正常数据、1-表示是错误数据、2-表示是有事件的数据)数据库默认是0,污染数据不参与报表统计")
|
||||
private String qualityFlag;
|
||||
|
||||
@ApiModelProperty("数据清洗标识 0:正常 1:异常")
|
||||
private Integer abnormalFlag;
|
||||
|
||||
@ApiModelProperty("长时闪变值")
|
||||
private Double plt;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.njcn.dataProcess.pojo.dto;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class DataPowerPDto implements Serializable {
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private String time;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private String minTime;
|
||||
|
||||
@ApiModelProperty("监测点Id")
|
||||
private String lineId;
|
||||
|
||||
@ApiModelProperty("相别,'A'表示A相,'B'表示B相,'C'表示C相,'T'表示总, 'M'表示无相别")
|
||||
private String phasicType;
|
||||
|
||||
@ApiModelProperty("数据类型 最大值:max、最小值:min、平均值:avg、95值:cp95")
|
||||
private String valueType;
|
||||
|
||||
@ApiModelProperty("数据质量标志(0-表示是正常数据、1-表示是错误数据、2-表示是有事件的数据)数据库默认是0,污染数据不参与报表统计")
|
||||
private String qualityFlag;
|
||||
|
||||
@ApiModelProperty("数据清洗标识 0:正常 1:异常")
|
||||
private Integer abnormalFlag;
|
||||
|
||||
@ApiModelProperty("位移功率因数")
|
||||
private Double df;
|
||||
|
||||
@ApiModelProperty("视在功率因素")
|
||||
private Double pf;
|
||||
|
||||
@ApiModelProperty("总功功率")
|
||||
private Double p;
|
||||
|
||||
@ApiModelProperty("基波有功功率")
|
||||
private Double p1;
|
||||
|
||||
@ApiModelProperty("2次谐波有功功率")
|
||||
private Double p2;
|
||||
|
||||
@ApiModelProperty("3次谐波有功功率")
|
||||
private Double p3;
|
||||
|
||||
@ApiModelProperty("4次谐波有功功率")
|
||||
private Double p4;
|
||||
|
||||
@ApiModelProperty("5次谐波有功功率")
|
||||
private Double p5;
|
||||
|
||||
@ApiModelProperty("6次谐波有功功率")
|
||||
private Double p6;
|
||||
|
||||
@ApiModelProperty("7次谐波有功功率")
|
||||
private Double p7;
|
||||
|
||||
@ApiModelProperty("8次谐波有功功率")
|
||||
private Double p8;
|
||||
|
||||
private Double p9;
|
||||
|
||||
private Double p10;
|
||||
|
||||
private Double p11;
|
||||
|
||||
private Double p12;
|
||||
|
||||
private Double p13;
|
||||
|
||||
private Double p14;
|
||||
|
||||
private Double p15;
|
||||
|
||||
private Double p16;
|
||||
|
||||
private Double p17;
|
||||
|
||||
private Double p18;
|
||||
|
||||
private Double p19;
|
||||
|
||||
private Double p20;
|
||||
|
||||
private Double p21;
|
||||
|
||||
private Double p22;
|
||||
|
||||
private Double p23;
|
||||
|
||||
private Double p24;
|
||||
|
||||
private Double p25;
|
||||
|
||||
private Double p26;
|
||||
|
||||
private Double p27;
|
||||
|
||||
private Double p28;
|
||||
|
||||
private Double p29;
|
||||
|
||||
private Double p30;
|
||||
|
||||
private Double p31;
|
||||
|
||||
private Double p32;
|
||||
|
||||
private Double p33;
|
||||
|
||||
private Double p34;
|
||||
|
||||
private Double p35;
|
||||
|
||||
private Double p36;
|
||||
|
||||
private Double p37;
|
||||
|
||||
private Double p38;
|
||||
|
||||
private Double p39;
|
||||
|
||||
private Double p40;
|
||||
|
||||
private Double p41;
|
||||
|
||||
private Double p42;
|
||||
|
||||
private Double p43;
|
||||
|
||||
private Double p44;
|
||||
|
||||
private Double p45;
|
||||
|
||||
private Double p46;
|
||||
|
||||
private Double p47;
|
||||
|
||||
private Double p48;
|
||||
|
||||
private Double p49;
|
||||
|
||||
@ApiModelProperty("50次谐波有功功率")
|
||||
private Double p50;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
package com.njcn.dataProcess.pojo.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
*/
|
||||
@Data
|
||||
public class PqReasonableRangeDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 指标code
|
||||
*/
|
||||
private String indexCode;
|
||||
|
||||
/**
|
||||
* 指标名称
|
||||
*/
|
||||
private String indexName;
|
||||
|
||||
/**
|
||||
* 指标开始
|
||||
*/
|
||||
private Integer harmStart;
|
||||
|
||||
/**
|
||||
* 指标结束
|
||||
*/
|
||||
private Integer harmEnd;
|
||||
|
||||
/**
|
||||
* 指标所属项别
|
||||
*/
|
||||
private String phaseType;
|
||||
|
||||
/**
|
||||
* 指标所属influxdb表的实体类
|
||||
*/
|
||||
private String influxdbTableName;
|
||||
|
||||
/**
|
||||
* 指标所属类的属性
|
||||
*/
|
||||
private String influxdbColumnName;
|
||||
|
||||
/**
|
||||
* 指标下限
|
||||
*/
|
||||
private Double minValue;
|
||||
|
||||
/**
|
||||
* 指标上限
|
||||
*/
|
||||
private Double maxValue;
|
||||
|
||||
/**
|
||||
* 电压等级是否参与计算(0:不参与1:参与)
|
||||
*/
|
||||
private Integer isVoltage;
|
||||
|
||||
/**
|
||||
* Ct变比是否参与计算
|
||||
*/
|
||||
private Integer ctAttendFlag;
|
||||
|
||||
/**
|
||||
* 指标数据源(influxdb,oralce,mysql)
|
||||
*/
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 无具体范围,判断的条件描述
|
||||
*/
|
||||
private String otherAlgorithm;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 所属系统(pqs,govern)目前就这个两个系统
|
||||
*/
|
||||
private String belongingSystem;
|
||||
|
||||
/**
|
||||
* 状态(0:删除 1:正常)
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package com.njcn.dataProcess.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-02-17
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("pq_data_verify")
|
||||
public class PqDataVerify implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 监测点id
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "line_id")
|
||||
private String lineId;
|
||||
|
||||
/**
|
||||
* 异常数据时间
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "time")
|
||||
private LocalDateTime time;
|
||||
|
||||
/**
|
||||
* 数据类型(最大值:max、最小值:min、平均值:avg、95值:cp95)
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "value_type")
|
||||
private String valueType;
|
||||
|
||||
/**
|
||||
* 相别:"A" "B" "C" "ABC" "T"
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "phasic_type")
|
||||
private String phasicType;
|
||||
|
||||
/**
|
||||
* 指标code
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "index_code")
|
||||
private String indexCode;
|
||||
|
||||
/**
|
||||
* 指标名称
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "index_name")
|
||||
private String indexName;
|
||||
|
||||
/**
|
||||
* 指标表名
|
||||
*/
|
||||
@MppMultiId
|
||||
@TableField(value = "index_table")
|
||||
private String indexTable;
|
||||
|
||||
/**
|
||||
* 异常值
|
||||
*/
|
||||
@TableField(value = "abnormal_value")
|
||||
private Double abnormalValue;
|
||||
|
||||
/**
|
||||
* 指标上限
|
||||
*/
|
||||
@TableField(value = "min_value")
|
||||
private Double minValue;
|
||||
|
||||
/**
|
||||
* 指标下限
|
||||
*/
|
||||
@TableField(value = "max_value")
|
||||
private Double maxValue;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.njcn.dataProcess.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author xy
|
||||
* @since 2025-02-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("pq_reasonable_range")
|
||||
public class PqReasonableRange extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 指标code
|
||||
*/
|
||||
private String indexCode;
|
||||
|
||||
/**
|
||||
* 指标名称
|
||||
*/
|
||||
private String indexName;
|
||||
|
||||
/**
|
||||
* 指标开始
|
||||
*/
|
||||
private Integer harmStart;
|
||||
|
||||
/**
|
||||
* 指标结束
|
||||
*/
|
||||
private Integer harmEnd;
|
||||
|
||||
/**
|
||||
* 指标所属项别
|
||||
*/
|
||||
private String phaseType;
|
||||
|
||||
/**
|
||||
* 指标所属influxdb表的实体类
|
||||
*/
|
||||
private String influxdbTableName;
|
||||
|
||||
/**
|
||||
* 指标所属类的属性
|
||||
*/
|
||||
private String influxdbColumnName;
|
||||
|
||||
/**
|
||||
* 指标下限
|
||||
*/
|
||||
private Double minValue;
|
||||
|
||||
/**
|
||||
* 指标上限
|
||||
*/
|
||||
private Double maxValue;
|
||||
|
||||
/**
|
||||
* 电压等级是否参与计算(0:不参与1:参与)
|
||||
*/
|
||||
private Integer isVoltage;
|
||||
|
||||
/**
|
||||
* Ct变比是否参与计算
|
||||
*/
|
||||
private Integer ctAttendFlag;
|
||||
|
||||
/**
|
||||
* 指标数据源(influxdb,oralce,mysql)
|
||||
*/
|
||||
private String dataSource;
|
||||
|
||||
/**
|
||||
* 无具体范围,判断的条件描述
|
||||
*/
|
||||
private String otherAlgorithm;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 所属系统(pqs,govern)目前就这个两个系统
|
||||
*/
|
||||
private String belongingSystem;
|
||||
|
||||
/**
|
||||
* 状态(0:删除 1:正常)
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.njcn.dataProcess.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -37,187 +36,187 @@ public class RStatDataVD implements Serializable {
|
||||
@TableField(value = "quality_flag")
|
||||
private Integer qualityFlag;
|
||||
|
||||
@TableField(value = "freq")
|
||||
@TableField(value = "freq",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double freq;
|
||||
|
||||
@TableField(value = "freq_dev")
|
||||
@TableField(value = "freq_dev",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double freqDev;
|
||||
|
||||
@TableField(value = "rms")
|
||||
@TableField(value = "rms",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double rms;
|
||||
|
||||
@TableField(value = "rms_lvr")
|
||||
@TableField(value = "rms_lvr",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double rmsLvr;
|
||||
|
||||
@TableField(value = "v_neg")
|
||||
@TableField(value = "v_neg",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double vNeg;
|
||||
|
||||
@TableField(value = "v_pos")
|
||||
@TableField(value = "v_pos",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double vPos;
|
||||
|
||||
@TableField(value = "v_thd")
|
||||
@TableField(value = "v_thd",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double vThd;
|
||||
|
||||
@TableField(value = "v_unbalance")
|
||||
@TableField(value = "v_unbalance",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double vUnbalance;
|
||||
|
||||
@TableField(value = "v_zero")
|
||||
@TableField(value = "v_zero",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double vZero;
|
||||
|
||||
@TableField(value = "vl_dev")
|
||||
@TableField(value = "vl_dev",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double vlDev;
|
||||
|
||||
@TableField(value = "vu_dev")
|
||||
@TableField(value = "vu_dev",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double vuDev;
|
||||
|
||||
@TableField(value = "v_1")
|
||||
@TableField(value = "v_1",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v1;
|
||||
|
||||
@TableField(value = "v_2")
|
||||
@TableField(value = "v_2",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v2;
|
||||
|
||||
@TableField(value = "v_3")
|
||||
@TableField(value = "v_3",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v3;
|
||||
|
||||
@TableField(value = "v_4")
|
||||
@TableField(value = "v_4",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v4;
|
||||
|
||||
@TableField(value = "v_5")
|
||||
@TableField(value = "v_5",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v5;
|
||||
|
||||
@TableField(value = "v_6")
|
||||
@TableField(value = "v_6",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v6;
|
||||
|
||||
@TableField(value = "v_7")
|
||||
@TableField(value = "v_7",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v7;
|
||||
|
||||
@TableField(value = "v_8")
|
||||
@TableField(value = "v_8",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v8;
|
||||
|
||||
@TableField(value = "v_9")
|
||||
@TableField(value = "v_9",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v9;
|
||||
|
||||
@TableField(value = "v_10")
|
||||
@TableField(value = "v_10",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v10;
|
||||
|
||||
@TableField(value = "v_11")
|
||||
@TableField(value = "v_11",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v11;
|
||||
|
||||
@TableField(value = "v_12")
|
||||
@TableField(value = "v_12",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v12;
|
||||
|
||||
@TableField(value = "v_13")
|
||||
@TableField(value = "v_13",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v13;
|
||||
|
||||
@TableField(value = "v_14")
|
||||
@TableField(value = "v_14",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v14;
|
||||
|
||||
@TableField(value = "v_15")
|
||||
@TableField(value = "v_15",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v15;
|
||||
|
||||
@TableField(value = "v_16")
|
||||
@TableField(value = "v_16",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v16;
|
||||
|
||||
@TableField(value = "v_17")
|
||||
@TableField(value = "v_17",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v17;
|
||||
|
||||
@TableField(value = "v_18")
|
||||
@TableField(value = "v_18",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v18;
|
||||
|
||||
@TableField(value = "v_19")
|
||||
@TableField(value = "v_19",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v19;
|
||||
|
||||
@TableField(value = "v_20")
|
||||
@TableField(value = "v_20",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v20;
|
||||
|
||||
@TableField(value = "v_21")
|
||||
@TableField(value = "v_21",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v21;
|
||||
|
||||
@TableField(value = "v_22")
|
||||
@TableField(value = "v_22",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v22;
|
||||
|
||||
@TableField(value = "v_23")
|
||||
@TableField(value = "v_23",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v23;
|
||||
|
||||
@TableField(value = "v_24")
|
||||
@TableField(value = "v_24",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v24;
|
||||
|
||||
@TableField(value = "v_25")
|
||||
@TableField(value = "v_25",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v25;
|
||||
|
||||
@TableField(value = "v_26")
|
||||
@TableField(value = "v_26",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v26;
|
||||
|
||||
@TableField(value = "v_27")
|
||||
@TableField(value = "v_27",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v27;
|
||||
|
||||
@TableField(value = "v_28")
|
||||
@TableField(value = "v_28",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v28;
|
||||
|
||||
@TableField(value = "v_29")
|
||||
@TableField(value = "v_29",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v29;
|
||||
|
||||
@TableField(value = "v_30")
|
||||
@TableField(value = "v_30",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v30;
|
||||
|
||||
@TableField(value = "v_31")
|
||||
@TableField(value = "v_31",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v31;
|
||||
|
||||
@TableField(value = "v_32")
|
||||
@TableField(value = "v_32",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v32;
|
||||
|
||||
@TableField(value = "v_33")
|
||||
@TableField(value = "v_33",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v33;
|
||||
|
||||
@TableField(value = "v_34")
|
||||
@TableField(value = "v_34",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v34;
|
||||
|
||||
@TableField(value = "v_35")
|
||||
@TableField(value = "v_35",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v35;
|
||||
|
||||
@TableField(value = "v_36")
|
||||
@TableField(value = "v_36",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v36;
|
||||
|
||||
@TableField(value = "v_37")
|
||||
@TableField(value = "v_37",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v37;
|
||||
|
||||
@TableField(value = "v_38")
|
||||
@TableField(value = "v_38",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v38;
|
||||
|
||||
@TableField(value = "v_39")
|
||||
@TableField(value = "v_39",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v39;
|
||||
|
||||
@TableField(value = "v_40")
|
||||
@TableField(value = "v_40",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v40;
|
||||
|
||||
@TableField(value = "v_41")
|
||||
@TableField(value = "v_41",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v41;
|
||||
|
||||
@TableField(value = "v_42")
|
||||
@TableField(value = "v_42",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v42;
|
||||
|
||||
@TableField(value = "v_43")
|
||||
@TableField(value = "v_43",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v43;
|
||||
|
||||
@TableField(value = "v_44")
|
||||
@TableField(value = "v_44",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v44;
|
||||
|
||||
@TableField(value = "v_45")
|
||||
@TableField(value = "v_45",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v45;
|
||||
|
||||
@TableField(value = "v_46")
|
||||
@TableField(value = "v_46",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v46;
|
||||
|
||||
@TableField(value = "v_47")
|
||||
@TableField(value = "v_47",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v47;
|
||||
|
||||
@TableField(value = "v_48")
|
||||
@TableField(value = "v_48",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v48;
|
||||
|
||||
@TableField(value = "v_49")
|
||||
@TableField(value = "v_49",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v49;
|
||||
|
||||
@TableField(value = "v_50")
|
||||
@TableField(value = "v_50",updateStrategy = FieldStrategy.IGNORED)
|
||||
private Double v50;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.njcn.dataProcess.util;
|
||||
|
||||
/**
|
||||
* @author xy
|
||||
* @description 公共方法
|
||||
*/
|
||||
|
||||
public class DataCommonUtils {
|
||||
|
||||
/**
|
||||
* 传入字典类型的电压等级,获取可以计算的数据
|
||||
* 例如 35kV->32.0
|
||||
* 0.38kV->0.38
|
||||
*/
|
||||
public static Double getVoltageData(String lineVoltage) {
|
||||
String numberStr = lineVoltage.replace("kV", "");
|
||||
return Double.parseDouble(numberStr);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,6 +27,24 @@ public class TimeUtils {
|
||||
return dateTime.toLocalDate();
|
||||
}
|
||||
|
||||
/**
|
||||
* String类型的yyyy-MM-dd HH:mm:ss转成LocalDataTime yyyy-MM-dd HH:mm:ss
|
||||
* @param time
|
||||
* @return LocalDataTime
|
||||
*/
|
||||
public static LocalDateTime StringToLocalDateTime(String time) {
|
||||
return LocalDateTime.parse(time, DATE_TIME_FORMATTER);
|
||||
}
|
||||
|
||||
/**
|
||||
* LocalDataTime类型的yyyy-MM-dd HH:mm:ss转成String yyyy-MM-dd HH:mm:ss
|
||||
* @param time
|
||||
* @return LocalDataTime
|
||||
*/
|
||||
public static String LocalDateTimeToString(LocalDateTime time) {
|
||||
return time.format(DATE_TIME_FORMATTER);
|
||||
}
|
||||
|
||||
/**
|
||||
* String类型的yyyy-MM-dd转成yyyy-MM-dd
|
||||
* @param time
|
||||
|
||||
Reference in New Issue
Block a user