|
@@ -26,11 +26,13 @@ import com.qmth.teachcloud.mark.dto.mark.score.SettingDto;
|
|
|
import com.qmth.teachcloud.mark.entity.MarkPaper;
|
|
|
import com.qmth.teachcloud.mark.entity.MarkStudent;
|
|
|
import com.qmth.teachcloud.mark.entity.ScanPackage;
|
|
|
+import com.qmth.teachcloud.mark.enums.OmrTaskStatus;
|
|
|
import com.qmth.teachcloud.mark.mapper.MarkPaperMapper;
|
|
|
import com.qmth.teachcloud.mark.service.*;
|
|
|
import com.qmth.teachcloud.mark.utils.Calculator;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
@@ -53,6 +55,8 @@ public class MarkPaperServiceImpl extends ServiceImpl<MarkPaperMapper, MarkPaper
|
|
|
@Resource
|
|
|
private ScanPackageService scanPackageService;
|
|
|
@Resource
|
|
|
+ private ScanOmrTaskService scanOmrTaskService;
|
|
|
+ @Resource
|
|
|
private TeachcloudCommonService teachcloudCommonService;
|
|
|
@Resource
|
|
|
private BasicRoleDataPermissionService basicRoleDataPermissionService;
|
|
@@ -153,14 +157,22 @@ public class MarkPaperServiceImpl extends ServiceImpl<MarkPaperMapper, MarkPaper
|
|
|
if (markStudentService.countByExamIdAndPaperNumberAndMarkStatus(examId, paperNumber, SubjectiveStatus.UNMARK) > 0) {
|
|
|
throw ExceptionResultEnum.ERROR.exception(courseInfo + "考生未全部评完,无法结束评卷");
|
|
|
}
|
|
|
- // 识别缺考未做完,不能结束
|
|
|
+ // 未全部扫描,不能结束
|
|
|
if (markStudentService.countUnexistByExamIdAndPaperNumberAndPaperType(examId, paperNumber, markPaper.getPaperType()) > 0) {
|
|
|
throw ExceptionResultEnum.ERROR.exception(courseInfo + "未全部扫描完成,无法结束评卷");
|
|
|
}
|
|
|
- // 识别缺考未做完,不能结束
|
|
|
+ // 识别缺考未确认完,不能结束
|
|
|
if (markStudentService.countOmrAbsentStudent(examId, paperNumber, markPaper.getPaperType(), false) > 0) {
|
|
|
throw ExceptionResultEnum.ERROR.exception(courseInfo + "识别缺考未全部确认,无法结束评卷");
|
|
|
}
|
|
|
+ // 人工绑定未做完,不能结束
|
|
|
+ if (markStudentService.getAssignedCount(examId, false, markPaper.getCourseCode(), markPaper.getCoursePaperId(), MarkPaperStatus.FORMAL, null) > 0) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(courseInfo + "人工绑定未全部处理,无法结束评卷");
|
|
|
+ }
|
|
|
+ // 客观题检查未做完,不能结束
|
|
|
+ if (scanOmrTaskService.getFinishStudentCountByExamAndUserId(examId, markPaper.getCourseCode(), markPaper.getCoursePaperId(), OmrTaskStatus.WAITING.name(), null) > 0) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception(courseInfo + "客观题检查未全部处理,无法结束评卷");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 结束评卷时,客观题统分
|