From 0dd35029429965abd39c062356c3ee6054f6b676 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Wed, 29 Oct 2025 09:05:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=A8=A1-=E6=A3=80=E6=B5=8B=E9=A1=B9?= =?UTF-8?q?=E6=A0=91=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../result/service/impl/ResultServiceImpl.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java b/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java index fa13c05a..5ecf0fe0 100644 --- a/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java +++ b/detection/src/main/java/com/njcn/gather/result/service/impl/ResultServiceImpl.java @@ -398,8 +398,8 @@ public class ResultServiceImpl implements IResultService { double cosValue = Math.cos((aDtl1.get(0).getAngle() - aDtl2.get(0).getAngle()) / 180 * Math.PI); BigDecimal bigDecimal = BigDecimal.valueOf(cosValue).setScale(6, BigDecimal.ROUND_HALF_UP); - dtlType.setScriptTypeName(ResultUnitEnum.V_RELATIVE.getName() + "=" + v.get(0).getValue().intValue() + unitV - + " " + ResultUnitEnum.I_RELATIVE.getName() + "=" + i.get(0).getValue().intValue() + unitI + dtlType.setScriptTypeName(ResultUnitEnum.V_RELATIVE.getName() + "=" + v.get(0).getValue() + unitV + + " " + ResultUnitEnum.I_RELATIVE.getName() + "=" + i.get(0).getValue() + unitI + " cos(φ)=" + bigDecimal.doubleValue()); } break; @@ -415,7 +415,7 @@ public class ResultServiceImpl implements IResultService { unit = ResultUnitEnum.V_ABSOLUTELY.getUnit(); } List v = scriptDtlIndexList.stream().filter(x -> "VOL".equals(x.getValueType())).collect(Collectors.toList()); - dtlType.setScriptTypeName(dictTree.getName() + "=" + v.get(0).getValue().intValue() + unit); + dtlType.setScriptTypeName(dictTree.getName() + "=" + v.get(0).getValue() + unit); break; /** * 电流 @@ -429,7 +429,7 @@ public class ResultServiceImpl implements IResultService { unitI = ResultUnitEnum.I_ABSOLUTELY.getUnit(); } List I = scriptDtlIndexList.stream().filter(x -> "CUR".equals(x.getValueType())).collect(Collectors.toList()); - dtlType.setScriptTypeName(dictTree.getName() + "=" + I.get(0).getValue().intValue() + unitI); + dtlType.setScriptTypeName(dictTree.getName() + "=" + I.get(0).getValue() + unitI); break; /** * 谐波电压 @@ -449,12 +449,12 @@ public class ResultServiceImpl implements IResultService { .collect(Collectors.groupingBy(PqScriptDtls::getHarmNum, LinkedHashMap::new, Collectors.toList())); if (harmNumMap.size() > 1) { //叠加2~50次谐波电压(含有率为GB/T) - dtlType.setScriptTypeName("叠加" + harmNumMap.entrySet().iterator().next().getValue().get(0).getHarmNum().intValue() + "~" + - new ArrayList<>(harmNumMap.entrySet()).get(harmNumMap.size() - 1).getValue().get(0).getHarmNum().intValue() + dtlType.setScriptTypeName("叠加" + harmNumMap.entrySet().iterator().next().getValue().get(0).getHarmNum() + "~" + + new ArrayList<>(harmNumMap.entrySet()).get(harmNumMap.size() - 1).getValue().get(0).getHarmNum() + "次" + dictTree.getName()); // + "(含有率为GB/T)" } else { //叠加5%的2次谐波电压 - dtlType.setScriptTypeName("叠加" + hv.get(0).getValue().intValue() + ResultUnitEnum.HV.getUnit() + "的" + hv.get(0).getHarmNum().intValue() + "次" + dictTree.getName()); + dtlType.setScriptTypeName("叠加" + hv.get(0).getValue() + ResultUnitEnum.HV.getUnit() + "的" + hv.get(0).getHarmNum() + "次" + dictTree.getName()); } break; /** @@ -488,7 +488,7 @@ public class ResultServiceImpl implements IResultService { dtlType.setScriptTypeName(a.toString()); } else { //叠加5%的2次谐波电压 - dtlType.setScriptTypeName("叠加" + harmInNumList.get(0).getValue().intValue() + ResultUnitEnum.HV.getUnit() + "的" + harmInNumList.get(0).getHarmNum() + "次" + dictTree.getName()); + dtlType.setScriptTypeName("叠加" + harmInNumList.get(0).getValue() + ResultUnitEnum.HV.getUnit() + "的" + harmInNumList.get(0).getHarmNum() + "次" + dictTree.getName()); } break;