|
@@ -293,9 +293,6 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
PaperPageEntity page = paperPageService.findPaperIdAndIndex(paper.getId(), 1);
|
|
PaperPageEntity page = paperPageService.findPaperIdAndIndex(paper.getId(), 1);
|
|
List<String> paperTypeBarcodeContents = markSiteService
|
|
List<String> paperTypeBarcodeContents = markSiteService
|
|
.findPaperTypeBarcodeContentByExamAndSubjectCode(student.getExamId(), student.getSubjectCode());
|
|
.findPaperTypeBarcodeContentByExamAndSubjectCode(student.getExamId(), student.getSubjectCode());
|
|
- if (paperTypeBarcodeContents == null || paperTypeBarcodeContents.isEmpty()) {
|
|
|
|
- paperTypeBarcodeContents = exam.getPaperTypeBarcodeContent();
|
|
|
|
- }
|
|
|
|
if (page.getPaperType() == null || page.getPaperType().getResult().length() == 0
|
|
if (page.getPaperType() == null || page.getPaperType().getResult().length() == 0
|
|
|| page.getPaperType().getResult().equals("#")) {
|
|
|| page.getPaperType().getResult().equals("#")) {
|
|
student.setPaperType("#");
|
|
student.setPaperType("#");
|
|
@@ -1119,12 +1116,8 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
// if (domain.getPapers().size() != answerCard.getPaperCount()) {
|
|
// if (domain.getPapers().size() != answerCard.getPaperCount()) {
|
|
// throw new ParameterException("卡格式张数不一致");
|
|
// throw new ParameterException("卡格式张数不一致");
|
|
// }
|
|
// }
|
|
- ExamEntity exam = examService.getById(student.getExamId());
|
|
|
|
- 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());
|
|
concurrentService.getReadWriteLock(LockType.STUDENT + "-" + student.getId()).writeLock().lock();
|
|
concurrentService.getReadWriteLock(LockType.STUDENT + "-" + student.getId()).writeLock().lock();
|
|
try {
|
|
try {
|
|
List<StudentPaperEntity> studentPaperList = studentPaperService.findByStudentId(student.getId());
|
|
List<StudentPaperEntity> studentPaperList = studentPaperService.findByStudentId(student.getId());
|
|
@@ -1285,8 +1278,10 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
if (exam == null) {
|
|
if (exam == null) {
|
|
throw new ParameterException("未找到考试");
|
|
throw new ParameterException("未找到考试");
|
|
}
|
|
}
|
|
- if (CollectionUtils.isEmpty(exam.getPaperTypeBarcodeContent())) {
|
|
|
|
- throw new ParameterException("该考试条码值未设置");
|
|
|
|
|
|
+ List<String> paperTypeBarcodeContents = markSiteService
|
|
|
|
+ .findPaperTypeBarcodeContentByExamAndSubjectCode(query.getExamId(), query.getSubjectCode());
|
|
|
|
+ if (CollectionUtils.isEmpty(paperTypeBarcodeContents)) {
|
|
|
|
+ throw new ParameterException("该科目条码值未设置");
|
|
}
|
|
}
|
|
if (!ExamMode.CET.equals(exam.getMode())) {
|
|
if (!ExamMode.CET.equals(exam.getMode())) {
|
|
throw new ParameterException("该考试不是CET");
|
|
throw new ParameterException("该考试不是CET");
|
|
@@ -1307,8 +1302,8 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
Map<Long, List<PaperPageCetVo>> totalpagesmap = ofPage(totalpages);
|
|
Map<Long, List<PaperPageCetVo>> totalpagesmap = ofPage(totalpages);
|
|
Map<Long, List<PaperCetVo>> totalpapersmap = ofPaper(totalpapers);
|
|
Map<Long, List<PaperCetVo>> totalpapersmap = ofPaper(totalpapers);
|
|
for (ExportCetVo vo : dataList) {
|
|
for (ExportCetVo vo : dataList) {
|
|
- disposeStudent(vo, exam, totalpagesmap.get(vo.getId()), totalpapersmap.get(vo.getId()),
|
|
|
|
- imageTransferDir, structs, cardMap);
|
|
|
|
|
|
+ disposeStudent(vo, paperTypeBarcodeContents, totalpagesmap.get(vo.getId()),
|
|
|
|
+ totalpapersmap.get(vo.getId()), imageTransferDir, structs, cardMap);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -1317,11 +1312,11 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
return iPage.getRecords();
|
|
return iPage.getRecords();
|
|
}
|
|
}
|
|
|
|
|
|
- private void disposeStudent(ExportCetVo student, ExamEntity exam, List<PaperPageCetVo> pages,
|
|
|
|
|
|
+ private void disposeStudent(ExportCetVo student, List<String> paperTypeBarcodeContents, List<PaperPageCetVo> pages,
|
|
List<PaperCetVo> papers, String imageTransferDir, Map<String, List<QuestionEntity>> structs,
|
|
List<PaperCetVo> papers, String imageTransferDir, Map<String, List<QuestionEntity>> structs,
|
|
Map<Integer, AnswerCardEntity> cardMap) {
|
|
Map<Integer, AnswerCardEntity> cardMap) {
|
|
- int subject = Integer.valueOf(student.getSubjectCode());
|
|
|
|
- if (subject > 2) {
|
|
|
|
|
|
+ int subjectCodeVal = Integer.valueOf(student.getSubjectCode());
|
|
|
|
+ if (subjectCodeVal > 2) {
|
|
if (student.getExamStatus().equals(ExamStatus.ABSENT)) {
|
|
if (student.getExamStatus().equals(ExamStatus.ABSENT)) {
|
|
student.setPaperType("000000");
|
|
student.setPaperType("000000");
|
|
} else {
|
|
} else {
|
|
@@ -1331,7 +1326,7 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
if (StringUtils.isBlank(student.getPaperType()) || "#".equals(student.getPaperType())) {
|
|
if (StringUtils.isBlank(student.getPaperType()) || "#".equals(student.getPaperType())) {
|
|
student.setPaperType("000000");
|
|
student.setPaperType("000000");
|
|
} else if ("?".equals(student.getPaperType())
|
|
} else if ("?".equals(student.getPaperType())
|
|
- || !exam.getPaperTypeBarcodeContent().contains(student.getPaperType())) {
|
|
|
|
|
|
+ || !paperTypeBarcodeContents.contains(student.getPaperType())) {
|
|
student.setPaperType("999999");
|
|
student.setPaperType("999999");
|
|
}
|
|
}
|
|
}
|
|
}
|