|
@@ -24,8 +24,10 @@ import com.ningdatech.pmapi.todocenter.handle.PassHandle; |
|
|
import com.ningdatech.pmapi.todocenter.handle.WithDrawHandle; |
|
|
import com.ningdatech.pmapi.todocenter.handle.WithDrawHandle; |
|
|
import com.ningdatech.pmapi.todocenter.model.dto.*; |
|
|
import com.ningdatech.pmapi.todocenter.model.dto.*; |
|
|
import com.ningdatech.pmapi.todocenter.model.vo.TodoNumVO; |
|
|
import com.ningdatech.pmapi.todocenter.model.vo.TodoNumVO; |
|
|
|
|
|
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; |
|
|
import com.wflow.contants.HisProInsEndActId; |
|
|
import com.wflow.contants.HisProInsEndActId; |
|
|
import com.wflow.workflow.bean.process.ProcessComment; |
|
|
import com.wflow.workflow.bean.process.ProcessComment; |
|
|
|
|
|
import com.wflow.workflow.bean.process.enums.NodeTypeEnum; |
|
|
import com.wflow.workflow.utils.ProcessTaskUtils; |
|
|
import com.wflow.workflow.utils.ProcessTaskUtils; |
|
|
import org.apache.commons.io.FileUtils; |
|
|
import org.apache.commons.io.FileUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.apache.commons.lang3.StringUtils; |
|
@@ -541,25 +543,68 @@ public class TodoCenterManage { |
|
|
String instanceId = request.getInstanceId(); |
|
|
String instanceId = request.getInstanceId(); |
|
|
String nodeId = request.getNodeId(); |
|
|
String nodeId = request.getNodeId(); |
|
|
Long projectId = request.getProjectId(); |
|
|
Long projectId = request.getProjectId(); |
|
|
ProcessProgressVo progressInstanceDetail = processInstanceService.getProgressInstanceDetail(nodeId, instanceId); |
|
|
|
|
|
|
|
|
String taskId = request.getTaskId(); |
|
|
|
|
|
ProcessProgressVo progressInstanceDetail = processInstanceService.getProgressInstanceDetail(nodeId, instanceId,taskId); |
|
|
|
|
|
|
|
|
if(Objects.isNull(progressInstanceDetail)){ |
|
|
if(Objects.isNull(progressInstanceDetail)){ |
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
List<ProgressNode> progressInfo = progressInstanceDetail.getProgressInfo(); |
|
|
List<ProgressNode> progressInfo = progressInstanceDetail.getProgressInfo(); |
|
|
|
|
|
Boolean isHighLine = Boolean.FALSE; |
|
|
if (CollUtil.isNotEmpty(progressInfo)){ |
|
|
if (CollUtil.isNotEmpty(progressInfo)){ |
|
|
buildUserUtils.buildUserByProcessInfo(progressInfo); |
|
|
buildUserUtils.buildUserByProcessInfo(progressInfo); |
|
|
|
|
|
isHighLine = checkHighLine(progressInfo,taskId,LoginUserUtil.loginUserDetail()); |
|
|
} |
|
|
} |
|
|
ProcessProgressDetailVo res = new ProcessProgressDetailVo(); |
|
|
ProcessProgressDetailVo res = new ProcessProgressDetailVo(); |
|
|
res.setProcessProgressVo(progressInstanceDetail); |
|
|
res.setProcessProgressVo(progressInstanceDetail); |
|
|
res.setStatus(progressInstanceDetail.getStatus()); |
|
|
res.setStatus(progressInstanceDetail.getStatus()); |
|
|
res.setProjectId(projectId); |
|
|
res.setProjectId(projectId); |
|
|
res.setCanWithdraw(withDrawHandle.checkCanWithdraw(instanceId,progressInstanceDetail,request.getTaskId())); |
|
|
res.setCanWithdraw(withDrawHandle.checkCanWithdraw(instanceId,progressInstanceDetail,request.getTaskId())); |
|
|
|
|
|
res.setIsHighLine(isHighLine); |
|
|
passHandle.checkCanPassOrSeal(request.getInstanceId(),request.getTaskId(),employeeCode,res); |
|
|
passHandle.checkCanPassOrSeal(request.getInstanceId(),request.getTaskId(),employeeCode,res); |
|
|
return res; |
|
|
return res; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 筛选 当前登录人 是不是 上级条线单位的审批 |
|
|
|
|
|
* @param progressInfo |
|
|
|
|
|
* @param taskId |
|
|
|
|
|
* @param user |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
private Boolean checkHighLine(List<ProgressNode> progressInfo, String taskId, UserInfoDetails user) { |
|
|
|
|
|
if(CollUtil.isEmpty(progressInfo)){ |
|
|
|
|
|
return Boolean.FALSE; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
final Boolean[] res = {Boolean.FALSE}; |
|
|
|
|
|
progressInfo.forEach(p -> { |
|
|
|
|
|
//如果是 子流程 |
|
|
|
|
|
if(Objects.nonNull(p.getNodeType()) && NodeTypeEnum.SUB.name().equals(p.getNodeType().name())){ |
|
|
|
|
|
//如果不是上级条线单位 根本不用理 |
|
|
|
|
|
if(!p.getIsHighLine()){ |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
List<ProgressNode> children = p.getChildren(); |
|
|
|
|
|
ProgressNode progressNode = children.get(0); |
|
|
|
|
|
String userId = progressNode.getUserId(); |
|
|
|
|
|
UserFullInfoDTO userFullInfoDTO = userInfoHelper.getUserFullInfoByEmployeeCode(userId); |
|
|
|
|
|
if(Objects.nonNull(userFullInfoDTO) && user.getEmpPosUnitCode() |
|
|
|
|
|
.equals(userFullInfoDTO.getEmpPosUnitCode())){ |
|
|
|
|
|
//说明是此单位的人 |
|
|
|
|
|
//那么要去看 taskId 是不是 在这个单位内的任务 |
|
|
|
|
|
Boolean isContainsTask = handlerManage.checkIsContainsTask(children,taskId); |
|
|
|
|
|
if(isContainsTask){ |
|
|
|
|
|
res[0] = Boolean.TRUE; |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
return res[0]; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 待办中心我已处理项目列表查询 |
|
|
* 待办中心我已处理项目列表查询 |
|
|