Browse Source

Merge remote-tracking branch 'origin/dev_screen_data_2.0' into dev_temp

dev_shibei_match
zxc 5 years ago
parent
commit
bb38c7c8c6
  1. 15
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/support/normalizing/batch/BatchScoreCalculator.java

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

Loading…
Cancel
Save