chendayu před 2 roky
rodič
revize
445c3461de

+ 0 - 3
PAS/src/main/java/cn/cslg/pas/common/model/BaseEntity.java

@@ -8,17 +8,14 @@ import lombok.Data;
 
 /**
  * Entity基类
- *
  */
 @Data
 @SuppressWarnings("rawtypes")
 public class BaseEntity<T extends Model> extends Model {
-
     /**
      *
      */
     private static final long serialVersionUID = -4851055162892178225L;
-
     /**
      * 唯一ID
      */

+ 11 - 6
PAS/src/main/java/cn/cslg/pas/domain/PatentRight.java

@@ -5,36 +5,41 @@ import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+
 import java.io.Serializable;
+
 import lombok.Data;
 
 /**
  * 专利权利要求
+ *
  * @TableName os_patent_right
  */
 @Data
-@TableName(value ="os_patent_right")
+@TableName(value = "os_patent_right")
 public class PatentRight extends BaseEntity<PatentRight> {
-
     /**
      * 专利ID
      */
     private Integer patentId;
-
     /**
      * 内容
      */
     private String contentOut;
-
     /**
      * 内容
      */
     private String content;
-
     /**
      * 类型
      */
     private Integer type;
-
+    /**
+     * 排序
+     */
     private Integer sort;
+    /**
+     * 父权要id
+     */
+    private Integer parentId;
 }

+ 29 - 29
PAS/src/main/java/cn/cslg/pas/service/PatentRightService.java

@@ -23,10 +23,10 @@ import java.util.regex.Pattern;
 import java.util.stream.Collectors;
 
 /**
-* @author Administrator
-* @description 针对表【os_patent_right(专利权利要求)】的数据库操作Service
-* @createDate 2022-04-16 10:09:24
-*/
+ * @author Administrator
+ * @description 针对表【os_patent_right(专利权利要求)】的数据库操作Service
+ * @createDate 2022-04-16 10:09:24
+ */
 @Service
 @RequiredArgsConstructor(onConstructor_ = {@Lazy})
 public class PatentRightService extends ServiceImpl<PatentRightMapper, PatentRight> {
@@ -96,13 +96,13 @@ public class PatentRightService extends ServiceImpl<PatentRightMapper, PatentRig
         //去掉全要开头的""
         List<Authority> list = new ArrayList<>();
         String selfContent = params.getContent();
-        if(selfContent==null){
-            selfContent="";
+        if (selfContent == null) {
+            selfContent = "";
         }
         //청구항 2. 삭제(是否删除代办)
-      //  selfContent.replaceAll("청구항(\\s)(^\\d*$+)(\\s)삭제","");
+        //  selfContent.replaceAll("청구항(\\s)(^\\d*$+)(\\s)삭제","");
         selfContent.replaceAll("''", "");
-        selfContent.replaceAll("(^\\d*$+)-(^\\d*$+)(\\.)(\\s)(canceled)","");
+        selfContent.replaceAll("(^\\d*$+)-(^\\d*$+)(\\.)(\\s)(canceled)", "");
 //        selfContent.replaceAll("(^\\d*$+)(.)(\\s)(canceled)","");
         selfContent.replaceAll("\n", " ");
 
@@ -118,9 +118,9 @@ public class PatentRightService extends ServiceImpl<PatentRightMapper, PatentRig
         Matcher m4 = p4.matcher(selfContent);
         List<Integer> integers1 = new ArrayList<>();
         while (m4.find()) {
-                integers1.add(m4.start());
-            }
-        if(integers1.size()!=0) {
+            integers1.add(m4.start());
+        }
+        if (integers1.size() != 0) {
             for (int i = integers1.size() - 1; i >= 0; i--) {
                 String str = selfContent.substring(integers1.get(i));
                 Authority authority = new Authority();
@@ -370,8 +370,8 @@ public class PatentRightService extends ServiceImpl<PatentRightMapper, PatentRig
      */
     public List<Authority> relationshipAuthority4(List<Authority> list) {
         //韩文情况下的正则表达式
-        String str1="제(\\s)(^\\d*$+)항" ;     //"제 1항에" ;
-        String str3="제(\\s)(^\\d*$+)항(\\s)또는(\\s)제(^\\d*$+)항";//제 1항 또는 제 2항에 있어서 这种情况下的正则表达式
+        String str1 = "제(\\s)(^\\d*$+)항";     //"제 1항에" ;
+        String str3 = "제(\\s)(^\\d*$+)항(\\s)또는(\\s)제(^\\d*$+)항";//제 1항 또는 제 2항에 있어서 这种情况下的正则表达式
         Pattern p = Pattern.compile(str1);
         for (int i = 0; i < list.size(); i++) {
 
@@ -385,7 +385,7 @@ public class PatentRightService extends ServiceImpl<PatentRightMapper, PatentRig
                 //找到了
                 Pattern compile = Pattern.compile(str3);
                 Matcher matcher1 = compile.matcher(list.get(i).getContent());
-                if(matcher1.find()){
+                if (matcher1.find()) {
                     String group = m.group(0);
                     String str2 = "(^\\d*$+)";
                     Pattern p1 = Pattern.compile(str1);
@@ -408,21 +408,21 @@ public class PatentRightService extends ServiceImpl<PatentRightMapper, PatentRig
                     list.get(i).setFatherID(fatherID1);
 
 
-                }else {
-                String group = m.group(0);
-                String str2 = "(^\\d*$+)";
-                Pattern p1 = Pattern.compile(str1);
-                Matcher matcher = p1.matcher(group);
-                String substring = matcher.group(0);
-                int j = Integer.parseInt(substring);
-                List<Integer> sonID = list.get(j - 1).getSonID();
-                sonID.add(list.get(i).getId());
-                list.get(j - 1).setSonID(sonID);
-                List<Integer> fatherID = list.get(i).getFatherID();
-                fatherID.add(list.get(j - 1).getId());
-                list.get(i).setFatherID(fatherID);
-                //设置为
-                list.get(i).setType(1);
+                } else {
+                    String group = m.group(0);
+                    String str2 = "(^\\d*$+)";
+                    Pattern p1 = Pattern.compile(str1);
+                    Matcher matcher = p1.matcher(group);
+                    String substring = matcher.group(0);
+                    int j = Integer.parseInt(substring);
+                    List<Integer> sonID = list.get(j - 1).getSonID();
+                    sonID.add(list.get(i).getId());
+                    list.get(j - 1).setSonID(sonID);
+                    List<Integer> fatherID = list.get(i).getFatherID();
+                    fatherID.add(list.get(j - 1).getId());
+                    list.get(i).setFatherID(fatherID);
+                    //设置为
+                    list.get(i).setType(1);
                 }
             }
         }