Browse Source

流程处理修改

tags/24080901
CMM 1 year ago
parent
commit
492ab83bf5
1 changed files with 16 additions and 6 deletions
  1. +16
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java

+ 16
- 6
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -37,6 +37,7 @@ import com.wflow.contants.HisProInsEndActId;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import com.wflow.workflow.bean.dto.ReqProcessHandlerDTO;
import com.wflow.workflow.bean.process.ProgressNode;
import com.wflow.workflow.bean.process.enums.NodeTypeEnum;
import com.wflow.workflow.bean.vo.ProcessInstanceVo;
import com.wflow.workflow.bean.vo.ProcessProgressVo;
import com.wflow.workflow.bean.vo.ProcessTaskVo;
@@ -226,7 +227,16 @@ public class TodoCenterManage {
// 获取流程通过后当前审核人信息,向其发送工作通知
List<ProgressNode> newProgressInfo = newInstanceDetail.getProgressInfo();
ProgressNode currentNode = newProgressInfo.get(newProgressInfo.size() - 1);
UserInfo auditUserInfo = userInfoService.getById(Long.valueOf(currentNode.getUserId()));
UserInfo auditUserInfo = null;
// 说明当前节点是子流程节点
if (currentNode.getNodeType().name().equals(NodeTypeEnum.SUB.name())){
List<ProgressNode> children = currentNode.getChildren();
// 获取子流程当前审核人节点
ProgressNode subCurrentNode = children.get(children.size() - 1);
auditUserInfo = userInfoService.getById(Long.valueOf(subCurrentNode.getUserId()));
}else {
auditUserInfo = userInfoService.getById(Long.valueOf(currentNode.getUserId()));
}

// 如果流程状态是被退回状态,流程通过后,进入下一个审核人,
// 当前通过审核人一定不是最后一个审核人(下一个审核人至多是最后一个),更新流程状态为审核中
@@ -240,7 +250,7 @@ public class TodoCenterManage {
WorkNoticeInfo passWorkNoticeInfo = getSendWorkNoticeInfo(auditUserInfo);
String passMsg = String.format(PASS_MSG_TEMPLATE, passWorkNoticeInfo.getOrganizationName(), projectName);
// 异步发送工作通知
SendWorkNoticeUtil.sendWorkNotice(zwddClient,passWorkNoticeInfo,passMsg);
// SendWorkNoticeUtil.sendWorkNotice(zwddClient,passWorkNoticeInfo,passMsg);
return;
}
// 若不是被退回状态,流程通过后,判断当前登录用户是不是最后一个审核人
@@ -270,7 +280,7 @@ public class TodoCenterManage {
WorkNoticeInfo passWorkNoticeInfo2 = getSendWorkNoticeInfo(startUserInfo);
String passMsg2 = String.format(PASS_MSG_TEMPLATE2, projectName, processDefinitionName);
// 异步发送工作通知
SendWorkNoticeUtil.sendWorkNotice(zwddClient,passWorkNoticeInfo2,passMsg2);
// SendWorkNoticeUtil.sendWorkNotice(zwddClient,passWorkNoticeInfo2,passMsg2);
}else {
// 若有下一个审核人(当前节点的用户),
// 向其发送浙政钉工作通知:标题:审核任务 内容:【单位名称】的【项目名称】需要您审核。
@@ -278,7 +288,7 @@ public class TodoCenterManage {
WorkNoticeInfo sendWorkNoticeInfo = getSendWorkNoticeInfo(auditUserInfo);
String msg = String.format(PASS_MSG_TEMPLATE, null, projectName);
// 异步发送工作通知
SendWorkNoticeUtil.sendWorkNotice(zwddClient,sendWorkNoticeInfo,msg);
// SendWorkNoticeUtil.sendWorkNotice(zwddClient,sendWorkNoticeInfo,msg);
}
break;
// 盖章并通过
@@ -294,7 +304,7 @@ public class TodoCenterManage {
WorkNoticeInfo rejectWorkNoticeInfo = getSendWorkNoticeInfo(startUserInfo);
String rejectMsg = String.format(REJECT_MSG_TEMPLATE, projectName, processDefinitionName);
// 异步发送工作通知
SendWorkNoticeUtil.sendWorkNotice(zwddClient,rejectWorkNoticeInfo,rejectMsg);
// SendWorkNoticeUtil.sendWorkNotice(zwddClient,rejectWorkNoticeInfo,rejectMsg);
// 更新项目状态和流程状态
updateRejectProjectStatus(userId, declaredProject);
break;
@@ -311,7 +321,7 @@ public class TodoCenterManage {
WorkNoticeInfo backWorkNoticeInfo = getSendWorkNoticeInfo(startUserInfo);
String backMsg = String.format(BACK_MSG_TEMPLATE, projectName, processDefinitionName);
// 异步发送工作通知
SendWorkNoticeUtil.sendWorkNotice(zwddClient,backWorkNoticeInfo,backMsg);
// SendWorkNoticeUtil.sendWorkNotice(zwddClient,backWorkNoticeInfo,backMsg);
break;
// 撤回(流程发起人和当前流程审核人的前一个审核人操作)
case WITHDRAW:


Loading…
Cancel
Save