|
@@ -313,6 +313,15 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
.eq(ExamStudent::getExamDetailCourseId, examDetailCourse.getId());
|
|
|
List<ExamStudent> examStudentList = examStudentService.list(examStudentQueryWrapper);
|
|
|
|
|
|
+ List<String> paperTypes = Arrays.asList(paperType.split(",")).stream().sorted(Comparator.comparing(String::valueOf)).collect(Collectors.toList());
|
|
|
+ int i1 = 0;
|
|
|
+ for (ExamStudent t : examStudentList) {
|
|
|
+ int mod = i1 % examTaskDetail.getDrawCount().intValue();
|
|
|
+ String stuPaperType = paperTypes.get(mod);
|
|
|
+ t.setPaperType(stuPaperType);
|
|
|
+ i1++;
|
|
|
+ }
|
|
|
+
|
|
|
List<PaperPdfDto> paperPdfDto = null;
|
|
|
if (printContent.contains("PAPER")) {
|
|
|
paperPdfDto = createPdfUtil.getPaperPdfFile(paperType, examTaskDetail);
|
|
@@ -327,16 +336,10 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
// 备用试卷
|
|
|
list[0].addAll(backupPaperTempPdfList);
|
|
|
|
|
|
- List<String> paperTypes = Arrays.asList(paperType.split(",")).stream().sorted(Comparator.comparing(String::valueOf)).collect(Collectors.toList());
|
|
|
- int i = 0;
|
|
|
for (ExamStudent t : examStudentList) {
|
|
|
- int mod = i % examTaskDetail.getDrawCount().intValue();
|
|
|
- String stuPaperType = paperTypes.get(mod);
|
|
|
if (Objects.nonNull(pdfDto)) {
|
|
|
- createPdfUtil.getExamStudentPaperPdf(stuPaperType, paperPdfDto, paperPdfTempList);
|
|
|
+ createPdfUtil.getExamStudentPaperPdf(t.getPaperType(), paperPdfDto, paperPdfTempList);
|
|
|
}
|
|
|
- t.setPaperType(stuPaperType);
|
|
|
- i++;
|
|
|
}
|
|
|
// 试卷
|
|
|
list[2].addAll(paperPdfTempList);
|