ソースを参照

Merge remote-tracking branch 'origin/master'

lwhhszx 1 年間 前
コミット
fcaed7013d

+ 22 - 0
src/main/java/cn/cslg/pas/common/dto/PatentColumnDTO.java

@@ -44,6 +44,28 @@ public class PatentColumnDTO {
      */
     private PersonAddress applicantAddr;
 
+    //申请人地址
+    private String appAddress;
+    //申请人国家
+    private String applicantCountry;
+    //申请人省份
+    private String appProvince;
+    //申请人市
+    private String appCity;
+    //申请人县
+    private String appDistrict;
+
+    //权利人地址
+    private String rightAddress;
+    //权利人国家
+    private String rightCountry;
+    //权利人省份
+    private String rightProvince;
+    //权利人市
+    private String rightCity;
+    //权利人县
+    private String rightDistrict;
+
     /**
      * 权利人地址
      */

+ 1 - 0
src/main/java/cn/cslg/pas/common/vo/QueryFiledVO.java

@@ -19,4 +19,5 @@ public class QueryFiledVO {
     private String group;
     private String groupBy;
     private Integer filedType;
+    private Object children;
 }

+ 1 - 0
src/main/java/cn/cslg/pas/common/vo/patentCount/GetAllPatentCountVO.java

@@ -31,4 +31,5 @@ public class GetAllPatentCountVO {
     private Boolean defaultShowStats;
     private String field;
     private String groupBy;
+    private Object children;
 }

+ 10 - 5
src/main/java/cn/cslg/pas/controller/PatentController.java

@@ -191,7 +191,7 @@ public class PatentController {
         try {
             personId = mergePersonService.mergePerson(personVO);
         } catch (Exception e) {
-            return Response.success(e.getMessage());
+            return Response.error(e.getMessage());
         }
         return Response.success(personId);
     }
@@ -199,7 +199,12 @@ public class PatentController {
     @Operation(summary = "专利列表上再次新增发明人/权利人/申请人合并")
     @PostMapping("/mergePersonAgain")
     public Response mergePersonAgain(@RequestBody MergePersonAgainVO againVO) throws Exception {
-        Integer personId = mergePersonService.mergePersonAgain(againVO);
+        Integer personId = null;
+        try {
+            personId = mergePersonService.mergePersonAgain(againVO);
+        } catch (Exception e) {
+            return Response.error(e.getMessage());
+        }
         return Response.success(personId);
     }
 
@@ -210,7 +215,7 @@ public class PatentController {
         try {
             personId = mergePersonService.updateMergePerson(personVO);
         } catch (Exception e) {
-            return Response.success(e.getMessage());
+            return Response.error(e.getMessage());
         }
         return Response.success(personId);
     }
@@ -243,7 +248,7 @@ public class PatentController {
         try {
             id = mergePersonService.delMergedName(vo);
         } catch (Exception e) {
-            return Response.success(e.getMessage());
+            return Response.error(e.getMessage());
         }
         return Response.success(id);
     }
@@ -255,7 +260,7 @@ public class PatentController {
         try {
             id = mergePersonService.delMergePerson(vo);
         } catch (Exception e) {
-            return Response.success(e.getMessage());
+            return Response.error(e.getMessage());
         }
         return Response.success(id);
     }

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

@@ -278,15 +278,15 @@ public class CustomFieldService extends ServiceImpl<CustomFieldMapper, CustomFie
                 allCustomFieldVO.setType(item.getTreeType());
                 allCustomFieldVO.setSysOrder(order);
                 switch (item.getTreeType()) {
-                    case 7:
-                        Product product = productService.getById(item.getId());
+                    case 2:
+                        Product product = productService.getById(item.getFieldId());
                         allCustomFieldVO.setName(product.getName());
                         break;
-                    case 8:
-                        ProductCategory productCategory = productCategoryService.getById(item.getId());
+                    case 3:
+                        ProductCategory productCategory = productCategoryService.getById(item.getFieldId());
                         allCustomFieldVO.setName(productCategory.getName());
                         break;
-                    case 9:
+                    case 1:
                         //TODO 技术类别
                         break;
                 }

+ 9 - 4
src/main/java/cn/cslg/pas/service/business/MergePersonService.java

@@ -109,7 +109,7 @@ public class MergePersonService extends ServiceImpl<MergePersonMapper, MergePers
                 .eq(MergePerson::getProjectId, vo.getProjectId())
                 .eq(MergePerson::getName, vo.getName());
         List<MergePerson> list = mergePersonMapper.selectList(wrapper);
-        if (list.size() > 1) {
+        if (list.size() > 0) {
             throw new XiaoShiException("合并名称不可重复");
         }
 
@@ -460,7 +460,11 @@ public class MergePersonService extends ServiceImpl<MergePersonMapper, MergePers
         personVO.setAddress(vo.getAddress());
         personVO.setRemark(vo.getRemark());
         personVO.setMergedName(nameList);
-        return this.mergePerson(personVO);
+        Integer id = this.mergePerson(personVO);
+        if (id < 0) {
+            throw new XiaoShiException("再合并失败");
+        }
+        return id;
     }
 
     /**
@@ -482,9 +486,10 @@ public class MergePersonService extends ServiceImpl<MergePersonMapper, MergePers
         //判断是否名称重复
         LambdaQueryWrapper<MergePerson> wrapper = new LambdaQueryWrapper<MergePerson>()
                 .eq(MergePerson::getProjectId, vo.getProjectId())
-                .eq(MergePerson::getName, vo.getName());
+                .eq(MergePerson::getName, vo.getName())
+                .ne(BaseEntity::getId, vo.getId());
         List<MergePerson> list = mergePersonMapper.selectList(wrapper);
-        if (list.size() > 1) {
+        if (list.size() > 0) {
             throw new XiaoShiException("合并名称不可重复");
         }
         //获取老专利

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

@@ -34,6 +34,7 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import lombok.RequiredArgsConstructor;
+import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.elasticsearch.client.RequestOptions;
 import org.springframework.beans.BeanUtils;
@@ -299,6 +300,22 @@ public class EsService {
                                 columnDTO.setMergeInventor(new ArrayList<>());
                             }
                         }
+                        if (ObjectUtils.isNotEmpty(patent1.getApplicantAddr())) {
+                            PersonAddress applicantAddr = patent1.getApplicantAddr();
+                            columnDTO.setAppAddress(applicantAddr.getAddress());
+                            columnDTO.setApplicantCountry(applicantAddr.getCountry());
+                            columnDTO.setAppProvince(applicantAddr.getProvince());
+                            columnDTO.setAppCity(applicantAddr.getCity());
+                            columnDTO.setAppDistrict(applicantAddr.getDistrict());
+                        }
+                        if (ObjectUtils.isNotEmpty(patent1.getRightHolderAddr())) {
+                            PersonAddress rightAddr = patent1.getRightHolderAddr();
+                            columnDTO.setRightAddress(rightAddr.getAddress());
+                            columnDTO.setRightCountry(rightAddr.getCountry());
+                            columnDTO.setRightProvince(rightAddr.getProvince());
+                            columnDTO.setRightCity(rightAddr.getCity());
+                            columnDTO.setRightDistrict(rightAddr.getDistrict());
+                        }
                         columnDTO.setApplicant(esPatentService.loadName(patent1.getApplicant()));
                         columnDTO.setRightHolder(esPatentService.loadName(patent1.getRightHolder()));
                         columnDTO.setInventor(esPatentService.loadName(patent1.getInventor()));
@@ -332,6 +349,22 @@ public class EsService {
                         columnDTO.setMergeInventor(new ArrayList<>());
                     }
                 }
+                if (ObjectUtils.isNotEmpty(esMess.getApplicantAddr())) {
+                    PersonAddress applicantAddr = esMess.getApplicantAddr();
+                    columnDTO.setAppAddress(applicantAddr.getAddress());
+                    columnDTO.setApplicantCountry(applicantAddr.getCountry());
+                    columnDTO.setAppProvince(applicantAddr.getProvince());
+                    columnDTO.setAppCity(applicantAddr.getCity());
+                    columnDTO.setAppDistrict(applicantAddr.getDistrict());
+                }
+                if (ObjectUtils.isNotEmpty(esMess.getRightHolderAddr())) {
+                    PersonAddress rightAddr = esMess.getRightHolderAddr();
+                    columnDTO.setRightAddress(rightAddr.getAddress());
+                    columnDTO.setRightCountry(rightAddr.getCountry());
+                    columnDTO.setRightProvince(rightAddr.getProvince());
+                    columnDTO.setRightCity(rightAddr.getCity());
+                    columnDTO.setRightDistrict(rightAddr.getDistrict());
+                }
                 columnDTO.setApplicant(esPatentService.loadName(esMess.getApplicant()));
                 columnDTO.setRightHolder(esPatentService.loadName(esMess.getRightHolder()));
                 columnDTO.setInventor(esPatentService.loadName(esMess.getInventor()));

+ 138 - 46
src/main/resources/jsons/patent.json

@@ -336,8 +336,8 @@
     "field": "SFN",
     "esField": "simple_family_num",
     "esClass": "numberQueryBuilder",
-    "ifSearch": "true",
-    "ifGroup": "true",
+    "ifSearch": "false",
+    "ifGroup": "false",
     "ifShow": "true",
     "ifAsCondition": "true",
     "groupBy": "amount"
@@ -349,8 +349,8 @@
     "field": "IFN",
     "esField": "inpadoc_family_num",
     "esClass": "numberQueryBuilder",
-    "ifSearch": "true",
-    "ifGroup": "true",
+    "ifSearch": "false",
+    "ifGroup": "false",
     "ifShow": "true",
     "ifAsCondition": "true",
     "groupBy": "amount"
@@ -362,8 +362,8 @@
     "field": "PFN",
     "esField": "patsnap_family_num",
     "esClass": "numberQueryBuilder",
-    "ifSearch": "true",
-    "ifGroup": "true",
+    "ifSearch": "false",
+    "ifGroup": "false",
     "ifShow": "true",
     "ifAsCondition": "true",
     "groupBy": "amount"
@@ -375,8 +375,8 @@
     "field": "QPN",
     "esField": "quote_patent_no_num",
     "esClass": "numberQueryBuilder",
-    "ifSearch": "true",
-    "ifGroup": "true",
+    "ifSearch": "false",
+    "ifGroup": "false",
     "ifShow": "true",
     "ifAsCondition": "true",
     "groupBy": "amount"
@@ -388,8 +388,8 @@
     "field": "QDPN",
     "esField": "quoted_patent_no_num",
     "esClass": "numberQueryBuilder",
-    "ifSearch": "true",
-    "ifGroup": "true",
+    "ifSearch": "false",
+    "ifGroup": "false",
     "ifShow": "true",
     "ifAsCondition": "true",
     "groupBy": "amount"
@@ -400,7 +400,7 @@
     "value": "appAddress",
     "field": "ADD",
     "esField": "applicant_addr.address",
-    "esClass": "matchQueryBuilder",
+    "esClass": "matchPhaseQueryBuilder",
     "ifSearch": "true",
     "ifGroup": "true",
     "ifShow": "true",
@@ -484,7 +484,7 @@
     "value": "rightAddress",
     "field": "RDD",
     "esField": "right_holder_addr.address",
-    "esClass": "matchQueryBuilder",
+    "esClass": "matchPhaseQueryBuilder",
     "ifSearch": "true",
     "ifGroup": "true",
     "ifShow": "true",
@@ -549,17 +549,49 @@
   },
   {
     "name": "IPC分类号",
-    "type": "String",
-    "value": "MIPC",
+    "type": "Object",
+    "value": "mipc",
     "field": "MIPC",
     "esField": "mipc",
     "esClass": "prefixQueryBuilder",
     "ifSearch": "true",
     "ifGroup": "true",
-    "ifShow": "false",
+    "ifShow": "true",
     "ifStats": "true",
     "ifAsCondition": "true",
-    "groupBy": "classify"
+    "groupBy": "classify",
+    "children": [
+      {
+        "label": "IPC部",
+        "type": "1",
+        "group": "nos",
+        "value": "IC1"
+      },
+      {
+        "label": "IPC大类",
+        "type": "1",
+        "group": "nos",
+        "value": "IC2"
+      },
+      {
+        "label": "IPC小类",
+        "type": "1",
+        "group": "nos",
+        "value": "IC3"
+      },
+      {
+        "label": "IPC大组",
+        "type": "1",
+        "group": "nos",
+        "value": "IC4"
+      },
+      {
+        "label": "IPC",
+        "type": "1",
+        "group": "nos",
+        "value": "IC"
+      }
+    ]
   },
   {
     "name": "IPC部",
@@ -570,7 +602,7 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
@@ -583,7 +615,7 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
@@ -596,7 +628,7 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
@@ -609,7 +641,7 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
@@ -622,23 +654,55 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
   {
     "name": "CPC分类号",
-    "type": "String",
-    "value": "MCPC",
+    "type": "Object",
+    "value": "mcpc",
     "field": "MCPC",
     "esField": "mcpc",
     "esClass": "prefixQueryBuilder",
     "ifSearch": "true",
     "ifGroup": "true",
-    "ifShow": "false",
+    "ifShow": "true",
     "ifStats": "true",
     "ifAsCondition": "true",
-    "groupBy": "classify"
+    "groupBy": "classify",
+    "children": [
+      {
+        "label": "CPC部",
+        "type": "1",
+        "group": "nos",
+        "field": "CPC1"
+      },
+      {
+        "label": "CPC大类",
+        "type": "1",
+        "group": "nos",
+        "value": "CPC2"
+      },
+      {
+        "label": "CPC小类",
+        "type": "1",
+        "group": "nos",
+        "value": "CPC3"
+      },
+      {
+        "label": "CPC大组",
+        "type": "1",
+        "group": "nos",
+        "value": "CPC4"
+      },
+      {
+        "label": "CPC",
+        "type": "1",
+        "group": "nos",
+        "value": "CPC"
+      }
+    ]
   },
   {
     "name": "CPC部",
@@ -649,7 +713,7 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
@@ -662,7 +726,7 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
@@ -675,7 +739,7 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
@@ -688,7 +752,7 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
@@ -701,23 +765,37 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
   {
     "name": "UPC分类号",
-    "type": "String",
-    "value": "MUPC",
+    "type": "Object",
+    "value": "mupc",
     "field": "MUPC",
     "esField": "mupc",
     "esClass": "prefixQueryBuilder",
     "ifSearch": "true",
     "ifGroup": "true",
-    "ifShow": "false",
+    "ifShow": "true",
     "ifStats": "true",
     "ifAsCondition": "true",
-    "groupBy": "classify"
+    "groupBy": "classify",
+    "children": [
+      {
+        "label": "UPC大类",
+        "type": "1",
+        "group": "nos",
+        "value": "UPC1"
+      },
+      {
+        "label": "UPC",
+        "type": "1",
+        "group": "nos",
+        "value": "UPC"
+      }
+    ]
   },
   {
     "name": "UPC大类",
@@ -728,7 +806,7 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
@@ -741,26 +819,40 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
   {
     "name": "LOC分类号",
-    "type": "String",
-    "value": "MLOC",
+    "type": "Object",
+    "value": "mloc",
     "field": "MLOC",
     "esField": "mloc",
     "esClass": "prefixQueryBuilder",
     "ifSearch": "true",
     "ifGroup": "true",
-    "ifShow": "false",
+    "ifShow": "true",
     "ifStats": "true",
     "ifAsCondition": "true",
-    "groupBy": "classify"
-  },
-  {
-    "name": "LOC分类号大类",
+    "groupBy": "classify",
+    "children": [
+      {
+        "label": "LOC大类",
+        "type": "1",
+        "group": "nos",
+        "value": "LOC1"
+      },
+      {
+        "label": "LOC",
+        "type": "1",
+        "group": "nos",
+        "value": "LOC"
+      }
+    ]
+  },
+  {
+    "name": "LOC大类",
     "type": "String",
     "value": "locLevel1",
     "field": "LOC1",
@@ -768,7 +860,7 @@
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },
@@ -776,12 +868,12 @@
     "name": "LOC",
     "type": "String",
     "value": "locLevel2",
-    "field": "LOC2",
+    "field": "LOC",
     "esField": "mloc.level2",
     "esClass": "keyWordQueryBuilder",
     "ifSearch": "false",
     "ifGroup": "false",
-    "ifShow": "true",
+    "ifShow": "false",
     "ifStats": "false",
     "ifAsCondition": "true"
   },