|
@@ -163,7 +163,8 @@ public class CreatePdfUtil {
|
|
|
htmlMap.put("maxSite", maxSite);
|
|
|
htmlMap.put("studentCount", examStudentList.size());
|
|
|
|
|
|
- htmlMap.put("tag", tag ? "订" : null);
|
|
|
+ String tagValue = tag ? "订" : null;
|
|
|
+ htmlMap.put("tag", tagValue);
|
|
|
|
|
|
htmlMap.computeIfAbsent("basicAttachment", v -> basicAttachment);
|
|
|
htmlMap.computeIfAbsent("variablePdfList", v -> variablePdfList);
|
|
@@ -533,8 +534,11 @@ public class CreatePdfUtil {
|
|
|
}
|
|
|
examDetail.setPagesA3(PdfUtil.getPdfPages(localA3PdfFile));
|
|
|
examDetail.setPagesA4(PdfUtil.getPdfPages(localA4PdfFile));
|
|
|
-// log.info("pageA3Count:{},examDetail:{}", pageA3Count.get(), JacksonUtil.parseJson(examDetail));
|
|
|
- examDetail.setStatus(PrintMethodEnum.AUTO == basicExamRule.getPrintMethod() ? ExamDetailStatusEnum.WAITING : ExamDetailStatusEnum.READY);
|
|
|
+ if (PrintMethodEnum.AUTO == basicExamRule.getPrintMethod()) {
|
|
|
+ examDetail.setStatus(ExamDetailStatusEnum.WAITING);
|
|
|
+ } else {
|
|
|
+ examDetail.setStatus(ExamDetailStatusEnum.READY);
|
|
|
+ }
|
|
|
detailService.saveOrUpdate(examDetail);
|
|
|
if (Objects.nonNull(localA3PdfFile)) {
|
|
|
ossUtil.ossUpload(dirNameA3, localA3PdfFile, DigestUtils.md5Hex(new FileInputStream(localA3PdfFile)));
|
|
@@ -619,8 +623,10 @@ public class CreatePdfUtil {
|
|
|
studentHtml = studentHtml.replaceAll("\\$\\{paperType\\}", GoogleBarCodeUtil.createBarCode(SystemConstant.convertPaperType(examDetailCourse.getPaperType()), false));
|
|
|
}
|
|
|
Map<String, Object> map = ConvertUtil.analyzeDateAndTime(examDetail.getExamStartTime(), examDetail.getExamEndTime());
|
|
|
- studentHtml = studentHtml.replaceAll("\\$\\{examDate\\}", Objects.nonNull(map.get("date")) ? (String) map.get("date") : "");
|
|
|
- studentHtml = studentHtml.replaceAll("\\$\\{examTime\\}", Objects.nonNull(map.get("time")) ? (String) map.get("time") : "");
|
|
|
+ String examDate = Objects.nonNull(map.get("date")) ? (String) map.get("date") : "";
|
|
|
+ String examTime = Objects.nonNull(map.get("time")) ? (String) map.get("time") : "";
|
|
|
+ studentHtml = studentHtml.replaceAll("\\$\\{examDate\\}", examDate);
|
|
|
+ studentHtml = studentHtml.replaceAll("\\$\\{examTime\\}", examTime);
|
|
|
studentHtml = studentHtml.replaceAll("\\$\\{ticketNumber\\}", t.getTicketNumber());
|
|
|
studentHtml = studentHtml.replaceAll("\\$\\{siteNumber\\}", t.getSiteNumber());
|
|
|
studentHtml = studentHtml.replaceAll("\\$\\{paperTypeName\\}", examDetailCourse.getPaperType());
|