|
@@ -186,7 +186,6 @@ public class PdfTaskLogicServiceImpl implements PdfTaskLogicService {
|
|
|
ExamTaskDetail examTaskDetail = createPdfUtil.extractPaperType(tbTaskPdf, examDetailCourse);
|
|
|
List<ExamStudent> examStudentList = examStudentService.listByExamDetailCourseId(examDetailCourse.getId());
|
|
|
|
|
|
- List<String> relatePaperTypes = new ArrayList<>();
|
|
|
List<String> paperTypes = Arrays.stream(examTaskDetail.getPaperType().split(",")).sorted(Comparator.comparing(String::valueOf)).collect(Collectors.toList());
|
|
|
if (CollectionUtils.isNotEmpty(examStudentList)) {
|
|
|
AtomicInteger atomicInteger = new AtomicInteger(0);
|
|
@@ -194,24 +193,11 @@ public class PdfTaskLogicServiceImpl implements PdfTaskLogicService {
|
|
|
int i1 = atomicInteger.getAndIncrement();
|
|
|
int mod = i1 % paperTypes.size();
|
|
|
examStudent.setPaperType(paperTypes.get(mod));
|
|
|
- if (!relatePaperTypes.contains(examStudent.getPaperType())) {
|
|
|
- relatePaperTypes.add(examStudent.getPaperType());
|
|
|
- }
|
|
|
}
|
|
|
- } else if (examDetailCourse.getTotalSubjects() != null) {
|
|
|
- if (examDetailCourse.getTotalSubjects().intValue() - paperTypes.size() >= 0) {
|
|
|
- relatePaperTypes.addAll(paperTypes);
|
|
|
- } else {
|
|
|
- for (int i = 0; i < examDetailCourse.getTotalSubjects().intValue(); i++) {
|
|
|
- relatePaperTypes.add(paperTypes.get(i));
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- relatePaperTypes.addAll(paperTypes);
|
|
|
}
|
|
|
|
|
|
examDetailCourse.setSerialNumber(examTaskDetail.getSerialNumber());
|
|
|
- examDetailCourse.setPaperType(String.join(",", relatePaperTypes));
|
|
|
+ examDetailCourse.setPaperType(examTaskDetail.getPaperType());
|
|
|
examDetailCourseService.updateById(examDetailCourse);
|
|
|
|
|
|
examStudentService.updateBatchById(examStudentList);
|