|
@@ -203,8 +203,6 @@ public class MarkQuestionServiceImpl extends ServiceImpl<MarkQuestionMapper, Mar
|
|
// 用来判断是否保存过
|
|
// 用来判断是否保存过
|
|
markQuestion.setUpdateId(sysUser.getId());
|
|
markQuestion.setUpdateId(sysUser.getId());
|
|
markQuestion.setUpdateTime(System.currentTimeMillis());
|
|
markQuestion.setUpdateTime(System.currentTimeMillis());
|
|
- // 是否需要清除OCR识别结果
|
|
|
|
- markQuestion.setClearOcrResult(!question.getObjective() && question.getTotalScore() - markQuestion.getTotalScore() != 0);
|
|
|
|
saveOrUpdateList.add(markQuestion);
|
|
saveOrUpdateList.add(markQuestion);
|
|
markQuestionList.remove(markQuestion);
|
|
markQuestionList.remove(markQuestion);
|
|
} else {
|
|
} else {
|
|
@@ -774,7 +772,12 @@ public class MarkQuestionServiceImpl extends ServiceImpl<MarkQuestionMapper, Mar
|
|
throw ExceptionResultEnum.ERROR.exception("该题已开始评卷,不允许双评改单评");
|
|
throw ExceptionResultEnum.ERROR.exception("该题已开始评卷,不允许双评改单评");
|
|
}
|
|
}
|
|
|
|
|
|
- if (doubleRate > 0 && doubleMarkParam.getArbitrateThreshold() > 0 && doubleMarkParam.getArbitrateThreshold() > markQuestion.getTotalScore()) {
|
|
|
|
|
|
+ MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
|
|
|
|
+ if(oldDoubleRate > 0 && doubleRate == 0 && MarkPaperAiMark.MAN_MACHINE.equals(markPaper.getAiMark())){
|
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("人机双评模式,不允许双评改单评");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (doubleRate == 100 && doubleMarkParam.getArbitrateThreshold() > 0 && doubleMarkParam.getArbitrateThreshold() > markQuestion.getTotalScore()) {
|
|
throw ExceptionResultEnum.ERROR.exception("仲裁阈值不能大于小题满分");
|
|
throw ExceptionResultEnum.ERROR.exception("仲裁阈值不能大于小题满分");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -785,28 +788,13 @@ public class MarkQuestionServiceImpl extends ServiceImpl<MarkQuestionMapper, Mar
|
|
.eq(MarkQuestion::getId, doubleMarkParam.getQuestionId());
|
|
.eq(MarkQuestion::getId, doubleMarkParam.getQuestionId());
|
|
this.update(updateWrapper);
|
|
this.update(updateWrapper);
|
|
|
|
|
|
- MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
|
|
|
|
- if (MarkPaperAiMark.MAN_MACHINE.equals(markPaper.getAiMark()) && oldDoubleRate - doubleRate != 0) {
|
|
|
|
- throw ExceptionResultEnum.ERROR.exception("人机双评模式,不允许进行单、双评切换");
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
// 单、双评切换修改,不删除任务,补发二评任务
|
|
// 单、双评切换修改,不删除任务,补发二评任务
|
|
- if (oldDoubleRate == 0 && doubleRate == 100) {
|
|
|
|
- this.updateMarkedCount(questionId, 0);
|
|
|
|
- this.updateTaskCount(questionId, 0);
|
|
|
|
- if (lockService.trylock(LockType.QUESTION_UPDATE, questionId)) {
|
|
|
|
- // 考生主观题重新统分
|
|
|
|
- markService.checkStudentSubjectiveScore(examId, markPaper.getCoursePaperId());
|
|
|
|
- markSyncService.deleteMarkedByQuestion(markQuestion, false);
|
|
|
|
- }
|
|
|
|
- } else if (oldDoubleRate == 100 && doubleRate == 0) {
|
|
|
|
- this.updateMarkedCount(questionId, 0);
|
|
|
|
- this.updateTaskCount(questionId, 0);
|
|
|
|
- if (lockService.trylock(LockType.QUESTION_UPDATE, questionId)) {
|
|
|
|
- // 考生主观题重新统分
|
|
|
|
- markService.checkStudentSubjectiveScore(examId, markPaper.getCoursePaperId());
|
|
|
|
- markSyncService.deleteMarkedByQuestion(markQuestion, true);
|
|
|
|
- }
|
|
|
|
|
|
+ this.updateMarkedCount(questionId, 0);
|
|
|
|
+ this.updateTaskCount(questionId, 0);
|
|
|
|
+ if (lockService.trylock(LockType.QUESTION_UPDATE, questionId)) {
|
|
|
|
+ // 考生主观题重新统分
|
|
|
|
+ markService.checkStudentSubjectiveScore(examId, markPaper.getCoursePaperId());
|
|
|
|
+ markSyncService.deleteMarkedByQuestion(markQuestion, oldDoubleRate > 0 && doubleRate == 0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|