|
@@ -15,6 +15,7 @@ import cn.cslg.pas.common.vo.*;
|
|
import cn.cslg.pas.common.vo.business.SplitVO;
|
|
import cn.cslg.pas.common.vo.business.SplitVO;
|
|
import cn.cslg.pas.common.vo.invalidVO.QueryClaimSplitHistoryVO;
|
|
import cn.cslg.pas.common.vo.invalidVO.QueryClaimSplitHistoryVO;
|
|
import cn.cslg.pas.domain.business.*;
|
|
import cn.cslg.pas.domain.business.*;
|
|
|
|
+import cn.cslg.pas.domain.es.PatentTranslate;
|
|
import cn.cslg.pas.exception.XiaoShiException;
|
|
import cn.cslg.pas.exception.XiaoShiException;
|
|
import cn.cslg.pas.mapper.FeatureMapper;
|
|
import cn.cslg.pas.mapper.FeatureMapper;
|
|
import cn.cslg.pas.service.ClaimMessageService;
|
|
import cn.cslg.pas.service.ClaimMessageService;
|
|
@@ -22,12 +23,18 @@ import cn.cslg.pas.service.business.es.EsService;
|
|
import cn.cslg.pas.service.business.invalidReport.AssoGroupFeatureService;
|
|
import cn.cslg.pas.service.business.invalidReport.AssoGroupFeatureService;
|
|
import cn.cslg.pas.service.business.invalidReport.PatentClaimService;
|
|
import cn.cslg.pas.service.business.invalidReport.PatentClaimService;
|
|
import cn.cslg.pas.service.common.PatentStarApiService;
|
|
import cn.cslg.pas.service.common.PatentStarApiService;
|
|
|
|
+import cn.cslg.pas.service.common.TranslateService;
|
|
|
|
+import co.elastic.clients.elasticsearch._types.query_dsl.Query;
|
|
|
|
+import co.elastic.clients.elasticsearch._types.query_dsl.QueryBuilders;
|
|
|
|
+import co.elastic.clients.elasticsearch.core.SearchRequest;
|
|
|
|
+import co.elastic.clients.elasticsearch.core.SearchResponse;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.context.annotation.Lazy;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
@@ -66,6 +73,9 @@ public class FeatureService extends ServiceImpl<FeatureMapper, Feature> {
|
|
@Autowired
|
|
@Autowired
|
|
private PatentClaimService patentClaimService;
|
|
private PatentClaimService patentClaimService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private TranslateService translateService;
|
|
|
|
+
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public List<PatentRightVo> splitPatentFeature(SplitVO splitVO) throws IOException {
|
|
public List<PatentRightVo> splitPatentFeature(SplitVO splitVO) throws IOException {
|
|
String patentNo = splitVO.getPatentNo();
|
|
String patentNo = splitVO.getPatentNo();
|
|
@@ -285,13 +295,24 @@ public class FeatureService extends ServiceImpl<FeatureMapper, Feature> {
|
|
|
|
|
|
//判断若处理后的权要集合只有1个元素并且类型type=-1、排序号sort=-1,则表示本次拆分失败,则直接返回整个权要
|
|
//判断若处理后的权要集合只有1个元素并且类型type=-1、排序号sort=-1,则表示本次拆分失败,则直接返回整个权要
|
|
if (patentRights.size() == 1 && patentRights.get(0).getType() == -1 && patentRights.get(0).getSort() == -1) {
|
|
if (patentRights.size() == 1 && patentRights.get(0).getType() == -1 && patentRights.get(0).getSort() == -1) {
|
|
- treeNodeList.add(new PatentRightTree(patentRights.get(0).getSort(), null, patentRights.get(0).getContent()));
|
|
|
|
|
|
+ List<String> list = translateService.getTranslateOrder(patentNo, patentRights.get(0).getSort());
|
|
|
|
+ String translateContent = "";
|
|
|
|
+ if (!CollectionUtils.isEmpty(list)) {
|
|
|
|
+ translateContent = list.get(0);
|
|
|
|
+ }
|
|
|
|
+ treeNodeList.add(new PatentRightTree(patentRights.get(0).getSort(), null, patentRights.get(0).getContent(),translateContent));
|
|
return treeNodeList;
|
|
return treeNodeList;
|
|
}
|
|
}
|
|
List<PatentRightContent> patentRightContents = this.loadPatentRightContent(patentRights);
|
|
List<PatentRightContent> patentRightContents = this.loadPatentRightContent(patentRights);
|
|
for (PatentRightContent patentRightContent : patentRightContents) {
|
|
for (PatentRightContent patentRightContent : patentRightContents) {
|
|
- treeNodeList.add(new PatentRightTree(patentRightContent.getSort(), patentRightContent.getParentSorts(), patentRightContent.getContent()));
|
|
|
|
|
|
+ List<String> list = translateService.getTranslateOrder(patentNo, patentRightContent.getSort());
|
|
|
|
+ String translateContent = "";
|
|
|
|
+ if (!CollectionUtils.isEmpty(list)) {
|
|
|
|
+ translateContent = list.get(0);
|
|
|
|
+ }
|
|
|
|
+ treeNodeList.add(new PatentRightTree(patentRightContent.getSort(), patentRightContent.getParentSorts(), patentRightContent.getContent(), translateContent));
|
|
}
|
|
}
|
|
|
|
+
|
|
//开始进行权要树装载
|
|
//开始进行权要树装载
|
|
try {
|
|
try {
|
|
TreeBuild treeBuild = new TreeBuild(treeNodeList);
|
|
TreeBuild treeBuild = new TreeBuild(treeNodeList);
|