考试单操,场景重复回答步骤的问题

This commit is contained in:
tiger_zhou 2023-05-06 15:02:26 +08:00
parent c77ef0b669
commit 5f8511b200

View File

@ -146,7 +146,7 @@ public class PaperUserSubmitAnswerService {
List<PaperTrainAnswerDetail> details = this.training2Service.finishTraining2(req.getGroup(),user,req.getTrainAnswerDetail().getTrainDetail());
boolean allHasRule = details.stream().allMatch(PaperTrainAnswerDetail::isHaveRule);
BusinessExceptionAssertEnum.DATA_ERROR.assertTrue(allHasRule,"场景实训没有对应的评分规则");
int sumScore = details.stream().mapToInt(d->d.getScore().intValue()).sum();
int sumScore = details.stream().mapToInt(d->d.getRuleScore().intValue()).sum();
for (PaperTrainAnswerDetail detail : details) {
detail.setScore(detail.getScore());