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);