|
@@ -92,8 +92,6 @@ public class MarkQuestionServiceImpl extends ServiceImpl<MarkQuestionMapper, Mar
|
|
|
private FileStoreUtil fileStoreUtil;
|
|
|
@Resource
|
|
|
private LockService lockService;
|
|
|
- @Resource
|
|
|
- private MarkSubjectiveScoreService markSubjectiveScoreService;
|
|
|
|
|
|
@Override
|
|
|
public List<MarkQuestion> listQuestionByExamIdAndPaperNumber(Long examId, String paperNumber) {
|
|
@@ -137,8 +135,9 @@ public class MarkQuestionServiceImpl extends ServiceImpl<MarkQuestionMapper, Mar
|
|
|
throw ExceptionResultEnum.ERROR.exception("间隔分必须大于0");
|
|
|
}
|
|
|
question.setExamId(examId);
|
|
|
+ question.setCourseId(markPaper.getCourseId());
|
|
|
question.setPaperNumber(paperNumber);
|
|
|
- question.setPaperType(markPaper.getPaperType());
|
|
|
+// question.setPaperType(markPaper.getPaperType());
|
|
|
question.setCreateId(sysUser.getId());
|
|
|
question.setCreateTime(System.currentTimeMillis());
|
|
|
// 用来判断是否保存过
|
|
@@ -764,6 +763,10 @@ public class MarkQuestionServiceImpl extends ServiceImpl<MarkQuestionMapper, Mar
|
|
|
throw ExceptionResultEnum.ERROR.exception("该题已开始评卷,不允许双评改单评");
|
|
|
}
|
|
|
|
|
|
+ if (doubleRate > 0 && doubleMarkParam.getArbitrateThreshold() > 0 && doubleMarkParam.getArbitrateThreshold() > markQuestion.getTotalScore()) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("仲裁阈值不能大于小题满分");
|
|
|
+ }
|
|
|
+
|
|
|
UpdateWrapper<MarkQuestion> updateWrapper = new UpdateWrapper<>();
|
|
|
updateWrapper.lambda().set(MarkQuestion::getDoubleRate, doubleRate)
|
|
|
.set(MarkQuestion::getArbitrateThreshold, doubleRate > 0 ? doubleMarkParam.getArbitrateThreshold() : null)
|
|
@@ -771,19 +774,26 @@ public class MarkQuestionServiceImpl extends ServiceImpl<MarkQuestionMapper, Mar
|
|
|
.eq(MarkQuestion::getId, doubleMarkParam.getQuestionId());
|
|
|
this.update(updateWrapper);
|
|
|
|
|
|
- // 单、双评切换、双评比例修改,删除任务
|
|
|
- if (!oldDoubleRate.equals(doubleRate)) {
|
|
|
+ // 单、双评切换修改,不删除任务,补发二评任务
|
|
|
+ if (oldDoubleRate == 0 && doubleRate == 100) {
|
|
|
+ this.updateMarkedCount(questionId, 0);
|
|
|
+ this.updateTaskCount(questionId, 0);
|
|
|
+ if (lockService.trylock(LockType.QUESTION_UPDATE, questionId)) {
|
|
|
+ MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
|
|
|
+ // 考生主观题重新统分
|
|
|
+ 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)) {
|
|
|
MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
|
|
|
// 考生主观题重新统分
|
|
|
markService.checkStudentSubjectiveScore(examId, markPaper.getCoursePaperId());
|
|
|
- markSyncService.deleteMarkedByQuestion(markQuestion);
|
|
|
+ markSyncService.deleteMarkedByQuestion(markQuestion, true);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
@Override
|