From 27e799e60d9aec4270bb3f0f5ce85114af7dc4ec Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 19 Oct 2020 16:41:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=99=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../normalizing/batch/BatchScoreCalculator.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java index ec62793b66..4eca102834 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java @@ -59,13 +59,6 @@ public class BatchScoreCalculator { String sampleId = vo.getSampleId(); //归一后的值 BigDecimal normalizeValue;// = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold)); - //如果不需要归一 则 直接value*权重 - if (idx.isScore()) { - normalizeValue = getFinalSampleValue(vo.getSampleValue(), threshold); - } else { - normalizeValue = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold)); - } - //反正切函数 [-pi/2,pi/2] BigDecimal maxValue = idx.getScoreCalculator().getMaxValue(); BigDecimal minValue = idx.getScoreCalculator().getMinValue(); BigDecimal minScoreValue = idx.getScoreCalculator().getMinScore(); @@ -81,8 +74,14 @@ public class BatchScoreCalculator { normalizeValue = maxValue.subtract(normalizeValue); } + }else { + //如果不需要归一 则 直接value*权重 + if (idx.isScore()) { + normalizeValue = getFinalSampleValue(vo.getSampleValue(), threshold); + } else { + normalizeValue = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold)); + } } - BigDecimal score = normalizeValue.multiply(weight).setScale(6, RoundingMode.HALF_UP); CalculateResult result = scoreCountOfSamples.get(sampleId);