|
@@ -515,14 +515,17 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
|
|
|
createA4File(examPrintPlan, examDetail, basicSchool, ftlList, examDetailCourseList, ordinaryPdfList, variablePdfList);
|
|
|
|
|
|
- //合并pdf
|
|
|
+ //合并A3(试卷+题卡+备用试卷+备用题卡)
|
|
|
String dirNameA3 = createPdfUtil.mergeA3Pdf(paperPdfList, examStudentPdfList, backupPaperPdfList, cardPdfList);
|
|
|
+ //合并A4(签到表+卷袋贴+登记表)
|
|
|
String dirNameA4 = createPdfUtil.mergeA4Pdf(variablePdfList, ordinaryPdfList);
|
|
|
+ //合并A3(题卡+备用题卡)
|
|
|
+ String dirNameCardA3 = createPdfUtil.mergeA3Pdf(examStudentPdfList, cardPdfList);
|
|
|
|
|
|
List<PdfDto> mergePdfDeleteList = new ArrayList<>();
|
|
|
mergePdfDeleteList.addAll(examStudentPdfList);
|
|
|
mergePdfDeleteList.addAll(cardPdfList);
|
|
|
- BasicAttachment attachment = createPdfUtil.mergePdfSaveDb(dirNameA4, dirNameA3, tbTask, sysUser.getId(), examDetail, basicExamRule, mergePdfDeleteList);
|
|
|
+ BasicAttachment attachment = createPdfUtil.mergePdfSaveDb(dirNameA4, dirNameA3, dirNameCardA3, tbTask, sysUser.getId(), examDetail, basicExamRule, mergePdfDeleteList);
|
|
|
if (basicAttachmentList != null) {
|
|
|
basicAttachmentList.add(attachment);
|
|
|
}
|
|
@@ -807,7 +810,15 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
//查询examDetail
|
|
|
List<ExamDetail> examDetailList = examDetailService.listByIds(Arrays.asList(arraysParams.getIds()));
|
|
|
if (Objects.nonNull(examDetailList)) {
|
|
|
- Set<Long> attachmentIds = examDetailList.stream().map(ExamDetail::getAttachmentId).collect(Collectors.toSet());
|
|
|
+ Set<Long> attachmentIds = new HashSet<>();
|
|
|
+ Set<Long> allAttachmentIds = examDetailList.stream().map(ExamDetail::getAttachmentId).collect(Collectors.toSet());
|
|
|
+ if(!CollectionUtils.isEmpty(allAttachmentIds)){
|
|
|
+ attachmentIds.addAll(allAttachmentIds);
|
|
|
+ }
|
|
|
+ Set<Long> cardAttachmentIds = examDetailList.stream().map(ExamDetail::getCardAttachmentId).collect(Collectors.toSet());
|
|
|
+ if(!CollectionUtils.isEmpty(cardAttachmentIds)){
|
|
|
+ attachmentIds.addAll(cardAttachmentIds);
|
|
|
+ }
|
|
|
List<BasicAttachment> basicAttachmentList = basicAttachmentService.listByIds(attachmentIds);
|
|
|
|
|
|
if (Objects.nonNull(basicAttachmentList) && basicAttachmentList.size() > 0) {
|