|
@@ -8,6 +8,7 @@ import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
+import cn.com.qmth.scancentral.service.*;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
import org.apache.commons.lang.math.RandomUtils;
|
|
import org.apache.commons.lang.math.RandomUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -51,20 +52,6 @@ import cn.com.qmth.scancentral.enums.Role;
|
|
import cn.com.qmth.scancentral.enums.VerifyStatus;
|
|
import cn.com.qmth.scancentral.enums.VerifyStatus;
|
|
import cn.com.qmth.scancentral.exception.NotFoundExceptions;
|
|
import cn.com.qmth.scancentral.exception.NotFoundExceptions;
|
|
import cn.com.qmth.scancentral.exception.ParameterExceptions;
|
|
import cn.com.qmth.scancentral.exception.ParameterExceptions;
|
|
-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.BatchPaperService;
|
|
|
|
-import cn.com.qmth.scancentral.service.BatchService;
|
|
|
|
-import cn.com.qmth.scancentral.service.ExamRoomService;
|
|
|
|
-import cn.com.qmth.scancentral.service.ExamService;
|
|
|
|
-import cn.com.qmth.scancentral.service.FilePropertyService;
|
|
|
|
-import cn.com.qmth.scancentral.service.FileService;
|
|
|
|
-import cn.com.qmth.scancentral.service.PaperPageService;
|
|
|
|
-import cn.com.qmth.scancentral.service.PaperService;
|
|
|
|
-import cn.com.qmth.scancentral.service.ScannerService;
|
|
|
|
-import cn.com.qmth.scancentral.service.StudentService;
|
|
|
|
-import cn.com.qmth.scancentral.service.SubjectService;
|
|
|
|
import cn.com.qmth.scancentral.support.TaskLock;
|
|
import cn.com.qmth.scancentral.support.TaskLock;
|
|
import cn.com.qmth.scancentral.support.TaskLockUtil;
|
|
import cn.com.qmth.scancentral.support.TaskLockUtil;
|
|
import cn.com.qmth.scancentral.util.PageUtil;
|
|
import cn.com.qmth.scancentral.util.PageUtil;
|
|
@@ -347,11 +334,11 @@ public class BatchServiceImpl extends ServiceImpl<BatchDao, BatchEntity> impleme
|
|
if (!exam.getAllowUnexistPaper() && domain.getPapers().size() != answerCard.getPaperCount()) {
|
|
if (!exam.getAllowUnexistPaper() && domain.getPapers().size() != answerCard.getPaperCount()) {
|
|
throw new ParameterException("卡格式张数不一致");
|
|
throw new ParameterException("卡格式张数不一致");
|
|
}
|
|
}
|
|
- List<String> paperTypeBarcodeContents = exam.getPaperTypeBarcodeContent();
|
|
|
|
- SubjectEntity subject = subjectService.findByExamIdAndCode(student.getExamId(), student.getSubjectCode());
|
|
|
|
- if (subject.getPaperTypeBarcodeContent() != null && !subject.getPaperTypeBarcodeContent().isEmpty()) {
|
|
|
|
- paperTypeBarcodeContents = subject.getPaperTypeBarcodeContent();
|
|
|
|
- }
|
|
|
|
|
|
+// List<String> paperTypeBarcodeContents = markSiteService.findPaperTypeBarcodeContentByExamAndSubjectCode(student.getExamId(), student.getSubjectCode());
|
|
|
|
+// if (paperTypeBarcodeContents == null || paperTypeBarcodeContents.isEmpty()) {
|
|
|
|
+// paperTypeBarcodeContents = exam.getPaperTypeBarcodeContent();
|
|
|
|
+// }
|
|
|
|
+
|
|
boolean studentAssigned = false;
|
|
boolean studentAssigned = false;
|
|
List<StudentPaperEntity> studentPaperList = new ArrayList<>();
|
|
List<StudentPaperEntity> studentPaperList = new ArrayList<>();
|
|
for (AnswerPaper answerPaper : domain.getPapers()) {
|
|
for (AnswerPaper answerPaper : domain.getPapers()) {
|
|
@@ -369,8 +356,8 @@ public class BatchServiceImpl extends ServiceImpl<BatchDao, BatchEntity> impleme
|
|
paper.setOmrExamNumber(answerPaper.getOmrExamNumber());
|
|
paper.setOmrExamNumber(answerPaper.getOmrExamNumber());
|
|
paper.setAssigned(answerPaper.getAssigned());
|
|
paper.setAssigned(answerPaper.getAssigned());
|
|
// 保存paper与page到数据库
|
|
// 保存paper与page到数据库
|
|
- paperService.savePaperAndPages(paper, answerPaper.buildPageList(paperTypeBarcodeContents));
|
|
|
|
- // 记录paper与batch关联关系
|
|
|
|
|
|
+ paperService.savePaperAndPages(paper, answerPaper.buildPageList(null));
|
|
|
|
+ // 记录paper与batch关联关系
|
|
batchPaperService.update(batch, paper, student.getId(), paperNumber, false);
|
|
batchPaperService.update(batch, paper, student.getId(), paperNumber, false);
|
|
// 创建student与paper的关联关系
|
|
// 创建student与paper的关联关系
|
|
studentPaperList.add(new StudentPaperEntity(student.getId(), paperNumber, paper.getId()));
|
|
studentPaperList.add(new StudentPaperEntity(student.getId(), paperNumber, paper.getId()));
|