|
|
@ -2419,15 +2419,19 @@ public class ProcessService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public List<TaskDefinitionLog> getTaskDefineLogListByRelation(List<ProcessTaskRelation> processTaskRelations) { |
|
|
|
public List<TaskDefinitionLog> getTaskDefineLogListByRelation(List<ProcessTaskRelation> processTaskRelations) { |
|
|
|
List<TaskDefinitionLog> taskDefinitionLogs = com.google.common.collect.Lists.newArrayList(); |
|
|
|
List<TaskDefinitionLog> taskDefinitionLogs = new ArrayList<>(); |
|
|
|
|
|
|
|
Map<Long, Integer> taskCodeVersionMap = new HashMap<>(); |
|
|
|
for (ProcessTaskRelation processTaskRelation : processTaskRelations) { |
|
|
|
for (ProcessTaskRelation processTaskRelation : processTaskRelations) { |
|
|
|
if (processTaskRelation.getPreTaskCode() > 0) { |
|
|
|
if (processTaskRelation.getPreTaskCode() > 0) { |
|
|
|
taskDefinitionLogs.add((TaskDefinitionLog) this.findTaskDefinition(processTaskRelation.getPreTaskCode(), processTaskRelation.getPreTaskVersion())); |
|
|
|
taskCodeVersionMap.put(processTaskRelation.getPreTaskCode(), processTaskRelation.getPreTaskVersion()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (processTaskRelation.getPostTaskCode() > 0) { |
|
|
|
if (processTaskRelation.getPostTaskCode() > 0) { |
|
|
|
taskDefinitionLogs.add((TaskDefinitionLog) this.findTaskDefinition(processTaskRelation.getPostTaskCode(), processTaskRelation.getPostTaskVersion())); |
|
|
|
taskCodeVersionMap.put(processTaskRelation.getPostTaskCode(), processTaskRelation.getPostTaskVersion()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
taskCodeVersionMap.forEach((code,version) -> { |
|
|
|
|
|
|
|
taskDefinitionLogs.add((TaskDefinitionLog) this.findTaskDefinition(code, version)); |
|
|
|
|
|
|
|
}); |
|
|
|
return taskDefinitionLogs; |
|
|
|
return taskDefinitionLogs; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|