lwhhszx 1 рік тому
батько
коміт
af717b3062

+ 0 - 2
src/main/java/cn/cslg/pas/service/business/CustomFieldService.java

@@ -239,8 +239,6 @@ public class CustomFieldService extends ServiceImpl<CustomFieldMapper, CustomFie
             Personnel personnel = personnels.stream().filter(item -> item.getId().equals(customFieldVO.getCreateId())).findFirst().orElse(null);
             if (personnel != null) {
                 customFieldVO.setCreateName(personnel.getPersonnelName());
-            } else {
-                throw new XiaoShiException("未获取到当前登陆人信息");
             }
         }
     }

+ 2 - 0
src/main/java/cn/cslg/pas/service/business/es/EsService.java

@@ -261,6 +261,8 @@ public class EsService {
             builder.from((current.intValue() - 1) * size.intValue()).size(size.intValue());
         }
 
+        //解除最大条数限制
+        builder.trackTotalHits(i->i.enabled(true));
         SearchResponse<Patent> response = client.search(builder.build(), Patent.class);
         List<PatentColumnDTO> list = new ArrayList<>();
         long total = 0L;

+ 3 - 3
src/main/java/cn/cslg/pas/service/common/FileManagerService.java

@@ -91,9 +91,9 @@ public class FileManagerService {
      */
     public byte[] downloadSystemFileFromFMS(String fieldId) throws IOException {
         OkHttpClient okHttpClient = new OkHttpClient.Builder()
-                .connectTimeout(60, TimeUnit.SECONDS)
-                .writeTimeout(60, TimeUnit.SECONDS)
-                .readTimeout(60, TimeUnit.SECONDS)
+                .connectTimeout(60000, TimeUnit.SECONDS)
+                .writeTimeout(60000, TimeUnit.SECONDS)
+                .readTimeout(60000, TimeUnit.SECONDS)
                 .build();
         Request request = new Request.Builder()
                 .url(FMSUrl + "/fileManager/downloadFile?fileId=" + fieldId)

+ 6 - 1
src/main/java/cn/cslg/pas/service/importPatent/GetCataloguingFromWebThread.java

@@ -104,7 +104,12 @@ public class GetCataloguingFromWebThread extends Thread {
                 if (!familyPatentNoStr.equals("no data")&&!familyPatentNoStr.trim().equals("")) {
                     FamilyPatentNo familyPatentNo = JSON.parseObject(familyPatentNoStr, FamilyPatentNo.class);
                     if (familyPatentNo != null &&!familyPatentNo.getFamilyinfo().trim().equals("")&& familyPatentNo.getFamilyinfo() != null) {
-                        familyPatentNos = Arrays.asList(familyPatentNo.getFamilyinfo().split(";"));
+                   String[] nos =     familyPatentNo.getFamilyinfo().split(";");
+                   if(nos!=null&&nos.length>0){
+                       for (String no : nos) {
+                           familyPatentNos.add(no);
+                       }
+                   }
                     }
                 }
                 familyPatentNos.add(uploadPatentWebDTO.getPatent().getAppNo());

+ 8 - 6
src/main/java/cn/cslg/pas/service/importPatent/GetPatentPDFFromWebThread.java

@@ -115,18 +115,20 @@ public class GetPatentPDFFromWebThread extends Thread {
                         }
                     }
                     //根据专利号调用"获得世界专利pdf"接口,获得pdf的url地址
-                } else {
+                }
+                }
+                else {
                     pdfUrl = patentStarApiService.getEnPdfApi(usedPatentNo);
                     //若没有取到说明书pdf,则将当前申请号和备注信息存入问题记录表,并返回空对象
 //                    if (pdfUrl.equals("") || pdfUrl.equals("{}")) {
 //                        recordQuestionPatent(starPatent.getApplicationNo(), task.getId(), 4);
 //                        return;
 //                    }
-                    String guid1 = FormatUtil.getPDFFormat(starPatentVO.getApplicationNo(), 0);
-                    File file1 = FileUtils.getFileByUrl(pdfUrl);
-                    fileManagerService.uploadFileWithGuid(file1, guid1);
-
-                }
+                    if (!pdfUrl.equals("")) {
+                        String guid1 = FormatUtil.getPDFFormat(starPatentVO.getApplicationNo(), 0);
+                        File file1 = FileUtils.getFileByUrl(pdfUrl);
+                        fileManagerService.uploadFileWithGuid(file1, guid1);
+                    }
                 }
                 taskThread.updateProcess(false,4,"");
             } catch (Exception e) {

+ 6 - 4
src/main/java/cn/cslg/pas/service/importPatent/ImportSinglePatentService.java

@@ -687,17 +687,19 @@ public class ImportSinglePatentService {
                     }
                 }
                 //根据专利号调用"获得世界专利pdf"接口,获得pdf的url地址
-            } else {
-                pdfUrl = patentStarApiService.getEnPdfApi(usedPatentNo);
-                //若没有取到说明书pdf,则将当前申请号和备注信息存入问题记录表,并返回空对象
+            }
+        }
+        else {
+            pdfUrl = patentStarApiService.getEnPdfApi(usedPatentNo);
+            //若没有取到说明书pdf,则将当前申请号和备注信息存入问题记录表,并返回空对象
 //                    if (pdfUrl.equals("") || pdfUrl.equals("{}")) {
 //                        recordQuestionPatent(starPatent.getApplicationNo(), task.getId(), 4);
 //                        return;
 //                    }
+            if (!pdfUrl.equals("")) {
                 String guid1 = FormatUtil.getPDFFormat(starPatentVO.getApplicationNo(), 0);
                 File file1 = FileUtils.getFileByUrl(pdfUrl);
                 fileManagerService.uploadFileWithGuid(file1, guid1);
-
             }
         }
     }

+ 1 - 0
src/main/java/cn/cslg/pas/service/importPatent/SavePatentToEsThread.java

@@ -143,6 +143,7 @@ public class SavePatentToEsThread extends Thread {
                     ) {
                         esCustomFieldDTO.setPatentId(patentId);
                         esCustomFieldDTO.setOptionType(2);
+                        esCustomFieldDTO.setPatentNo(patent.getPatentNo());
                         EsCustomFieldService esCustomFieldService = applicationContext.getBean(EsCustomFieldService.class);
                         esCustomFieldService.addCustomField(esCustomFieldDTO);
                     }