|
@@ -53,8 +53,7 @@ public class SavePatentToEsThread extends Thread {
|
|
|
taskCondition.await();
|
|
|
}
|
|
|
|
|
|
- }
|
|
|
- catch (Exception e) {
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
|
}
|
|
|
if (uploadPatentWebDTOS.size() == 0) {
|
|
@@ -77,24 +76,24 @@ public class SavePatentToEsThread extends Thread {
|
|
|
patent = this.formPatent(patent, orgPatent);
|
|
|
|
|
|
//更新翻译
|
|
|
- if(patent.getClaim()!=null&&patent.getClaim()!=orgPatent.getClaim()){
|
|
|
- TranslateService translateService =applicationContext.getBean(TranslateService.class);
|
|
|
- if(orgPatent.getPatentNo()!=null) {
|
|
|
- translateService.deleteTranslatePatentNo(orgPatent.getPatentNo(),"3");
|
|
|
+ if (patent.getClaim() != null && patent.getClaim() != orgPatent.getClaim()) {
|
|
|
+ TranslateService translateService = applicationContext.getBean(TranslateService.class);
|
|
|
+ if (orgPatent.getPatentNo() != null) {
|
|
|
+ translateService.deleteTranslatePatentNo(orgPatent.getPatentNo(), "3");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(patent.getPublicFullText()!=null&&patent.getPublicFullText()!=orgPatent.getPublicFullText()){
|
|
|
- TranslateService translateService =applicationContext.getBean(TranslateService.class);
|
|
|
- if(orgPatent.getPatentNo()!=null) {
|
|
|
- translateService.deleteTranslatePatentNo(orgPatent.getPatentNo(),"4");
|
|
|
+ if (patent.getPublicFullText() != null && patent.getPublicFullText() != orgPatent.getPublicFullText()) {
|
|
|
+ TranslateService translateService = applicationContext.getBean(TranslateService.class);
|
|
|
+ if (orgPatent.getPatentNo() != null) {
|
|
|
+ translateService.deleteTranslatePatentNo(orgPatent.getPatentNo(), "4");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(patent.getGrantFullText()!=null&&patent.getGrantFullText()!=orgPatent.getGrantFullText()){
|
|
|
- TranslateService translateService =applicationContext.getBean(TranslateService.class);
|
|
|
- if(orgPatent.getPatentNo()!=null) {
|
|
|
- translateService.deleteTranslatePatentNo(orgPatent.getPatentNo(),"4");
|
|
|
+ if (patent.getGrantFullText() != null && patent.getGrantFullText() != orgPatent.getGrantFullText()) {
|
|
|
+ TranslateService translateService = applicationContext.getBean(TranslateService.class);
|
|
|
+ if (orgPatent.getPatentNo() != null) {
|
|
|
+ translateService.deleteTranslatePatentNo(orgPatent.getPatentNo(), "4");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -135,7 +134,7 @@ public class SavePatentToEsThread extends Thread {
|
|
|
|
|
|
//添加报告对比文件
|
|
|
if (importTaskAMVO.getProjectType() != null && importTaskAMVO.getProjectType().equals(1)) {
|
|
|
- if (importTaskAMVO.getReportType().equals(7) || importTaskAMVO.getReportType().equals(1) || importTaskAMVO.getReportType().equals(2)) {
|
|
|
+ if (importTaskAMVO.getReportType()==null||importTaskAMVO.getReportType().equals(7) || importTaskAMVO.getReportType().equals(1) || importTaskAMVO.getReportType().equals(2)) {
|
|
|
CompareLiteratureService compareLiteratureService = applicationContext.getBean(CompareLiteratureService.class);
|
|
|
compareLiteratureService.addPatentCompareLiterature(patent, importTaskAMVO.getProjectId(), importTaskAMVO.getCreateId());
|
|
|
}
|
|
@@ -168,7 +167,6 @@ public class SavePatentToEsThread extends Thread {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
//保存和自定义字段关联
|
|
|
if (importTaskAMVO.getFieldDTOS() != null && importTaskAMVO.getFieldDTOS().size() > 0) {
|
|
|
for (EsCustomFieldDTO esCustomFieldDTO : importTaskAMVO.getFieldDTOS()
|
|
@@ -256,12 +254,12 @@ public class SavePatentToEsThread extends Thread {
|
|
|
if (orgPatent.getClaim() != null && orgPatent.getClaim().size() > 0 && orgPatent.getGrantNo() != null && patent.getGrantNo() == null) {
|
|
|
patent.setClaim(orgPatent.getClaim());
|
|
|
}
|
|
|
- if(orgPatent.getGrantNo()!=null){
|
|
|
+ if (orgPatent.getGrantNo() != null) {
|
|
|
patent.setGrantFullText(patent.getPublicFullText());
|
|
|
patent.setPublicFullText(null);
|
|
|
}
|
|
|
}
|
|
|
-return patent;
|
|
|
+ return patent;
|
|
|
}
|
|
|
|
|
|
|