|
@@ -8,7 +8,6 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.Set;
|
|
|
|
|
|
-import cn.com.qmth.scancentral.service.*;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.apache.commons.lang.math.RandomUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -44,7 +43,6 @@ import cn.com.qmth.scancentral.entity.PaperPageEntity;
|
|
|
import cn.com.qmth.scancentral.entity.ScannerEntity;
|
|
|
import cn.com.qmth.scancentral.entity.StudentEntity;
|
|
|
import cn.com.qmth.scancentral.entity.StudentPaperEntity;
|
|
|
-import cn.com.qmth.scancentral.entity.SubjectEntity;
|
|
|
import cn.com.qmth.scancentral.enums.BatchStatus;
|
|
|
import cn.com.qmth.scancentral.enums.CheckStatus;
|
|
|
import cn.com.qmth.scancentral.enums.LockType;
|
|
@@ -52,6 +50,19 @@ import cn.com.qmth.scancentral.enums.Role;
|
|
|
import cn.com.qmth.scancentral.enums.VerifyStatus;
|
|
|
import cn.com.qmth.scancentral.exception.NotFoundExceptions;
|
|
|
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.support.TaskLock;
|
|
|
import cn.com.qmth.scancentral.support.TaskLockUtil;
|
|
|
import cn.com.qmth.scancentral.util.PageUtil;
|
|
@@ -118,9 +129,6 @@ public class BatchServiceImpl extends ServiceImpl<BatchDao, BatchEntity> impleme
|
|
|
@Autowired
|
|
|
private FilePropertyService filePropertyService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private SubjectService subjectService;
|
|
|
-
|
|
|
@Autowired
|
|
|
private AssignedCheckHistoryService assignedCheckHistoryService;
|
|
|
|
|
@@ -334,10 +342,13 @@ public class BatchServiceImpl extends ServiceImpl<BatchDao, BatchEntity> impleme
|
|
|
if (!exam.getAllowUnexistPaper() && domain.getPapers().size() != answerCard.getPaperCount()) {
|
|
|
throw new ParameterException("卡格式张数不一致");
|
|
|
}
|
|
|
-// List<String> paperTypeBarcodeContents = markSiteService.findPaperTypeBarcodeContentByExamAndSubjectCode(student.getExamId(), student.getSubjectCode());
|
|
|
-// if (paperTypeBarcodeContents == null || paperTypeBarcodeContents.isEmpty()) {
|
|
|
-// paperTypeBarcodeContents = exam.getPaperTypeBarcodeContent();
|
|
|
-// }
|
|
|
+ // List<String> paperTypeBarcodeContents =
|
|
|
+ // markSiteService.findPaperTypeBarcodeContentByExamAndSubjectCode(student.getExamId(),
|
|
|
+ // student.getSubjectCode());
|
|
|
+ // if (paperTypeBarcodeContents == null ||
|
|
|
+ // paperTypeBarcodeContents.isEmpty()) {
|
|
|
+ // paperTypeBarcodeContents = exam.getPaperTypeBarcodeContent();
|
|
|
+ // }
|
|
|
|
|
|
boolean studentAssigned = false;
|
|
|
List<StudentPaperEntity> studentPaperList = new ArrayList<>();
|
|
@@ -357,7 +368,7 @@ public class BatchServiceImpl extends ServiceImpl<BatchDao, BatchEntity> impleme
|
|
|
paper.setAssigned(answerPaper.getAssigned());
|
|
|
// 保存paper与page到数据库
|
|
|
paperService.savePaperAndPages(paper, answerPaper.buildPageList(null));
|
|
|
- // 记录paper与batch关联关系
|
|
|
+ // 记录paper与batch关联关系
|
|
|
batchPaperService.update(batch, paper, student.getId(), paperNumber, false);
|
|
|
// 创建student与paper的关联关系
|
|
|
studentPaperList.add(new StudentPaperEntity(student.getId(), paperNumber, paper.getId()));
|