chendayu 2 年之前
父節點
當前提交
42a668f35e

+ 8 - 5
PAS/src/main/java/cn/cslg/pas/common/model/vo/UploadParamsVO.java

@@ -124,16 +124,19 @@ public class UploadParamsVO {
      * 专利摘要附图
      */
     private PictureData pictureData;
-
     /**
-     * 文件(说明书pdf/摘要附图)
+     * 摘要附图
+     */
+    private UploadFileDTO pictureFileDTO;
+    /**
+     * 说明书公开pdf文档
      */
-    private UploadFileDTO fileDTO;
+    private UploadFileDTO pdf1FileDTO;
 
     /**
-     * 若是专利之星下载中国专利pdf,若有公开(1)和授权(2)两个pdf,则此存放授权pdf的文件信息
+     * 说明书授权pdf文档
      */
-    private UploadFileDTO fileDTO2;
+    private UploadFileDTO pdf2FileDTO;
 
 
 }

+ 2 - 2
PAS/src/main/java/cn/cslg/pas/service/PatentImageService.java

@@ -99,8 +99,8 @@ public class PatentImageService extends ServiceImpl<PatentImageMapper, PatentIma
         PatentImage patentImage = new PatentImage();
         patentImage.setStatus(1);
         patentImage.setPatentId(uploadParamsVO.getPatent().getId());
-        patentImage.setUrl(uploadParamsVO.getFileDTO().getPath());
-        patentImage.setFileName(uploadParamsVO.getFileDTO().getFileName());
+        patentImage.setUrl(uploadParamsVO.getPictureFileDTO().getPath());
+        patentImage.setFileName(uploadParamsVO.getPictureFileDTO().getFileName());
         //数据入库
         patentImage.insert();
         return patentImage.getUrl();

+ 2 - 2
PAS/src/main/java/cn/cslg/pas/service/PatentInstructionService.java

@@ -181,7 +181,7 @@ public class PatentInstructionService extends ServiceImpl<PatentInstructionMappe
         //根据专利号和pdf类型(1公开 2授权)查询该专利号是否已有公开的pdf
         List<PatentInstruction> patentInstructions = this.list(new LambdaQueryWrapper<PatentInstruction>().eq(PatentInstruction::getPatentNo, patentNo).eq(PatentInstruction::getType, 1));
         if (patentInstructions != null && patentInstructions.size() > 0) {  //若有则更新
-            patentInstruction = patentInstructions.get(0);
+            patentInstruction.setId(patentInstructions.get(0).getId());
             this.updateById(patentInstruction);
         } else {  //若没有则新增
             this.save(patentInstruction);
@@ -204,7 +204,7 @@ public class PatentInstructionService extends ServiceImpl<PatentInstructionMappe
         List<PatentInstruction> patentInstructions = this.list(new LambdaQueryWrapper<PatentInstruction>().eq(PatentInstruction::getPatentNo, patentNo).eq(PatentInstruction::getType, 2));
         //若有则更新
         if (patentInstructions != null && patentInstructions.size() > 0) {
-            patentInstruction = patentInstructions.get(0);
+            patentInstruction.setId(patentInstructions.get(0).getId());
             this.updateById(patentInstruction);
         } else {  //若没有则新增
             this.save(patentInstruction);

+ 121 - 99
PAS/src/main/java/cn/cslg/pas/service/getPatentStarPart/GetPatentStarPartService.java

@@ -119,7 +119,7 @@ public class GetPatentStarPartService {
         ArrayList<PatentInstruction> patentInstructions = new ArrayList<>();
         PatentDTO patentDTO = new PatentDTO();
 
-        String pdfUrl = "", pdfUrlOA = "", pdfUrlOC = "";
+        String pdfUrl = "", pdfUrl1 = "", pdfUrl2 = "";
         if (patentNo.contains("CN")) {
             //根据申请号调用"获得中国专利pdf"接口,获得1个或2个pdf的url地址
             String pdfUrlStr = patentStarApiService.getCnPdfApi(appNo);
@@ -128,45 +128,60 @@ public class GetPatentStarPartService {
             }
             if (pdfUrlStr.contains("|http")) {  //若包含公开和授权两个pdf
                 String[] pdfUrlArr = pdfUrlStr.split("\\|http");
-                pdfUrlOA = pdfUrlArr[0].substring(pdfUrlArr[0].indexOf("http"), pdfUrlArr[0].indexOf("0A_CN_0.pdf") + 11);
-                pdfUrlArr[1] = "|http" + pdfUrlArr[1];
-                pdfUrlOC = pdfUrlArr[1].substring(pdfUrlArr[1].indexOf("http"), pdfUrlArr[1].indexOf("0C_CN_0.pdf") + 11);
-            } else if (pdfUrlStr.contains("0A_CN_0.pdf")) {  //若只有一个且是OA
-                pdfUrlOA = pdfUrlStr.substring(pdfUrlStr.indexOf("http"), pdfUrlStr.indexOf("0A_CN_0.pdf") + 11);
-            } else if (pdfUrlStr.contains("0C_CN_0.pdf")) {  //若只有一个且是OC
-                pdfUrlOC = pdfUrlStr.substring(pdfUrlStr.indexOf("http"), pdfUrlStr.indexOf("0C_CN_0.pdf") + 11);
-            }
-
-            //公开pdf文档
-            if (!pdfUrlOA.equals("")) {
-                PatentInstruction patentInstruction = new PatentInstruction();
-                patentInstruction.setUrl(pdfUrlOA);
-                patentInstruction.setType(1);
-                patentInstructions.add(patentInstruction);
-            }
-            //授权pdf文档
-            if (!pdfUrlOC.equals("")) {
+                pdfUrl1 = pdfUrlArr[0].substring(pdfUrlArr[0].indexOf("http"), pdfUrlArr[0].indexOf("?"));
+                pdfUrlArr[1] = "http" + pdfUrlArr[1];
+                pdfUrl2 = pdfUrlArr[1].substring(pdfUrlArr[1].indexOf("http"), pdfUrlArr[1].indexOf("?"));
+                if (pdfUrl1.contains("0A_CN_0.pdf")) {
+                    PatentInstruction patentInstruction = new PatentInstruction();
+                    patentInstruction.setUrl(pdfUrl1);
+                    patentInstruction.setType(1);
+                    patentInstructions.add(patentInstruction);
+                    PatentInstruction patentInstruction2 = new PatentInstruction();
+                    patentInstruction2.setUrl(pdfUrl2);
+                    patentInstruction2.setType(2);
+                    patentInstructions.add(patentInstruction2);
+                } else {
+                    PatentInstruction patentInstruction = new PatentInstruction();
+                    patentInstruction.setUrl(pdfUrl2);
+                    patentInstruction.setType(1);
+                    patentInstructions.add(patentInstruction);
+                    PatentInstruction patentInstruction2 = new PatentInstruction();
+                    patentInstruction2.setUrl(pdfUrl1);
+                    patentInstruction2.setType(2);
+                    patentInstructions.add(patentInstruction2);
+                }
+            } else {  //若只有一个
+                pdfUrl1 = pdfUrlStr.substring(pdfUrlStr.indexOf("http"), pdfUrlStr.indexOf("?"));
                 PatentInstruction patentInstruction = new PatentInstruction();
-                patentInstruction.setUrl(pdfUrlOC);
-                patentInstruction.setType(2);
+                patentInstruction.setUrl(pdfUrl1);
+                if (pdfUrl1.contains("0A_CN_0.pdf")) {
+                    patentInstruction.setType(1);
+                } else {
+                    patentInstruction.setType(2);
+                }
                 patentInstructions.add(patentInstruction);
+
             }
-            patentDTO.setPdf(patentInstructions);
-            return patentDTO;
+
         } else {
             //根据专利号调用"获得世界专利pdf"接口,获得pdf的url地址
             pdfUrl = patentStarApiService.getEnPdfApi(patentNo);
             if (pdfUrl.equals("")) {
                 return new PatentDTO();
             }
+            if (pdfUrl.contains("?Expire")) {
+                //pdfUrl = pdfUrl.substring(pdfUrl.indexOf("http"), pdfUrl.indexOf("?Expire"));
+                return patentDTO;
+            }
             PatentInstruction patentInstruction = new PatentInstruction();
             patentInstruction.setUrl(pdfUrl);
             patentInstruction.setType(1);
             patentInstructions.add(patentInstruction);
-            patentDTO.setPdf(patentInstructions);
-            return patentDTO;
+
         }
 
+        patentDTO.setPdf(patentInstructions);
+        return patentDTO;
     }
 
     /**
@@ -209,90 +224,97 @@ public class GetPatentStarPartService {
                 .setCurrent(current)
                 .setSize(size);
 
-        //以下 ↓装载的是调用"获得同族专利"接口返回的专利相关数据
-        String familyPatentNoStr = patentStarApiService.getFamilyByPubNoApi(patentNo);
-        //若没有同族号,则返回空集合(表示该公开号暂无同族)
-        if (familyPatentNoStr.equals("no data")) {
-            pageVO.setRecords(new ArrayList<>())
-                    .setTotal(0);
-            patentDTO.setFamilyPatentResult(pageVO);
-            return patentDTO;
-        }
+        try {
+            //以下 ↓装载的是调用"获得同族专利"接口返回的专利相关数据
+            String familyPatentNoStr = patentStarApiService.getFamilyByPubNoApi(patentNo);
+            //若没有同族号,则返回空集合(表示该公开号暂无同族)
+            if (familyPatentNoStr.equals("no data")) {
+                pageVO.setRecords(new ArrayList<>())
+                        .setTotal(0);
+                patentDTO.setFamilyPatentResult(pageVO);
+                return patentDTO;
+            }
 
-        FamilyPatentNo familyPatentNo = JSON.parseObject(familyPatentNoStr, FamilyPatentNo.class);
-        //familyPNStr:以分号;拼接的多个同族公开号字符串
-        String familyPNStr = familyPatentNo.getFamilyinfo();
-        List<String> familyPatentNos = Arrays.asList(familyPNStr.split(";"));
-
-        //集合转成字符串
-        String conditions = "PN=(" + StringUtils.join(familyPatentNos, " OR ") + ")";
-
-        //调用一般接口返回这些同族号专利的著录相关数据(标题、申请人、权利人、摘要附图)
-        PatentStarListDto patentStarListDto = new PatentStarListDto()
-                .setCurrentQuery(conditions)
-                .setOrderBy("ID")
-                .setOrderByType("DESC")
-                .setPageNum(current)
-                .setRowCount(size)
-                .setDBType("CN");
-        Map<String, Object> resultMap = patentStarApiService.patentStarSearchApi(patentStarListDto);
-        if (resultMap == null || (Integer) resultMap.get("total") == 0) {
-            patentStarListDto.setDBType("WD");
-            resultMap = patentStarApiService.patentStarSearchApi(patentStarListDto);
+            FamilyPatentNo familyPatentNo = JSON.parseObject(familyPatentNoStr, FamilyPatentNo.class);
+            //familyPNStr:以分号;拼接的多个同族公开号字符串
+            String familyPNStr = familyPatentNo.getFamilyinfo();
+            List<String> familyPatentNos = Arrays.asList(familyPNStr.split(";"));
+
+            //集合转成字符串
+            String conditions = "PN=(" + StringUtils.join(familyPatentNos, " OR ") + ")";
+
+            //调用一般接口返回这些同族号专利的著录相关数据(标题、申请人、权利人、摘要附图)
+            PatentStarListDto patentStarListDto = new PatentStarListDto()
+                    .setCurrentQuery(conditions)
+                    .setOrderBy("ID")
+                    .setOrderByType("DESC")
+                    .setPageNum(current)
+                    .setRowCount(size)
+                    .setDBType("CN");
+            Map<String, Object> resultMap = patentStarApiService.patentStarSearchApi(patentStarListDto);
             if (resultMap == null || (Integer) resultMap.get("total") == 0) {
-                ThrowException.throwXiaoShiException("发生未知错误,一般接口未检索出专利");
+                patentStarListDto.setDBType("WD");
+                resultMap = patentStarApiService.patentStarSearchApi(patentStarListDto);
+                if (resultMap == null || (Integer) resultMap.get("total") == 0) {
+                    ThrowException.throwXiaoShiException("发生未知错误,一般接口未检索出专利");
+                }
             }
-        }
 
-        List<StarPatentVO> patents = (List<StarPatentVO>) resultMap.get("records");
-        int total = patents.size();
+            List<StarPatentVO> patents = (List<StarPatentVO>) resultMap.get("records");
+            int total = patents.size();
 
-        //防止下标越界的判断(即判断所需当前页是否有数据)
-        if ((current - 1) * size >= total) {
-            pageVO.setRecords(new ArrayList<>())
-                    .setTotal(familyPatentNos.size());
-            patentDTO.setFamilyPatentResult(pageVO);
-            return patentDTO;
-        }
+            //防止下标越界的判断(即判断所需当前页是否有数据)
+            if ((current - 1) * size >= total) {
+                pageVO.setRecords(new ArrayList<>())
+                        .setTotal(familyPatentNos.size());
+                patentDTO.setFamilyPatentResult(pageVO);
+                return patentDTO;
+            }
 
-        //根据分页信息,取分页区间内的同族号
-        //familyPatentNos = pageBySubList(familyPatentNos, current, size);
-
-        List<PatentSimpleFamilyLink> records = new ArrayList<>();
-        for (StarPatentVO starPatent : patents) {
-            PatentSimpleFamilyLink patentSimpleFamilyLink = new PatentSimpleFamilyLink();
-            patentSimpleFamilyLink.setAbstractPath(starPatent.getAbstractPath());  //装载摘要附图
-            patentSimpleFamilyLink.setPatentNo(starPatent.getPatentNo());  //装载公开号
-            patentSimpleFamilyLink.setName(starPatent.getName());  //装载标题
-            //装载申请人和权利人
-            ArrayList<PatentApplicant> patentApplicants = new ArrayList<>();
-            //装载申请人
-            if (starPatent.getApplicantStr() != null && !starPatent.getApplicantStr().equals("")) {
-                List<String> patentApplicantOriginalNames = Arrays.asList(starPatent.getApplicantStr().split(";"));
-                for (String patentApplicantOriginalName : patentApplicantOriginalNames) {
-                    PatentApplicant patentApplicant = new PatentApplicant();
-                    patentApplicant.setName(patentApplicantOriginalName);
-                    patentApplicant.setDataType(1);
-                    patentApplicants.add(patentApplicant);  //装载申请人
+            //根据分页信息,取分页区间内的同族号
+            //familyPatentNos = pageBySubList(familyPatentNos, current, size);
+
+            List<PatentSimpleFamilyLink> records = new ArrayList<>();
+            for (StarPatentVO starPatent : patents) {
+                PatentSimpleFamilyLink patentSimpleFamilyLink = new PatentSimpleFamilyLink();
+                patentSimpleFamilyLink.setAbstractPath(starPatent.getAbstractPath());  //装载摘要附图
+                patentSimpleFamilyLink.setPatentNo(starPatent.getPatentNo());  //装载公开号
+                patentSimpleFamilyLink.setName(starPatent.getName());  //装载标题
+                //装载申请人和权利人
+                ArrayList<PatentApplicant> patentApplicants = new ArrayList<>();
+                //装载申请人
+                if (starPatent.getApplicantStr() != null && !starPatent.getApplicantStr().equals("")) {
+                    List<String> patentApplicantOriginalNames = Arrays.asList(starPatent.getApplicantStr().split(";"));
+                    for (String patentApplicantOriginalName : patentApplicantOriginalNames) {
+                        PatentApplicant patentApplicant = new PatentApplicant();
+                        patentApplicant.setName(patentApplicantOriginalName);
+                        patentApplicant.setDataType(1);
+                        patentApplicants.add(patentApplicant);  //装载申请人
+                    }
                 }
-            }
-            //装载权利人
-            if (starPatent.getCurrentApplicantStr() != null && !starPatent.getCurrentApplicantStr().equals("")) {
-                List<String> patentApplicantCurrentNames = (Arrays.asList(starPatent.getCurrentApplicantStr().split(";")));
-                for (String patentApplicantCurrentName : patentApplicantCurrentNames) {
-                    PatentApplicant patentApplicant = new PatentApplicant();
-                    patentApplicant.setName(patentApplicantCurrentName);
-                    patentApplicant.setDataType(2);
-                    patentApplicants.add(patentApplicant);  //装载权利人
+                //装载权利人
+                if (starPatent.getCurrentApplicantStr() != null && !starPatent.getCurrentApplicantStr().equals("")) {
+                    List<String> patentApplicantCurrentNames = (Arrays.asList(starPatent.getCurrentApplicantStr().split(";")));
+                    for (String patentApplicantCurrentName : patentApplicantCurrentNames) {
+                        PatentApplicant patentApplicant = new PatentApplicant();
+                        patentApplicant.setName(patentApplicantCurrentName);
+                        patentApplicant.setDataType(2);
+                        patentApplicants.add(patentApplicant);  //装载权利人
+                    }
                 }
+                patentSimpleFamilyLink.setApplicant(patentApplicants);
+                records.add(patentSimpleFamilyLink);
             }
-            patentSimpleFamilyLink.setApplicant(patentApplicants);
-            records.add(patentSimpleFamilyLink);
-        }
 
-        pageVO.setRecords(records)
-                .setTotal(total);
-        patentDTO.setFamilyPatentResult(pageVO);
+            pageVO.setRecords(records)
+                    .setTotal(total);
+            patentDTO.setFamilyPatentResult(pageVO);
+        } catch (Exception e) {
+            pageVO.setRecords(new ArrayList<>())
+                    .setTotal(0);
+            patentDTO.setFamilyPatentResult(pageVO);
+            return patentDTO;
+        }
 
         return patentDTO;
     }

+ 29 - 28
PAS/src/main/java/cn/cslg/pas/service/upLoadPatent/ExcutePatentDataStar.java

@@ -624,7 +624,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
             }
 
         } catch (Exception e) {
-            //e.printStackTrace();
+
         }
 
         //以下 ↓装载的是调用"获得同族专利"接口返回的专利相关数据
@@ -665,8 +665,9 @@ public class ExcutePatentDataStar implements IExcutePatentData {
                     }
                 }
             }
+
         } catch (Exception e) {
-            e.printStackTrace();
+
         }
 
         //以下 ↓装载的是调用"获得中国专利法律状态"接口返回的专利相关数据
@@ -708,8 +709,9 @@ public class ExcutePatentDataStar implements IExcutePatentData {
                     uploadParamsVO.setPatentAffair(patentAffair);
                 }
             }
+
         } catch (Exception e) {
-            e.printStackTrace();
+
         }
 
     }
@@ -836,7 +838,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
      * @param uploadParamsVO 专利实体类对象
      */
     public void setPatentInstructionPDF(StarPatentVO starPatent, UploadParamsVO uploadParamsVO) throws IOException {
-        String pdfUrl = "", pdfUrlOA = "", pdfUrlOC = "";
+        String pdfUrl = "", pdfUrl1 = "", pdfUrl2 = "";
         if ((starPatent.getPatentNo() != null && !starPatent.getPatentNo().equals("")) || (starPatent.getApplicationNo() != null && !starPatent.getApplicationNo().equals(""))) {
             //根据申请号调用"获得中国专利pdf"接口,获得1个或2个pdf的url地址
             if (starPatent.getPatentNo().contains("CN")) {
@@ -850,37 +852,36 @@ public class ExcutePatentDataStar implements IExcutePatentData {
                 }
                 if (pdfUrlStr.contains("|http")) {  //若包含公开和授权两个pdf
                     String[] pdfUrlArr = pdfUrlStr.split("\\|http");
-                    pdfUrlOA = pdfUrlArr[0].substring(pdfUrlArr[0].indexOf("http"), pdfUrlArr[0].indexOf("0A_CN_0.pdf") + 11);
-                    pdfUrlArr[1] = "|http" + pdfUrlArr[1];
-                    pdfUrlOC = pdfUrlArr[1].substring(pdfUrlArr[1].indexOf("http"), pdfUrlArr[1].indexOf("0C_CN_0.pdf") + 11);
-                } else if (pdfUrlStr.contains("0A_CN_0.pdf")) {  //若只有一个且是OA
-                    pdfUrlOA = pdfUrlStr.substring(pdfUrlStr.indexOf("http"), pdfUrlStr.indexOf("0A_CN_0.pdf") + 11);
-                } else if (pdfUrlStr.contains("0C_CN_0.pdf")) {  //若只有一个且是OC
-                    pdfUrlOC = pdfUrlStr.substring(pdfUrlStr.indexOf("http"), pdfUrlStr.indexOf("0C_CN_0.pdf") + 11);
-                    //外国专利检索世界pdf接口
+                    pdfUrl1 = pdfUrlArr[0].substring(pdfUrlArr[0].indexOf("http"), pdfUrlArr[0].indexOf("?"));
+                    pdfUrlArr[1] = "http" + pdfUrlArr[1];
+                    pdfUrl2 = pdfUrlArr[1].substring(pdfUrlArr[1].indexOf("http"), pdfUrlArr[1].indexOf("?"));
+                    UploadFileDTO fileDTO = downLoadPdf(pdfUrl1);
+                    UploadFileDTO fileDTO2 = downLoadPdf(pdfUrl2);
+                    if (pdfUrl1.contains("0A_CN_0.pdf")) {
+                        uploadParamsVO.setPdf1FileDTO(fileDTO);
+                        uploadParamsVO.setPdf2FileDTO(fileDTO2);
+                    } else {
+                        uploadParamsVO.setPdf1FileDTO(fileDTO2);
+                        uploadParamsVO.setPdf2FileDTO(fileDTO);
+                    }
+                } else {  //若只有一个
+                    pdfUrl1 = pdfUrlStr.substring(pdfUrlStr.indexOf("http"), pdfUrlStr.indexOf("?"));
+                    UploadFileDTO fileDTO = downLoadPdf(pdfUrl1);
+                    if (pdfUrl1.contains("0A_CN_0.pdf")) {
+                        uploadParamsVO.setPdf1FileDTO(fileDTO);
+                    } else {
+                        uploadParamsVO.setPdf2FileDTO(fileDTO);
+                    }
                 }
+
                 //根据专利号调用"获得世界专利pdf"接口,获得pdf的url地址
             } else {
                 pdfUrl = patentStarApiService.getEnPdfApi(starPatent.getPatentNo());
                 if (pdfUrl.equals("")) {
                     return;
                 }
-            }
-
-            if (!pdfUrl.equals("")) {
                 UploadFileDTO fileDTO = downLoadPdf(pdfUrl);
-                uploadParamsVO.setFileDTO(fileDTO);
-            } else if (!pdfUrlOA.equals("") && !pdfUrlOC.equals("")) {
-                UploadFileDTO fileDTO = downLoadPdf(pdfUrlOA);
-                uploadParamsVO.setFileDTO(fileDTO);
-                UploadFileDTO fileDTO2 = downLoadPdf(pdfUrlOC);
-                uploadParamsVO.setFileDTO2(fileDTO2);
-            } else if (!pdfUrlOA.equals("")) {
-                UploadFileDTO fileDTO = downLoadPdf(pdfUrlOA);
-                uploadParamsVO.setFileDTO(fileDTO);
-            } else if (!pdfUrlOC.equals("")) {
-                UploadFileDTO fileDTO2 = downLoadPdf(pdfUrlOC);
-                uploadParamsVO.setFileDTO2(fileDTO2);
+                uploadParamsVO.setPdf1FileDTO(fileDTO);
             }
 
         }
@@ -923,7 +924,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
         fis.close();
         MultipartFile multipartFile = new CommonsMultipartFile(item);
         UploadFileDTO fileDTO = fileUtils.uploadFile(multipartFile);
-        uploadParamsVO.setFileDTO(fileDTO);
+        uploadParamsVO.setPictureFileDTO(fileDTO);
 
     }
 

+ 6 - 6
PAS/src/main/java/cn/cslg/pas/service/upLoadPatent/PantentQueueService.java

@@ -481,12 +481,12 @@ public class PantentQueueService {
             try {
                 if (patentInstructionPDFQueueList.size() > 0) {
                     queueData = patentInstructionPDFQueueList.remove(0);
-                    if (queueData.getUploadParamsVO().getFileDTO() != null && queueData.getUploadParamsVO().getFileDTO2() == null) {  //若只有公开文档pdf
-                        patentInstructionService.edit(queueData.getUploadParamsVO().getPatent().getPatentNo(), queueData.getUploadParamsVO().getFileDTO());
-                    } else if (queueData.getUploadParamsVO().getFileDTO() == null && queueData.getUploadParamsVO().getFileDTO2() != null) {  //若只有授权文档pdf
-                        patentInstructionService.edit2(queueData.getUploadParamsVO().getPatent().getPatentNo(), queueData.getUploadParamsVO().getFileDTO2());
-                    } else if (queueData.getUploadParamsVO().getFileDTO() != null && queueData.getUploadParamsVO().getFileDTO2() != null) {  //若同时有公开和授权两个文档pdf
-                        patentInstructionService.edit12(queueData.getUploadParamsVO().getPatent().getPatentNo(), queueData.getUploadParamsVO().getFileDTO(), queueData.getUploadParamsVO().getFileDTO2());
+                    if (queueData.getUploadParamsVO().getPdf1FileDTO() != null && queueData.getUploadParamsVO().getPdf2FileDTO() == null) {  //若只有公开文档pdf
+                        patentInstructionService.edit(queueData.getUploadParamsVO().getPatent().getPatentNo(), queueData.getUploadParamsVO().getPdf1FileDTO());
+                    } else if (queueData.getUploadParamsVO().getPdf1FileDTO() == null && queueData.getUploadParamsVO().getPdf2FileDTO() != null) {  //若只有授权文档pdf
+                        patentInstructionService.edit2(queueData.getUploadParamsVO().getPatent().getPatentNo(), queueData.getUploadParamsVO().getPdf2FileDTO());
+                    } else if (queueData.getUploadParamsVO().getPdf1FileDTO() != null && queueData.getUploadParamsVO().getPdf2FileDTO() != null) {  //若同时有公开和授权两个文档pdf
+                        patentInstructionService.edit12(queueData.getUploadParamsVO().getPatent().getPatentNo(), queueData.getUploadParamsVO().getPdf1FileDTO(), queueData.getUploadParamsVO().getPdf2FileDTO());
                     }
 
                     sendMessage(queueData);

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/service/upLoadPatent/UploadPatentToDBService.java

@@ -52,7 +52,7 @@ public class UploadPatentToDBService {
     public void uploadPatentImage2(UploadParamsVO uploadParamsVO) throws IOException {
         //摘要附图数据装配及入库(摘要附图表"os_patent_img")
         if (uploadParamsVO.getPatent() != null) {
-            if (uploadParamsVO.getPatent().getId() != null && uploadParamsVO.getFileDTO() != null) {
+            if (uploadParamsVO.getPatent().getId() != null && uploadParamsVO.getPictureFileDTO() != null) {
                 uploadParamsVO.getPatent().setAbstractPath(patentImageService.updatePatentImage2(uploadParamsVO));
                 //专利表"os_patent"更新数据(更新摘要附图路径)
                 patentService.updateById(uploadParamsVO.getPatent());