|
@@ -108,6 +108,8 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
@Resource
|
|
|
RedisTemplate<String, Object> redisTemplate;
|
|
|
|
|
|
+ @Resource
|
|
|
+ BasicExamRuleService basicExamRuleService;
|
|
|
|
|
|
/**
|
|
|
* 创建pdf逻辑
|
|
@@ -139,6 +141,10 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
}
|
|
|
|
|
|
BasicSchool basicSchool = cacheService.schoolCache(examPrintPlan.getSchoolId());
|
|
|
+ BasicExamRule basicExamRule = basicExamRuleService.getBySchoolId(schoolId);
|
|
|
+ if (Objects.isNull(basicExamRule)) {
|
|
|
+ throw ExceptionResultEnum.ERROR.exception("考务规则为空");
|
|
|
+ }
|
|
|
|
|
|
//查询examDetail
|
|
|
QueryWrapper<ExamDetail> examDetailQueryWrapper = new QueryWrapper<>();
|
|
@@ -292,9 +298,13 @@ public class TaskLogicServiceImpl implements TaskLogicService {
|
|
|
}
|
|
|
detailCourseService.saveOrUpdateBatch(examDetailCourseList);
|
|
|
//合并pdf
|
|
|
- basicAttachmentList.add(createPdfUtil.mergePdf(tbTask, examDetail, sysUser.getId(), schoolId, variablePdfList, ordinaryPdfList, paperPdfList, examStudentPdfList, backupPaperPdfList, cardPdfList));
|
|
|
+ basicAttachmentList.add(createPdfUtil.mergePdf(basicExamRule, tbTask, examDetail, sysUser.getId(), schoolId, variablePdfList, ordinaryPdfList, paperPdfList, examStudentPdfList, backupPaperPdfList, cardPdfList));
|
|
|
}
|
|
|
}
|
|
|
+ if (PrintMethodEnum.AUTO == basicExamRule.getPrintMethod()) {
|
|
|
+ examPrintPlan.setStatus(PrintPlanStatusEnum.PRINTING);
|
|
|
+ examPrintPlanService.updateById(examPrintPlan);
|
|
|
+ }
|
|
|
map.computeIfAbsent("size", v -> examDetailList.size());
|
|
|
//最后一步删除附件
|
|
|
createPdfUtil.deleteAttachment(attachmentIds, ftlList);
|