|
@@ -1124,8 +1124,8 @@ public class PatentStarApiService {
|
|
|
pubText.setTextContent(fullText);
|
|
|
pubText.setIfOrigin(true);
|
|
|
claimList.add(pubText);
|
|
|
- } catch (DocumentException e) {
|
|
|
- e.printStackTrace();
|
|
|
+ } catch (Exception e) {
|
|
|
+// e.printStackTrace();
|
|
|
}
|
|
|
SelectClaimDTO dto = new SelectClaimDTO();
|
|
|
if (!CollectionUtils.isEmpty(claimList)) {
|
|
@@ -1235,8 +1235,8 @@ public class PatentStarApiService {
|
|
|
pubText.setTextContent(fullText);
|
|
|
pubText.setIfOrigin(true);
|
|
|
pubTextList.add(pubText);
|
|
|
- } catch (DocumentException e) {
|
|
|
- e.printStackTrace();
|
|
|
+ } catch (Exception e) {
|
|
|
+// e.printStackTrace();
|
|
|
}
|
|
|
return pubTextList;
|
|
|
}
|
|
@@ -1489,11 +1489,20 @@ public class PatentStarApiService {
|
|
|
BeanUtils.copyProperties(columnDTO, dto);
|
|
|
}
|
|
|
}
|
|
|
+ String txtGuid = "";
|
|
|
if (StringUtils.isNotEmpty(dto.getRowApplicationNo())) {
|
|
|
- String txtGuid = this.getTxtGuid(dto.getRowApplicationNo(), patentNo);
|
|
|
- dto.setTxtGuid(txtGuid);
|
|
|
+ try {
|
|
|
+ txtGuid = this.getTxtGuid(dto.getRowApplicationNo(), patentNo);
|
|
|
+ } catch (Exception ignored) {
|
|
|
+ }
|
|
|
+ }
|
|
|
+ dto.setTxtGuid(txtGuid);
|
|
|
+ List<InnerPatentPdfDTO> pdfList = null;
|
|
|
+ try {
|
|
|
+ pdfList = this.getExternalTextPdf(dto.getAppNo(), dto.getRowApplicationNo(), dto.getPublicNo(), dto.getGrantNo());
|
|
|
+ } catch (Exception e) {
|
|
|
+ pdfList = new ArrayList<>();
|
|
|
}
|
|
|
- List<InnerPatentPdfDTO> pdfList = this.getExternalTextPdf(dto.getAppNo(), dto.getRowApplicationNo(), dto.getPublicNo(), dto.getGrantNo());
|
|
|
if (!CollectionUtils.isEmpty(pdfList)) {
|
|
|
List<InnerPatentPdfDTO> pdfDTOS = new ArrayList<>();
|
|
|
for (InnerPatentPdfDTO innerPatentPdfDTO : pdfList) {
|
|
@@ -1509,6 +1518,8 @@ public class PatentStarApiService {
|
|
|
}
|
|
|
}
|
|
|
dto.setPdfDTOS(pdfDTOS);
|
|
|
+ } else {
|
|
|
+ dto.setPdfDTOS(new ArrayList<>());
|
|
|
}
|
|
|
return dto;
|
|
|
}
|
|
@@ -1543,11 +1554,13 @@ public class PatentStarApiService {
|
|
|
}
|
|
|
}
|
|
|
String result = builder.toString();
|
|
|
- byte[] bytes = result.getBytes();
|
|
|
- MultipartFile multipartFile = FileUtils.convertBytesToMultipartFile(bytes, patentNo + "-" + "文本文档.txt");
|
|
|
- List<String> list = fileManagerService.uploadFileGetGuid(Collections.singletonList(multipartFile));
|
|
|
- if (!CollectionUtils.isEmpty(list)) {
|
|
|
- return list.get(0);
|
|
|
+ if (StringUtils.isNotEmpty(result)) {
|
|
|
+ byte[] bytes = result.getBytes();
|
|
|
+ MultipartFile multipartFile = FileUtils.convertBytesToMultipartFile(bytes, patentNo + "-" + "文本文档.txt");
|
|
|
+ List<String> list = fileManagerService.uploadFileGetGuid(Collections.singletonList(multipartFile));
|
|
|
+ if (!CollectionUtils.isEmpty(list)) {
|
|
|
+ return list.get(0);
|
|
|
+ }
|
|
|
}
|
|
|
return "";
|
|
|
}
|