From d5b1c5a22559df7c44bb28119372ce8ee19d708b Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 14 Sep 2020 09:52:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=BD=92=E4=B8=80=E7=AE=97?= =?UTF-8?q?=E6=B3=95=20=E8=BF=94=E5=9B=9E=E5=8E=9F=E5=A7=8B=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../support/normalizing/batch/BatchScoreCalculator.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 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 c171f62300..b0ee8fa0ad 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 @@ -37,7 +37,7 @@ public class BatchScoreCalculator { } /** - * 执行计算,以样本的所有指标总得分及明细分数值 + * 执行计算,以样本的所有指标总得分(原始值)及明细分数(归一后的值 不乘以权重)值 * * @param indexInputVOS * @return @@ -56,7 +56,9 @@ public class BatchScoreCalculator { //遍历该指标下的每个数据 for (SampleValue vo : indexValueVOs) { String sampleId = vo.getSampleId(); - BigDecimal score = scoreCalculator.normalize(getFinalSampleValue(vo.getSampleValue(), threshold), weight).setScale(6, RoundingMode.HALF_UP); + //归一后的值 + BigDecimal normalizeValue = getFinalSampleValue(vo.getSampleValue(), threshold); + BigDecimal score = scoreCalculator.normalize(normalizeValue, weight).setScale(6, RoundingMode.HALF_UP); CalculateResult result = scoreCountOfSamples.get(sampleId); if (result == null) { @@ -67,7 +69,7 @@ public class BatchScoreCalculator { result.setDetails(new ArrayList<>()); scoreCountOfSamples.put(sampleId, result); } - IndexScoreVo sampleScore = new IndexScoreVo(idx.getIndexId(), idx.getAllParentIndexCode(), score, idx.getWeight()); + IndexScoreVo sampleScore = new IndexScoreVo(idx.getIndexId(), idx.getAllParentIndexCode(), normalizeValue, idx.getWeight()); result.getDetails().add(sampleScore); result.setTotalScore(result.getTotalScore().add(score).setScale(6, RoundingMode.HALF_UP)); }