Merge branch 'master' of https://e.coding.net/g-iswv8783/education/pengchen-exam-java
This commit is contained in:
@@ -895,9 +895,15 @@ public class MysqlServericeImpl implements IMysqlServerice {
|
||||
.sum();
|
||||
|
||||
//乘以 对了多少个 关键字 权值
|
||||
double finalRoundedScore = new BigDecimal(
|
||||
double finalRoundedScore;
|
||||
if (totalKeyScoreInt == 0) {
|
||||
// 如果总键值为0,可以设置为0或其他默认值
|
||||
finalRoundedScore = 0.0;
|
||||
} else {
|
||||
finalRoundedScore = new BigDecimal(
|
||||
((double) totalScoreRate / totalKeyScoreInt) * singleScore
|
||||
).setScale(2, RoundingMode.HALF_UP).doubleValue();
|
||||
}
|
||||
|
||||
appendToFile(answerLogPath,"❌学生语句"+sql+"不正确,语句权值:"+scoreRateStr+",关键权值:"+totalKeyScoreInt+",答对得分点为:"+matchedKeywords+",答对关键得分权值"+ totalScoreRate+ ",得分" + finalRoundedScore);
|
||||
return finalRoundedScore;
|
||||
|
Reference in New Issue
Block a user