|
|
@@ -78,8 +78,10 @@ public class WithDrawHandle { |
|
|
|
.filter(c -> !NodeTypeEnum.CC.name().equals(c.getNodeType().name())) |
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
//1.判断出 当前审批人和上一个审批人 |
|
|
|
ProgressNode progressNode = currentProgressInfo.get(currentProgressInfo.size() - 1); |
|
|
|
//1.判断出 当前审批人和上一个审批人 如果传了taskid |
|
|
|
ProgressNode progressNode = StringUtils.isBlank(param.getTaskId()) ? |
|
|
|
currentProgressInfo.get(currentProgressInfo.size() - 1) |
|
|
|
: findSubNodeByTaskId(param.getTaskId(),currentProgressInfo); |
|
|
|
ProgressNode beforeProgressNode = null; |
|
|
|
ProgressNode currentProgressNode = null; |
|
|
|
|
|
|
@@ -177,6 +179,26 @@ public class WithDrawHandle { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 找到其 所在的子流程父节点 |
|
|
|
* @param taskId |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
private ProgressNode findSubNodeByTaskId(String taskId,List<ProgressNode> currentProgressInfos) { |
|
|
|
for(ProgressNode progressNode : currentProgressInfos){ |
|
|
|
if(progressNode.getNodeType().equals(NodeTypeEnum.SUB)){ |
|
|
|
List<ProgressNode> children = progressNode.getChildren(); |
|
|
|
for(ProgressNode c : children){ |
|
|
|
if(taskId.equals(c.getTaskId())){ |
|
|
|
//如果任务ID对得上 返回其 所在的子流程 |
|
|
|
return progressNode; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 判断撤回用户 是不是发起人 |
|
|
|
* @param processInstanceId |
|
|
|
* @param task |
|
|
|