|
@@ -351,6 +351,13 @@ public class ExcutePatentDataStar implements IExcutePatentData {
|
|
|
* @param uploadParamsVO 专利实体类对象
|
|
|
*/
|
|
|
public void setPatentZhuLu(StarPatentVO starPatent, UploadParamsVO uploadParamsVO) throws IOException {
|
|
|
+ String usedPatentNo;
|
|
|
+ if (starPatent.getPublicNo() != null && !starPatent.getPublicNo().equals("")) {
|
|
|
+ usedPatentNo = starPatent.getPublicNo();
|
|
|
+ } else {
|
|
|
+ usedPatentNo = starPatent.getPatentNo();
|
|
|
+ }
|
|
|
+
|
|
|
//以下 ↓装载的是调用"一般检索"接口返回的专利相关数据
|
|
|
//装载专利类型
|
|
|
Integer patentType = starPatent.getPatentType();
|
|
@@ -498,7 +505,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
|
|
|
|
|
|
try {
|
|
|
//以下 ↓装载的是调用"获得中国专利著录"接口返回的专利相关数据
|
|
|
- if (appNo.contains("CN")) {
|
|
|
+ if ((starPatent.getPublicNo() != null && starPatent.getPublicNo().contains("CN")) || (starPatent.getPublicNo() == null && starPatent.getPatentNo().contains("CN"))) {
|
|
|
String chinaPatentZhuLuStr = patentStarApiService.getCnBibApi(appNo);
|
|
|
if (chinaPatentZhuLuStr != null && !chinaPatentZhuLuStr.trim().equals("") && !chinaPatentZhuLuStr.equals("{}") && !chinaPatentZhuLuStr.contains("请求不合法")) {
|
|
|
List<ChinaPatentZhuLu> chinaPatentZhuLus = JSON.parseArray(chinaPatentZhuLuStr, ChinaPatentZhuLu.class);
|
|
@@ -559,7 +566,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
|
|
|
}
|
|
|
}
|
|
|
} else { //以下 ↓装载的是调用"获得世界专利著录"接口返回的专利相关数据
|
|
|
- String worldPatentZhuLuStr = patentStarApiService.getENBibApi(starPatent.getPatentNo());
|
|
|
+ String worldPatentZhuLuStr = patentStarApiService.getENBibApi(usedPatentNo);
|
|
|
List<WorldPatentZhuLu> worldPatentZhuLus = JSON.parseArray(worldPatentZhuLuStr, WorldPatentZhuLu.class);
|
|
|
WorldPatentZhuLu worldPatentZhuLu = worldPatentZhuLus.get(0);
|
|
|
|
|
@@ -638,7 +645,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
|
|
|
//以下 ↓装载的是调用"获得同族专利"接口返回的专利相关数据
|
|
|
try {
|
|
|
if (starPatent.getPatentNo() != null && !starPatent.getPatentNo().equals("")) {
|
|
|
- String familyPatentNoStr = patentStarApiService.getFamilyByPubNoApi(starPatent.getPatentNo());
|
|
|
+ String familyPatentNoStr = patentStarApiService.getFamilyByPubNoApi(usedPatentNo);
|
|
|
if (!familyPatentNoStr.equals("no data") && !familyPatentNoStr.equals("{}")) {
|
|
|
FamilyPatentNo familyPatentNo = JSON.parseObject(familyPatentNoStr, FamilyPatentNo.class);
|
|
|
List<String> familyPatentNos = Arrays.asList(familyPatentNo.getFamilyinfo().split(";"));
|
|
@@ -651,7 +658,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
|
|
|
|
|
|
//以下 ↓装载的是调用"获得中国专利法律状态"接口返回的专利相关数据
|
|
|
try {
|
|
|
- if (appNo.contains("CN")) {
|
|
|
+ if ((starPatent.getPublicNo() != null && starPatent.getPublicNo().contains("CN")) || (starPatent.getPublicNo() == null && starPatent.getPatentNo().contains("CN"))) {
|
|
|
PatentAffair patentAffair = new PatentAffair();
|
|
|
String cnLegalApiStr = patentStarApiService.getCnLegalApi(appNo);
|
|
|
if (!cnLegalApiStr.equals("")) {
|
|
@@ -705,7 +712,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
|
|
|
*/
|
|
|
public Boolean setPatentClaim(StarPatentVO starPatent, UploadParamsVO uploadParamsVO, PQueueData pQueueData) throws IOException {
|
|
|
try {
|
|
|
- if (starPatent.getApplicationNo().contains("CN")) {
|
|
|
+ if ((starPatent.getPublicNo() != null && starPatent.getPublicNo().contains("CN")) || (starPatent.getPublicNo() == null && starPatent.getPatentNo().contains("CN"))) {
|
|
|
String applicationNo = starPatent.getApplicationNo() + "";
|
|
|
String appNo;
|
|
|
if (starPatent.getApplicationNo().contains(".")) {
|
|
@@ -771,7 +778,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
|
|
|
*/
|
|
|
public Boolean setPatentInstructionText(StarPatentVO starPatent, UploadParamsVO uploadParamsVO, PQueueData pQueueData) throws IOException {
|
|
|
try {
|
|
|
- if (starPatent.getApplicationNo().contains("CN")) {
|
|
|
+ if ((starPatent.getPublicNo() != null && starPatent.getPublicNo().contains("CN")) || (starPatent.getPublicNo() == null && starPatent.getPatentNo().contains("CN"))) {
|
|
|
String applicationNo = starPatent.getApplicationNo() + "";
|
|
|
String appNo;
|
|
|
if (starPatent.getApplicationNo().contains(".")) {
|
|
@@ -828,11 +835,17 @@ public class ExcutePatentDataStar implements IExcutePatentData {
|
|
|
* @param uploadParamsVO 专利实体类对象
|
|
|
*/
|
|
|
public void setPatentInstructionPDF(StarPatentVO starPatent, UploadParamsVO uploadParamsVO, Task task) throws IOException {
|
|
|
+ String usedPatentNo;
|
|
|
+ if (starPatent.getPublicNo() != null && !starPatent.getPublicNo().equals("")) {
|
|
|
+ usedPatentNo = starPatent.getPublicNo();
|
|
|
+ } else {
|
|
|
+ usedPatentNo = starPatent.getPatentNo();
|
|
|
+ }
|
|
|
try {
|
|
|
String pdfUrl = "", pdfUrl1 = "", pdfUrl2 = "";
|
|
|
if ((starPatent.getPatentNo() != null && !starPatent.getPatentNo().equals("")) || (starPatent.getApplicationNo() != null && !starPatent.getApplicationNo().equals(""))) {
|
|
|
- //根据申请号调用"获得中国专利pdf"接口,获得1个或2个pdf的url地址
|
|
|
- if (starPatent.getPatentNo().contains("CN")) {
|
|
|
+ //先根据公开号判断国家,若没有公开号再根据申请号判断,调用"获得中国专利pdf"接口,获得1个或2个pdf的url地址
|
|
|
+ if ((starPatent.getPublicNo() != null && starPatent.getPublicNo().contains("CN")) || (starPatent.getPublicNo() == null && starPatent.getPatentNo().contains("CN"))) {
|
|
|
String appNo = starPatent.getApplicationNo();
|
|
|
if (appNo.contains(".")) {
|
|
|
appNo = appNo.substring(0, appNo.lastIndexOf("."));
|
|
@@ -873,7 +886,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
|
|
|
|
|
|
//根据专利号调用"获得世界专利pdf"接口,获得pdf的url地址
|
|
|
} else {
|
|
|
- pdfUrl = patentStarApiService.getEnPdfApi(starPatent.getPatentNo());
|
|
|
+ pdfUrl = patentStarApiService.getEnPdfApi(usedPatentNo);
|
|
|
|
|
|
//若没有取到说明书pdf,则将当前申请号和备注信息存入问题记录表,并返回空对象
|
|
|
if (pdfUrl.equals("") || pdfUrl.equals("{}")) {
|
|
@@ -905,7 +918,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
|
|
|
if (appNo.contains(".")) {
|
|
|
appNo = appNo.substring(0, appNo.lastIndexOf("."));
|
|
|
}
|
|
|
- if (appNo.contains("CN")) {
|
|
|
+ if ((starPatent.getPublicNo() != null && starPatent.getPublicNo().contains("CN")) || (starPatent.getPublicNo() == null && starPatent.getPatentNo().contains("CN"))) {
|
|
|
String pictureUrl = patentStarApiService.getPictureApi(appNo);
|
|
|
URL url = new URL(pictureUrl); //想要读取的url地址
|
|
|
InputStream in = url.openStream();
|
|
@@ -1117,7 +1130,7 @@ public class ExcutePatentDataStar implements IExcutePatentData {
|
|
|
.setCell(cell)
|
|
|
.setTaskId(taskId)
|
|
|
.setRemark("该申请号的该字段(2权要 3说明书文本 4说明书pdf)接口检索返回原始数据为空");
|
|
|
- List<QuestionRecord> questionRecords = questionRecordService.list(new LambdaQueryWrapper<QuestionRecord>().eq(QuestionRecord::getPatentNo, applicationNoOrPatentNo).eq(QuestionRecord::getCell, cell).eq(QuestionRecord::getTaskId, -1));
|
|
|
+ List<QuestionRecord> questionRecords = questionRecordService.list(new LambdaQueryWrapper<QuestionRecord>().eq(QuestionRecord::getPatentNo, applicationNoOrPatentNo).eq(QuestionRecord::getCell, cell));
|
|
|
if (questionRecords == null || questionRecords.size() == 0) {
|
|
|
questionRecordService.save(questionRecord);
|
|
|
}
|