|
@@ -53,7 +53,7 @@ public class AlgorithmFacade {
|
|
|
}
|
|
|
//得分≤90分且得分>80分为乙级
|
|
|
if (BigDecimalUtil.compareTo(score, new BigDecimal(90)) == 5
|
|
|
- && BigDecimalUtil.compareTo(score, new BigDecimal(80)) == 3) {
|
|
|
+ && BigDecimalUtil.compareTo(score, new BigDecimal(80)) == 4) {
|
|
|
level = "乙";
|
|
|
}
|
|
|
//得分≤80分为丙级
|
|
@@ -147,13 +147,13 @@ public class AlgorithmFacade {
|
|
|
//非单票否决计分
|
|
|
if (casesScoreMap.containsKey(qcResultAlgVO.getCasesId())) {
|
|
|
BigDecimal casesScore = casesScoreMap.get(qcResultAlgVO.getCasesId());
|
|
|
- casesScore= casesScore.add(qcResultAlgVO.getScore());
|
|
|
+ casesScore = casesScore.add(qcResultAlgVO.getScore());
|
|
|
casesScoreMap.put(qcResultAlgVO.getCasesId(), casesScore);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //结果先减去单票否决计分
|
|
|
+ //结果先减去单票否决计分总和
|
|
|
res = res.subtract(rejectScore);
|
|
|
//结果小于0按0计算
|
|
|
if (BigDecimalUtil.compareTo(res, BigDecimal.ZERO) == 1) {
|
|
@@ -163,8 +163,10 @@ public class AlgorithmFacade {
|
|
|
for (Map.Entry<Long, BigDecimal> casesScore : casesScoreMap.entrySet()) {
|
|
|
BigDecimal allSccore = casesMap.get(casesScore.getKey());
|
|
|
if (BigDecimalUtil.compareTo(allSccore, casesScore.getValue()) == 5) {
|
|
|
+ //模块标准分小于等于模块减分总和就用模块标准分
|
|
|
res = res.subtract(allSccore);
|
|
|
} else {
|
|
|
+ //模块标准分大于模块减分总和就用模块减分总和
|
|
|
res = res.subtract(casesScore.getValue());
|
|
|
}
|
|
|
}
|
|
@@ -176,4 +178,19 @@ public class AlgorithmFacade {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
+
|
|
|
+ public static void main(String[] args) {
|
|
|
+ AlgorithmFacade algorithmFacade = new AlgorithmFacade();
|
|
|
+ System.out.println("100:" + algorithmFacade.getLevel(new BigDecimal(100)));
|
|
|
+ System.out.println("95:" + algorithmFacade.getLevel(new BigDecimal(95)));
|
|
|
+ System.out.println("90.1:" + algorithmFacade.getLevel(new BigDecimal(90.1)));
|
|
|
+ System.out.println("90:" + algorithmFacade.getLevel(new BigDecimal(90)));
|
|
|
+ System.out.println("85:" + algorithmFacade.getLevel(new BigDecimal(85)));
|
|
|
+ System.out.println("80.1:" + algorithmFacade.getLevel(new BigDecimal(80.1)));
|
|
|
+ System.out.println("80:" + algorithmFacade.getLevel(new BigDecimal(80)));
|
|
|
+ System.out.println("79.9:" + algorithmFacade.getLevel(new BigDecimal(79.9)));
|
|
|
+ System.out.println("60:" + algorithmFacade.getLevel(new BigDecimal(60)));
|
|
|
+ System.out.println("0:" + algorithmFacade.getLevel(new BigDecimal(0)));
|
|
|
+
|
|
|
+ }
|
|
|
}
|