Prechádzať zdrojové kódy

Merge branch 'dev_v3.2.0' of http://git.qmth.com.cn/wangliang/distributed-print-service into dev_v3.2.0

xiaof 2 rokov pred
rodič
commit
02c2a1915b

+ 9 - 4
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/DownloadServiceImpl.java

@@ -244,11 +244,16 @@ public class DownloadServiceImpl implements DownloadService {
                     Long cardId = paper.getCardId();
                     Long attachmentId = paper.getAttachmentId();
                     BasicAttachment basicAttachment = basicAttachmentService.getById(attachmentId);
+                    String paperName = null;
+                    String paperSuffix = null;
+                    String paperPath = null;
+                    if (Objects.nonNull(basicAttachment)){
+                        paperName = basicAttachment.getName();
+                        paperSuffix = basicAttachment.getType();
+                        JSONObject jsonObject = JSONObject.parseObject(basicAttachment.getPath());
+                        paperPath = (String) jsonObject.get(SystemConstant.PATH);
+                    }
                     String paperType = paper.getName();
-                    String paperName = basicAttachment.getName();
-                    String paperSuffix = basicAttachment.getType();
-                    JSONObject jsonObject = JSONObject.parseObject(basicAttachment.getPath());
-                    String paperPath = (String) jsonObject.get(SystemConstant.PATH);
 
                     boolean exposureStatus;
                     if (exposedPaperTypeList.contains(paperType)) {