feat(workflow): 实现自定义选择下一个处理人功能
- 在前端增加提示信息,指导用户指定下一个任务的处理人 - 在后端增加逻辑,处理用户选择的下一个处理人 - 修改数据库,增加采购计划详情编号字段- 优化采购计划详情查询条件,支持按详情编号查询
This commit is contained in:
@@ -74,6 +74,18 @@ public class WfTaskServiceImpl extends FlowServiceFactory implements IWfTaskServ
|
||||
// 获取 bpmn 模型
|
||||
BpmnModel bpmnModel = repositoryService.getBpmnModel(task.getProcessDefinitionId());
|
||||
identityService.setAuthenticatedUserId(TaskUtils.getUserId());
|
||||
|
||||
// 处理下一级审批人,将用户选择的下一个处理人保存到流程变量中
|
||||
if (StringUtils.isNotBlank(taskBo.getNextUserIds())) {
|
||||
// 如果有指定下一个处理人,则将其保存到流程变量中
|
||||
Map<String, Object> variables = taskBo.getVariables();
|
||||
if (variables == null) {
|
||||
variables = new HashMap<>();
|
||||
taskBo.setVariables(variables);
|
||||
}
|
||||
variables.put("nextUserIds", taskBo.getNextUserIds());
|
||||
}
|
||||
|
||||
if (DelegationState.PENDING.equals(task.getDelegationState())) {
|
||||
taskService.addComment(taskBo.getTaskId(), taskBo.getProcInsId(), FlowComment.DELEGATE.getType(), taskBo.getComment());
|
||||
taskService.resolveTask(taskBo.getTaskId());
|
||||
|
||||
Reference in New Issue
Block a user