|
@@ -346,15 +346,41 @@ public class TaskService extends ServiceImpl<TaskMapper, Task> {
|
|
.eq(CompareFiles::getState, 0);
|
|
.eq(CompareFiles::getState, 0);
|
|
List<CompareFiles> compareFiles = compareFilesService.list(wrapper);
|
|
List<CompareFiles> compareFiles = compareFilesService.list(wrapper);
|
|
List<String> AllpatentNos = compareFiles.stream().map(CompareFiles::getPatentNo).collect(Collectors.toList());
|
|
List<String> AllpatentNos = compareFiles.stream().map(CompareFiles::getPatentNo).collect(Collectors.toList());
|
|
|
|
+ List<String> patentNos1 =new ArrayList<>();
|
|
//无查询条件
|
|
//无查询条件
|
|
if (patentVO == null || patentVO.getFiledOptions() == null || patentVO.getFiledOptions().size() == 0) {
|
|
if (patentVO == null || patentVO.getFiledOptions() == null || patentVO.getFiledOptions().size() == 0) {
|
|
- patentVO.setPatentNos(AllpatentNos);
|
|
|
|
|
|
+ patentNos1 =AllpatentNos;
|
|
}
|
|
}
|
|
//有查询条件时,自定义字段的专利号和任务的专利号取交集
|
|
//有查询条件时,自定义字段的专利号和任务的专利号取交集
|
|
else {
|
|
else {
|
|
List<String> temPatentNos = reportFieldService.getPatentNo1(patentVO.getFiledOptions(), patentVO.getReportId(), patentVO.getTaskId(), patentVO.getTaskStatus());
|
|
List<String> temPatentNos = reportFieldService.getPatentNo1(patentVO.getFiledOptions(), patentVO.getReportId(), patentVO.getTaskId(), patentVO.getTaskStatus());
|
|
- patentVO.setPatentNos(temPatentNos);
|
|
|
|
|
|
+ patentNos1=temPatentNos;
|
|
|
|
+ }
|
|
|
|
+ //如果有任务过滤条件
|
|
|
|
+ List<String> patentNosTask = new ArrayList<>();
|
|
|
|
+ if (patentVO.getTaskSources() != null && patentVO.getTaskSources().size() != 0) {
|
|
|
|
+ patentNosTask = assoTaskPersonelService.getBaseMapper().getPatents(patentVO.getTaskSources());
|
|
|
|
+ }
|
|
|
|
+ List<String> allPatentsCopy = new ArrayList<>();
|
|
|
|
+ if (patentVO.getNotAssignTypes() != null && patentVO.getNotAssignTypes().size() != 0) {
|
|
|
|
+ for(Integer types :patentVO.getNotAssignTypes())
|
|
|
|
+ {
|
|
|
|
+ List<String> PatentsCopy = new ArrayList<>(AllpatentNos);
|
|
|
|
+ LambdaQueryWrapper<AssoTaskPersonel> assoWrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ assoWrapper.eq(AssoTaskPersonel::getReportId, patentVO.getReportId())
|
|
|
|
+ .eq(AssoTaskPersonel::getTaskType, types);
|
|
|
|
+ List<AssoTaskPersonel> assoTaskPersonels = assoTaskPersonelService.list(assoWrapper);
|
|
|
|
+ List<String> tem = assoTaskPersonels.stream().map(AssoTaskPersonel::getPatentNo).collect(Collectors.toList());
|
|
|
|
+ PatentsCopy.removeAll(tem);
|
|
|
|
+ allPatentsCopy.addAll(PatentsCopy);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if ((patentVO.getTaskSources() != null && patentVO.getTaskSources().size() != 0) || (patentVO.getNotAssignTypes() != null && patentVO.getNotAssignTypes().size() != 0)) {
|
|
|
|
+ patentNosTask.addAll(allPatentsCopy);
|
|
|
|
+ patentNos1 = new ArrayList<>(CollectionUtils.intersection(patentNosTask, patentNos1));
|
|
}
|
|
}
|
|
|
|
+ patentVO.setPatentNos(patentNos1);
|
|
String res = outInterfaceService.getConPantentNos(patentVO, 1);
|
|
String res = outInterfaceService.getConPantentNos(patentVO, 1);
|
|
JSONObject jsonObject1 = JSONObject.parseObject(res);
|
|
JSONObject jsonObject1 = JSONObject.parseObject(res);
|
|
List<String> patentNos = JSONArray.parseArray(jsonObject1.get("data").toString(), String.class);
|
|
List<String> patentNos = JSONArray.parseArray(jsonObject1.get("data").toString(), String.class);
|