【单操打分规则逻辑修改】
This commit is contained in:
parent
6825eb02bd
commit
943c46bda7
@ -283,8 +283,11 @@ public class Training2Service {
|
||||
return 0D;
|
||||
}
|
||||
List<ScoringRule2> scoringRules = training2.getScoringRules();
|
||||
if (CollectionUtils.isEmpty(scoreDetailList) || CollectionUtils.isEmpty(scoringRules)) {
|
||||
if (CollectionUtils.isEmpty(scoreDetailList)) {
|
||||
return 0D;
|
||||
} else if (CollectionUtils.isEmpty(scoringRules)) { // 如果没有打分规则,直接取平均分
|
||||
long rightStepCount = scoreDetailList.stream().filter(PaperTrainAnswerDetail::isSuccess).count();
|
||||
return 100D * rightStepCount / scoreDetailList.size();
|
||||
} else {
|
||||
List<Long> rightStepList = scoreDetailList.stream().filter(PaperTrainAnswerDetail::isSuccess)
|
||||
.map(PaperTrainAnswerDetail::getStepId).collect(Collectors.toList());
|
||||
|
Loading…
Reference in New Issue
Block a user