From ff53c912791eea0c583642b852f6fcabb0606cfd Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Fri, 14 Mar 2025 16:31:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gather/detection/service/impl/DetectionServiceImpl.java | 6 +++--- .../java/com/njcn/gather/result/pojo/vo/RawDataExcel.java | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java b/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java index 725726fc..685ca47a 100644 --- a/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/detection/service/impl/DetectionServiceImpl.java @@ -1145,15 +1145,15 @@ public class DetectionServiceImpl { if (devData - channelData != 0) { switch (errorValueType) { case 2: - //下发的谐波电压幅值,返回的是谐波电压含有率,拿(含有率值*基波 - 源下发对应谐波值幅值)/下发的幅值 + //下发的谐波电压幅值,返回的是谐波电压含有率,拿(含有率值*基波 - 源下发对应谐波值幅值)/下发的幅值 注:相对值-1型。 return BigDecimal.valueOf(devData - channelData) .divide(BigDecimal.valueOf(channelData), 4, RoundingMode.HALF_UP); case 3: - //下发的谐波电压幅值,返回的是谐波电压含有率,拿(含有率值*基波 - 源下发对应谐波值幅值)/装置返回值 + //下发的谐波电压幅值,返回的是谐波电压含有率,拿(含有率值*基波 - 源下发对应谐波值幅值)/装置返回值 注:相对值-2型。 return BigDecimal.valueOf(devData - channelData) .divide(BigDecimal.valueOf(devData), 4, RoundingMode.HALF_UP); } - return BigDecimal.valueOf(devData - channelData); + return BigDecimal.valueOf(devData).subtract(BigDecimal.valueOf(channelData)); } return BigDecimal.valueOf(0); } diff --git a/detection/src/main/java/com/njcn/gather/result/pojo/vo/RawDataExcel.java b/detection/src/main/java/com/njcn/gather/result/pojo/vo/RawDataExcel.java index 86251ba9..f7b00eba 100644 --- a/detection/src/main/java/com/njcn/gather/result/pojo/vo/RawDataExcel.java +++ b/detection/src/main/java/com/njcn/gather/result/pojo/vo/RawDataExcel.java @@ -1,7 +1,6 @@ package com.njcn.gather.result.pojo.vo; import cn.afterturn.easypoi.excel.annotation.Excel; -import com.njcn.gather.device.pojo.vo.PqDevExcel; import lombok.Data; import lombok.EqualsAndHashCode;