|
@@ -19,6 +19,7 @@ import cn.cslg.pas.domain.es.*;
|
|
|
import cn.cslg.pas.service.WebLoginConfigService;
|
|
|
|
|
|
|
|
|
+import cn.cslg.pas.service.importPatent.WebVOTransformService;
|
|
|
import cn.cslg.pas.service.query.FormatQueryService;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -76,6 +77,8 @@ public class PatentStarApiService {
|
|
|
private WebLoginConfigService webLoginConfigService;
|
|
|
@Autowired
|
|
|
private FormatQueryService formatQueryService;
|
|
|
+ @Autowired
|
|
|
+ private WebVOTransformService webVOTransformService;
|
|
|
|
|
|
public Records patentStarSearchLocal(PatentStarListDTO patentStarListDTO) throws IOException {
|
|
|
RetrieveRecord retrieveRecord = new RetrieveRecord();
|
|
@@ -872,36 +875,13 @@ public class PatentStarApiService {
|
|
|
|
|
|
List<PatentColumnDTO> patentColumnDTOS = new ArrayList<>();
|
|
|
starPatentVOS.forEach(item -> {
|
|
|
+ UploadPatentWebDTO uploadPatentWebDTO = new UploadPatentWebDTO();
|
|
|
+ uploadPatentWebDTO.setStarPatentVO(item);
|
|
|
+ Patent patent = new Patent();
|
|
|
+ uploadPatentWebDTO.setPatent(patent);
|
|
|
+ webVOTransformService.loadPatent(uploadPatentWebDTO,false);
|
|
|
PatentColumnDTO patentColumnDTO = new PatentColumnDTO();
|
|
|
- //申请号
|
|
|
- patentColumnDTO.setAppNo(item.getAN());
|
|
|
- //装载公开号
|
|
|
- patentColumnDTO.setPublicNo(item.getPN());
|
|
|
- //装载公告号
|
|
|
- patentColumnDTO.setGrantNo(item.getGN());
|
|
|
- //装载专利状态
|
|
|
- if (item.getLG() != null) {
|
|
|
- patentColumnDTO.setSimpleStatus(item.getLG().toString());
|
|
|
- }
|
|
|
- //装载专利类型
|
|
|
- if (item.getPT() != null) {
|
|
|
- patentColumnDTO.setPatentType(item.getPT().toString());
|
|
|
- }
|
|
|
- //装载摘要
|
|
|
- List<Text> abstractList = new ArrayList<>();
|
|
|
- Text text = new Text();
|
|
|
- text.setTextContent(item.getAB());
|
|
|
- text.setIfOrigin(true);
|
|
|
- abstractList.add(text);
|
|
|
- patentColumnDTO.setAbstractStr(abstractList);
|
|
|
- //装载标题
|
|
|
- List<Text> titleList = new ArrayList<>();
|
|
|
- Text title = new Text();
|
|
|
- title.setTextContent(item.getTI());
|
|
|
- title.setIfOrigin(true);
|
|
|
- titleList.add(title);
|
|
|
-// text.setLanguage(patent.getAppCountry());
|
|
|
- patentColumnDTO.setTitle(titleList);
|
|
|
+ BeanUtils.copyProperties(patent,patentColumnDTO);
|
|
|
//装载权利要求
|
|
|
List<Text> claimList = new ArrayList<>();
|
|
|
Text claim = new Text();
|
|
@@ -909,50 +889,7 @@ public class PatentStarApiService {
|
|
|
claim.setIfOrigin(true);
|
|
|
claimList.add(claim);
|
|
|
patentColumnDTO.setClaim(claimList);
|
|
|
- //装载专利号
|
|
|
- if (patentColumnDTO.getAppNo() != null) {
|
|
|
- if (patentColumnDTO.getAppNo().trim().startsWith("CN")) {
|
|
|
- patentColumnDTO.setPatentNo(patentColumnDTO.getAppNo());
|
|
|
- } else {
|
|
|
- if (patentColumnDTO.getPublicNo() != null) {
|
|
|
- patentColumnDTO.setPatentNo(patentColumnDTO.getPublicNo());
|
|
|
- } else if (patentColumnDTO.getGrantNo() != null) {
|
|
|
- patentColumnDTO.setPatentNo(patentColumnDTO.getGrantNo());
|
|
|
- } else {
|
|
|
- patentColumnDTO.setPatentNo(patentColumnDTO.getAppNo());
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- //装载申请日
|
|
|
- if (item.getAD() != null && !item.getAD().trim().equals("")) {
|
|
|
- patentColumnDTO.setAppDate(DateUtils.strToDate(item.getAD()));
|
|
|
- }
|
|
|
-// patentColumnDTO.setAppCountry(item.getBureau());
|
|
|
- //装载申请人地址
|
|
|
- PersonAddress appAddress = new PersonAddress();
|
|
|
- appAddress.setAddress(item.getDZ());
|
|
|
- appAddress.setProvince(item.getPaAllCountry());
|
|
|
- patentColumnDTO.setApplicantAddr(appAddress);
|
|
|
- patentColumnDTO.setAppAddress(item.getDZ());
|
|
|
-// patentColumnDTO.setApplicantCountry(item.getProvinceStr());
|
|
|
- String provinceStr = item.getCO();
|
|
|
- if (provinceStr.contains("(") && provinceStr.contains(")")) {
|
|
|
- String substring = provinceStr.substring(provinceStr.indexOf("(") + 1, provinceStr.indexOf(")"));
|
|
|
- patentColumnDTO.setAppProvince(substring);
|
|
|
- }
|
|
|
- //装载ipc(主)分类号
|
|
|
- PatentClassify mipcClassify = new PatentClassify();
|
|
|
- mipcClassify.setLevel5(item.getMC());
|
|
|
- patentColumnDTO.setMipc(mipcClassify);
|
|
|
- //装载ipc分类号
|
|
|
- List<PatentClassify> classifies = new ArrayList<>();
|
|
|
- String[] split = item.getIC().split(";");
|
|
|
- for (String ipc : split) {
|
|
|
- PatentClassify ipcClassify = new PatentClassify();
|
|
|
- ipcClassify.setLevel5(ipc);
|
|
|
- }
|
|
|
- patentColumnDTO.setIpc(classifies);
|
|
|
//获取摘要附图
|
|
|
// String pictureApi = this.getPictureApi(item.getRowApplicationNo());
|
|
|
// patentColumnDTO.setPictureGuid(pictureApi);
|
|
@@ -962,15 +899,6 @@ public class PatentStarApiService {
|
|
|
// String cnLegalApi = this.getCnLegalApi(item.getRowApplicationNo());
|
|
|
// patentColumnDTO.setLegalStatus(Arrays.asList(cnLegalApi));
|
|
|
//获取被引用次数
|
|
|
- //装载公开日
|
|
|
- if (item.getPD() != null && !item.getPD().trim().equals("")) {
|
|
|
- patentColumnDTO.setPublicDate(DateUtils.strToDate(item.getPD()));
|
|
|
- }
|
|
|
-
|
|
|
- //装载公告日
|
|
|
- if (item.getGD() != null && !item.getGD().trim().equals("")) {
|
|
|
- patentColumnDTO.setGrantDate(DateUtils.strToDate(item.getGD()));
|
|
|
- }
|
|
|
|
|
|
//装载申请人
|
|
|
if (item.getPA() != null && !item.getPA().trim().equals("")) {
|
|
@@ -995,24 +923,6 @@ public class PatentStarApiService {
|
|
|
} else {
|
|
|
patentColumnDTO.setRightHolder(new ArrayList<>());
|
|
|
}
|
|
|
-
|
|
|
- //装载代理人
|
|
|
- if (item.getAT() != null && !item.getAT().trim().equals("")) {
|
|
|
- List<String> names = Arrays.asList(item.getAT().split(";"));
|
|
|
- patentColumnDTO.setAgent(names);
|
|
|
- } else {
|
|
|
- patentColumnDTO.setAgent(new ArrayList<>());
|
|
|
- }
|
|
|
-
|
|
|
- //装载代理机构
|
|
|
- if (item.getAGN() != null && !item.getAGN().trim().equals("")) {
|
|
|
- patentColumnDTO.setAgency(item.getAGN());
|
|
|
- }
|
|
|
- //装载优先权
|
|
|
- patentColumnDTO.setPriorityNo(item.getPR());
|
|
|
- patentColumnDTO.setPriorityDate(item.getPRD());
|
|
|
- patentColumnDTO.setAppCountry(item.getGJ());
|
|
|
- patentColumnDTOS.add(patentColumnDTO);
|
|
|
});
|
|
|
|
|
|
return patentColumnDTOS;
|