浏览代码

返回判断字段优化

master
PoffyZhang 1年前
父节点
当前提交
79687bbaf1
共有 1 个文件被更改,包括 10 次插入1 次删除
  1. +10
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 10
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java 查看文件

@@ -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;
@@ -828,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());
}


/**
* 待办中心我已处理项目列表查询


正在加载...
取消
保存