|
@@ -20,6 +20,7 @@ import co.elastic.clients.elasticsearch.core.UpdateRequest;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import org.apache.commons.compress.utils.IOUtils;
|
|
import org.apache.commons.compress.utils.IOUtils;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.poi.ss.usermodel.Sheet;
|
|
import org.apache.poi.ss.usermodel.Sheet;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.beans.factory.annotation.Configurable;
|
|
import org.springframework.beans.factory.annotation.Configurable;
|
|
@@ -68,17 +69,18 @@ public class GetCataloguingFromWebThread extends Thread {
|
|
StarPatentVO starPatentVO = uploadPatentWebDTO.getStarPatentVO();
|
|
StarPatentVO starPatentVO = uploadPatentWebDTO.getStarPatentVO();
|
|
String patentZhuLuStr = "";
|
|
String patentZhuLuStr = "";
|
|
patentStarApiService = applicationContext.getBean(PatentStarApiService.class);
|
|
patentStarApiService = applicationContext.getBean(PatentStarApiService.class);
|
|
|
|
+ String number = this.getNumber(starPatentVO.getGN(), starPatentVO.getPN(), starPatentVO.getAN());
|
|
WebVOTransformService webVOTransformService = applicationContext.getBean(WebVOTransformService.class);
|
|
WebVOTransformService webVOTransformService = applicationContext.getBean(WebVOTransformService.class);
|
|
- if (starPatentVO.getAN().startsWith("CN")) {
|
|
|
|
|
|
+ if (number.startsWith("CN")) {
|
|
patentZhuLuStr = patentStarApiService.getCnBibApi(uploadPatentWebDTO.getStarPatentVO().getANO());
|
|
patentZhuLuStr = patentStarApiService.getCnBibApi(uploadPatentWebDTO.getStarPatentVO().getANO());
|
|
} else {
|
|
} else {
|
|
patentZhuLuStr = patentStarApiService.getENBibApi(uploadPatentWebDTO.getStarPatentVO().getPN());
|
|
patentZhuLuStr = patentStarApiService.getENBibApi(uploadPatentWebDTO.getStarPatentVO().getPN());
|
|
}
|
|
}
|
|
- if (starPatentVO.getAN().startsWith("CN")) {
|
|
|
|
- webVOTransformService.loadCNPatent(patentZhuLuStr, uploadPatentWebDTO);
|
|
|
|
- } else {
|
|
|
|
- webVOTransformService.loadWorldPatent(patentZhuLuStr, uploadPatentWebDTO);
|
|
|
|
- }
|
|
|
|
|
|
+ if (number.startsWith("CN")) {
|
|
|
|
+ webVOTransformService.loadCNPatent(patentZhuLuStr, uploadPatentWebDTO);
|
|
|
|
+ } else {
|
|
|
|
+ webVOTransformService.loadWorldPatent(patentZhuLuStr, uploadPatentWebDTO);
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
EsService esService = applicationContext.getBean(EsService.class);
|
|
EsService esService = applicationContext.getBean(EsService.class);
|
|
@@ -137,6 +139,17 @@ public class GetCataloguingFromWebThread extends Thread {
|
|
this.sendDone();
|
|
this.sendDone();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public String getNumber(String grantNo, String publicNo, String appNo) {
|
|
|
|
+ String res = "";
|
|
|
|
+ if (StringUtils.isNotEmpty(grantNo)) {
|
|
|
|
+ res = grantNo;
|
|
|
|
+ } else if (StringUtils.isNotEmpty(publicNo)) {
|
|
|
|
+ res = publicNo;
|
|
|
|
+ } else {
|
|
|
|
+ res = appNo;
|
|
|
|
+ }
|
|
|
|
+ return res;
|
|
|
|
+ }
|
|
|
|
|
|
public GetCataloguingFromWebThread(TaskThread taskThread, ImportFromWebToEsService importFromWebToEsService) {
|
|
public GetCataloguingFromWebThread(TaskThread taskThread, ImportFromWebToEsService importFromWebToEsService) {
|
|
this.importTaskAMVO = taskThread.getImportTaskAMVO();
|
|
this.importTaskAMVO = taskThread.getImportTaskAMVO();
|