|
@@ -74,6 +74,8 @@ public class ImportSinglePatentService {
|
|
private OPSService opsService;
|
|
private OPSService opsService;
|
|
@Autowired
|
|
@Autowired
|
|
private PatentNoUtil patentNoUtil;
|
|
private PatentNoUtil patentNoUtil;
|
|
|
|
+ @Autowired
|
|
|
|
+ private WebVOTransformService webVOTransformService;
|
|
|
|
|
|
public StarPatentVO getPatentFromWeb(String patentNo) {
|
|
public StarPatentVO getPatentFromWeb(String patentNo) {
|
|
StarPatentVO starPatentVO = null;
|
|
StarPatentVO starPatentVO = null;
|
|
@@ -151,407 +153,17 @@ public class ImportSinglePatentService {
|
|
UploadPatentWebDTO uploadPatentWebDTO = new UploadPatentWebDTO();
|
|
UploadPatentWebDTO uploadPatentWebDTO = new UploadPatentWebDTO();
|
|
uploadPatentWebDTO.setPatent(new Patent());
|
|
uploadPatentWebDTO.setPatent(new Patent());
|
|
uploadPatentWebDTO.setStarPatentVO(starPatentVO);
|
|
uploadPatentWebDTO.setStarPatentVO(starPatentVO);
|
|
- this.loadPatent(uploadPatentWebDTO);
|
|
|
|
|
|
+
|
|
if (patentZhuLuStr != null && !patentZhuLuStr.trim().equals("") && !patentZhuLuStr.equals("{}") && !patentZhuLuStr.contains("请求不合法")) {
|
|
if (patentZhuLuStr != null && !patentZhuLuStr.trim().equals("") && !patentZhuLuStr.equals("{}") && !patentZhuLuStr.contains("请求不合法")) {
|
|
if (starPatentVO.getAN().startsWith("CN")) {
|
|
if (starPatentVO.getAN().startsWith("CN")) {
|
|
- this.loadCNPatent(patentZhuLuStr, uploadPatentWebDTO.getPatent(), starPatentVO);
|
|
|
|
- //装载专利号
|
|
|
|
- if (uploadPatentWebDTO.getPatent().getAppNo() != null) {
|
|
|
|
- uploadPatentWebDTO.getPatent().setPatentNo(uploadPatentWebDTO.getPatent().getAppNo());
|
|
|
|
- } else if (uploadPatentWebDTO.getPatent().getGrantNo() != null) {
|
|
|
|
- uploadPatentWebDTO.getPatent().setPatentNo(uploadPatentWebDTO.getPatent().getGrantNo());
|
|
|
|
- } else if (uploadPatentWebDTO.getPatent().getPublicNo() != null) {
|
|
|
|
- uploadPatentWebDTO.getPatent().setPatentNo(uploadPatentWebDTO.getPatent().getPublicNo());
|
|
|
|
- }
|
|
|
|
|
|
+ webVOTransformService.loadCNPatent(patentZhuLuStr, uploadPatentWebDTO);
|
|
} else {
|
|
} else {
|
|
- this.loadWorldPatent(patentZhuLuStr, uploadPatentWebDTO.getPatent());
|
|
|
|
- //装载专利号
|
|
|
|
- if (uploadPatentWebDTO.getPatent().getGrantNo() != null) {
|
|
|
|
- uploadPatentWebDTO.getPatent().setPatentNo(uploadPatentWebDTO.getPatent().getGrantNo());
|
|
|
|
- } else if (uploadPatentWebDTO.getPatent().getPublicNo() != null) {
|
|
|
|
- uploadPatentWebDTO.getPatent().setPatentNo(uploadPatentWebDTO.getPatent().getPublicNo());
|
|
|
|
- } else if (uploadPatentWebDTO.getPatent().getAppNo() != null) {
|
|
|
|
- uploadPatentWebDTO.getPatent().setPatentNo(uploadPatentWebDTO.getPatent().getAppNo());
|
|
|
|
- }
|
|
|
|
|
|
+ webVOTransformService.loadWorldPatent(patentZhuLuStr, uploadPatentWebDTO);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return uploadPatentWebDTO.getPatent();
|
|
return uploadPatentWebDTO.getPatent();
|
|
}
|
|
}
|
|
|
|
|
|
- //装载专利信息
|
|
|
|
- private void loadPatent(UploadPatentWebDTO uploadPatentWebDTO) {
|
|
|
|
-
|
|
|
|
- String country = "";
|
|
|
|
- Patent patent = uploadPatentWebDTO.getPatent();
|
|
|
|
- StarPatentVO starPatentVO = uploadPatentWebDTO.getStarPatentVO();
|
|
|
|
-
|
|
|
|
- //装载专利类型
|
|
|
|
- Integer patentType = starPatentVO.getPT();
|
|
|
|
- if (patentType != null) {
|
|
|
|
- if (patentType.equals(2) || patentType.equals(9)) {
|
|
|
|
- patent.setPatentType("1"); //实用新型
|
|
|
|
- } else if (patentType.equals(1) || patentType.equals(8)) {
|
|
|
|
- patent.setPatentType("2"); //发明
|
|
|
|
- } else if (patentType.equals(3)) {
|
|
|
|
- patent.setPatentType("3"); //外观设计
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载申请人地址
|
|
|
|
- if (starPatentVO.getDZ() != null && !starPatentVO.getDZ().equals("")) {
|
|
|
|
- String applicationAddress = starPatentVO.getDZ();
|
|
|
|
- PersonAddress personAddress = AddressSplitter.splitAddress(applicationAddress, starPatentVO.getCO());
|
|
|
|
- patent.setApplicantAddr(personAddress);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载IPC分类号
|
|
|
|
- if (starPatentVO.getIC() != null && !starPatentVO.getIC().equals("")) {
|
|
|
|
- List<PatentClassify> patentClassifies = new ArrayList<>();
|
|
|
|
- List<String> ipcArr = Arrays.asList(starPatentVO.getIC().split(";"));
|
|
|
|
- for (int i = 0; i < ipcArr.size(); i++) {
|
|
|
|
- PatentClassify patentClassify = PatentClassifySplitter.split(ipcArr.get(i));
|
|
|
|
- patentClassifies.add(patentClassify);
|
|
|
|
- if (i == 0) {
|
|
|
|
- patent.setMipc(patentClassify);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- patent.setIpc(patentClassifies);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载公告日
|
|
|
|
- if (starPatentVO.getGN() != null && !starPatentVO.getGN().equals("")) {
|
|
|
|
-//
|
|
|
|
-// patent.setGrantDate();
|
|
|
|
- Date date = DateUtils.strToDate(starPatentVO.getGN());
|
|
|
|
- patent.setGrantDate(date);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载摘要
|
|
|
|
- if (starPatentVO.getAB() != null && !starPatentVO.getAB().equals("")) {
|
|
|
|
- Text text = new Text();
|
|
|
|
- text.setLanguage(patent.getAppCountry());
|
|
|
|
- text.setIfOrigin(true);
|
|
|
|
- text.setTextContent(starPatentVO.getAB());
|
|
|
|
- patent.setAbstractStr(Arrays.asList(text));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载申请日
|
|
|
|
- if (starPatentVO.getAD() != null && !starPatentVO.getAD().equals("")) {
|
|
|
|
- Date date = DateUtils.strToDate(starPatentVO.getAD());
|
|
|
|
- patent.setAppDate(date);
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载发明人
|
|
|
|
- if (starPatentVO.getIV() != null && !starPatentVO.getIV().equals("")) {
|
|
|
|
- List<String> patentInventorNames = Arrays.asList(starPatentVO.getIV().split(";"));
|
|
|
|
- List<PatentPerson> patentPeople = new ArrayList<>();
|
|
|
|
- for (int i = 0; i < patentInventorNames.size(); i++) {
|
|
|
|
- PatentPerson patentPerson = new PatentPerson();
|
|
|
|
- patentPerson.setOrder(i + 1);
|
|
|
|
- patentPerson.setType("1");
|
|
|
|
- patentPerson.setName(patentInventorNames.get(i));
|
|
|
|
- patentPeople.add(patentPerson);
|
|
|
|
- }
|
|
|
|
- patent.setInventor(patentPeople);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载申请号
|
|
|
|
- if (starPatentVO.getAN() != null && !starPatentVO.getAN().equals("")) {
|
|
|
|
- patent.setAppNo(starPatentVO.getAN());
|
|
|
|
- country = starPatentVO.getAN().substring(0, 2);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载公开号
|
|
|
|
- if (starPatentVO.getPN() != null && !starPatentVO.getPN().equals("")) {
|
|
|
|
- patent.setPublicNo(starPatentVO.getPN());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (starPatentVO.getGN() != null && !starPatentVO.getGN().equals("")) {
|
|
|
|
- patent.setGrantNo(starPatentVO.getGN());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (patent.getAppNo().startsWith("CN")) {
|
|
|
|
- patent.setPatentNo(patent.getAppNo());
|
|
|
|
- } else {
|
|
|
|
- if (patent.getPublicNo() != null) {
|
|
|
|
- patent.setPatentNo(patent.getPublicNo());
|
|
|
|
- } else if (patent.getGrantNo() != null) {
|
|
|
|
- patent.setPatentNo(patent.getGrantNo());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //装载申请人
|
|
|
|
- if (starPatentVO.getPA() != null && !starPatentVO.getPA().equals("")) {
|
|
|
|
- List<String> names = Arrays.asList(starPatentVO.getPA().split(";"));
|
|
|
|
- List<PatentPerson> patentPeople = new ArrayList<>();
|
|
|
|
- for (int i = 0; i < names.size(); i++) {
|
|
|
|
- PatentPerson patentPerson = new PatentPerson();
|
|
|
|
- patentPerson.setOrder(i + 1);
|
|
|
|
- patentPerson.setType("1");
|
|
|
|
- patentPerson.setName(names.get(i));
|
|
|
|
- patentPeople.add(patentPerson);
|
|
|
|
- }
|
|
|
|
- patent.setApplicant(patentPeople);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载代理人
|
|
|
|
- if (starPatentVO.getAT() != null && !starPatentVO.getAT().equals("")) {
|
|
|
|
- List<String> patentAgents = Arrays.asList(starPatentVO.getAT().split(";"));
|
|
|
|
- if (patentAgents != null && patentAgents.size() != 0) {
|
|
|
|
- patent.setAgent(patentAgents);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- if (starPatentVO.getAGN() != null && !starPatentVO.getAGN().equals("")) {
|
|
|
|
- patent.setAgency(starPatentVO.getAGN());
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- //装载公开日
|
|
|
|
- if (starPatentVO.getPD() != null && !starPatentVO.getPD().equals("")) {
|
|
|
|
- Date date = DateUtils.strToDate(starPatentVO.getPD());
|
|
|
|
- patent.setPublicDate(date);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载标题
|
|
|
|
- if (starPatentVO.getTI() != null && !starPatentVO.getTI().equals("")) {
|
|
|
|
- Text text = new Text();
|
|
|
|
- text.setLanguage(country);
|
|
|
|
- text.setIfOrigin(true);
|
|
|
|
- text.setTextContent(starPatentVO.getTI());
|
|
|
|
- patent.setTitle(Arrays.asList(text));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载权利人
|
|
|
|
- if (starPatentVO.getPE() != null && !starPatentVO.getPE().equals("")) {
|
|
|
|
- List<String> names = Arrays.asList(starPatentVO.getPE().split(";"));
|
|
|
|
- List<PatentPerson> patentPeople = new ArrayList<>();
|
|
|
|
- for (int i = 0; i < names.size(); i++) {
|
|
|
|
- PatentPerson patentPerson = new PatentPerson();
|
|
|
|
- patentPerson.setOrder(0);
|
|
|
|
- patentPerson.setType("1");
|
|
|
|
- patentPerson.setName(names.get(i));
|
|
|
|
- patentPeople.add(patentPerson);
|
|
|
|
- }
|
|
|
|
- patent.setRightHolder(patentPeople);
|
|
|
|
- } else if (patent.getApplicant() != null) {
|
|
|
|
- patent.setRightHolder(patent.getApplicant());
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载法律状态(os_patent表status字段值)
|
|
|
|
- Integer status = starPatentVO.getLG();
|
|
|
|
- if (status != null) {
|
|
|
|
- //有效(有权)
|
|
|
|
- if (status == 1) {
|
|
|
|
- patent.setSimpleStatus("3");
|
|
|
|
- //失效(无权)
|
|
|
|
- } else if (status == 2) {
|
|
|
|
- patent.setSimpleStatus("2");
|
|
|
|
- //审中(审中)
|
|
|
|
- } else if (status == 3) {
|
|
|
|
- patent.setSimpleStatus("1");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载优先权
|
|
|
|
- if (starPatentVO.getPR() != null && !starPatentVO.getPR().equals("")) {
|
|
|
|
- Priorities priorities = new Priorities();
|
|
|
|
- priorities.setPriorityNo(starPatentVO.getPR());
|
|
|
|
- String pCountry = starPatentVO.getAN().substring(0, 2);
|
|
|
|
- priorities.setPriorityCountry(pCountry);
|
|
|
|
- //装载优先权日
|
|
|
|
- if (starPatentVO.getPRD() != null && !starPatentVO.getPRD().equals("")) {
|
|
|
|
- DateUtils.str2Date(starPatentVO.getPRD());
|
|
|
|
- }
|
|
|
|
- patent.setPriorities(Arrays.asList(priorities));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载受理局
|
|
|
|
- if (starPatentVO.getCO() != null && !starPatentVO.getCO().equals("")) {
|
|
|
|
- patent.setAppCountry(starPatentVO.getCO());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- //装载中国专利
|
|
|
|
- private void loadCNPatent(String chinaPatentZhuLuStr, Patent patent, StarPatentVO starPatentVO) {
|
|
|
|
- patent.setPatentNo(patent.getAppNo());
|
|
|
|
- if (chinaPatentZhuLuStr != null && !chinaPatentZhuLuStr.trim().equals("") && !chinaPatentZhuLuStr.equals("{}") && !chinaPatentZhuLuStr.contains("请求不合法")) {
|
|
|
|
- List<ChinaPatentZhuLu> chinaPatentZhuLus = JSON.parseArray(chinaPatentZhuLuStr, ChinaPatentZhuLu.class);
|
|
|
|
- ChinaPatentZhuLu chinaPatentZhuLu = chinaPatentZhuLus.get(0);
|
|
|
|
- //装载申请人地址
|
|
|
|
- if (patent.getApplicantAddr() == null) {
|
|
|
|
- if (chinaPatentZhuLu.getDZ() != null && !chinaPatentZhuLu.getDZ().equals("")) {
|
|
|
|
- PersonAddress personAddress = AddressSplitter.splitAddress(chinaPatentZhuLu.getDZ(), starPatentVO.getCO());
|
|
|
|
- patent.setApplicantAddr(personAddress);
|
|
|
|
- patent.setApplicantAddr(personAddress);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //装载代理人
|
|
|
|
- if (patent.getAgent() == null || patent.getAgent().size() == 0) {
|
|
|
|
- if (chinaPatentZhuLu.getAT() != null && !chinaPatentZhuLu.getAT().equals("")) {
|
|
|
|
- List<String> patentAgents = Arrays.asList(chinaPatentZhuLu.getAT().split(";"));
|
|
|
|
- if (patentAgents != null && patentAgents.size() != 0) {
|
|
|
|
- patent.setAgent(patentAgents);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载发明人
|
|
|
|
- if (patent.getInventor() == null || patent.getInventor().size() == 0) {
|
|
|
|
-
|
|
|
|
- if (chinaPatentZhuLu.getIV() != null && !chinaPatentZhuLu.getIV().equals("")) {
|
|
|
|
- List<String> patentInventorNames = Arrays.asList(chinaPatentZhuLu.getIV().split(";"));
|
|
|
|
- List<PatentPerson> patentPeople = new ArrayList<>();
|
|
|
|
- for (int i = 0; i < patentInventorNames.size(); i++) {
|
|
|
|
- PatentPerson patentPerson = new PatentPerson();
|
|
|
|
- patentPerson.setOrder(0);
|
|
|
|
- patentPerson.setType("1");
|
|
|
|
- patentPerson.setName(patentInventorNames.get(i));
|
|
|
|
- patentPeople.add(patentPerson);
|
|
|
|
- }
|
|
|
|
- patent.setInventor(patentPeople);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- //装载优先权号、优先权国家、优先权日
|
|
|
|
- if (patent.getPriorities() == null && chinaPatentZhuLu.getPR() != null && chinaPatentZhuLu.getPR() != "") {
|
|
|
|
- Priorities priorities = new Priorities();
|
|
|
|
- priorities.setPriorityNo(chinaPatentZhuLu.getPR());
|
|
|
|
- String pCountry = chinaPatentZhuLu.getPR().substring(0, 2);
|
|
|
|
- priorities.setPriorityCountry(pCountry);
|
|
|
|
- patent.setPriorities(Arrays.asList(priorities));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 装载世界专利著录
|
|
|
|
- *
|
|
|
|
- * @param worldPatentZhuLuStr
|
|
|
|
- * @param patent
|
|
|
|
- */
|
|
|
|
- private void loadWorldPatent(String worldPatentZhuLuStr, Patent patent) {
|
|
|
|
- String country = "";
|
|
|
|
- List<WorldPatentZhuLu> worldPatentZhuLus = JSON.parseArray(worldPatentZhuLuStr, WorldPatentZhuLu.class);
|
|
|
|
- WorldPatentZhuLu worldPatentZhuLu = worldPatentZhuLus.get(0);
|
|
|
|
-
|
|
|
|
- //装载公开号
|
|
|
|
- if (patent.getPublicNo() == null || patent.getPublicNo().equals("")) {
|
|
|
|
- patent.setPublicNo(worldPatentZhuLu.getDocdbPubNo());
|
|
|
|
- }
|
|
|
|
- //装载申请号
|
|
|
|
- if (patent.getAppNo() == null || patent.getAppNo().equals("")) {
|
|
|
|
- patent.setAppNo(worldPatentZhuLu.getEpoAppNo());
|
|
|
|
- }
|
|
|
|
- //装载申请日
|
|
|
|
- if (patent.getAppDate() == null) {
|
|
|
|
- if (worldPatentZhuLu.getAppDate() != null && !worldPatentZhuLu.getAppDate().equals("")) {
|
|
|
|
- Date date = DateUtils.strToDate(worldPatentZhuLu.getAppDate());
|
|
|
|
- patent.setAppDate(date);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- //装载公开日
|
|
|
|
- if (patent.getPublicDate() == null) {
|
|
|
|
- if (worldPatentZhuLu.getPubDate() != null && !worldPatentZhuLu.getPubDate().equals("")) {
|
|
|
|
- Date date = DateUtils.strToDate(worldPatentZhuLu.getPubDate());
|
|
|
|
- patent.setPublicDate(date);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- //装载IPC分类号
|
|
|
|
- if (patent.getIpc() == null || patent.getIpc().size() == 0) {
|
|
|
|
- List<PatentClassify> patentClassifies = new ArrayList<>();
|
|
|
|
- List<String> ipcArr = Arrays.asList(worldPatentZhuLu.getIpc().split(";"));
|
|
|
|
- for (int i = 0; i < ipcArr.size(); i++) {
|
|
|
|
- PatentClassify patentClassify = PatentClassifySplitter.split(ipcArr.get(i));
|
|
|
|
- patentClassifies.add(patentClassify);
|
|
|
|
- if (i == 0) {
|
|
|
|
- patent.setMipc(patentClassify);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- patent.setIpc(patentClassifies);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载CPC分类号
|
|
|
|
- if (patent.getCpc() == null || patent.getCpc().size() == 0) {
|
|
|
|
- if (worldPatentZhuLu.getCpc() != null && !worldPatentZhuLu.getCpc().equals("")) {
|
|
|
|
- List<PatentClassify> patentClassifies = new ArrayList<>();
|
|
|
|
- List<String> cpcArr = Arrays.asList(worldPatentZhuLu.getCpc().split(";"));
|
|
|
|
- for (int i = 0; i < cpcArr.size(); i++) {
|
|
|
|
- PatentClassify patentClassify = PatentClassifySplitter.split(cpcArr.get(i));
|
|
|
|
- patentClassifies.add(patentClassify);
|
|
|
|
- if (i == 0) {
|
|
|
|
- patent.setMipc(patentClassify);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- patent.setCpc(patentClassifies);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载申请人
|
|
|
|
- if (patent.getApplicant() == null || patent.getApplicant().size() == 0) {
|
|
|
|
- List<String> names = Arrays.asList(worldPatentZhuLu.getPa().split(";"));
|
|
|
|
- List<PatentPerson> patentPeople = new ArrayList<>();
|
|
|
|
- for (int i = 0; i < names.size(); i++) {
|
|
|
|
- PatentPerson patentPerson = new PatentPerson();
|
|
|
|
- patentPerson.setOrder(0);
|
|
|
|
- patentPerson.setType("1");
|
|
|
|
- patentPerson.setName(names.get(i));
|
|
|
|
- patentPeople.add(patentPerson);
|
|
|
|
- }
|
|
|
|
- patent.setApplicant(patentPeople);
|
|
|
|
- if (patent.getRightHolder() == null || patent.getRightHolder().size() == 0) {
|
|
|
|
- patent.setRightHolder(patent.getApplicant());
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- //装载发明人
|
|
|
|
- if (patent.getInventor() == null || patent.getInventor().size() == 0) {
|
|
|
|
- if (worldPatentZhuLu.getIv() != null && !worldPatentZhuLu.getIv().equals("")) {
|
|
|
|
- List<String> patentInventorNames = Arrays.asList(worldPatentZhuLu.getIv().split(";"));
|
|
|
|
- List<PatentPerson> patentPeople = new ArrayList<>();
|
|
|
|
- for (int i = 0; i < patentInventorNames.size(); i++) {
|
|
|
|
- PatentPerson patentPerson = new PatentPerson();
|
|
|
|
- patentPerson.setOrder(0);
|
|
|
|
- patentPerson.setType("1");
|
|
|
|
- patentPerson.setName(patentInventorNames.get(i));
|
|
|
|
- patentPeople.add(patentPerson);
|
|
|
|
- }
|
|
|
|
- patent.setInventor(patentPeople);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载优先权号、优先权国家、优先权日
|
|
|
|
- if (patent.getPriorities() == null && worldPatentZhuLu.getPr() != null && worldPatentZhuLu.getPr() != "") {
|
|
|
|
- Priorities priorities = new Priorities();
|
|
|
|
- priorities.setPriorityNo(worldPatentZhuLu.getPr());
|
|
|
|
- String pCountry = worldPatentZhuLu.getPr().substring(0, 2);
|
|
|
|
- priorities.setPriorityCountry(pCountry);
|
|
|
|
- patent.setPriorities(Arrays.asList(priorities));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- //装载标题
|
|
|
|
- if (patent.getTitle() == null || patent.getTitle().size() != 0) {
|
|
|
|
- Text text = new Text();
|
|
|
|
- text.setLanguage(country);
|
|
|
|
- text.setIfOrigin(true);
|
|
|
|
- text.setTextContent(worldPatentZhuLu.getTitle());
|
|
|
|
- patent.setTitle(Arrays.asList(text));
|
|
|
|
- }
|
|
|
|
- //装载摘要
|
|
|
|
- if (patent.getAbstractStr() == null || patent.getAbstractStr().equals("")) {
|
|
|
|
- Text text = new Text();
|
|
|
|
- text.setLanguage(patent.getAppCountry());
|
|
|
|
- text.setIfOrigin(true);
|
|
|
|
- text.setTextContent(worldPatentZhuLu.getAbstract());
|
|
|
|
- patent.setAbstractStr(Arrays.asList(text));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
|
|
public void getFullXmlStr(Patent patent, StarPatentVO starPatentVO, List<Integer> contents) throws Exception {
|
|
public void getFullXmlStr(Patent patent, StarPatentVO starPatentVO, List<Integer> contents) throws Exception {
|
|
String cnFullXmlStr = patentStarApiService.getCnFullXmlApi(starPatentVO.getANO());
|
|
String cnFullXmlStr = patentStarApiService.getCnFullXmlApi(starPatentVO.getANO());
|
|
@@ -733,8 +345,6 @@ public class ImportSinglePatentService {
|
|
}
|
|
}
|
|
|
|
|
|
public void getPictureFromWeb(StarPatentVO starPatentVO) throws Exception {
|
|
public void getPictureFromWeb(StarPatentVO starPatentVO) throws Exception {
|
|
-
|
|
|
|
-
|
|
|
|
String pictureUrl = patentStarApiService.getPictureApi(starPatentVO.getANO());
|
|
String pictureUrl = patentStarApiService.getPictureApi(starPatentVO.getANO());
|
|
if (pictureUrl != null && pictureUrl != "{}") {
|
|
if (pictureUrl != null && pictureUrl != "{}") {
|
|
File file = FileUtils.getPictureFileByUrl(pictureUrl);
|
|
File file = FileUtils.getPictureFileByUrl(pictureUrl);
|