|
|
@@ -157,13 +157,17 @@ public class WithDrawHandle { |
|
|
|
} |
|
|
|
//进入上一个节点的标识 |
|
|
|
Boolean enterBefore = Boolean.FALSE; |
|
|
|
//假设 作为当前会签的第一个点 |
|
|
|
String thisAndOrNodeId = curr.getNodeId(); |
|
|
|
//假设 作为上一个会签/或签的第一个点 |
|
|
|
ProgressNode beforeAndOrNode = null; |
|
|
|
for(int i = progressNodes.size() - 2;i >= 0;i--){ |
|
|
|
//说明有会签 或签 |
|
|
|
if(progressNodes.get(i).getNodeId().equals(thisAndOrNodeId)){ |
|
|
|
//还在当前节点 |
|
|
|
if(!enterBefore){ |
|
|
|
if(thisAndOr.isEmpty()){ |
|
|
|
//放入当前的那个点 |
|
|
|
thisAndOr.add(curr); |
|
|
|
} |
|
|
|
thisAndOr.add(progressNodes.get(i)); |
|
|
@@ -171,12 +175,15 @@ public class WithDrawHandle { |
|
|
|
//如果在上个节点了 |
|
|
|
else{ |
|
|
|
if(beforeAndOr.isEmpty()){ |
|
|
|
beforeAndOr.add(curr); |
|
|
|
//放入假设的那个点 |
|
|
|
beforeAndOr.add(beforeAndOrNode); |
|
|
|
} |
|
|
|
beforeAndOr.add(progressNodes.get(i)); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
thisAndOrNodeId = progressNodes.get(i).getNodeId(); |
|
|
|
//存在假设可能 |
|
|
|
beforeAndOrNode = progressNodes.get(i); |
|
|
|
if(!enterBefore){ |
|
|
|
beforeNode = progressNodes.get(i); |
|
|
|
enterBefore = Boolean.TRUE; |
|
|
@@ -193,8 +200,7 @@ public class WithDrawHandle { |
|
|
|
* 2.并且流程 尚未开始审批 |
|
|
|
* @return |
|
|
|
*/ |
|
|
|
public boolean canRootWithDraw(HistoricProcessInstance instance) { |
|
|
|
String employeeCode = LoginUserUtil.loginUserDetail().getEmployeeCode(); |
|
|
|
public boolean canRootWithDraw(HistoricProcessInstance instance,String employeeCode) { |
|
|
|
String startUserId = instance.getStartUserId(); |
|
|
|
//如果流程发起人 不是 当前登录人 直接返回false |
|
|
|
if(StringUtils.isBlank(employeeCode) || StringUtils.isBlank(startUserId) |
|
|
|