|
|
@@ -13,6 +13,7 @@ import java.util.stream.Collectors; |
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; |
|
|
|
import com.wflow.workflow.enums.ProcessStatusEnum; |
|
|
|
import org.apache.commons.io.FileUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.assertj.core.util.Lists; |
|
|
@@ -540,9 +541,10 @@ public class TodoCenterManage { |
|
|
|
} |
|
|
|
//进入上一个节点的标识 |
|
|
|
Boolean enterBefore = Boolean.FALSE; |
|
|
|
String thisAndOrNodeId = curr.getNodeId(); |
|
|
|
for(int i = progressNodes.size() - 2;i >= 0;i--){ |
|
|
|
//说明有会签 或签 |
|
|
|
if(progressNodes.get(i).getNodeId().equals(curr.getNodeId())){ |
|
|
|
if(progressNodes.get(i).getNodeId().equals(thisAndOrNodeId)){ |
|
|
|
//还在当前节点 |
|
|
|
if(!enterBefore){ |
|
|
|
if(thisAndOr.isEmpty()){ |
|
|
@@ -558,6 +560,7 @@ public class TodoCenterManage { |
|
|
|
beforeAndOr.add(progressNodes.get(i)); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
thisAndOrNodeId = progressNodes.get(i).getNodeId(); |
|
|
|
if(!enterBefore){ |
|
|
|
beforeNode = progressNodes.get(i); |
|
|
|
enterBefore = Boolean.TRUE; |
|
|
@@ -826,10 +829,18 @@ public class TodoCenterManage { |
|
|
|
res.setProcessProgressVo(progressInstanceDetail); |
|
|
|
res.setStatus(progressInstanceDetail.getStatus()); |
|
|
|
res.setProjectId(projectId); |
|
|
|
res.setCanWithdraw(checkUserIsRoot(instanceId,null) || checkUserIsBefore(progressInfo)); |
|
|
|
res.setCanWithdraw(checkCanWithdraw(instanceId,progressInstanceDetail)); |
|
|
|
return res; |
|
|
|
} |
|
|
|
|
|
|
|
private Boolean checkCanWithdraw(String instanceId, ProcessProgressVo progressInstanceDetail) { |
|
|
|
if(!ProcessStatusEnum.UNDER_REVIEW.getDesc().equals(progressInstanceDetail.getStatus())){ |
|
|
|
return Boolean.FALSE; |
|
|
|
} |
|
|
|
|
|
|
|
return checkUserIsRoot(instanceId,null) || checkUserIsBefore(progressInstanceDetail.getProgressInfo()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 待办中心我已处理项目列表查询 |
|
|
|