|
@@ -9,9 +9,11 @@ import cn.cslg.pas.common.model.cronModel.PersonnelVO;
|
|
import cn.cslg.pas.common.model.cronModel.Records;
|
|
import cn.cslg.pas.common.model.cronModel.Records;
|
|
import cn.cslg.pas.common.model.importTaskModel.PatentApplicant;
|
|
import cn.cslg.pas.common.model.importTaskModel.PatentApplicant;
|
|
import cn.cslg.pas.common.utils.*;
|
|
import cn.cslg.pas.common.utils.*;
|
|
|
|
+import cn.cslg.pas.common.vo.ContentVO;
|
|
import cn.cslg.pas.common.vo.StarPatentVO;
|
|
import cn.cslg.pas.common.vo.StarPatentVO;
|
|
import cn.cslg.pas.domain.WebLoginConfig;
|
|
import cn.cslg.pas.domain.WebLoginConfig;
|
|
import cn.cslg.pas.domain.business.RetrieveRecord;
|
|
import cn.cslg.pas.domain.business.RetrieveRecord;
|
|
|
|
+import cn.cslg.pas.domain.es.PatentPerson;
|
|
import cn.cslg.pas.service.WebLoginConfigService;
|
|
import cn.cslg.pas.service.WebLoginConfigService;
|
|
|
|
|
|
import cn.cslg.pas.service.query.FormatQueryService;
|
|
import cn.cslg.pas.service.query.FormatQueryService;
|
|
@@ -58,142 +60,6 @@ public class PatentStarApiService {
|
|
private WebLoginConfigService webLoginConfigService;
|
|
private WebLoginConfigService webLoginConfigService;
|
|
@Autowired
|
|
@Autowired
|
|
private FormatQueryService formatQueryService;
|
|
private FormatQueryService formatQueryService;
|
|
-//
|
|
|
|
-// //装载专利信息
|
|
|
|
-// public void loadStarPatentVOS(List<StarPatentVO> starPatentVOS, JSONObject Data) {
|
|
|
|
-// String aa = Data.toString();
|
|
|
|
-// starPatentVOS.forEach(item -> {
|
|
|
|
-// //专利类型
|
|
|
|
-// Integer patentType = item.getPatentType();
|
|
|
|
-// if (patentType != null) {
|
|
|
|
-// if (patentType.equals(2) || patentType.equals(9)) {
|
|
|
|
-// item.setType("实用新型");
|
|
|
|
-// } else if (patentType.equals(1) || patentType.equals(8)) {
|
|
|
|
-// item.setType("发明");
|
|
|
|
-// } else if (patentType.equals(3)) {
|
|
|
|
-// item.setType("外观设计");
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// //如果有公开号,则将公开号作为专利号
|
|
|
|
-// if (item.getApplicationNo() != null && !item.getApplicationNo().equals("") && item.getApplicationNo().contains("CN")) {
|
|
|
|
-// item.setPatentNo(item.getApplicationNo());
|
|
|
|
-// } else if (item.getPublicNo() != null && !item.getPublicNo().equals("")) {
|
|
|
|
-// item.setPatentNo(item.getPublicNo());
|
|
|
|
-// //如果没有公开号,但是有公告号,则将公告号作为公开号和专利号
|
|
|
|
-// }
|
|
|
|
-// if (item.getPublicAccreditNo() != null && !item.getPublicAccreditNo().equals("")) {
|
|
|
|
-// if (item.getPublicNo() == null || item.getPublicNo().equals("")) {
|
|
|
|
-// item.setPublicNo(item.getPublicAccreditNo());
|
|
|
|
-// }
|
|
|
|
-// if (item.getPatentNo() == null) {
|
|
|
|
-// item.setPatentNo(item.getPublicAccreditNo());
|
|
|
|
-// }
|
|
|
|
-// } else {
|
|
|
|
-// System.out.println("");
|
|
|
|
-//
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// //如果没有公开日就将公告日作为公开日
|
|
|
|
-// if (item.getPublicDate() == null || item.getPublicDate().equals("")) {
|
|
|
|
-// item.setPublicDate(item.getPublicAccreditDate());
|
|
|
|
-// }
|
|
|
|
-// item.setApplicant(new ArrayList<>());
|
|
|
|
-// item.setAgent(new ArrayList<>());
|
|
|
|
-// item.setIpcList(Arrays.asList(item.getIpcListStr().split(";")));
|
|
|
|
-// if (item.getApplicationAddress() == null) {
|
|
|
|
-// item.setApplicationAddress("");
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// List<String> applicationAddress = Arrays.asList(item.getApplicationAddress().split(";"));
|
|
|
|
-// List<String> applicants = Arrays.asList(item.getApplicantStr().split(";"));
|
|
|
|
-// //装载申请人
|
|
|
|
-// for (int i = 0; i < applicants.size(); i++) {
|
|
|
|
-// PatentApplicant patentApplicant = new PatentApplicant();
|
|
|
|
-// patentApplicant.setType(2);
|
|
|
|
-// patentApplicant.setDataType(2);
|
|
|
|
-// patentApplicant.setName(applicants.get(i));
|
|
|
|
-// if (applicationAddress.size() > i) {
|
|
|
|
-// patentApplicant.setAddressStr(applicationAddress.get(i));
|
|
|
|
-// }
|
|
|
|
-// item.getApplicant().add(patentApplicant);
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// //装载权利人
|
|
|
|
-// if (item.getCurrentApplicantStr() != null && !item.getCurrentApplicantStr().equals("")) {
|
|
|
|
-// List<String> cApplicants = Arrays.asList(item.getCurrentApplicantStr().split(";"));
|
|
|
|
-// cApplicants.forEach(
|
|
|
|
-// tem -> {
|
|
|
|
-// PatentApplicant patentApplicant = new PatentApplicant();
|
|
|
|
-// patentApplicant.setType(2);
|
|
|
|
-// patentApplicant.setDataType(1);
|
|
|
|
-// patentApplicant.setName(tem);
|
|
|
|
-// item.getApplicant().add(patentApplicant);
|
|
|
|
-// }
|
|
|
|
-// );
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// //优先权
|
|
|
|
-// if (item.getPriorityNo() != null && !item.getPriorityNo().equals("")) {
|
|
|
|
-//
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// //代理机构
|
|
|
|
-// if (item.getAgencyStr() != null && !item.getAgencyStr().equals("")) {
|
|
|
|
-// PatentAgency patentAgency = new PatentAgency();
|
|
|
|
-// patentAgency.setName(item.getAgencyStr().split(" ")[0]);
|
|
|
|
-// item.setAgency(patentAgency);
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// //发明人
|
|
|
|
-// if (item.getInventorStr() != null && !item.getInventorStr().equals("")) {
|
|
|
|
-// item.setInventor(new ArrayList<>());
|
|
|
|
-// List<String> inventors = Arrays.asList(item.getInventorStr().split(";"));
|
|
|
|
-// inventors.forEach(
|
|
|
|
-// tem -> {
|
|
|
|
-// PatentInventor patentInventor = new PatentInventor();
|
|
|
|
-// patentInventor.setName(tem);
|
|
|
|
-// item.getInventor().add(patentInventor);
|
|
|
|
-// ;
|
|
|
|
-// }
|
|
|
|
-// );
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// //代理人
|
|
|
|
-// if (item.getAgentStr() != null && !item.getAgentStr().equals("")) {
|
|
|
|
-// List<String> agent = Arrays.asList(item.getAgentStr().split(";"));
|
|
|
|
-// agent.forEach(
|
|
|
|
-// tem -> {
|
|
|
|
-// PatentAgent patentAgent = new PatentAgent();
|
|
|
|
-// patentAgent.setName(tem);
|
|
|
|
-// item.getAgent().add(patentAgent);
|
|
|
|
-// }
|
|
|
|
-// );
|
|
|
|
-// }
|
|
|
|
-// //TODO 此处不调用取附图接口,(遍历调接口效率太低) 提出者:罗总
|
|
|
|
-// //附图
|
|
|
|
-//// if (item.getApplicationNo() != null && item.getApplicationNo() != "") {
|
|
|
|
-//// String apN = item.getApplicationNo().replace(".", "");
|
|
|
|
-////
|
|
|
|
-//// //String path = this.getPictureApi(apN.substring(2));
|
|
|
|
-//// //item.setAbstractPath(path);
|
|
|
|
-//// }
|
|
|
|
-// if (item.getLG() != null) {
|
|
|
|
-// switch (item.getLG()) {
|
|
|
|
-// case 1:
|
|
|
|
-// item.setSimpleStatus("有效");
|
|
|
|
-// break;
|
|
|
|
-// case 2:
|
|
|
|
-// item.setSimpleStatus("失效");
|
|
|
|
-// break;
|
|
|
|
-// case 3:
|
|
|
|
-// item.setSimpleStatus("审中");
|
|
|
|
-// break;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// //法律状态
|
|
|
|
-// });
|
|
|
|
-// }
|
|
|
|
|
|
|
|
public Records patentStarSearchLocal(PatentStarListDTO patentStarListDTO) throws IOException {
|
|
public Records patentStarSearchLocal(PatentStarListDTO patentStarListDTO) throws IOException {
|
|
RetrieveRecord retrieveRecord = new RetrieveRecord();
|
|
RetrieveRecord retrieveRecord = new RetrieveRecord();
|
|
@@ -290,9 +156,6 @@ public class PatentStarApiService {
|
|
}
|
|
}
|
|
JSONObject Data = (JSONObject) jsonObject.get("Data");
|
|
JSONObject Data = (JSONObject) jsonObject.get("Data");
|
|
List<StarPatentVO> starPatentVOS = JSONArray.parseArray(Data.get("List").toString(), StarPatentVO.class);
|
|
List<StarPatentVO> starPatentVOS = JSONArray.parseArray(Data.get("List").toString(), StarPatentVO.class);
|
|
-// this.loadStarPatentVOS(starPatentVOS, Data);
|
|
|
|
- // 打印服务端返回结果
|
|
|
|
- // return Objects.requireNonNull(response.body()).string();
|
|
|
|
Map<String, Object> reMap = new HashMap<>();
|
|
Map<String, Object> reMap = new HashMap<>();
|
|
reMap.put("size", PatentStarListDTO.getRowCount());
|
|
reMap.put("size", PatentStarListDTO.getRowCount());
|
|
reMap.put("current", PatentStarListDTO.getPageNum());
|
|
reMap.put("current", PatentStarListDTO.getPageNum());
|
|
@@ -891,7 +754,10 @@ public class PatentStarApiService {
|
|
PatentColumnDTO patentColumnDTO = new PatentColumnDTO();
|
|
PatentColumnDTO patentColumnDTO = new PatentColumnDTO();
|
|
//申请号
|
|
//申请号
|
|
patentColumnDTO.setAppNo(item.getApplicationNo());
|
|
patentColumnDTO.setAppNo(item.getApplicationNo());
|
|
- patentColumnDTOS.add(patentColumnDTO);
|
|
|
|
|
|
+ //装载公开号
|
|
|
|
+ patentColumnDTO.setPublicNo(item.getPublicNo());
|
|
|
|
+ //装载公告号
|
|
|
|
+ patentColumnDTO.setGrantNo(item.getPublicAccreditNo());
|
|
//装载专利号
|
|
//装载专利号
|
|
if (patentColumnDTO.getAppNo() != null) {
|
|
if (patentColumnDTO.getAppNo() != null) {
|
|
if (patentColumnDTO.getAppNo().trim().startsWith("CN")) {
|
|
if (patentColumnDTO.getAppNo().trim().startsWith("CN")) {
|
|
@@ -899,24 +765,66 @@ public class PatentStarApiService {
|
|
} else {
|
|
} else {
|
|
if (patentColumnDTO.getPublicNo() != null) {
|
|
if (patentColumnDTO.getPublicNo() != null) {
|
|
patentColumnDTO.setPatentNo(patentColumnDTO.getPublicNo());
|
|
patentColumnDTO.setPatentNo(patentColumnDTO.getPublicNo());
|
|
- }
|
|
|
|
- else if(patentColumnDTO.getAgencyNo()!=null){
|
|
|
|
- patentColumnDTO.setPatentNo(patentColumnDTO.getAgencyNo());
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
|
|
+ } else if (patentColumnDTO.getGrantNo() != null) {
|
|
|
|
+ patentColumnDTO.setPatentNo(patentColumnDTO.getGrantNo());
|
|
|
|
+ } else {
|
|
patentColumnDTO.setPatentNo(patentColumnDTO.getAppNo());
|
|
patentColumnDTO.setPatentNo(patentColumnDTO.getAppNo());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
//装载申请日
|
|
//装载申请日
|
|
- if(item.getApplicationDate()!=null&&item.getApplicationDate().trim().equals("")) {
|
|
|
|
|
|
+ if (item.getApplicationDate() != null && !item.getApplicationDate().trim().equals("")) {
|
|
patentColumnDTO.setAppDate(DateUtils.strToDate(item.getApplicationDate()));
|
|
patentColumnDTO.setAppDate(DateUtils.strToDate(item.getApplicationDate()));
|
|
}
|
|
}
|
|
//装载公开日
|
|
//装载公开日
|
|
- if(item.getPublicDate()!=null&&item.getPublicDate().trim().equals("")){
|
|
|
|
|
|
+ if (item.getPublicDate() != null && !item.getPublicDate().trim().equals("")) {
|
|
patentColumnDTO.setPublicDate(DateUtils.strToDate(item.getPublicDate()));
|
|
patentColumnDTO.setPublicDate(DateUtils.strToDate(item.getPublicDate()));
|
|
}
|
|
}
|
|
|
|
+ //装载申请人
|
|
|
|
+ if (item.getApplicantStr() != null && !item.getApplicantStr().trim().equals("")) {
|
|
|
|
+ List<String> names = Arrays.asList(item.getApplicantStr().split(";"));
|
|
|
|
+ patentColumnDTO.setApplicant(names);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ //装载发明人
|
|
|
|
+ if (item.getInventorStr() != null && !item.getInventorStr().trim().equals("")) {
|
|
|
|
+ List<String> names = Arrays.asList(item.getInventorStr().split(";"));
|
|
|
|
+ patentColumnDTO.setInventor(names);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //装载标题
|
|
|
|
+ if(item.getName()!=null){
|
|
|
|
+ ContentVO contentVO =new ContentVO();
|
|
|
|
+ contentVO.setContent(item.getName());
|
|
|
|
+ patentColumnDTO.setTitle(contentVO);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //装载权利人
|
|
|
|
+ if (item.getCurrentApplicantStr() != null && !item.getCurrentApplicantStr().trim().equals("")) {
|
|
|
|
+ List<String> names = Arrays.asList(item.getCurrentApplicantStr().split(";"));
|
|
|
|
+ patentColumnDTO.setRightHolder(names);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //装载摘要
|
|
|
|
+ if (item.getAbstractStr() != null && !item.getAbstractStr().trim().equals("")) {
|
|
|
|
+ ContentVO contentVO =new ContentVO();
|
|
|
|
+ contentVO.setContent(item.getAbstractStr());
|
|
|
|
+ patentColumnDTO.setAbstractStr(contentVO);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //装载代理人
|
|
|
|
+ if (item.getAgentStr() != null && !item.getAgentStr().trim().equals("")) {
|
|
|
|
+ List<String> names = Arrays.asList(item.getAgentStr().split(";"));
|
|
|
|
+ patentColumnDTO.setAgent(names);
|
|
|
|
+ }
|
|
|
|
+ //装载代理机构
|
|
|
|
+ if (item.getAgencyStr() != null && !item.getAgencyStr() .trim().equals("")) {
|
|
|
|
+ patentColumnDTO.setAgency(item.getAgencyStr() );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ patentColumnDTOS.add(patentColumnDTO);
|
|
});
|
|
});
|
|
|
|
|
|
return patentColumnDTOS;
|
|
return patentColumnDTOS;
|