|
@@ -208,6 +208,8 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
|
@Autowired
|
|
|
private MarkSiteService markSiteService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ExamRoomService examRoomService;
|
|
|
static {
|
|
|
int threadCount = 5;
|
|
|
exec = new ThreadPoolExecutor(threadCount, threadCount, 0L, TimeUnit.SECONDS,
|
|
@@ -289,18 +291,22 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
|
if (studentPaper.getPaperNumber() == 1) {
|
|
|
// 根据识别结果更新考生属性
|
|
|
PaperPageEntity page = paperPageService.findPaperIdAndIndex(paper.getId(), 1);
|
|
|
- List<String> paperTypeBarcodeContents = markSiteService.findPaperTypeBarcodeContentByExamAndSubjectCode(student.getExamId(), student.getSubjectCode());
|
|
|
+ List<String> paperTypeBarcodeContents = markSiteService
|
|
|
+ .findPaperTypeBarcodeContentByExamAndSubjectCode(student.getExamId(), student.getSubjectCode());
|
|
|
if (paperTypeBarcodeContents == null || paperTypeBarcodeContents.isEmpty()) {
|
|
|
paperTypeBarcodeContents = exam.getPaperTypeBarcodeContent();
|
|
|
}
|
|
|
- if(page.getPaperType() == null||page.getPaperType().getResult().length()==0 || page.getPaperType().getResult().equals("#")){
|
|
|
+ if (page.getPaperType() == null || page.getPaperType().getResult().length() == 0
|
|
|
+ || page.getPaperType().getResult().equals("#")) {
|
|
|
student.setPaperType("#");
|
|
|
- }else if (CollectionUtils.isNotEmpty(paperTypeBarcodeContents) && !paperTypeBarcodeContents.contains(page.getPaperType().getResult())) {
|
|
|
+ } else if (CollectionUtils.isNotEmpty(paperTypeBarcodeContents)
|
|
|
+ && !paperTypeBarcodeContents.contains(page.getPaperType().getResult())) {
|
|
|
student.setPaperType("?");
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
student.setPaperType(page.getPaperType().getResult());
|
|
|
}
|
|
|
-// student.setPaperType(page.getPaperType() != null ? page.getPaperType().getResult() : "#");
|
|
|
+ // student.setPaperType(page.getPaperType() != null ?
|
|
|
+ // page.getPaperType().getResult() : "#");
|
|
|
student.setOmrAbsent(page.getAbsent() == null ? false : page.getAbsent().getResult());
|
|
|
student.setDevice(batchService.findByPaperId(paper.getId()).getDevice());
|
|
|
}
|
|
@@ -1030,7 +1036,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
|
throw ParameterExceptions.EXAM_NOT_FOUND;
|
|
|
}
|
|
|
|
|
|
- if (batchService.getCountByExam(examId) > 0) {
|
|
|
+ if (batchService.getCountByExamAndSubject(examId, subjectCode) > 0) {
|
|
|
throw new ParameterException("已开始扫描不能清空");
|
|
|
}
|
|
|
|
|
@@ -1038,6 +1044,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
|
wrapper.eq(StudentEntity::getExamId, examId);
|
|
|
wrapper.eq(StudentEntity::getSubjectCode, subjectCode);
|
|
|
baseMapper.delete(wrapper);
|
|
|
+ examRoomService.clearByExamAndSubject(examId, subjectCode);
|
|
|
|
|
|
}
|
|
|
|