| | |
| | | } |
| | | |
| | | @Override |
| | | public Result taskWait(TaskWaitForm form) { |
| | | Task task = taskService.createTaskQuery().taskId(form.getTaskId()).processInstanceId(form.getProcessInsId()).singleResult(); |
| | | if (Objects.nonNull(task)) { |
| | | // 添加容缺日志 |
| | | publisher.publishEvent(new TaskLogEvent(this, |
| | | null, |
| | | SecurityUtils.getUserId(), |
| | | form.getProjectId(), |
| | | form.getProcessInsId(), |
| | | task.getId(), |
| | | task.getTaskDefinitionKey(), |
| | | task.getName(), |
| | | ProcessLogEventTypeEnum.WAIT, |
| | | new WaitData(form.getDesc()))); |
| | | // 查出该任务绑定的表单 |
| | | Map<String, Object> data = new HashMap<>(1); |
| | | if (StringUtils.isNotBlank(task.getFormKey())) { |
| | | SysForm sysForm = formService.selectSysFormById(Long.parseLong(task.getFormKey())); |
| | | if (Objects.nonNull(sysForm)) { |
| | | data.put(ProcessConstants.TASK_FORM_KEY, JSONObject.parseObject(sysForm.getFormContent())); |
| | | } |
| | | } |
| | | // 完成任务 |
| | | flowTaskService.completeSubmitForm(form.getTaskId(), data, Boolean.FALSE); |
| | | } |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public Result taskSupervise(TaskSuperviseForm form) { |
| | | Task task = taskService.createTaskQuery().taskId(form.getTaskId()).singleResult(); |
| | | if (Objects.isNull(task)) { |