Browse Source

计算器返回权重

master
jianjun 5 years ago
parent
commit
6421327229
  1. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java
  2. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexScoreVo.java

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java

@ -67,7 +67,7 @@ public class BatchScoreCalculator {
result.setDetails(new ArrayList<>());
scoreCountOfSamples.put(sampleId, result);
}
IndexScoreVo sampleScore = new IndexScoreVo(idx.getIndexId(), idx.getAllParentIndexCode(), score);
IndexScoreVo sampleScore = new IndexScoreVo(idx.getIndexId(), idx.getAllParentIndexCode(), score, idx.getWeight());
result.getDetails().add(sampleScore);
result.setTotalScore(result.getTotalScore().add(score).setScale(6, RoundingMode.HALF_UP));
}

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/IndexScoreVo.java

@ -26,6 +26,10 @@ public class IndexScoreVo implements Serializable {
* 分值
*/
private BigDecimal score;
/**
* 该指标的权重
*/
private BigDecimal weight;
}

Loading…
Cancel
Save