|
@@ -730,21 +730,43 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
|
|
|
|
|
|
QueryCMVO queryCMVO = new QueryCMVO();
|
|
|
queryCMVO.setReportId(syneryVO.getReportId());
|
|
|
- queryCMVO.setPatentNo(syneryVO.getPatentNo());
|
|
|
queryCMVO.setCompareResult(syneryVO.getCompareResult());
|
|
|
- List<String> AllpatentNos = compareMessageService.getBaseMapper().getComparedMessageAll(queryCMVO);
|
|
|
- //无查询条件
|
|
|
- if ((patentVO == null || patentVO.getFiledOptions() == null || patentVO.getFiledOptions().size() == 0)&&syneryVO.getPatentNo()!=null) {
|
|
|
- patentVO.setPatentNos(AllpatentNos);
|
|
|
+ List<String> patentNos = new ArrayList<>();
|
|
|
+ //无查询条件,单个专利
|
|
|
+ if( syneryVO.getPatentNo()!=null){
|
|
|
+ patentNos =Arrays.asList(syneryVO.getPatentNo());
|
|
|
+ }
|
|
|
+ //无查询条件并且是对比过的专利
|
|
|
+ else if ((patentVO == null || patentVO.getFiledOptions() == null || patentVO.getFiledOptions().size() == 0)&&syneryVO.getIsAll()==0) {
|
|
|
+ List<String> AllpatentNos = compareMessageService.getBaseMapper().getComparedMessageAll(queryCMVO);
|
|
|
+ patentNos=AllpatentNos;
|
|
|
+ }
|
|
|
+ //无查询条件并且是全部的专利
|
|
|
+ else if((patentVO == null || patentVO.getFiledOptions() == null || patentVO.getFiledOptions().size() == 0)&&syneryVO.getIsAll()==1){
|
|
|
+ LambdaQueryWrapper<CompareFiles> queryWrapper1 = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper1.eq(CompareFiles::getReportId, syneryVO.getReportId());
|
|
|
+ List<CompareFiles> compareFiles = compareFilesService.list(queryWrapper1);
|
|
|
+ List<String> AllpatentNos = compareFiles.stream().map(CompareFiles::getPatentNo).collect(Collectors.toList());
|
|
|
+ patentNos=AllpatentNos;
|
|
|
+ }
|
|
|
+ //有查询条件并且是对比过的专利
|
|
|
+ else if(patentVO != null && patentVO.getFiledOptions() != null && patentVO.getFiledOptions().size() != 0&&syneryVO.getIsAll()==0){
|
|
|
+ List<String> AllpatentNos = compareMessageService.getBaseMapper().getComparedMessageAll(queryCMVO);
|
|
|
+ List<String> temPatentNos = reportFieldService.getPatentNo1(patentVO.getFiledOptions(), syneryVO.getReportId(), task.getId(), patentVO.getTaskStatus());
|
|
|
+ List<String> strings1 = new ArrayList<>(CollectionUtils.intersection(temPatentNos, AllpatentNos));
|
|
|
+ patentVO.setPatentNos(temPatentNos);
|
|
|
}
|
|
|
- //有查询条件时,自定义字段的专利号和任务的专利号取交集
|
|
|
- else {
|
|
|
- List<String> temPatentNos = reportFieldService.getPatentNo1(patentVO.getFiledOptions(), patentVO.getReportId(), patentVO.getTaskId(), patentVO.getTaskStatus());
|
|
|
+ //有查询条件并且是全部的专利
|
|
|
+ else if(patentVO != null && patentVO.getFiledOptions() != null && patentVO.getFiledOptions().size() != 0&&syneryVO.getIsAll()==1){
|
|
|
+ LambdaQueryWrapper<CompareFiles> queryWrapper1 = new LambdaQueryWrapper<>();
|
|
|
+ queryWrapper1.eq(CompareFiles::getReportId, syneryVO.getReportId());
|
|
|
+ List<CompareFiles> compareFiles = compareFilesService.list(queryWrapper1);
|
|
|
+ List<String> AllpatentNos = compareFiles.stream().map(CompareFiles::getPatentNo).collect(Collectors.toList());
|
|
|
+ List<String> temPatentNos = reportFieldService.getPatentNo1(patentVO.getFiledOptions(), syneryVO.getReportId(), task.getId(), patentVO.getTaskStatus());
|
|
|
List<String> strings1 = new ArrayList<>(CollectionUtils.intersection(temPatentNos, AllpatentNos));
|
|
|
patentVO.setPatentNos(temPatentNos);
|
|
|
}
|
|
|
- List<String> patentNos = new ArrayList<>();
|
|
|
- if (patentVO.getPatentNos().size() != 0) {
|
|
|
+ if (patentVO!=null&&patentVO.getPatentNos()!=null&&patentVO.getPatentNos().size() != 0) {
|
|
|
String res = outInterfaceService.getConPantentNos(patentVO, 1);
|
|
|
JSONObject jsonObject1 = JSONObject.parseObject(res);
|
|
|
patentNos = JSONArray.parseArray(jsonObject1.get("data").toString(), String.class);
|