Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
niohe·erbao 1 year ago
parent
commit
4c06c3d6d4
3 changed files with 23 additions and 5 deletions
  1. +6
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java
  2. +4
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  3. +13
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 6
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java View File

@@ -162,14 +162,18 @@ public class PrequalificationDeclaredProjectManage {
* @return
*/
public PageVo<ProjectLibListItemVO> projectLibList(PrequalificationDeclaredListReq preReq) {
UserInfoDetails userInfoDetail = LoginUserUtil.loginUserDetail();
VUtils.isTrue(Objects.isNull(userInfoDetail)).throwMessage("获取登录用户失败!");
if(!userInfoDetail.getIsOrgAdmin()){
return PageVo.empty();
}
//限定参数 复制bean
ProjectListReq req = new ProjectListReq();
BeanUtils.copyProperties(preReq,req);
//项目阶段 状态 已定 待预审
req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
req.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode());
UserInfoDetails userInfoDetail = LoginUserUtil.loginUserDetail();
VUtils.isTrue(Objects.isNull(userInfoDetail)).throwMessage("获取登录用户失败!");

//放入用户的主管单位
req.setSuperOrgCode(userInfoDetail.getOrganizationCode());
return projectLibManage.projectLibList(req);


+ 4
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java View File

@@ -29,6 +29,7 @@ import com.ningdatech.pmapi.user.util.LoginUserUtil;
import com.wflow.workflow.bean.vo.ProcessDetailVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

@@ -105,7 +106,9 @@ public class ProjectLibManage {
item.setProcessStatus(w.getProcessStatus());
item.setInstCode(w.getInstCode());
if(userInfoDetails.getIsOrgAdmin() &&
ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(item.getStatus())){
ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode().equals(item.getStatus())
&& StringUtils.isNotBlank(w.getSuperOrgCode()) && StringUtils.isNotBlank(userInfoDetails.getOrganizationCode())
&& w.getSuperOrgCode().equals(userInfoDetails.getOrganizationCode())){
item.setCanPreDeclared(Boolean.TRUE);
}
return item;


+ 13
- 2
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

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


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


Loading…
Cancel
Save