|
@@ -1,10 +1,12 @@
|
|
|
package cn.cslg.report.service.business;
|
|
|
|
|
|
+import cn.cslg.report.common.model.PatentRightParams;
|
|
|
import cn.cslg.report.common.model.vo.PatentRightVo;
|
|
|
import cn.cslg.report.common.model.vo.PatentVO;
|
|
|
import cn.cslg.report.common.model.vo.PersonnelVO;
|
|
|
import cn.cslg.report.common.model.vo.SplitVO;
|
|
|
import cn.cslg.report.common.utils.CacheUtils;
|
|
|
+import cn.cslg.report.common.utils.PatentRightUtils;
|
|
|
import cn.cslg.report.common.utils.Response;
|
|
|
import cn.cslg.report.common.utils.SecurityUtils.LoginUtils;
|
|
|
import cn.cslg.report.entity.*;
|
|
@@ -47,6 +49,7 @@ public class FeatureService extends ServiceImpl<FeatureMapper, Features> {
|
|
|
private final AssoTaskPatentSplitService assoTaskPatentSplitService;
|
|
|
private final TaskService taskService;
|
|
|
private final CompareMessageService compareMessageService;
|
|
|
+ private final PatentRightUtils patentRightUtils;
|
|
|
|
|
|
/**
|
|
|
* @param patentRights(专利权利要求)
|
|
@@ -54,21 +57,16 @@ public class FeatureService extends ServiceImpl<FeatureMapper, Features> {
|
|
|
* @function 对权要进行合并操作
|
|
|
*/
|
|
|
|
|
|
- public List<PatentRight> FormatPatentRights(List<PatentRight> patentRights) {
|
|
|
- List<PatentRight> retList = new ArrayList<>();
|
|
|
- if(patentRights==null){
|
|
|
- patentRights=new ArrayList<>();
|
|
|
- }
|
|
|
- for (int i = 0; i < patentRights.size(); i++) {
|
|
|
- String str = patentRights.get(i).getContent();
|
|
|
- str = str.replace("\r", "");
|
|
|
- str =str.replace("\n","");
|
|
|
- if(str.replace(" ","").equals("")){
|
|
|
- patentRights.remove(i);
|
|
|
- }
|
|
|
- else{patentRights.get(i).setContent(str);
|
|
|
- }
|
|
|
- }
|
|
|
+ public List<PatentRight> FormatPatentRights(List<PatentRight> patentRights,String patentNo) {
|
|
|
+ StringBuilder stringBuilder =new StringBuilder();
|
|
|
+ patentRights.forEach(item->{
|
|
|
+ stringBuilder.append(item.getContent());
|
|
|
+ });
|
|
|
+ PatentRightParams params =new PatentRightParams();
|
|
|
+ params.setPatentNo(patentNo);
|
|
|
+ params.setPatentId(-1);
|
|
|
+ params.setContent(stringBuilder.toString());
|
|
|
+ patentRightUtils.formatPatentRight(params);
|
|
|
return patentRights;
|
|
|
}
|
|
|
|
|
@@ -156,7 +154,7 @@ public class FeatureService extends ServiceImpl<FeatureMapper, Features> {
|
|
|
//解析jason获得标的专利的权要
|
|
|
List<PatentRight> patentRightsOrgin = JSON.parseArray(jsonObject.getString("data"), PatentRight.class);
|
|
|
//给权要进行格式更改
|
|
|
- List<PatentRight> patentRights = FormatPatentRights(patentRightsOrgin);
|
|
|
+ List<PatentRight> patentRights = FormatPatentRights(patentRightsOrgin,patentNo);
|
|
|
List<Integer> partRightIds = new ArrayList<>();
|
|
|
List<String> flags = new ArrayList<>();
|
|
|
// 当splitType=0仅拆解主权要
|
|
@@ -302,7 +300,7 @@ public class FeatureService extends ServiceImpl<FeatureMapper, Features> {
|
|
|
//解析jason获得标的专利的权要
|
|
|
List<PatentRight> patentRightsOrgin = JSON.parseArray(jsonObject.getString("data"), PatentRight.class);
|
|
|
//处理权要
|
|
|
- List<PatentRight> patentRights = FormatPatentRights(patentRightsOrgin);
|
|
|
+ List<PatentRight> patentRights = FormatPatentRights(patentRightsOrgin,patentNo);
|
|
|
Features featureTO = new Features();
|
|
|
featureTO.setReportId(reportId);
|
|
|
featureTO.setSignPatentNo(patentNo);
|