|
@@ -1,6 +1,7 @@
|
|
|
package cn.cslg.pas.service.novelty;
|
|
|
|
|
|
import cn.cslg.pas.common.dto.es.RefreshPatentDTO;
|
|
|
+import cn.cslg.pas.common.vo.PatentWithIdVO;
|
|
|
import cn.cslg.pas.domain.business.novelty.ImportPatentQueen;
|
|
|
import cn.cslg.pas.mapper.novelty.ImportPatentQueenMapper;
|
|
|
import cn.cslg.pas.service.business.CompareLiteratureService;
|
|
@@ -44,16 +45,21 @@ public class ImportPatentQueenService extends ServiceImpl<ImportPatentQueenMappe
|
|
|
// refreshPatentDTO.setPatentNo(importPatentQueen.getPatentNo());
|
|
|
// refreshPatentDTO.setRefreshContent(Arrays.asList(2,3,4,5,6));
|
|
|
new Thread(() -> {
|
|
|
+
|
|
|
Integer projectId = importPatentQueen.getProjectId();
|
|
|
String patentNo = importPatentQueen.getPatentNo();
|
|
|
try {
|
|
|
- importSinglePatentService.addSinglePatent(importPatentQueen.getPatentNo());
|
|
|
- compareLiteratureService.updateByPatentNo(projectId, patentNo);
|
|
|
+ PatentWithIdVO patentWithIdVO = importSinglePatentService.addSinglePatent(importPatentQueen.getPatentNo());
|
|
|
+ if(patentWithIdVO!=null){
|
|
|
+
|
|
|
+ this.removeById(importPatentQueen.getId());
|
|
|
+ compareLiteratureService.updateByPatentNo(projectId, patentNo);
|
|
|
+ }
|
|
|
+
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
total = total - 1;
|
|
|
- this.removeById(importPatentQueen.getId());
|
|
|
this.startImport();
|
|
|
}).start();
|
|
|
|
|
@@ -67,7 +73,8 @@ public class ImportPatentQueenService extends ServiceImpl<ImportPatentQueenMappe
|
|
|
}
|
|
|
|
|
|
LambdaQueryWrapper<ImportPatentQueen> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper.eq(ImportPatentQueen::getState, 0);
|
|
|
+ queryWrapper.eq(ImportPatentQueen::getState, 0)
|
|
|
+ .orderByAsc(ImportPatentQueen::getCreateTime);
|
|
|
ImportPatentQueen importPatentQueen = this.getOne(queryWrapper, false);
|
|
|
if (importPatentQueen != null) {
|
|
|
total += 1;
|