Browse Source

印刷任务管理优化和合并pdf修改

wangliang 2 years ago
parent
commit
a3246b630b

+ 1 - 3
distributed-print-business/src/main/java/com/qmth/distributed/print/business/util/PdfUtil.java

@@ -192,9 +192,7 @@ public class PdfUtil {
         Long schoolId = SystemConstant.getHeadOrUserSchoolId();
         CommonCacheService commonCacheService = SpringContextHolder.getBean(CommonCacheService.class);
         SysConfig sysConfig = commonCacheService.addSysConfigCache(schoolId, SystemConstant.PDF_SIZE_LIST);
-        if (Objects.isNull(sysConfig)) {
-            sysConfig = commonCacheService.addSysConfigCache(SystemConstant.SYS_PDF_SIZE_LIST);
-        }
+        sysConfig = Objects.isNull(sysConfig) ? commonCacheService.addSysConfigCache(SystemConstant.SYS_PDF_SIZE_LIST) : sysConfig;
         Optional.ofNullable(sysConfig).orElseThrow(() -> ExceptionResultEnum.ERROR.exception("未配置全局pdf格式清单"));
 
         String pdfSize = sysConfig.getConfigValue().replace("8K", "A6");