|
|
|
@ -12,6 +12,7 @@ import cn.iocoder.yudao.framework.common.util.object.PageUtils; |
|
|
|
|
import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.convert.task.BpmTaskConvert; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.dal.dataobject.definition.BpmFormDO; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.enums.definition.*; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.enums.task.BpmCommentTypeEnum; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.enums.task.BpmReasonEnum; |
|
|
|
@ -20,6 +21,7 @@ import cn.iocoder.yudao.module.bpm.enums.task.BpmTaskStatusEnum; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.framework.flowable.core.enums.BpmnVariableConstants; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.BpmnModelUtils; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.framework.flowable.core.util.FlowableUtils; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.service.definition.BpmFormService; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.service.definition.BpmModelService; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.service.definition.BpmProcessDefinitionService; |
|
|
|
|
import cn.iocoder.yudao.module.bpm.service.message.BpmMessageService; |
|
|
|
@ -91,6 +93,8 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
|
|
|
|
private BpmModelService modelService; |
|
|
|
|
@Resource |
|
|
|
|
private BpmMessageService messageService; |
|
|
|
|
@Resource |
|
|
|
|
private BpmFormService formService; |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private AdminUserApi adminUserApi; |
|
|
|
@ -153,7 +157,14 @@ public class BpmTaskServiceImpl implements BpmTaskService { |
|
|
|
|
BpmnModel bpmnModel = bpmProcessDefinitionService.getProcessDefinitionBpmnModel(todoTask.getProcessDefinitionId()); |
|
|
|
|
Map<Integer, BpmTaskRespVO.OperationButtonSetting> buttonsSetting = BpmnModelUtils.parseButtonsSetting( |
|
|
|
|
bpmnModel, todoTask.getTaskDefinitionKey()); |
|
|
|
|
return BpmTaskConvert.INSTANCE.buildTodoTask(todoTask, childrenTasks, buttonsSetting); |
|
|
|
|
|
|
|
|
|
// 4. 任务表单
|
|
|
|
|
BpmFormDO taskForm = null; |
|
|
|
|
if (StrUtil.isNotBlank(todoTask.getFormKey())){ |
|
|
|
|
taskForm = formService.getForm(NumberUtils.parseLong(todoTask.getFormKey())); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return BpmTaskConvert.INSTANCE.buildTodoTask(todoTask, childrenTasks, buttonsSetting, taskForm); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|