|
@@ -20,6 +20,7 @@ import cn.cslg.pas.service.WebLoginConfigService;
|
|
|
|
|
|
|
|
|
import cn.cslg.pas.service.importPatent.WebVOTransformService;
|
|
|
+import cn.cslg.pas.service.novelty.AssoRetrieveRecordProjectService;
|
|
|
import cn.cslg.pas.service.query.FormatQueryService;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -81,9 +82,11 @@ public class PatentStarApiService {
|
|
|
@Autowired
|
|
|
@Lazy
|
|
|
private WebVOTransformService webVOTransformService;
|
|
|
+ @Autowired
|
|
|
+ private AssoRetrieveRecordProjectService assoRetrieveRecordProjectService;
|
|
|
|
|
|
public Records patentStarSearchLocal(PatentStarListDTO patentStarListDTO) throws IOException {
|
|
|
- RetrieveRecord retrieveRecord =retrieveRecordService.setRetrieveRecord(patentStarListDTO);
|
|
|
+ RetrieveRecord retrieveRecord = retrieveRecordService.setRetrieveRecord(patentStarListDTO);
|
|
|
long start = System.currentTimeMillis();
|
|
|
Map<String, Object> map = this.patentStarSearchApi(patentStarListDTO);
|
|
|
long end = System.currentTimeMillis();
|
|
@@ -94,6 +97,10 @@ public class PatentStarApiService {
|
|
|
retrieveRecord.setTotalNum(Integer.parseInt(map.get("total").toString()));
|
|
|
if (patentStarListDTO.getRetrieveRecordId() == null) {
|
|
|
retrieveRecord.insert();
|
|
|
+ Integer projectId = patentStarListDTO.getProjectId();
|
|
|
+ if (projectId != null) {
|
|
|
+ assoRetrieveRecordProjectService.add(retrieveRecord.getId(), projectId);
|
|
|
+ }
|
|
|
} else {
|
|
|
retrieveRecord.updateById();
|
|
|
}
|
|
@@ -104,7 +111,7 @@ public class PatentStarApiService {
|
|
|
records.setRetrieveRecordId(retrieveRecord.getId());
|
|
|
records.setCurrent(Long.parseLong(map.get("current").toString()));
|
|
|
records.setSize(Long.parseLong(map.get("size").toString()));
|
|
|
- records.setData(this.loadPatent(starPatentVOS,patentStarListDTO.getDBType()));
|
|
|
+ records.setData(this.loadPatent(starPatentVOS, patentStarListDTO.getDBType()));
|
|
|
records.setTotal(Long.parseLong(map.get("total").toString()));
|
|
|
return records;
|
|
|
}
|
|
@@ -856,7 +863,7 @@ public class PatentStarApiService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- private List<PatentColumnDTO> loadPatent(List<StarPatentVO> starPatentVOS,String dbType) {
|
|
|
+ private List<PatentColumnDTO> loadPatent(List<StarPatentVO> starPatentVOS, String dbType) {
|
|
|
|
|
|
List<PatentColumnDTO> patentColumnDTOS = new ArrayList<>();
|
|
|
starPatentVOS.forEach(item -> {
|
|
@@ -864,17 +871,15 @@ public class PatentStarApiService {
|
|
|
uploadPatentWebDTO.setStarPatentVO(item);
|
|
|
Patent patent = new Patent();
|
|
|
uploadPatentWebDTO.setPatent(patent);
|
|
|
- webVOTransformService.loadPatent(uploadPatentWebDTO,false);
|
|
|
- if(dbType!=null&&dbType.equals("CN"))
|
|
|
- {
|
|
|
- webVOTransformService.loadCNPatentNo(uploadPatentWebDTO.getPatent());
|
|
|
- }
|
|
|
- else {
|
|
|
- webVOTransformService.loadWorldPatentNo(uploadPatentWebDTO.getPatent());
|
|
|
-
|
|
|
- }
|
|
|
+ webVOTransformService.loadPatent(uploadPatentWebDTO, false);
|
|
|
+ if (dbType != null && dbType.equals("CN")) {
|
|
|
+ webVOTransformService.loadCNPatentNo(uploadPatentWebDTO.getPatent());
|
|
|
+ } else {
|
|
|
+ webVOTransformService.loadWorldPatentNo(uploadPatentWebDTO.getPatent());
|
|
|
+
|
|
|
+ }
|
|
|
PatentColumnDTO patentColumnDTO = new PatentColumnDTO();
|
|
|
- BeanUtils.copyProperties(patent,patentColumnDTO);
|
|
|
+ BeanUtils.copyProperties(patent, patentColumnDTO);
|
|
|
//装载权利要求
|
|
|
List<Text> claimList = new ArrayList<>();
|
|
|
Text claim = new Text();
|