update(REQ-2324) - 发起人在审批日志中显示的文案不对的问题
This commit is contained in:
parent
335d8f22eb
commit
275220195f
@ -62,13 +62,21 @@ public class CustomApproveTaskCmd implements Command<Void>, Serializable {
|
||||
*/
|
||||
private List<BpmnFlowNodeType> nodeTypes;
|
||||
|
||||
|
||||
public CustomApproveTaskCmd(BpmnTaskAuditDTO dto) {
|
||||
this(dto, null);
|
||||
}
|
||||
|
||||
public CustomApproveTaskCmd(BpmnTaskAuditDTO dto, String operationDesc) {
|
||||
this.taskId = dto.getTaskId();
|
||||
this.advice = dto.getAdvice();
|
||||
this.attachmentList = dto.getAttachmentList();
|
||||
this.approver = dto.getApprover();
|
||||
this.nextApprover = dto.getNextApprover();
|
||||
this.nodeTypes = dto.getNodeTypes();
|
||||
if (Objects.nonNull(operationDesc)) {
|
||||
this.operationDesc = operationDesc;
|
||||
}
|
||||
}
|
||||
|
||||
public CustomApproveTaskCmd(String taskId, String advice, String operationDesc, List<AttachmentDTO> attachmentList,
|
||||
|
||||
@ -9,8 +9,13 @@ import org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl;
|
||||
import org.flowable.engine.impl.util.CommandContextUtil;
|
||||
import org.flowable.job.service.JobHandler;
|
||||
import org.flowable.job.service.impl.persistence.entity.JobEntity;
|
||||
import org.flowable.task.api.Task;
|
||||
import org.flowable.variable.api.delegate.VariableScope;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import static cn.axzo.workflow.common.enums.BpmnFlowNodeType.NODE_STARTER;
|
||||
|
||||
/**
|
||||
* 异步的通过任务的处理器
|
||||
*
|
||||
@ -32,6 +37,11 @@ public class AsyncApproveTaskJobHandler implements JobHandler {
|
||||
ProcessEngineConfigurationImpl processEngineConfiguration =
|
||||
CommandContextUtil.getProcessEngineConfiguration(commandContext);
|
||||
BpmnTaskAuditDTO dto = JSONUtil.toBean(job.getCustomValues(), BpmnTaskAuditDTO.class);
|
||||
processEngineConfiguration.getCommandExecutor().execute(new CustomApproveTaskCmd(dto));
|
||||
Task task = processEngineConfiguration.getTaskService().createTaskQuery().taskId(dto.getTaskId()).singleResult();
|
||||
CustomApproveTaskCmd command = new CustomApproveTaskCmd(dto);
|
||||
if (Objects.equals(task.getTaskDefinitionKey(), NODE_STARTER.getType())) {
|
||||
command = new CustomApproveTaskCmd(dto, "");
|
||||
}
|
||||
processEngineConfiguration.getCommandExecutor().execute(command);
|
||||
}
|
||||
}
|
||||
|
||||
@ -131,6 +131,7 @@ public class AutoOperatorEvent_101_Listener extends AbstractBpmnEventListener<Ta
|
||||
initiator.toJson());
|
||||
}
|
||||
dto.setApprover(initiator);
|
||||
|
||||
// 携带自定义的数据
|
||||
job.setCustomValues(JSONUtil.toJsonStr(dto));
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user