|
@@ -323,9 +323,6 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
} else {
|
|
} else {
|
|
paperType = createPdfUtil.getPaperType(examPrintPlan.getDrawRule(), examTaskDetail, key);//抽取卷型
|
|
paperType = createPdfUtil.getPaperType(examPrintPlan.getDrawRule(), examTaskDetail, key);//抽取卷型
|
|
}
|
|
}
|
|
- examTaskDetail.setRelatePaperType(paperType);
|
|
|
|
- examDetailCourse.setPaperType(paperType);
|
|
|
|
-
|
|
|
|
//查询考生
|
|
//查询考生
|
|
QueryWrapper<ExamStudent> examStudentQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<ExamStudent> examStudentQueryWrapper = new QueryWrapper<>();
|
|
examStudentQueryWrapper.lambda().eq(ExamStudent::getExamDetailCourseId, examDetailCourse.getId());
|
|
examStudentQueryWrapper.lambda().eq(ExamStudent::getExamDetailCourseId, examDetailCourse.getId());
|
|
@@ -337,15 +334,35 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
List<String> paperTypes = Arrays.stream(paperType.split(",")).sorted(Comparator.comparing(String::valueOf)).collect(Collectors.toList());
|
|
List<String> paperTypes = Arrays.stream(paperType.split(",")).sorted(Comparator.comparing(String::valueOf)).collect(Collectors.toList());
|
|
int backupCount = examPrintPlan.getBackupCount() != null ? examPrintPlan.getBackupCount() : 0;
|
|
int backupCount = examPrintPlan.getBackupCount() != null ? examPrintPlan.getBackupCount() : 0;
|
|
|
|
|
|
- if (examStudentList != null && examStudentList.size() > 0) {
|
|
|
|
|
|
+ // 当前关联试卷类型
|
|
|
|
+ List<String> relatePaperTypes = new ArrayList<>();
|
|
|
|
+ if (StringUtils.isNotBlank(examTaskDetail.getRelatePaperType())) {
|
|
|
|
+ String[] strings = examTaskDetail.getRelatePaperType().split(",");
|
|
|
|
+ if (strings.length > 0) {
|
|
|
|
+ relatePaperTypes.addAll(Arrays.asList(strings));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 考生实际关联试卷类型
|
|
|
|
+ List<String> studentPaperTypes = new ArrayList<>();
|
|
|
|
+ if (examStudentList != null && !examStudentList.isEmpty()) {
|
|
AtomicInteger atomicInteger = new AtomicInteger(0);
|
|
AtomicInteger atomicInteger = new AtomicInteger(0);
|
|
for (ExamStudent t : examStudentList) {
|
|
for (ExamStudent t : examStudentList) {
|
|
int i1 = atomicInteger.getAndIncrement();
|
|
int i1 = atomicInteger.getAndIncrement();
|
|
int mod = i1 % examTaskDetail.getDrawCount();
|
|
int mod = i1 % examTaskDetail.getDrawCount();
|
|
t.setPaperType(paperTypes.get(mod));
|
|
t.setPaperType(paperTypes.get(mod));
|
|
|
|
+ if (!relatePaperTypes.contains(t.getPaperType())) {
|
|
|
|
+ relatePaperTypes.add(t.getPaperType());
|
|
|
|
+ }
|
|
|
|
+ if (!studentPaperTypes.contains(t.getPaperType())) {
|
|
|
|
+ studentPaperTypes.add(t.getPaperType());
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ examTaskDetail.setRelatePaperType(String.join(",", relatePaperTypes));
|
|
|
|
+ examDetailCourse.setPaperType(String.join(",", studentPaperTypes));
|
|
|
|
+
|
|
// 试卷数据组装
|
|
// 试卷数据组装
|
|
if (printContent.contains("PAPER")) {
|
|
if (printContent.contains("PAPER")) {
|
|
List<PaperPdfDto> paperPdfDto = createPdfUtil.getPaperPdfFile(paperType, examTaskDetail);
|
|
List<PaperPdfDto> paperPdfDto = createPdfUtil.getPaperPdfFile(paperType, examTaskDetail);
|