zero 1 år sedan
förälder
incheckning
dc2ae861b5

+ 1 - 0
src/main/java/cn/cslg/pas/common/utils/FileUtils.java

@@ -48,6 +48,7 @@ public class FileUtils {
     public String analysisJsonFile() {
         ApplicationHome ah = new ApplicationHome(BackupUtils.class);
         File file = ah.getSource();
+//        String settingFilePath = file.getParentFile().toString() + FileUtils.FILE_SEPARATOR + "\\jsons\\" + "uploadSetting.json";
         String settingFilePath = file.getParentFile().toString() + FileUtils.FILE_SEPARATOR + "uploadSetting.json";
         BufferedReader reader = null;
         StringBuilder last = new StringBuilder();

+ 26 - 7
src/main/java/cn/cslg/pas/common/utils/PatentRightUtils.java

@@ -101,6 +101,14 @@ public class PatentRightUtils {
     }
 
     private static void getChinaRights(String content, String patentNo, ArrayList<RePatentClaim> patentRights) {
+//        if (!content.equals("") && content.contains("[1]")) {
+//            content = content.substring(content.indexOf("["));
+//        } else if (!content.equals("") && content.contains("1")) {
+//            content = content.substring(content.indexOf("1"));
+//        }
+        if (!content.equals("") && content.contains("1.") && !content.contains("[权利要求1]")) {
+            content = content.substring(content.indexOf("1."));
+        }
         String regex;
         if (content.contains("@2")) {
             regex = "@[0-9]+";
@@ -176,17 +184,28 @@ public class PatentRightUtils {
                             .setSort(i)
                             .setParentSort((Integer.parseInt(parentNum) - 1) + "");
                     patentRights.add(patentRight);
+                } else {
+                    RePatentClaim patentRight = new RePatentClaim()
+                            .setPatentNo(patentNo)
+                            .setType(1)
+                            .setContent(strs[i])
+                            .setSort(i)
+                            .setParentSort("-1");
+
+                    patentRights.add(patentRight);
                 }
 
             } else {
-                RePatentClaim patentRight = new RePatentClaim()
-                        .setPatentNo(patentNo)
-                        .setType(1)
-                        .setContent(strs[i])
-                        .setSort(i)
-                        .setParentSort("-1");
+                if (!StringUtils.isEmpty(strs[i])) {
+                    RePatentClaim patentRight = new RePatentClaim()
+                            .setPatentNo(patentNo)
+                            .setType(1)
+                            .setContent(strs[i])
+                            .setSort(i)
+                            .setParentSort("-1");
 
-                patentRights.add(patentRight);
+                    patentRights.add(patentRight);
+                }
             }
         }
 

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

@@ -446,8 +446,8 @@ public class EsValueCurveService {
                 }
                 List<Integer> ids = new ArrayList<>();
                 List<Integer> collect = productIds.stream().distinct().collect(Collectors.toList());
-                List<Product> products = productMapper.selectBatchIds(collect);
-                if (!CollectionUtils.isEmpty(products)) {
+                if (!CollectionUtils.isEmpty(collect)) {
+                    List<Product> products = productMapper.selectBatchIds(collect);
                     ids = products.stream().filter(i -> i.getTenantId().equals(tenantId)).map(BaseEntity::getId).collect(Collectors.toList());
                 }
                 map.put(patentNo, ids);

+ 1 - 1
src/main/resources/jsons/patent.json

@@ -610,7 +610,7 @@
     "ifSearch": "true",
     "ifGroup": "true",
     "ifShow": "true",
-    "ifStats": "false",
+    "ifStats": "true",
     "ifAsCondition": "true",
     "groupBy": "nation",
     "ifSort": "false"