|
@@ -367,15 +367,20 @@ public class MarkServiceImpl implements MarkService {
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public void checkStudentSubjective(Long studentId, Long examId, String paperNumber, Integer version) {
|
|
|
- long unBindMarkerQuestionCount = markQuestionService.countUnBindMarkerByExamIdAndPaperNumberAndObjective(examId, paperNumber, false);
|
|
|
- long questionCount = markQuestionService.countByExamIdAndPaperNumberAndObjective(examId, paperNumber, false);
|
|
|
- long subjectiveScoreCount = markSubjectiveScoreService.countByStudentId(studentId);
|
|
|
- // 主观题数大于0,主观题全部绑定了评卷员,考生小题分数数量等于主观题数量
|
|
|
- if (questionCount > 0 && unBindMarkerQuestionCount == 0 && questionCount == subjectiveScoreCount) {
|
|
|
- scoreCalculate(studentId, version);
|
|
|
- } else {//否则更新该学生主观题状态为未阅卷
|
|
|
-// markStudentService.updateSubjectiveStatusAndScore(studentId, SubjectiveStatus.UNMARK, null, null);
|
|
|
- markStudentService.updateSubjectiveScoreByVersion(studentId, SubjectiveStatus.MARKED, null, null, version);
|
|
|
+ try {
|
|
|
+ long unBindMarkerQuestionCount = markQuestionService.countUnBindMarkerByExamIdAndPaperNumberAndObjective(examId, paperNumber, false);
|
|
|
+ long questionCount = markQuestionService.countByExamIdAndPaperNumberAndObjective(examId, paperNumber, false);
|
|
|
+ long subjectiveScoreCount = markSubjectiveScoreService.countByStudentId(studentId);
|
|
|
+ // 主观题数大于0,主观题全部绑定了评卷员,考生小题分数数量等于主观题数量
|
|
|
+ if (questionCount > 0 && unBindMarkerQuestionCount == 0 && questionCount == subjectiveScoreCount) {
|
|
|
+ scoreCalculate(studentId, version);
|
|
|
+ } else {//否则更新该学生主观题状态为未阅卷
|
|
|
+// markStudentService.updateSubjectiveStatusAndScore(studentId, SubjectiveStatus.UNMARK, null, null);
|
|
|
+ markStudentService.updateSubjectiveScoreByVersion(studentId, SubjectiveStatus.MARKED, null, null, version);
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error(SystemConstant.LOG_ERROR, e);
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|