|
@@ -22,6 +22,7 @@ import java.util.stream.Collectors;
|
|
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
|
|
+import cn.com.qmth.scancentral.service.*;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.io.FileUtils;
|
|
|
import org.apache.commons.io.IOUtils;
|
|
@@ -96,23 +97,6 @@ import cn.com.qmth.scancentral.enums.UploadStatus;
|
|
|
import cn.com.qmth.scancentral.exception.NotFoundExceptions;
|
|
|
import cn.com.qmth.scancentral.exception.ParameterExceptions;
|
|
|
import cn.com.qmth.scancentral.model.ManualAbsentImportDTO;
|
|
|
-import cn.com.qmth.scancentral.service.AnswerCardService;
|
|
|
-import cn.com.qmth.scancentral.service.AnswerCardSubjectService;
|
|
|
-import cn.com.qmth.scancentral.service.AssignedCheckHistoryService;
|
|
|
-import cn.com.qmth.scancentral.service.AsyncTaskService;
|
|
|
-import cn.com.qmth.scancentral.service.BatchService;
|
|
|
-import cn.com.qmth.scancentral.service.ExamService;
|
|
|
-import cn.com.qmth.scancentral.service.FileService;
|
|
|
-import cn.com.qmth.scancentral.service.OmrGroupService;
|
|
|
-import cn.com.qmth.scancentral.service.OmrTaskService;
|
|
|
-import cn.com.qmth.scancentral.service.PaperPageService;
|
|
|
-import cn.com.qmth.scancentral.service.PaperService;
|
|
|
-import cn.com.qmth.scancentral.service.QuestionService;
|
|
|
-import cn.com.qmth.scancentral.service.StudentPaperService;
|
|
|
-import cn.com.qmth.scancentral.service.StudentService;
|
|
|
-import cn.com.qmth.scancentral.service.SubjectService;
|
|
|
-import cn.com.qmth.scancentral.service.ToolExportService;
|
|
|
-import cn.com.qmth.scancentral.service.UserService;
|
|
|
import cn.com.qmth.scancentral.support.SpringContextHolder;
|
|
|
import cn.com.qmth.scancentral.support.TaskLock;
|
|
|
import cn.com.qmth.scancentral.support.TaskLockUtil;
|
|
@@ -221,6 +205,9 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
|
@Autowired
|
|
|
private FileService fileService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private MarkSiteService markSiteService;
|
|
|
+
|
|
|
static {
|
|
|
int threadCount = 5;
|
|
|
exec = new ThreadPoolExecutor(threadCount, threadCount, 0L, TimeUnit.SECONDS,
|
|
@@ -302,7 +289,18 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
|
if (studentPaper.getPaperNumber() == 1) {
|
|
|
// 根据识别结果更新考生属性
|
|
|
PaperPageEntity page = paperPageService.findPaperIdAndIndex(paper.getId(), 1);
|
|
|
- student.setPaperType(page.getPaperType() != null ? page.getPaperType().getResult() : "#");
|
|
|
+ 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("#")){
|
|
|
+ student.setPaperType("#");
|
|
|
+ }else if (CollectionUtils.isNotEmpty(paperTypeBarcodeContents) && !paperTypeBarcodeContents.contains(page.getPaperType().getResult())) {
|
|
|
+ student.setPaperType("?");
|
|
|
+ }else{
|
|
|
+ student.setPaperType(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());
|
|
|
}
|