| | |
| | | Map<String, HistoricProcessInstance> processInstanceMap, |
| | | Map<Long, AdminUserRespDTO> userMap, |
| | | Map<Long, DeptRespDTO> deptMap) { |
| | | List<BpmTaskRespVO> taskVOList = convertList(pageResult.getList(), task -> { |
| | | List<BpmTaskRespVO> taskVOList = CollectionUtils.convertList(pageResult.getList(), task -> { |
| | | BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class); |
| | | taskVO.setStatus(FlowableUtils.getTaskStatus(task)).setReason(FlowableUtils.getTaskReason(task)); |
| | | // 用户信息 |
| | |
| | | Map<Long, BpmFormDO> formMap, |
| | | Map<Long, AdminUserRespDTO> userMap, |
| | | Map<Long, DeptRespDTO> deptMap) { |
| | | return convertList(taskList, task -> { |
| | | return CollectionUtils.convertList(taskList, task -> { |
| | | // 特殊:已取消的任务,不返回 |
| | | BpmTaskRespVO taskVO = BeanUtils.toBean(task, BpmTaskRespVO.class); |
| | | Integer taskStatus = FlowableUtils.getTaskStatus(task); |
| | |
| | | } |
| | | |
| | | default BpmTaskRespVO buildTodoTask(Task todoTask, List<Task> childrenTasks, |
| | | Map<Integer, BpmTaskRespVO.OperationButtonSetting> buttonsSetting) { |
| | | return BeanUtils.toBean(todoTask, BpmTaskRespVO.class) |
| | | Map<Integer, BpmTaskRespVO.OperationButtonSetting> buttonsSetting, |
| | | BpmFormDO form) { |
| | | BpmTaskRespVO bpmTaskRespVO = BeanUtils.toBean(todoTask, BpmTaskRespVO.class) |
| | | .setStatus(FlowableUtils.getTaskStatus(todoTask)).setReason(FlowableUtils.getTaskReason(todoTask)) |
| | | .setButtonsSetting(buttonsSetting) |
| | | .setChildren(convertList(childrenTasks, childTask -> BeanUtils.toBean(childTask, BpmTaskRespVO.class) |
| | | .setStatus(FlowableUtils.getTaskStatus(childTask)))); |
| | | if (form != null) { |
| | | bpmTaskRespVO.setFormId(form.getId()).setFormName(form.getName()) |
| | | .setFormConf(form.getConf()).setFormFields(form.getFields()); |
| | | } |
| | | return bpmTaskRespVO; |
| | | } |
| | | |
| | | default BpmMessageSendWhenTaskCreatedReqDTO convert(ProcessInstance processInstance, AdminUserRespDTO startUser, |