1、任务列表二次查询 bugfix
This commit is contained in:
@@ -352,6 +352,16 @@ public class TaskServiceImpl implements ITaskService {
|
||||
|
||||
try {
|
||||
// 获取当前任务的标签值
|
||||
// taskId特殊处理
|
||||
if (StringUtils.isNotBlank(taskId)) {
|
||||
List<String> taskIdList = Arrays.stream(taskId.split(",")).toList();
|
||||
if (taskIdList.contains(task.getUuid())) {
|
||||
matchedTagCount++;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
String currentNodeTagId = getTagProperty(task, tagKey);
|
||||
if (StringUtils.isBlank(currentNodeTagId)) {
|
||||
break; // 该标签无值,不匹配,直接跳出
|
||||
@@ -361,12 +371,7 @@ public class TaskServiceImpl implements ITaskService {
|
||||
boolean isMatched = Arrays.stream(currentNodeTagId.split(","))
|
||||
.map(String::trim) // 处理空格
|
||||
.anyMatch(tagValueSet::contains);
|
||||
boolean taskIsMatched = true;
|
||||
if (StringUtils.isNotBlank(taskId)) {
|
||||
taskIsMatched = taskId.equals(task.getUuid());
|
||||
}
|
||||
|
||||
if (isMatched && taskIsMatched) {
|
||||
if (isMatched) {
|
||||
matchedTagCount++;
|
||||
} else {
|
||||
break; // 该标签不匹配,直接跳出
|
||||
@@ -424,7 +429,8 @@ public class TaskServiceImpl implements ITaskService {
|
||||
new TagConfig("tag7", tagReq::getTag7),
|
||||
new TagConfig("tag8", tagReq::getTag8),
|
||||
new TagConfig("tag9", tagReq::getTag9),
|
||||
new TagConfig("tag10", tagReq::getTag10)
|
||||
new TagConfig("tag10", tagReq::getTag10),
|
||||
new TagConfig("taskId", tagReq::getTaskId)
|
||||
);
|
||||
|
||||
// 处理所有tag
|
||||
|
||||
Reference in New Issue
Block a user