From 15716878cc4bde55a5c8ed5289aa67a9f12c8668 Mon Sep 17 00:00:00 2001 From: hzj <826100833@qq.com> Date: Fri, 28 Feb 2025 16:32:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=94=B5=E5=8E=8B=E5=90=AB?= =?UTF-8?q?=E6=9C=89=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../executor/MeasurementExecutor.java | 17 + .../service/line/IDataVCvtService.java | 14 + .../serviceimpl/line/DataVCvtServiceImpl.java | 148 ++++++ .../com/njcn/stat/utils/BeanVConverter.java | 446 +++++++++--------- .../dataProcess/api/DataVCvtFeignClient.java | 31 ++ .../dataProcess/api/DataVFeignClient.java | 6 +- .../DataVCvtFeignClientFallbackFactory.java | 55 +++ .../DataVFeignClientFallbackFactory.java | 7 + .../dataProcess/po/influx/DataFlicker.java | 2 +- .../njcn/dataProcess/po/influx/DataFluc.java | 2 +- .../po/influx/DataHarmphasicI.java | 2 +- .../po/influx/DataHarmphasicV.java | 2 +- .../dataProcess/po/influx/DataHarmpowerP.java | 2 +- .../dataProcess/po/influx/DataHarmpowerQ.java | 2 +- .../dataProcess/po/influx/DataHarmpowerS.java | 2 +- .../dataProcess/po/influx/DataHarmrateI.java | 2 +- .../dataProcess/po/influx/DataHarmrateV.java | 2 +- .../com/njcn/dataProcess/po/influx/DataI.java | 2 +- .../dataProcess/po/influx/DataInharmI.java | 2 +- .../dataProcess/po/influx/DataInharmV.java | 2 +- .../njcn/dataProcess/po/influx/DataPlt.java | 2 +- .../com/njcn/dataProcess/po/influx/DataV.java | 2 +- .../njcn/dataProcess/po/influx/DataVCvt.java | 32 ++ .../dataProcess/pojo/dto/DataVCvtDTO.java | 159 +++++++ .../controller/DataHarmrateVController.java | 39 +- .../controller/DataVController.java | 13 + .../controller/DataVCvtController.java | 62 +++ .../dao/imapper/DataHarmrateVMapper.java | 14 +- .../dao/imapper/DataVCvtMapper.java | 19 + .../dataProcess/service/IDataHarmrateV.java | 20 +- .../com/njcn/dataProcess/service/IDataV.java | 3 + .../njcn/dataProcess/service/IDataVCvt.java | 25 + .../influxdb/InfluxdbDataHarmrateVImpl.java | 111 +++-- .../impl/influxdb/InfluxdbDataVCvtImpl.java | 56 +++ .../impl/influxdb/InfluxdbDataVImpl.java | 37 +- .../relation/RelationDataHarmrateVImpl.java | 54 +-- .../impl/relation/RelationDataVCvtImpl.java | 26 + .../impl/relation/RelationDataVImpl.java | 6 + .../src/main/resources/bootstrap.yml | 2 +- .../message/message/DeviceRebootMessage.java | 3 +- .../websocket/DataRecallController.java | 6 +- pom.xml | 4 +- 42 files changed, 1086 insertions(+), 357 deletions(-) create mode 100644 algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/line/IDataVCvtService.java create mode 100644 algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/DataVCvtServiceImpl.java create mode 100644 data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/DataVCvtFeignClient.java create mode 100644 data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/fallback/DataVCvtFeignClientFallbackFactory.java create mode 100644 data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataVCvt.java create mode 100644 data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/pojo/dto/DataVCvtDTO.java create mode 100644 data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/controller/DataVCvtController.java create mode 100644 data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/dao/imapper/DataVCvtMapper.java create mode 100644 data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/IDataVCvt.java create mode 100644 data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/influxdb/InfluxdbDataVCvtImpl.java create mode 100644 data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataVCvtImpl.java diff --git a/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/executor/MeasurementExecutor.java b/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/executor/MeasurementExecutor.java index 88e18c2..5ec338a 100644 --- a/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/executor/MeasurementExecutor.java +++ b/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/executor/MeasurementExecutor.java @@ -1,6 +1,7 @@ package com.njcn.algorithm.executor; import com.njcn.algorithm.service.line.IDataCleanService; +import com.njcn.algorithm.service.line.IDataVCvtService; import com.njcn.algorithm.service.line.IDayDataService; import com.yomahub.liteflow.annotation.LiteflowComponent; import com.yomahub.liteflow.annotation.LiteflowMethod; @@ -28,6 +29,9 @@ public class MeasurementExecutor extends BaseExecutor { @Resource private IDataCleanService dataCleanService; + @Resource + private IDataVCvtService dataVCvtService; + /** * 数据清洗 电压表 * dataV表 @@ -231,4 +235,17 @@ public class MeasurementExecutor extends BaseExecutor { dayDataService.dataHarmPowerQHandler(bindCmp.getRequestData()); } + /** + * 监测点cvt转换算法() + * @author hzj + */ + @LiteflowMethod(value = LiteFlowMethodEnum.IS_ACCESS, nodeId = "dataVCvt", nodeType = NodeTypeEnum.COMMON) + public boolean dataVCvtAccess(NodeComponent bindCmp) { + return isAccess(bindCmp); + } + @LiteflowMethod(value = LiteFlowMethodEnum.PROCESS, nodeId = "dataVCvt", nodeType = NodeTypeEnum.COMMON) + public void dataVCvtProcess(NodeComponent bindCmp) { + dataVCvtService.dataVCvtHandler(bindCmp.getRequestData()); + } + } diff --git a/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/line/IDataVCvtService.java b/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/line/IDataVCvtService.java new file mode 100644 index 0000000..b172ccf --- /dev/null +++ b/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/service/line/IDataVCvtService.java @@ -0,0 +1,14 @@ +package com.njcn.algorithm.service.line; + +import com.njcn.algorithm.pojo.bo.CalculatedParam; + +/** + * Description: + * Date: 2025/02/24 上午 9:10【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +public interface IDataVCvtService { + void dataVCvtHandler(CalculatedParam requestData); +} diff --git a/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/DataVCvtServiceImpl.java b/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/DataVCvtServiceImpl.java new file mode 100644 index 0000000..bf44c00 --- /dev/null +++ b/algorithm/algorithm-boot/src/main/java/com/njcn/algorithm/serviceimpl/line/DataVCvtServiceImpl.java @@ -0,0 +1,148 @@ +package com.njcn.algorithm.serviceimpl.line; + +import com.njcn.algorithm.pojo.bo.CalculatedParam; +import com.njcn.algorithm.service.line.IDataVCvtService; +import com.njcn.dataProcess.api.DataVCvtFeignClient; +import com.njcn.dataProcess.api.DataVFeignClient; +import com.njcn.dataProcess.constant.InfluxDBTableConstant; +import com.njcn.dataProcess.param.LineCountEvaluateParam; +import com.njcn.dataProcess.po.influx.DataVCvt; +import com.njcn.dataProcess.pojo.dto.DataVCvtDTO; +import com.njcn.dataProcess.util.TimeUtils; +import com.njcn.device.pq.api.CvtRelationFeignClient; +import com.njcn.device.pq.pojo.dto.CvtHarmonicCorrectionFactorsDTO; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + +/** + * Description: + * Date: 2025/02/24 上午 9:11【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Slf4j +@Component +@RequiredArgsConstructor +public class DataVCvtServiceImpl implements IDataVCvtService { + @Resource + private CvtRelationFeignClient cvtRelationFeignClient; + @Resource + private DataVCvtFeignClient dataVCvtFeignClient; + @Resource + private DataVFeignClient dataVFeignClient; + @Override + public void dataVCvtHandler(CalculatedParam calculatedParam) { + LineCountEvaluateParam lineParam = new LineCountEvaluateParam(); + lineParam.setStartTime(TimeUtils.getBeginOfDay(calculatedParam.getDataDate())); + lineParam.setEndTime(TimeUtils.getEndOfDay(calculatedParam.getDataDate())); + List idList = calculatedParam.getIdList(); + LineCountEvaluateParam lineCountEvaluateParam = new LineCountEvaluateParam(); + lineCountEvaluateParam.setLineId(calculatedParam.getIdList()); + lineCountEvaluateParam.setEndTime(calculatedParam.getDataDate()+ InfluxDBTableConstant.END_TIME); + lineCountEvaluateParam.setStartTime(calculatedParam.getDataDate()+ InfluxDBTableConstant.START_TIME); + List data = dataVCvtFeignClient.getRawData(lineCountEvaluateParam).getData(); + Map> collect = data.stream().collect(Collectors.groupingBy(DataVCvt::getLineId)); + List result = new ArrayList<>(); + collect.forEach((k,v)->{ + CvtHarmonicCorrectionFactorsDTO cvtHarmonicCorrectionFactorsDTO = cvtRelationFeignClient.queryByLineId(k).getData(); + if(Objects.nonNull(cvtHarmonicCorrectionFactorsDTO)&& + StringUtils.isNotEmpty(cvtHarmonicCorrectionFactorsDTO.getId())){ + v = cvtChange(v,cvtHarmonicCorrectionFactorsDTO); + } + List dataVCvtDTOList = v.stream().map(temp -> { + DataVCvtDTO dataVCvtDTO = new DataVCvtDTO(); + BeanUtils.copyProperties(temp, dataVCvtDTO); + return dataVCvtDTO; + }).collect(Collectors.toList()); + result.addAll(dataVCvtDTOList); + }); + dataVFeignClient.batchInsertionCvtDTO(result); + + } + + private List cvtChange(List v, CvtHarmonicCorrectionFactorsDTO cvtHarmonicCorrectionFactorsDTO) { + v.stream().forEach(temp->{ + //目前知道的只有v2到v50乘以系数 +// temp.setLineId(); +// temp.setPhasicType(); +// temp.setValueType(); +// temp.setQualityFlag(); +// temp.setAbnormalFlag(); +// temp.setFreq(); +// temp.setFreqDev(); +// temp.setRms(); +// temp.setRmsLvr(); +// temp.setVlDev(); +// temp.setVuDev(); +// temp.setVNeg(); +// temp.setVPos(); +// temp.setVThd(); +// temp.setVUnbalance(); +// temp.setVZero(); +// temp.setV1(); + temp.setV2(cvtHarmonicCorrectionFactorsDTO.getH2().doubleValue()*temp.getV2()); + temp.setV3(cvtHarmonicCorrectionFactorsDTO.getH3().doubleValue()*temp.getV3()); + temp.setV4(cvtHarmonicCorrectionFactorsDTO.getH4().doubleValue()*temp.getV4()); + temp.setV5(cvtHarmonicCorrectionFactorsDTO.getH5().doubleValue()*temp.getV5()); + temp.setV6(cvtHarmonicCorrectionFactorsDTO.getH6().doubleValue()*temp.getV6()); + temp.setV7(cvtHarmonicCorrectionFactorsDTO.getH7().doubleValue()*temp.getV7()); + temp.setV8(cvtHarmonicCorrectionFactorsDTO.getH8().doubleValue()*temp.getV8()); + temp.setV9(cvtHarmonicCorrectionFactorsDTO.getH9().doubleValue()*temp.getV9()); + temp.setV10(cvtHarmonicCorrectionFactorsDTO.getH10().doubleValue()*temp.getV10()); + temp.setV11(cvtHarmonicCorrectionFactorsDTO.getH11().doubleValue()*temp.getV11()); + temp.setV12(cvtHarmonicCorrectionFactorsDTO.getH12().doubleValue()*temp.getV12()); + temp.setV13(cvtHarmonicCorrectionFactorsDTO.getH13().doubleValue()*temp.getV13()); + temp.setV14(cvtHarmonicCorrectionFactorsDTO.getH14().doubleValue()*temp.getV14()); + temp.setV15(cvtHarmonicCorrectionFactorsDTO.getH15().doubleValue()*temp.getV15()); + temp.setV16(cvtHarmonicCorrectionFactorsDTO.getH16().doubleValue()*temp.getV16()); + temp.setV17(cvtHarmonicCorrectionFactorsDTO.getH17().doubleValue()*temp.getV17()); + temp.setV18(cvtHarmonicCorrectionFactorsDTO.getH18().doubleValue()*temp.getV18()); + temp.setV19(cvtHarmonicCorrectionFactorsDTO.getH19().doubleValue()*temp.getV19()); + temp.setV20(cvtHarmonicCorrectionFactorsDTO.getH20().doubleValue()*temp.getV20()); + temp.setV21(cvtHarmonicCorrectionFactorsDTO.getH21().doubleValue()*temp.getV21()); + temp.setV22(cvtHarmonicCorrectionFactorsDTO.getH22().doubleValue()*temp.getV22()); + temp.setV23(cvtHarmonicCorrectionFactorsDTO.getH23().doubleValue()*temp.getV23()); + temp.setV24(cvtHarmonicCorrectionFactorsDTO.getH24().doubleValue()*temp.getV24()); + temp.setV25(cvtHarmonicCorrectionFactorsDTO.getH25().doubleValue()*temp.getV25()); + temp.setV26(cvtHarmonicCorrectionFactorsDTO.getH26().doubleValue()*temp.getV26()); + temp.setV27(cvtHarmonicCorrectionFactorsDTO.getH27().doubleValue()*temp.getV27()); + temp.setV28(cvtHarmonicCorrectionFactorsDTO.getH28().doubleValue()*temp.getV28()); + temp.setV29(cvtHarmonicCorrectionFactorsDTO.getH29().doubleValue()*temp.getV29()); + temp.setV30(cvtHarmonicCorrectionFactorsDTO.getH30().doubleValue()*temp.getV30()); + temp.setV31(cvtHarmonicCorrectionFactorsDTO.getH31().doubleValue()*temp.getV31()); + temp.setV32(cvtHarmonicCorrectionFactorsDTO.getH32().doubleValue()*temp.getV32()); + temp.setV33(cvtHarmonicCorrectionFactorsDTO.getH33().doubleValue()*temp.getV33()); + temp.setV34(cvtHarmonicCorrectionFactorsDTO.getH34().doubleValue()*temp.getV34()); + temp.setV35(cvtHarmonicCorrectionFactorsDTO.getH35().doubleValue()*temp.getV35()); + temp.setV36(cvtHarmonicCorrectionFactorsDTO.getH36().doubleValue()*temp.getV36()); + temp.setV37(cvtHarmonicCorrectionFactorsDTO.getH37().doubleValue()*temp.getV37()); + temp.setV38(cvtHarmonicCorrectionFactorsDTO.getH38().doubleValue()*temp.getV38()); + temp.setV39(cvtHarmonicCorrectionFactorsDTO.getH39().doubleValue()*temp.getV39()); + temp.setV40(cvtHarmonicCorrectionFactorsDTO.getH40().doubleValue()*temp.getV40()); + temp.setV41(cvtHarmonicCorrectionFactorsDTO.getH41().doubleValue()*temp.getV41()); + temp.setV42(cvtHarmonicCorrectionFactorsDTO.getH42().doubleValue()*temp.getV42()); + temp.setV43(cvtHarmonicCorrectionFactorsDTO.getH43().doubleValue()*temp.getV43()); + temp.setV44(cvtHarmonicCorrectionFactorsDTO.getH44().doubleValue()*temp.getV44()); + temp.setV45(cvtHarmonicCorrectionFactorsDTO.getH45().doubleValue()*temp.getV45()); + temp.setV46(cvtHarmonicCorrectionFactorsDTO.getH46().doubleValue()*temp.getV46()); + temp.setV47(cvtHarmonicCorrectionFactorsDTO.getH47().doubleValue()*temp.getV47()); + temp.setV48(cvtHarmonicCorrectionFactorsDTO.getH48().doubleValue()*temp.getV48()); + temp.setV49(cvtHarmonicCorrectionFactorsDTO.getH49().doubleValue()*temp.getV49()); + temp.setV50(cvtHarmonicCorrectionFactorsDTO.getH50().doubleValue()*temp.getV50()); + + }); + return v; + } + +} diff --git a/analysis/stat/stat-api/src/main/java/com/njcn/stat/utils/BeanVConverter.java b/analysis/stat/stat-api/src/main/java/com/njcn/stat/utils/BeanVConverter.java index a89109f..756d9ab 100644 --- a/analysis/stat/stat-api/src/main/java/com/njcn/stat/utils/BeanVConverter.java +++ b/analysis/stat/stat-api/src/main/java/com/njcn/stat/utils/BeanVConverter.java @@ -41,234 +41,240 @@ public class BeanVConverter { // dataV.setRmscaCp95(); //根据电压偏差正负赋值 - if (Objects.nonNull(messageDataV.getDeltaV())&&messageDataV.getDeltaV() >= 0) { - dataVRelation.setVlDev(messageDataV.getDeltaV()); - } else { - dataVRelation.setVuDev(messageDataV.getDeltaV()); - } - if (Objects.nonNull(messageDataV.getGDeltaV())&&messageDataV.getGDeltaV() >= 0) { - dataVRelation.setVlDevCp95(messageDataV.getGDeltaV()); - } else { - dataVRelation.setVuDevCp95(messageDataV.getGDeltaV()); - } - if (Objects.nonNull(messageDataV.getMaxDeltaV())&&messageDataV.getMaxDeltaV() >= 0) { - dataVRelation.setVlDevMax(messageDataV.getDeltaV()); - } else { - dataVRelation.setVuDevMax(messageDataV.getDeltaV()); - } - if (Objects.nonNull(messageDataV.getMinDeltaV())&&messageDataV.getMinDeltaV() >= 0) { - dataVRelation.setVlDevMin(messageDataV.getDeltaV()); - } else { - dataVRelation.setVuDevMin(messageDataV.getDeltaV()); - } + //修改电压偏差都存在vu_dev方便查询 +// if (Objects.nonNull(messageDataV.getDeltaV())&&messageDataV.getDeltaV() >= 0) { +// dataVRelation.setVlDev(messageDataV.getDeltaV()); +// } else { +// dataVRelation.setVuDev(messageDataV.getDeltaV()); +// } +// if (Objects.nonNull(messageDataV.getGDeltaV())&&messageDataV.getGDeltaV() >= 0) { +// dataVRelation.setVlDevCp95(messageDataV.getGDeltaV()); +// } else { +// dataVRelation.setVuDevCp95(messageDataV.getGDeltaV()); +// } +// if (Objects.nonNull(messageDataV.getMaxDeltaV())&&messageDataV.getMaxDeltaV() >= 0) { +// dataVRelation.setVlDevMax(messageDataV.getDeltaV()); +// } else { +// dataVRelation.setVuDevMax(messageDataV.getDeltaV()); +// } +// if (Objects.nonNull(messageDataV.getMinDeltaV())&&messageDataV.getMinDeltaV() >= 0) { +// dataVRelation.setVlDevMin(messageDataV.getDeltaV()); +// } else { +// dataVRelation.setVuDevMin(messageDataV.getDeltaV()); +// } + dataVRelation.setVuDev(messageDataV.getDeltaV()); + dataVRelation.setVuDevCp95(messageDataV.getGDeltaV()); + dataVRelation.setVuDevMax(messageDataV.getDeltaV()); + dataVRelation.setVuDevMin(messageDataV.getDeltaV()); - dataVRelation.setV1(messageDataV.getV1()); - dataVRelation.setV2(messageDataV.getV2()); - dataVRelation.setV3(messageDataV.getV3()); - dataVRelation.setV4(messageDataV.getV4()); - dataVRelation.setV5(messageDataV.getV5()); - dataVRelation.setV6(messageDataV.getV6()); - dataVRelation.setV7(messageDataV.getV7()); - dataVRelation.setV8(messageDataV.getV8()); - dataVRelation.setV9(messageDataV.getV9()); - dataVRelation.setV10(messageDataV.getV10()); - dataVRelation.setV11(messageDataV.getV11()); - dataVRelation.setV12(messageDataV.getV12()); - dataVRelation.setV13(messageDataV.getV13()); - dataVRelation.setV14(messageDataV.getV14()); - dataVRelation.setV15(messageDataV.getV15()); - dataVRelation.setV16(messageDataV.getV16()); - dataVRelation.setV17(messageDataV.getV17()); - dataVRelation.setV18(messageDataV.getV18()); - dataVRelation.setV19(messageDataV.getV19()); - dataVRelation.setV20(messageDataV.getV20()); - dataVRelation.setV21(messageDataV.getV21()); - dataVRelation.setV22(messageDataV.getV22()); - dataVRelation.setV23(messageDataV.getV23()); - dataVRelation.setV24(messageDataV.getV24()); - dataVRelation.setV25(messageDataV.getV25()); - dataVRelation.setV26(messageDataV.getV26()); - dataVRelation.setV27(messageDataV.getV27()); - dataVRelation.setV28(messageDataV.getV28()); - dataVRelation.setV29(messageDataV.getV29()); - dataVRelation.setV30(messageDataV.getV30()); - dataVRelation.setV31(messageDataV.getV31()); - dataVRelation.setV32(messageDataV.getV32()); - dataVRelation.setV33(messageDataV.getV33()); - dataVRelation.setV34(messageDataV.getV34()); - dataVRelation.setV35(messageDataV.getV35()); - dataVRelation.setV36(messageDataV.getV36()); - dataVRelation.setV37(messageDataV.getV37()); - dataVRelation.setV38(messageDataV.getV38()); - dataVRelation.setV39(messageDataV.getV39()); - dataVRelation.setV40(messageDataV.getV40()); - dataVRelation.setV41(messageDataV.getV41()); - dataVRelation.setV42(messageDataV.getV42()); - dataVRelation.setV43(messageDataV.getV43()); - dataVRelation.setV44(messageDataV.getV44()); - dataVRelation.setV45(messageDataV.getV45()); - dataVRelation.setV46(messageDataV.getV46()); - dataVRelation.setV47(messageDataV.getV47()); - dataVRelation.setV48(messageDataV.getV48()); - dataVRelation.setV49(messageDataV.getV49()); - dataVRelation.setV50(messageDataV.getV50()); + //谐波电压幅值目前前置不上送,暂时注释掉 +// dataVRelation.setV1(messageDataV.getV1()); +// dataVRelation.setV2(messageDataV.getV2()); +// dataVRelation.setV3(messageDataV.getV3()); +// dataVRelation.setV4(messageDataV.getV4()); +// dataVRelation.setV5(messageDataV.getV5()); +// dataVRelation.setV6(messageDataV.getV6()); +// dataVRelation.setV7(messageDataV.getV7()); +// dataVRelation.setV8(messageDataV.getV8()); +// dataVRelation.setV9(messageDataV.getV9()); +// dataVRelation.setV10(messageDataV.getV10()); +// dataVRelation.setV11(messageDataV.getV11()); +// dataVRelation.setV12(messageDataV.getV12()); +// dataVRelation.setV13(messageDataV.getV13()); +// dataVRelation.setV14(messageDataV.getV14()); +// dataVRelation.setV15(messageDataV.getV15()); +// dataVRelation.setV16(messageDataV.getV16()); +// dataVRelation.setV17(messageDataV.getV17()); +// dataVRelation.setV18(messageDataV.getV18()); +// dataVRelation.setV19(messageDataV.getV19()); +// dataVRelation.setV20(messageDataV.getV20()); +// dataVRelation.setV21(messageDataV.getV21()); +// dataVRelation.setV22(messageDataV.getV22()); +// dataVRelation.setV23(messageDataV.getV23()); +// dataVRelation.setV24(messageDataV.getV24()); +// dataVRelation.setV25(messageDataV.getV25()); +// dataVRelation.setV26(messageDataV.getV26()); +// dataVRelation.setV27(messageDataV.getV27()); +// dataVRelation.setV28(messageDataV.getV28()); +// dataVRelation.setV29(messageDataV.getV29()); +// dataVRelation.setV30(messageDataV.getV30()); +// dataVRelation.setV31(messageDataV.getV31()); +// dataVRelation.setV32(messageDataV.getV32()); +// dataVRelation.setV33(messageDataV.getV33()); +// dataVRelation.setV34(messageDataV.getV34()); +// dataVRelation.setV35(messageDataV.getV35()); +// dataVRelation.setV36(messageDataV.getV36()); +// dataVRelation.setV37(messageDataV.getV37()); +// dataVRelation.setV38(messageDataV.getV38()); +// dataVRelation.setV39(messageDataV.getV39()); +// dataVRelation.setV40(messageDataV.getV40()); +// dataVRelation.setV41(messageDataV.getV41()); +// dataVRelation.setV42(messageDataV.getV42()); +// dataVRelation.setV43(messageDataV.getV43()); +// dataVRelation.setV44(messageDataV.getV44()); +// dataVRelation.setV45(messageDataV.getV45()); +// dataVRelation.setV46(messageDataV.getV46()); +// dataVRelation.setV47(messageDataV.getV47()); +// dataVRelation.setV48(messageDataV.getV48()); +// dataVRelation.setV49(messageDataV.getV49()); +// dataVRelation.setV50(messageDataV.getV50()); - dataVRelation.setV1Max(messageDataV.getMaxV1()); - dataVRelation.setV2Max(messageDataV.getMaxV2()); - dataVRelation.setV3Max(messageDataV.getMaxV3()); - dataVRelation.setV4Max(messageDataV.getMaxV4()); - dataVRelation.setV5Max(messageDataV.getMaxV5()); - dataVRelation.setV6Max(messageDataV.getMaxV6()); - dataVRelation.setV7Max(messageDataV.getMaxV7()); - dataVRelation.setV8Max(messageDataV.getMaxV8()); - dataVRelation.setV9Max(messageDataV.getMaxV9()); - dataVRelation.setV10Max(messageDataV.getMaxV10()); - dataVRelation.setV11Max(messageDataV.getMaxV11()); - dataVRelation.setV12Max(messageDataV.getMaxV12()); - dataVRelation.setV13Max(messageDataV.getMaxV13()); - dataVRelation.setV14Max(messageDataV.getMaxV14()); - dataVRelation.setV15Max(messageDataV.getMaxV15()); - dataVRelation.setV16Max(messageDataV.getMaxV16()); - dataVRelation.setV17Max(messageDataV.getMaxV17()); - dataVRelation.setV18Max(messageDataV.getMaxV18()); - dataVRelation.setV19Max(messageDataV.getMaxV19()); - dataVRelation.setV20Max(messageDataV.getMaxV20()); - dataVRelation.setV21Max(messageDataV.getMaxV21()); - dataVRelation.setV22Max(messageDataV.getMaxV22()); - dataVRelation.setV23Max(messageDataV.getMaxV23()); - dataVRelation.setV24Max(messageDataV.getMaxV24()); - dataVRelation.setV25Max(messageDataV.getMaxV25()); - dataVRelation.setV26Max(messageDataV.getMaxV26()); - dataVRelation.setV27Max(messageDataV.getMaxV27()); - dataVRelation.setV28Max(messageDataV.getMaxV28()); - dataVRelation.setV29Max(messageDataV.getMaxV29()); - dataVRelation.setV30Max(messageDataV.getMaxV30()); - dataVRelation.setV31Max(messageDataV.getMaxV31()); - dataVRelation.setV32Max(messageDataV.getMaxV32()); - dataVRelation.setV33Max(messageDataV.getMaxV33()); - dataVRelation.setV34Max(messageDataV.getMaxV34()); - dataVRelation.setV35Max(messageDataV.getMaxV35()); - dataVRelation.setV36Max(messageDataV.getMaxV36()); - dataVRelation.setV37Max(messageDataV.getMaxV37()); - dataVRelation.setV38Max(messageDataV.getMaxV38()); - dataVRelation.setV39Max(messageDataV.getMaxV39()); - dataVRelation.setV40Max(messageDataV.getMaxV40()); - dataVRelation.setV41Max(messageDataV.getMaxV41()); - dataVRelation.setV42Max(messageDataV.getMaxV42()); - dataVRelation.setV43Max(messageDataV.getMaxV43()); - dataVRelation.setV44Max(messageDataV.getMaxV44()); - dataVRelation.setV45Max(messageDataV.getMaxV45()); - dataVRelation.setV46Max(messageDataV.getMaxV46()); - dataVRelation.setV47Max(messageDataV.getMaxV47()); - dataVRelation.setV48Max(messageDataV.getMaxV48()); - dataVRelation.setV49Max(messageDataV.getMaxV49()); - dataVRelation.setV50Max(messageDataV.getMaxV50()); +// dataVRelation.setV1Max(messageDataV.getMaxV1()); +// dataVRelation.setV2Max(messageDataV.getMaxV2()); +// dataVRelation.setV3Max(messageDataV.getMaxV3()); +// dataVRelation.setV4Max(messageDataV.getMaxV4()); +// dataVRelation.setV5Max(messageDataV.getMaxV5()); +// dataVRelation.setV6Max(messageDataV.getMaxV6()); +// dataVRelation.setV7Max(messageDataV.getMaxV7()); +// dataVRelation.setV8Max(messageDataV.getMaxV8()); +// dataVRelation.setV9Max(messageDataV.getMaxV9()); +// dataVRelation.setV10Max(messageDataV.getMaxV10()); +// dataVRelation.setV11Max(messageDataV.getMaxV11()); +// dataVRelation.setV12Max(messageDataV.getMaxV12()); +// dataVRelation.setV13Max(messageDataV.getMaxV13()); +// dataVRelation.setV14Max(messageDataV.getMaxV14()); +// dataVRelation.setV15Max(messageDataV.getMaxV15()); +// dataVRelation.setV16Max(messageDataV.getMaxV16()); +// dataVRelation.setV17Max(messageDataV.getMaxV17()); +// dataVRelation.setV18Max(messageDataV.getMaxV18()); +// dataVRelation.setV19Max(messageDataV.getMaxV19()); +// dataVRelation.setV20Max(messageDataV.getMaxV20()); +// dataVRelation.setV21Max(messageDataV.getMaxV21()); +// dataVRelation.setV22Max(messageDataV.getMaxV22()); +// dataVRelation.setV23Max(messageDataV.getMaxV23()); +// dataVRelation.setV24Max(messageDataV.getMaxV24()); +// dataVRelation.setV25Max(messageDataV.getMaxV25()); +// dataVRelation.setV26Max(messageDataV.getMaxV26()); +// dataVRelation.setV27Max(messageDataV.getMaxV27()); +// dataVRelation.setV28Max(messageDataV.getMaxV28()); +// dataVRelation.setV29Max(messageDataV.getMaxV29()); +// dataVRelation.setV30Max(messageDataV.getMaxV30()); +// dataVRelation.setV31Max(messageDataV.getMaxV31()); +// dataVRelation.setV32Max(messageDataV.getMaxV32()); +// dataVRelation.setV33Max(messageDataV.getMaxV33()); +// dataVRelation.setV34Max(messageDataV.getMaxV34()); +// dataVRelation.setV35Max(messageDataV.getMaxV35()); +// dataVRelation.setV36Max(messageDataV.getMaxV36()); +// dataVRelation.setV37Max(messageDataV.getMaxV37()); +// dataVRelation.setV38Max(messageDataV.getMaxV38()); +// dataVRelation.setV39Max(messageDataV.getMaxV39()); +// dataVRelation.setV40Max(messageDataV.getMaxV40()); +// dataVRelation.setV41Max(messageDataV.getMaxV41()); +// dataVRelation.setV42Max(messageDataV.getMaxV42()); +// dataVRelation.setV43Max(messageDataV.getMaxV43()); +// dataVRelation.setV44Max(messageDataV.getMaxV44()); +// dataVRelation.setV45Max(messageDataV.getMaxV45()); +// dataVRelation.setV46Max(messageDataV.getMaxV46()); +// dataVRelation.setV47Max(messageDataV.getMaxV47()); +// dataVRelation.setV48Max(messageDataV.getMaxV48()); +// dataVRelation.setV49Max(messageDataV.getMaxV49()); +// dataVRelation.setV50Max(messageDataV.getMaxV50()); - dataVRelation.setV1Min( messageDataV.getMinV1()); - dataVRelation.setV2Min( messageDataV.getMinV2()); - dataVRelation.setV3Min( messageDataV.getMinV3()); - dataVRelation.setV4Min( messageDataV.getMinV4()); - dataVRelation.setV5Min( messageDataV.getMinV5()); - dataVRelation.setV6Min( messageDataV.getMinV6()); - dataVRelation.setV7Min( messageDataV.getMinV7()); - dataVRelation.setV8Min( messageDataV.getMinV8()); - dataVRelation.setV9Min( messageDataV.getMinV9()); - dataVRelation.setV10Min( messageDataV.getMinV10()); - dataVRelation.setV11Min( messageDataV.getMinV11()); - dataVRelation.setV12Min( messageDataV.getMinV12()); - dataVRelation.setV13Min( messageDataV.getMinV13()); - dataVRelation.setV14Min( messageDataV.getMinV14()); - dataVRelation.setV15Min( messageDataV.getMinV15()); - dataVRelation.setV16Min( messageDataV.getMinV16()); - dataVRelation.setV17Min( messageDataV.getMinV17()); - dataVRelation.setV18Min( messageDataV.getMinV18()); - dataVRelation.setV19Min( messageDataV.getMinV19()); - dataVRelation.setV20Min( messageDataV.getMinV20()); - dataVRelation.setV21Min( messageDataV.getMinV21()); - dataVRelation.setV22Min( messageDataV.getMinV22()); - dataVRelation.setV23Min( messageDataV.getMinV23()); - dataVRelation.setV24Min( messageDataV.getMinV24()); - dataVRelation.setV25Min( messageDataV.getMinV25()); - dataVRelation.setV26Min( messageDataV.getMinV26()); - dataVRelation.setV27Min( messageDataV.getMinV27()); - dataVRelation.setV28Min( messageDataV.getMinV28()); - dataVRelation.setV29Min( messageDataV.getMinV29()); - dataVRelation.setV30Min( messageDataV.getMinV30()); - dataVRelation.setV31Min( messageDataV.getMinV31()); - dataVRelation.setV32Min( messageDataV.getMinV32()); - dataVRelation.setV33Min( messageDataV.getMinV33()); - dataVRelation.setV34Min( messageDataV.getMinV34()); - dataVRelation.setV35Min( messageDataV.getMinV35()); - dataVRelation.setV36Min( messageDataV.getMinV36()); - dataVRelation.setV37Min( messageDataV.getMinV37()); - dataVRelation.setV38Min( messageDataV.getMinV38()); - dataVRelation.setV39Min( messageDataV.getMinV39()); - dataVRelation.setV40Min( messageDataV.getMinV40()); - dataVRelation.setV41Min( messageDataV.getMinV41()); - dataVRelation.setV42Min( messageDataV.getMinV42()); - dataVRelation.setV43Min( messageDataV.getMinV43()); - dataVRelation.setV44Min( messageDataV.getMinV44()); - dataVRelation.setV45Min( messageDataV.getMinV45()); - dataVRelation.setV46Min( messageDataV.getMinV46()); - dataVRelation.setV47Min( messageDataV.getMinV47()); - dataVRelation.setV48Min( messageDataV.getMinV48()); - dataVRelation.setV49Min( messageDataV.getMinV49()); - dataVRelation.setV50Min( messageDataV.getMinV50()); +// dataVRelation.setV1Min( messageDataV.getMinV1()); +// dataVRelation.setV2Min( messageDataV.getMinV2()); +// dataVRelation.setV3Min( messageDataV.getMinV3()); +// dataVRelation.setV4Min( messageDataV.getMinV4()); +// dataVRelation.setV5Min( messageDataV.getMinV5()); +// dataVRelation.setV6Min( messageDataV.getMinV6()); +// dataVRelation.setV7Min( messageDataV.getMinV7()); +// dataVRelation.setV8Min( messageDataV.getMinV8()); +// dataVRelation.setV9Min( messageDataV.getMinV9()); +// dataVRelation.setV10Min( messageDataV.getMinV10()); +// dataVRelation.setV11Min( messageDataV.getMinV11()); +// dataVRelation.setV12Min( messageDataV.getMinV12()); +// dataVRelation.setV13Min( messageDataV.getMinV13()); +// dataVRelation.setV14Min( messageDataV.getMinV14()); +// dataVRelation.setV15Min( messageDataV.getMinV15()); +// dataVRelation.setV16Min( messageDataV.getMinV16()); +// dataVRelation.setV17Min( messageDataV.getMinV17()); +// dataVRelation.setV18Min( messageDataV.getMinV18()); +// dataVRelation.setV19Min( messageDataV.getMinV19()); +// dataVRelation.setV20Min( messageDataV.getMinV20()); +// dataVRelation.setV21Min( messageDataV.getMinV21()); +// dataVRelation.setV22Min( messageDataV.getMinV22()); +// dataVRelation.setV23Min( messageDataV.getMinV23()); +// dataVRelation.setV24Min( messageDataV.getMinV24()); +// dataVRelation.setV25Min( messageDataV.getMinV25()); +// dataVRelation.setV26Min( messageDataV.getMinV26()); +// dataVRelation.setV27Min( messageDataV.getMinV27()); +// dataVRelation.setV28Min( messageDataV.getMinV28()); +// dataVRelation.setV29Min( messageDataV.getMinV29()); +// dataVRelation.setV30Min( messageDataV.getMinV30()); +// dataVRelation.setV31Min( messageDataV.getMinV31()); +// dataVRelation.setV32Min( messageDataV.getMinV32()); +// dataVRelation.setV33Min( messageDataV.getMinV33()); +// dataVRelation.setV34Min( messageDataV.getMinV34()); +// dataVRelation.setV35Min( messageDataV.getMinV35()); +// dataVRelation.setV36Min( messageDataV.getMinV36()); +// dataVRelation.setV37Min( messageDataV.getMinV37()); +// dataVRelation.setV38Min( messageDataV.getMinV38()); +// dataVRelation.setV39Min( messageDataV.getMinV39()); +// dataVRelation.setV40Min( messageDataV.getMinV40()); +// dataVRelation.setV41Min( messageDataV.getMinV41()); +// dataVRelation.setV42Min( messageDataV.getMinV42()); +// dataVRelation.setV43Min( messageDataV.getMinV43()); +// dataVRelation.setV44Min( messageDataV.getMinV44()); +// dataVRelation.setV45Min( messageDataV.getMinV45()); +// dataVRelation.setV46Min( messageDataV.getMinV46()); +// dataVRelation.setV47Min( messageDataV.getMinV47()); +// dataVRelation.setV48Min( messageDataV.getMinV48()); +// dataVRelation.setV49Min( messageDataV.getMinV49()); +// dataVRelation.setV50Min( messageDataV.getMinV50()); - dataVRelation.setV1Cp95(messageDataV.getGv1()); - dataVRelation.setV2Cp95(messageDataV.getGv2()); - dataVRelation.setV3Cp95(messageDataV.getGv3()); - dataVRelation.setV4Cp95(messageDataV.getGv4()); - dataVRelation.setV5Cp95(messageDataV.getGv5()); - dataVRelation.setV6Cp95(messageDataV.getGv6()); - dataVRelation.setV7Cp95(messageDataV.getGv7()); - dataVRelation.setV8Cp95(messageDataV.getGv8()); - dataVRelation.setV9Cp95(messageDataV.getGv9()); - dataVRelation.setV10Cp95(messageDataV.getGv10()); - dataVRelation.setV11Cp95(messageDataV.getGv11()); - dataVRelation.setV12Cp95(messageDataV.getGv12()); - dataVRelation.setV13Cp95(messageDataV.getGv13()); - dataVRelation.setV14Cp95(messageDataV.getGv14()); - dataVRelation.setV15Cp95(messageDataV.getGv15()); - dataVRelation.setV16Cp95(messageDataV.getGv16()); - dataVRelation.setV17Cp95(messageDataV.getGv17()); - dataVRelation.setV18Cp95(messageDataV.getGv18()); - dataVRelation.setV19Cp95(messageDataV.getGv19()); - dataVRelation.setV20Cp95(messageDataV.getGv20()); - dataVRelation.setV21Cp95(messageDataV.getGv21()); - dataVRelation.setV22Cp95(messageDataV.getGv22()); - dataVRelation.setV23Cp95(messageDataV.getGv23()); - dataVRelation.setV24Cp95(messageDataV.getGv24()); - dataVRelation.setV25Cp95(messageDataV.getGv25()); - dataVRelation.setV26Cp95(messageDataV.getGv26()); - dataVRelation.setV27Cp95(messageDataV.getGv27()); - dataVRelation.setV28Cp95(messageDataV.getGv28()); - dataVRelation.setV29Cp95(messageDataV.getGv29()); - dataVRelation.setV30Cp95(messageDataV.getGv30()); - dataVRelation.setV31Cp95(messageDataV.getGv31()); - dataVRelation.setV32Cp95(messageDataV.getGv32()); - dataVRelation.setV33Cp95(messageDataV.getGv33()); - dataVRelation.setV34Cp95(messageDataV.getGv34()); - dataVRelation.setV35Cp95(messageDataV.getGv35()); - dataVRelation.setV36Cp95(messageDataV.getGv36()); - dataVRelation.setV37Cp95(messageDataV.getGv37()); - dataVRelation.setV38Cp95(messageDataV.getGv38()); - dataVRelation.setV39Cp95(messageDataV.getGv39()); - dataVRelation.setV40Cp95(messageDataV.getGv40()); - dataVRelation.setV41Cp95(messageDataV.getGv41()); - dataVRelation.setV42Cp95(messageDataV.getGv42()); - dataVRelation.setV43Cp95(messageDataV.getGv43()); - dataVRelation.setV44Cp95(messageDataV.getGv44()); - dataVRelation.setV45Cp95(messageDataV.getGv45()); - dataVRelation.setV46Cp95(messageDataV.getGv46()); - dataVRelation.setV47Cp95(messageDataV.getGv47()); - dataVRelation.setV48Cp95(messageDataV.getGv48()); - dataVRelation.setV49Cp95(messageDataV.getGv49()); - dataVRelation.setV50Cp95(messageDataV.getGv50()); +// dataVRelation.setV1Cp95(messageDataV.getGv1()); +// dataVRelation.setV2Cp95(messageDataV.getGv2()); +// dataVRelation.setV3Cp95(messageDataV.getGv3()); +// dataVRelation.setV4Cp95(messageDataV.getGv4()); +// dataVRelation.setV5Cp95(messageDataV.getGv5()); +// dataVRelation.setV6Cp95(messageDataV.getGv6()); +// dataVRelation.setV7Cp95(messageDataV.getGv7()); +// dataVRelation.setV8Cp95(messageDataV.getGv8()); +// dataVRelation.setV9Cp95(messageDataV.getGv9()); +// dataVRelation.setV10Cp95(messageDataV.getGv10()); +// dataVRelation.setV11Cp95(messageDataV.getGv11()); +// dataVRelation.setV12Cp95(messageDataV.getGv12()); +// dataVRelation.setV13Cp95(messageDataV.getGv13()); +// dataVRelation.setV14Cp95(messageDataV.getGv14()); +// dataVRelation.setV15Cp95(messageDataV.getGv15()); +// dataVRelation.setV16Cp95(messageDataV.getGv16()); +// dataVRelation.setV17Cp95(messageDataV.getGv17()); +// dataVRelation.setV18Cp95(messageDataV.getGv18()); +// dataVRelation.setV19Cp95(messageDataV.getGv19()); +// dataVRelation.setV20Cp95(messageDataV.getGv20()); +// dataVRelation.setV21Cp95(messageDataV.getGv21()); +// dataVRelation.setV22Cp95(messageDataV.getGv22()); +// dataVRelation.setV23Cp95(messageDataV.getGv23()); +// dataVRelation.setV24Cp95(messageDataV.getGv24()); +// dataVRelation.setV25Cp95(messageDataV.getGv25()); +// dataVRelation.setV26Cp95(messageDataV.getGv26()); +// dataVRelation.setV27Cp95(messageDataV.getGv27()); +// dataVRelation.setV28Cp95(messageDataV.getGv28()); +// dataVRelation.setV29Cp95(messageDataV.getGv29()); +// dataVRelation.setV30Cp95(messageDataV.getGv30()); +// dataVRelation.setV31Cp95(messageDataV.getGv31()); +// dataVRelation.setV32Cp95(messageDataV.getGv32()); +// dataVRelation.setV33Cp95(messageDataV.getGv33()); +// dataVRelation.setV34Cp95(messageDataV.getGv34()); +// dataVRelation.setV35Cp95(messageDataV.getGv35()); +// dataVRelation.setV36Cp95(messageDataV.getGv36()); +// dataVRelation.setV37Cp95(messageDataV.getGv37()); +// dataVRelation.setV38Cp95(messageDataV.getGv38()); +// dataVRelation.setV39Cp95(messageDataV.getGv39()); +// dataVRelation.setV40Cp95(messageDataV.getGv40()); +// dataVRelation.setV41Cp95(messageDataV.getGv41()); +// dataVRelation.setV42Cp95(messageDataV.getGv42()); +// dataVRelation.setV43Cp95(messageDataV.getGv43()); +// dataVRelation.setV44Cp95(messageDataV.getGv44()); +// dataVRelation.setV45Cp95(messageDataV.getGv45()); +// dataVRelation.setV46Cp95(messageDataV.getGv46()); +// dataVRelation.setV47Cp95(messageDataV.getGv47()); +// dataVRelation.setV48Cp95(messageDataV.getGv48()); +// dataVRelation.setV49Cp95(messageDataV.getGv49()); +// dataVRelation.setV50Cp95(messageDataV.getGv50()); } diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/DataVCvtFeignClient.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/DataVCvtFeignClient.java new file mode 100644 index 0000000..5c13aca --- /dev/null +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/DataVCvtFeignClient.java @@ -0,0 +1,31 @@ +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.DataVCvtFeignClientFallbackFactory; +import com.njcn.dataProcess.api.fallback.DataVFeignClientFallbackFactory; +import com.njcn.dataProcess.dto.DataVDTO; +import com.njcn.dataProcess.param.LineCountEvaluateParam; +import com.njcn.dataProcess.po.influx.DataVCvt; +import com.njcn.dataProcess.pojo.dto.CommonMinuteDto; +import com.njcn.dataProcess.pojo.dto.DataVDto; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; + +import java.time.LocalDateTime; +import java.util.List; + + +@FeignClient(value = ServerInfo.PLATFORM_DATA_PROCESSING_BOOT, path = "/dataVCvt", fallbackFactory = DataVCvtFeignClientFallbackFactory.class, contextId = "dataVCvt") +public interface DataVCvtFeignClient { + + + //获取原始数据 + @PostMapping("/getRawData") + HttpResult> getRawData(@RequestBody LineCountEvaluateParam lineParam); + + + +} diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/DataVFeignClient.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/DataVFeignClient.java index 9b3feab..e6fe7d0 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/DataVFeignClient.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/DataVFeignClient.java @@ -5,9 +5,10 @@ import com.njcn.common.pojo.response.HttpResult; import com.njcn.dataProcess.api.fallback.DataVFeignClientFallbackFactory; import com.njcn.dataProcess.dto.DataVDTO; import com.njcn.dataProcess.param.LineCountEvaluateParam; -import com.njcn.dataProcess.po.influx.DataV; import com.njcn.dataProcess.pojo.dto.CommonMinuteDto; +import com.njcn.dataProcess.pojo.dto.DataVCvtDTO; import com.njcn.dataProcess.pojo.dto.DataVDto; +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; @@ -46,4 +47,7 @@ public interface DataVFeignClient { @PostMapping("/addInfluxDbList") HttpResult addInfluxDbList(@RequestBody List list); + @PostMapping("/batchInsertionCvtDTO") + HttpResult batchInsertionCvtDTO(@RequestBody List cvtDTOList); + } diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/fallback/DataVCvtFeignClientFallbackFactory.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/fallback/DataVCvtFeignClientFallbackFactory.java new file mode 100644 index 0000000..69efb0b --- /dev/null +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/fallback/DataVCvtFeignClientFallbackFactory.java @@ -0,0 +1,55 @@ +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.DataVCvtFeignClient; +import com.njcn.dataProcess.api.DataVFeignClient; +import com.njcn.dataProcess.dto.DataVDTO; +import com.njcn.dataProcess.param.LineCountEvaluateParam; +import com.njcn.dataProcess.po.influx.DataVCvt; +import com.njcn.dataProcess.pojo.dto.CommonMinuteDto; +import com.njcn.dataProcess.pojo.dto.DataVDto; +import com.njcn.dataProcess.util.DataProcessingEnumUtil; +import feign.hystrix.FallbackFactory; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; +import java.util.List; + +/** + * @author denghuajun + * @version 1.0.0 + * @date 2022年01月05日 15:08 + */ +@Slf4j +@Component +public class DataVCvtFeignClientFallbackFactory implements FallbackFactory { + + + /** + * 输出远程请求接口异常日志 + * @param cause RPC请求异常 + */ + @Override + public DataVCvtFeignClient 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 DataVCvtFeignClient() { + + + @Override + public HttpResult> getRawData(LineCountEvaluateParam lineParam) { + log.error("{}异常,降级处理,异常为:{}","获取原始数据",cause.toString()); + throw new BusinessException(finalExceptionEnum); + } + + }; + } +} diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/fallback/DataVFeignClientFallbackFactory.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/fallback/DataVFeignClientFallbackFactory.java index 250304a..d8cb674 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/fallback/DataVFeignClientFallbackFactory.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/api/fallback/DataVFeignClientFallbackFactory.java @@ -8,6 +8,7 @@ import com.njcn.dataProcess.dto.DataVDTO; import com.njcn.dataProcess.param.LineCountEvaluateParam; import com.njcn.dataProcess.po.influx.DataV; import com.njcn.dataProcess.pojo.dto.CommonMinuteDto; +import com.njcn.dataProcess.pojo.dto.DataVCvtDTO; import com.njcn.dataProcess.pojo.dto.DataVDto; import com.njcn.dataProcess.util.DataProcessingEnumUtil; import feign.hystrix.FallbackFactory; @@ -77,6 +78,12 @@ public class DataVFeignClientFallbackFactory implements FallbackFactory batchInsertionCvtDTO(List cvtDTOList) { + log.error("{}异常,降级处理,异常为:{}","cvt数据插入DataV",cause.toString()); + throw new BusinessException(finalExceptionEnum); + } }; } } diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataFlicker.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataFlicker.java index 2a9694f..5355ecf 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataFlicker.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataFlicker.java @@ -43,7 +43,7 @@ public class DataFlicker { private Double pst=0.00; @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag ="0"; public static DataFlicker relationToInfluxDB(DataFlickerDTO dataFlicker) { diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataFluc.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataFluc.java index c08d996..f63d0fa 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataFluc.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataFluc.java @@ -41,7 +41,7 @@ public class DataFluc { @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag="0"; public static DataFluc relationToInfluxDB(DataFlucDTO dataFluc) { if (dataFluc == null) { diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmphasicI.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmphasicI.java index adf24eb..a3fe296 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmphasicI.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmphasicI.java @@ -38,7 +38,7 @@ public class DataHarmphasicI { private String phasicType; @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag="0"; @Column(name = "value_type",tag = true) private String valueType; diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmphasicV.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmphasicV.java index 41dec23..36320cc 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmphasicV.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmphasicV.java @@ -39,7 +39,7 @@ public class DataHarmphasicV { private String phasicType; @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag="0"; @Column(name = "value_type",tag = true) private String valueType; diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmpowerP.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmpowerP.java index a5aac91..f9f124c 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmpowerP.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmpowerP.java @@ -39,7 +39,7 @@ public class DataHarmpowerP { private String phasicType; @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag="0"; @Column(name = "value_type",tag = true) private String valueType; diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmpowerQ.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmpowerQ.java index deb975d..ea9274b 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmpowerQ.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmpowerQ.java @@ -39,7 +39,7 @@ public class DataHarmpowerQ { private String phasicType; @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag="0"; @Column(name = "value_type",tag = true) private String valueType; diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmpowerS.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmpowerS.java index 10d60ba..a8e1503 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmpowerS.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmpowerS.java @@ -39,7 +39,7 @@ public class DataHarmpowerS { private String phasicType; @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag="0"; @Column(name = "value_type",tag = true) private String valueType; diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmrateI.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmrateI.java index 7b1e43e..18627ed 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmrateI.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmrateI.java @@ -38,7 +38,7 @@ public class DataHarmrateI { private String phasicType; @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag="0"; @Column(name = "value_type",tag = true) private String valueType; diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmrateV.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmrateV.java index 9f2a195..a3aeb35 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmrateV.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataHarmrateV.java @@ -38,7 +38,7 @@ public class DataHarmrateV { private String phasicType; @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag="0"; @Column(name = "value_type",tag = true) private String valueType; diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataI.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataI.java index e200aeb..ff8d688 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataI.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataI.java @@ -39,7 +39,7 @@ public class DataI { private String phasicType; @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag="0"; @Column(name = "value_type",tag = true) private String valueType; diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataInharmI.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataInharmI.java index 607084e..a91ab36 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataInharmI.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataInharmI.java @@ -39,7 +39,7 @@ public class DataInharmI { private String phasicType; @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag="0"; @Column(name = "value_type",tag = true) private String valueType; diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataInharmV.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataInharmV.java index b8fbba6..6fa3565 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataInharmV.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataInharmV.java @@ -39,7 +39,7 @@ public class DataInharmV { private String phasicType; @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag="0"; @Column(name = "value_type",tag = true) private String valueType; diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataPlt.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataPlt.java index 915a0d8..6ab88d1 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataPlt.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataPlt.java @@ -35,7 +35,7 @@ public class DataPlt { private String phasicType; @Column(name = "quality_flag",tag = true) - private String qualityFlag; + private String qualityFlag="0"; @Column(name = "plt") private Double plt; diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataV.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataV.java index 0aa9dcf..2acef74 100644 --- a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataV.java +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataV.java @@ -43,7 +43,7 @@ public class DataV { private String valueType; @Column(name = "quality_flag", tag = true) - private String qualityFlag; + private String qualityFlag="0"; //是否是异常指标数据,0否1是 @Column(name = "abnormal_flag") diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataVCvt.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataVCvt.java new file mode 100644 index 0000000..dd8d047 --- /dev/null +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/po/influx/DataVCvt.java @@ -0,0 +1,32 @@ +package com.njcn.dataProcess.po.influx; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.njcn.dataProcess.dto.DataVDTO; +import com.njcn.influx.utils.InstantDateSerializer; +import lombok.Data; +import org.influxdb.annotation.Column; +import org.influxdb.annotation.Measurement; +import org.influxdb.annotation.TimeColumn; +import org.springframework.beans.BeanUtils; + +import java.time.Instant; +import java.time.ZoneId; +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * 类的介绍: + * + * @author xuyang + * @version 1.0.0 + * @createTime 2022/4/7 10:00 + */ +@Data +@Measurement(name = "data_v_cvt") +public class DataVCvt extends DataV{ + + +} diff --git a/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/pojo/dto/DataVCvtDTO.java b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/pojo/dto/DataVCvtDTO.java new file mode 100644 index 0000000..8987712 --- /dev/null +++ b/data-processing/data-processing-api/src/main/java/com/njcn/dataProcess/pojo/dto/DataVCvtDTO.java @@ -0,0 +1,159 @@ +package com.njcn.dataProcess.pojo.dto; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.njcn.influx.utils.InstantDateSerializer; +import lombok.Data; +import org.influxdb.annotation.Column; +import org.influxdb.annotation.TimeColumn; + +import java.time.Instant; + +/** + * Description: + * Date: 2025/02/27 上午 8:53【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Data +public class DataVCvtDTO { + + private Instant time; + + + private String lineId; + + + private String phasicType; + + + private String valueType; + + + private String qualityFlag="0"; + + //是否是异常指标数据,0否1是 + private Integer abnormalFlag; + + private Double freq; + + private Double freqDev; + + private Double rms; + + private Double rmsLvr; + + private Double vlDev; + + private Double vuDev; + + private Double vNeg; + + private Double vPos; + + private Double vThd; + + private Double vUnbalance; + + private Double vZero; + + private Double v1; + + private Double v2; + + private Double v3; + + private Double v4; + + private Double v5; + + private Double v6; + + private Double v7; + + 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; + + private Double v50; +} diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/controller/DataHarmrateVController.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/controller/DataHarmrateVController.java index 1125f40..d3f5dfc 100644 --- a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/controller/DataHarmrateVController.java +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/controller/DataHarmrateVController.java @@ -8,11 +8,9 @@ import com.njcn.common.pojo.response.HttpResult; import com.njcn.common.utils.HttpResultUtil; import com.njcn.dataProcess.annotation.InsertBean; import com.njcn.dataProcess.annotation.QueryBean; -import com.njcn.dataProcess.dto.DataHarmphasicIDTO; -import com.njcn.dataProcess.dto.DataHarmrateVDTO; -import com.njcn.dataProcess.po.influx.DataHarmrateV; -import com.njcn.dataProcess.service.IDataHarmphasicI; -import com.njcn.dataProcess.service.IDataHarmrateV; +import com.njcn.dataProcess.param.LineCountEvaluateParam; +import com.njcn.dataProcess.pojo.dto.DataHarmDto; +import com.njcn.dataProcess.service.IDataHarmRateV; import com.njcn.web.controller.BaseController; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -35,30 +33,23 @@ import java.util.List; @Slf4j @Controller @RestController -@RequestMapping("/dataHarmratev") -@Api(tags = "谐波电流角度数据") -public class DataHarmrateVController extends BaseController { +@RequestMapping("/dataHarmRateV") +@Api(tags = "谐波电压含有率") +public class DataHarmRateVController extends BaseController { @QueryBean - private IDataHarmrateV dataHarmrateVQuery; + private IDataHarmRateV dataHarmRateVQuery; @InsertBean - private IDataHarmrateV dataHarmrateVInsert; + private IDataHarmRateV dataHarmRateVInsert; - - @OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD) - @PostMapping("/batchInsertion") - @ApiOperation("批量插入") - public HttpResult batchInsertion(@RequestBody List dataHarmrateVDTOList) { - String methodDescribe = getMethodDescribe("batchInsertion"); - - dataHarmrateVInsert.batchInsertion(dataHarmrateVDTOList); - return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); + @OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.QUERY) + @PostMapping("/getRawData") + @ApiOperation("获取原始数据") + public HttpResult> getRawData(@RequestBody LineCountEvaluateParam lineParam) { + String methodDescribe = getMethodDescribe("getRawData"); + List data = dataHarmRateVQuery.getRawData(lineParam); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe); } - - - - - } diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/controller/DataVController.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/controller/DataVController.java index fa20fb3..f3cb279 100644 --- a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/controller/DataVController.java +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/controller/DataVController.java @@ -12,6 +12,7 @@ import com.njcn.dataProcess.dto.DataVDTO; import com.njcn.dataProcess.dto.DataVFiveItemDTO; import com.njcn.dataProcess.param.LineCountEvaluateParam; import com.njcn.dataProcess.pojo.dto.CommonMinuteDto; +import com.njcn.dataProcess.pojo.dto.DataVCvtDTO; import com.njcn.dataProcess.pojo.dto.DataVDto; import com.njcn.dataProcess.service.IDataV; import com.njcn.web.controller.BaseController; @@ -65,6 +66,16 @@ public class DataVController extends BaseController { return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); } + @OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD) + @PostMapping("/batchInsertionCvtDTO") + @ApiOperation("批量插入cvtDto") + public HttpResult batchInsertionCvtDTO(@RequestBody List cvtDTOList) { + String methodDescribe = getMethodDescribe("batchInsertion"); + + dataVInsert.batchInsertionCvtDTO(cvtDTOList); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe); + } + @OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.ADD) @PostMapping("/monitoringTime") @ApiOperation("获取监测点数据时间点(补招使用)") @@ -111,4 +122,6 @@ public class DataVController extends BaseController { dataVQuery.addInfluxDbList(dataVList); return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, "", methodDescribe); } + + } diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/controller/DataVCvtController.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/controller/DataVCvtController.java new file mode 100644 index 0000000..29ce7d3 --- /dev/null +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/controller/DataVCvtController.java @@ -0,0 +1,62 @@ +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.annotation.InsertBean; +import com.njcn.dataProcess.annotation.QueryBean; +import com.njcn.dataProcess.dto.DataVDTO; +import com.njcn.dataProcess.dto.DataVFiveItemDTO; +import com.njcn.dataProcess.param.LineCountEvaluateParam; +import com.njcn.dataProcess.po.influx.DataVCvt; +import com.njcn.dataProcess.pojo.dto.CommonMinuteDto; +import com.njcn.dataProcess.pojo.dto.DataVDto; +import com.njcn.dataProcess.service.IDataV; +import com.njcn.dataProcess.service.IDataVCvt; +import com.njcn.web.controller.BaseController; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Controller; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; + +/** + * @author hongawen + * @version 1.0 + * @data 2024/11/6 19:48 + */ +@Validated +@Slf4j +@Controller +@RestController +@RequestMapping("/dataVCvt") +@Api(tags = "电压类数(cvt表)据获取") +public class DataVCvtController extends BaseController { + + @QueryBean + private IDataVCvt dataVCvtQuery; + + @InsertBean + private IDataVCvt dataVCvtInsert; + + + + @OperateInfo(info = LogEnum.BUSINESS_COMMON,operateType = OperateType.QUERY) + @PostMapping("/getRawData") + @ApiOperation("获取原始数据") + public HttpResult> getRawData(@RequestBody LineCountEvaluateParam lineParam) { + String methodDescribe = getMethodDescribe("getRawData"); + List data = dataVCvtQuery.getRawData(lineParam); + return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, data, methodDescribe); + } + +} diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/dao/imapper/DataHarmrateVMapper.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/dao/imapper/DataHarmrateVMapper.java index 2b72cdc..63303ad 100644 --- a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/dao/imapper/DataHarmrateVMapper.java +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/dao/imapper/DataHarmrateVMapper.java @@ -1,18 +1,14 @@ package com.njcn.dataProcess.dao.imapper; - -import com.njcn.dataProcess.po.influx.DataHarmphasicV; import com.njcn.dataProcess.po.influx.DataHarmrateV; import com.njcn.influx.base.InfluxDbBaseMapper; + /** - *

- * Mapper 接口 - *

- * - * @author hongawen - * @since 2023-12-28 + * @author xy */ -public interface DataHarmrateVMapper extends InfluxDbBaseMapper { +public interface DataHarmRateVMapper extends InfluxDbBaseMapper { + + } diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/dao/imapper/DataVCvtMapper.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/dao/imapper/DataVCvtMapper.java new file mode 100644 index 0000000..55178a5 --- /dev/null +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/dao/imapper/DataVCvtMapper.java @@ -0,0 +1,19 @@ +package com.njcn.dataProcess.dao.imapper; + +import com.njcn.dataProcess.dto.LineDataVFiveItemDTO; +import com.njcn.dataProcess.po.influx.DataV; +import com.njcn.dataProcess.po.influx.DataVCvt; +import com.njcn.influx.base.InfluxDbBaseMapper; +import com.njcn.influx.query.InfluxQueryWrapper; + +import java.util.List; + +/** + * @author hongawen + * @version 1.0 + * @data 2024/11/7 18:49 + */ +public interface DataVCvtMapper extends InfluxDbBaseMapper { + + +} diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/IDataHarmrateV.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/IDataHarmrateV.java index 621ccd5..8157190 100644 --- a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/IDataHarmrateV.java +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/IDataHarmrateV.java @@ -1,17 +1,19 @@ package com.njcn.dataProcess.service; -import com.njcn.dataProcess.dto.DataHarmphasicIDTO; -import com.njcn.dataProcess.dto.DataHarmrateVDTO; +import com.njcn.dataProcess.param.LineCountEvaluateParam; +import com.njcn.dataProcess.pojo.dto.DataHarmDto; import java.util.List; /** - * Description: - * Date: 2024/11/18 11:17【需求编号】 - * - * @author clam - * @version V1.0.0 + * @author xy */ -public interface IDataHarmrateV { - void batchInsertion(List dataHarmrateVDTOList); +public interface IDataHarmRateV { + + /** + * 获取原始数据 + * @param lineParam + * @return + */ + List getRawData(LineCountEvaluateParam lineParam); } diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/IDataV.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/IDataV.java index be1f5c9..a640884 100644 --- a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/IDataV.java +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/IDataV.java @@ -5,6 +5,7 @@ import com.njcn.dataProcess.dto.DataVDTO; import com.njcn.dataProcess.dto.DataVFiveItemDTO; import com.njcn.dataProcess.param.LineCountEvaluateParam; import com.njcn.dataProcess.pojo.dto.CommonMinuteDto; +import com.njcn.dataProcess.pojo.dto.DataVCvtDTO; import com.njcn.dataProcess.pojo.dto.DataVDto; import com.njcn.dataProcess.pojo.po.RStatDataVD; @@ -49,4 +50,6 @@ public interface IDataV extends IMppService { void addList(List dataVDtoList); void addInfluxDbList(List dataVList); + + void batchInsertionCvtDTO(List cvtDTOList); } diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/IDataVCvt.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/IDataVCvt.java new file mode 100644 index 0000000..ad24dcb --- /dev/null +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/IDataVCvt.java @@ -0,0 +1,25 @@ +package com.njcn.dataProcess.service; + +import com.github.jeffreyning.mybatisplus.service.IMppService; +import com.njcn.dataProcess.dto.DataVDTO; +import com.njcn.dataProcess.dto.DataVFiveItemDTO; +import com.njcn.dataProcess.param.LineCountEvaluateParam; +import com.njcn.dataProcess.po.influx.DataVCvt; +import com.njcn.dataProcess.pojo.dto.CommonMinuteDto; +import com.njcn.dataProcess.pojo.dto.DataVDto; +import com.njcn.dataProcess.pojo.po.RStatDataVD; + +import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; + +/** + * @author hongawen + * @version 1.0 + * @data 2024/11/7 10:54 + */ +public interface IDataVCvt { + + + List getRawData(LineCountEvaluateParam lineParam); +} diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/influxdb/InfluxdbDataHarmrateVImpl.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/influxdb/InfluxdbDataHarmrateVImpl.java index b7d8025..95c0608 100644 --- a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/influxdb/InfluxdbDataHarmrateVImpl.java +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/influxdb/InfluxdbDataHarmrateVImpl.java @@ -1,51 +1,98 @@ package com.njcn.dataProcess.service.impl.influxdb; -import com.njcn.dataProcess.dao.imapper.DataHarmphasicVMapper; -import com.njcn.dataProcess.dao.imapper.DataHarmrateVMapper; -import com.njcn.dataProcess.dto.DataHarmphasicVDTO; -import com.njcn.dataProcess.dto.DataHarmrateVDTO; -import com.njcn.dataProcess.po.influx.DataHarmphasicV; +import cn.hutool.core.collection.CollectionUtil; +import com.njcn.common.utils.HarmonicTimesUtil; +import com.njcn.dataProcess.dao.imapper.DataHarmRateVMapper; +import com.njcn.dataProcess.param.LineCountEvaluateParam; import com.njcn.dataProcess.po.influx.DataHarmrateV; -import com.njcn.dataProcess.service.IDataHarmphasicV; -import com.njcn.dataProcess.service.IDataHarmrateV; +import com.njcn.dataProcess.pojo.dto.DataHarmDto; +import com.njcn.dataProcess.service.IDataHarmRateV; +import com.njcn.influx.constant.InfluxDbSqlConstant; +import com.njcn.influx.query.InfluxQueryWrapper; import lombok.RequiredArgsConstructor; -import org.apache.commons.collections4.ListUtils; +import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; import java.util.ArrayList; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; /** - * Description: - * Date: 2024/11/18 14:33【需求编号】 - * - * @author clam - * @version V1.0.0 + * @author xy */ -@Service("InfluxdbDataHarmrateVImpl") +@Service("InfluxdbDataHarmRateVImpl") @RequiredArgsConstructor -public class InfluxdbDataHarmrateVImpl implements IDataHarmrateV { +public class InfluxdbDataHarmRateVImpl implements IDataHarmRateV { - private final DataHarmrateVMapper dataHarmrateVMapper; + private final DateTimeFormatter DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").withZone(ZoneId.systemDefault()); + private final DataHarmRateVMapper dataHarmRateVMapper; @Override - public void batchInsertion(List dataHarmrateVDTOList) { - int totalCount = dataHarmrateVDTOList.size(); - if(totalCount<=0){ - return; - } - - List collect = dataHarmrateVDTOList.stream().flatMap(temp -> DataHarmrateV.relationToInfluxDB(temp).stream()).collect(Collectors.toList()); - int minSize = Math.min(1200000, collect.size()); - - List> partition = ListUtils.partition(collect, minSize); - for (List dataHarmrateVList : partition) { - List sublistAsOriginalListType = new ArrayList<>(dataHarmrateVList); - - dataHarmrateVMapper.insertBatch(sublistAsOriginalListType); - - } + public List getRawData(LineCountEvaluateParam lineParam) { + List result = new ArrayList<>(); + List list = getMinuteDataI(lineParam.getLineId(), lineParam.getStartTime(), lineParam.getEndTime(), lineParam.getAbnormalTime()); + list.forEach(item->{ + DataHarmDto dto = new DataHarmDto(); + BeanUtils.copyProperties(item,dto); + dto.setMinTime(DATE_TIME_FORMATTER.format(item.getTime())); + result.add(dto); + }); + return result; } + + /** + * 按监测点集合、时间条件获取dataI分钟数据 + * timeMap参数来判断是否进行数据处理 timeMap为空则不进行数据处理 + * 需要进行剔除异常数据时,这里会有三种情况判断 + * 1.无异常数据,则直接返回集合; + * 2.异常数据和无异常数据参杂,剔除异常数据,只计算正常数据; + * 3.全是异常数据,则使用异常数据进行计算,但是日表中需要标记出来,此数据有异常 + */ + public List getMinuteDataI(List lineList, String startTime, String endTime, Map> timeMap) { + List result = new ArrayList<>(); + InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataHarmrateV.class); + influxQueryWrapper.samePrefixAndSuffix(InfluxDbSqlConstant.V, "", HarmonicTimesUtil.harmonicTimesList(2, 50, 1)); + influxQueryWrapper.regular(DataHarmrateV::getLineId, lineList) + .select(DataHarmrateV::getLineId) + .select(DataHarmrateV::getPhasicType) + .select(DataHarmrateV::getValueType) + .select(DataHarmrateV::getQualityFlag) + .between(DataHarmrateV::getTime, startTime, endTime) + .eq(DataHarmrateV::getQualityFlag,"0"); + List list = dataHarmRateVMapper.selectByQueryWrapper(influxQueryWrapper); + Map> lineMap = list.stream().collect(Collectors.groupingBy(DataHarmrateV::getLineId)); + //有异常数据 + if (CollectionUtil.isNotEmpty(timeMap)) { + lineMap.forEach((k,v)->{ + List timeList = timeMap.get(k); + //有异常数据,当前监测点自身的异常数据 + if (CollectionUtil.isNotEmpty(timeList)) { + List filterList = v.stream().filter(item -> !timeList.contains(DATE_TIME_FORMATTER.format(item.getTime()))).collect(Collectors.toList()); + //1.过滤掉异常数据后还有正常数据,则用正常数据计算 + if (CollectionUtil.isNotEmpty(filterList)) { + result.addAll(filterList); + } + //2.过滤掉异常数据后没有正常数据,则用所有异常数据计算,但是需要标记数据为异常的 + else { + v.parallelStream().forEach(item -> item.setQualityFlag("1")); + result.addAll(v); + } + } + //没有异常数据,则使用原数据 + else { + result.addAll(v); + } + }); + } + //没有异常数据,则使用原数据 + else { + result.addAll(list); + } + return result; + } + } diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/influxdb/InfluxdbDataVCvtImpl.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/influxdb/InfluxdbDataVCvtImpl.java new file mode 100644 index 0000000..e920180 --- /dev/null +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/influxdb/InfluxdbDataVCvtImpl.java @@ -0,0 +1,56 @@ +package com.njcn.dataProcess.service.impl.influxdb; + +import com.njcn.dataProcess.constant.InfluxDBTableConstant; +import com.njcn.dataProcess.dao.imapper.DataVCvtMapper; +import com.njcn.dataProcess.dao.imapper.DataVMapper; +import com.njcn.dataProcess.dto.DataVDTO; +import com.njcn.dataProcess.param.LineCountEvaluateParam; +import com.njcn.dataProcess.po.influx.DataV; +import com.njcn.dataProcess.po.influx.DataVCvt; +import com.njcn.dataProcess.service.IDataVCvt; +import com.njcn.influx.query.InfluxQueryWrapper; +import lombok.RequiredArgsConstructor; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * Description: + * Date: 2025/02/24 下午 3:34【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Service("InfluxdbDataVCvtImpl") +@RequiredArgsConstructor +public class InfluxdbDataVCvtImpl implements IDataVCvt { + @Resource + private DataVCvtMapper dataVCvtMapper; + + /** + * @Description: 获取时间段内的数据 + * @Param: + * @return: java.util.List + * @Author: clam + * @Date: 2025/02/24 + */ + @Override + public List getRawData(LineCountEvaluateParam lineParam) { + + InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataVCvt.class); + + influxQueryWrapper.regular(DataV::getLineId,lineParam.getLineId()).between(DataV::getTime, lineParam.getStartTime(), lineParam.getEndTime()); + + List dataVCvts = dataVCvtMapper.selectByQueryWrapper(influxQueryWrapper); + + + + return dataVCvts; + } +} diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/influxdb/InfluxdbDataVImpl.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/influxdb/InfluxdbDataVImpl.java index 35afd90..2ad222a 100644 --- a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/influxdb/InfluxdbDataVImpl.java +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/influxdb/InfluxdbDataVImpl.java @@ -2,6 +2,7 @@ package com.njcn.dataProcess.service.impl.influxdb; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.date.LocalDateTimeUtil; import com.github.jeffreyning.mybatisplus.service.MppServiceImpl; import com.njcn.common.utils.HarmonicTimesUtil; import com.njcn.dataProcess.constant.InfluxDBTableConstant; @@ -14,6 +15,7 @@ import com.njcn.dataProcess.dto.LineDataVFiveItemDTO; import com.njcn.dataProcess.param.LineCountEvaluateParam; import com.njcn.dataProcess.po.influx.DataV; import com.njcn.dataProcess.pojo.dto.CommonMinuteDto; +import com.njcn.dataProcess.pojo.dto.DataVCvtDTO; import com.njcn.dataProcess.pojo.dto.DataVDto; import com.njcn.dataProcess.pojo.po.RStatDataVD; import com.njcn.dataProcess.service.IDataV; @@ -114,7 +116,16 @@ public class InfluxdbDataVImpl extends MppServiceImpl monitoringTime(String lineId, String localData) { - return null; + InfluxQueryWrapper influxQueryWrapper = new InfluxQueryWrapper(DataV.class); + String startTime = localData+ InfluxDBTableConstant.START_TIME; + String endTime = localData+ InfluxDBTableConstant.END_TIME; + influxQueryWrapper.eq(DataV::getLineId,lineId).between(DataV::getTime, startTime, endTime); + + List dataVS = dataVMapper.selectByQueryWrapper(influxQueryWrapper); + List result = dataVS.stream().map(temp->{ + return LocalDateTime.ofInstant(temp.getTime(), ZoneId.systemDefault()); + }).distinct().collect(Collectors.toList()); + return result; } @Override @@ -256,6 +267,30 @@ public class InfluxdbDataVImpl extends MppServiceImpl cvtDTOList) { + int totalCount = cvtDTOList.size(); + if(totalCount<=0){ + return; + } + List collect = cvtDTOList.stream().map(temp -> + { + DataV dataV = new DataV(); + BeanUtils.copyProperties(temp,dataV); + return dataV; + + }).collect(Collectors.toList()); + int minSize = Math.min(1200000, collect.size()); + + List> partition = ListUtils.partition(collect, minSize); + for (List dataVList : partition) { + List sublistAsOriginalListType = new ArrayList<>(dataVList); + + dataVMapper.insertBatch(sublistAsOriginalListType); + + } + } + /** * 按监测点集合、时间条件获取dataV分钟数据 * timeMap参数来判断是否进行数据出来 timeMap为空则不进行数据处理 diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataHarmrateVImpl.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataHarmrateVImpl.java index de1c676..c620edf 100644 --- a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataHarmrateVImpl.java +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataHarmrateVImpl.java @@ -1,56 +1,28 @@ package com.njcn.dataProcess.service.impl.relation; -import com.njcn.dataProcess.dao.relation.mapper.DataHarmphasicVRelationMapper; -import com.njcn.dataProcess.dao.relation.mapper.DataHarmrateVRelationMapper; -import com.njcn.dataProcess.dto.DataHarmrateVDTO; -import com.njcn.dataProcess.po.relation.DataHarmphasicV; -import com.njcn.dataProcess.po.relation.DataHarmrateV; -import com.njcn.dataProcess.service.IDataHarmrateV; -import com.njcn.dataProcess.util.BeanFeildUtils; +import com.njcn.dataProcess.dao.relation.mapper.DataIRelationMapper; +import com.njcn.dataProcess.param.LineCountEvaluateParam; +import com.njcn.dataProcess.pojo.dto.DataHarmDto; +import com.njcn.dataProcess.service.IDataHarmRateV; import lombok.RequiredArgsConstructor; -import org.apache.commons.collections4.ListUtils; -import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; +import javax.annotation.Resource; +import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; /** - * Description: - * Date: 2025/02/21 下午 3:15【需求编号】 - * - * @author clam - * @version V1.0.0 + * @author xy */ -@Service("RelationDataHarmrateVImpl") +@Service("RelationDataHarmRateVImpl") @RequiredArgsConstructor -public class RelationDataHarmrateVImpl implements IDataHarmrateV { - private final DataHarmrateVRelationMapper dataHarmrateVRelationMapper; +public class RelationDataHarmRateVImpl implements IDataHarmRateV { + @Resource + private DataIRelationMapper dataIRelationMapper; @Override - public void batchInsertion(List dataHarmrateVDTOList) { - int totalCount = dataHarmrateVDTOList.size(); - int minSize = Math.min(120, totalCount); - - if(totalCount<=0){ - return; - } - List collect = dataHarmrateVDTOList.stream().map(temp -> { - DataHarmrateV dataHarmrateV = new DataHarmrateV(); - BeanUtils.copyProperties(temp, dataHarmrateV, BeanFeildUtils.getNullPropertyNames(temp)); - return dataHarmrateV; - }).collect(Collectors.toList()); - collect = collect.stream().collect(Collectors.toMap( - temp -> temp.getTimeid() + temp.getLineid() + temp.getPhasicType(), - temp -> temp, - (exist, replace) -> exist - )).values().stream().collect(Collectors.toList()); - - List> partition = ListUtils.partition(collect, minSize); - for (List dataHarmphasicVList : partition) { - dataHarmrateVRelationMapper.insertBatchSomeColumn(dataHarmphasicVList); - - } + public List getRawData(LineCountEvaluateParam lineParam) { + return Collections.emptyList(); } } diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataVCvtImpl.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataVCvtImpl.java new file mode 100644 index 0000000..b19d919 --- /dev/null +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataVCvtImpl.java @@ -0,0 +1,26 @@ +package com.njcn.dataProcess.service.impl.relation; + +import com.njcn.dataProcess.dto.DataVDTO; +import com.njcn.dataProcess.param.LineCountEvaluateParam; +import com.njcn.dataProcess.po.influx.DataVCvt; +import com.njcn.dataProcess.service.IDataVCvt; +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * Description: + * Date: 2025/02/24 下午 3:34【需求编号】 + * + * @author clam + * @version V1.0.0 + */ +@Service("RelationDataVCvtImpl") +@RequiredArgsConstructor +public class RelationDataVCvtImpl implements IDataVCvt { + @Override + public List getRawData(LineCountEvaluateParam lineParam) { + return null; + } +} diff --git a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataVImpl.java b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataVImpl.java index 1bbbfbb..8b59b56 100644 --- a/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataVImpl.java +++ b/data-processing/data-processing-boot/src/main/java/com/njcn/dataProcess/service/impl/relation/RelationDataVImpl.java @@ -10,6 +10,7 @@ import com.njcn.dataProcess.dto.DataVFiveItemDTO; import com.njcn.dataProcess.param.LineCountEvaluateParam; import com.njcn.dataProcess.po.relation.DataV; import com.njcn.dataProcess.pojo.dto.CommonMinuteDto; +import com.njcn.dataProcess.pojo.dto.DataVCvtDTO; import com.njcn.dataProcess.pojo.dto.DataVDto; import com.njcn.dataProcess.pojo.po.RStatDataVD; import com.njcn.dataProcess.service.IDataV; @@ -116,5 +117,10 @@ public class RelationDataVImpl extends MppServiceImpl cvtDTOList) { + + } + } diff --git a/data-processing/data-processing-boot/src/main/resources/bootstrap.yml b/data-processing/data-processing-boot/src/main/resources/bootstrap.yml index c32d6f1..f962dc7 100644 --- a/data-processing/data-processing-boot/src/main/resources/bootstrap.yml +++ b/data-processing/data-processing-boot/src/main/resources/bootstrap.yml @@ -56,7 +56,7 @@ data: source: query: Influxdb # insert: Influxdb - insert: Relation + insert: Influxdb #mybatis配置信息 mybatis-plus: configuration: diff --git a/message/message-api/src/main/java/com/njcn/message/message/DeviceRebootMessage.java b/message/message-api/src/main/java/com/njcn/message/message/DeviceRebootMessage.java index 3885cfb..64768d8 100644 --- a/message/message-api/src/main/java/com/njcn/message/message/DeviceRebootMessage.java +++ b/message/message-api/src/main/java/com/njcn/message/message/DeviceRebootMessage.java @@ -14,8 +14,9 @@ import java.util.List; @Data public class DeviceRebootMessage { private String code; + private Integer index; - private DeviceInfo data; + private List data; @Data public static class DeviceInfo { diff --git a/message/message-boot/src/main/java/com/njcn/message/websocket/DataRecallController.java b/message/message-boot/src/main/java/com/njcn/message/websocket/DataRecallController.java index d6f3c69..c61e079 100644 --- a/message/message-boot/src/main/java/com/njcn/message/websocket/DataRecallController.java +++ b/message/message-boot/src/main/java/com/njcn/message/websocket/DataRecallController.java @@ -10,6 +10,8 @@ //import com.njcn.common.utils.HttpResultUtil; // //import com.njcn.dataProcess.api.DataVFeignClient; +//import com.njcn.device.biz.commApi.CommTerminalGeneralClient; +//import com.njcn.device.biz.pojo.dto.LineDevGetDTO; //import com.njcn.message.message.RecallMessage; //import com.njcn.message.produce.template.RecallMessaggeTemplate; //import com.njcn.middle.rocket.domain.BaseMessage; @@ -84,13 +86,13 @@ // if(!CollectionUtils.isEmpty(recallDTOList)){ // // message.setData(recallDTOList); -// baseMessage.setMessageBoy(JSONObject.toJSONString(message)); +// baseMessage.setMessageBody(JSONObject.toJSONString(message)); // // recallMessaggeTemplate.sendMember(baseMessage); // } // }else { // message.setData(param); -// baseMessage.setMessageBoy(JSONObject.toJSONString(message)); +// baseMessage.setMessageBody(JSONObject.toJSONString(message)); // recallMessaggeTemplate.sendMember(baseMessage); // } // diff --git a/pom.xml b/pom.xml index 61f91ae..7730a5a 100644 --- a/pom.xml +++ b/pom.xml @@ -33,10 +33,10 @@ 192.168.1.22 - 127.0.0.1 + 192.168.1.130 192.168.1.22 ${middle.server.url}:18848 - 415a1c87-33aa-47bd-8e25-13cc456c87ed + c2cbedf1-14e9-42c8-98ec-4ffa96e68c0e ${middle.server.url}:8080