| | |
| | | import com.ycl.common.utils.SecurityUtils; |
| | | import com.ycl.constant.TaskTypeConstant; |
| | | import com.ycl.domain.entity.*; |
| | | import com.ycl.domain.form.TaskDelegationForm; |
| | | import com.ycl.domain.form.TaskJumpForm; |
| | | import com.ycl.domain.form.TaskSuperviseForm; |
| | | import com.ycl.domain.form.*; |
| | | import com.ycl.domain.json.DelegateData; |
| | | import com.ycl.domain.json.HangupData; |
| | | import com.ycl.domain.json.JumpData; |
| | | import com.ycl.domain.json.SuperviseData; |
| | | import com.ycl.domain.vo.CustomerTaskVO; |
| | | import com.ycl.domain.vo.IndexCustomerTaskVO; |
| | |
| | | import com.ycl.service.*; |
| | | import com.ycl.common.base.Result; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.domain.form.ProjectProcessForm; |
| | | import com.ycl.domain.vo.ProjectProcessVO; |
| | | import com.ycl.domain.query.ProjectProcessQuery; |
| | | import com.ycl.service.common.TaskCommonService; |
| | |
| | | .processDefinitionId(task.getProcessDefinitionId()) |
| | | .singleResult(); |
| | | taskVO.setDeployId(pd.getDeploymentId()); |
| | | taskVO.setProcessName(pd.getName()); |
| | | taskVO.setProcessName(pd.getName() + "(v" + pd.getVersion() + ")"); |
| | | taskVO.setProcessInsId(task.getProcessInstanceId()); |
| | | taskVO.setTaskDefinitionKey(task.getTaskDefinitionKey()); |
| | | |
| | |
| | | jsonData.setAfterHandlerIds(afterHandlerIds); |
| | | jsonData.setAfterHandlerType(form.getPeopleType()); |
| | | // 发布转办事件 |
| | | publisher.publishEvent(new TaskLogEvent(this, null,SecurityUtils.getUserId(), form.getProjectId(), form.getProcessInsId(), task.getId(), ProcessLogEventTypeEnum.DELEGATE, jsonData)); |
| | | publisher.publishEvent(new TaskLogEvent(this, null,SecurityUtils.getUserId(), form.getProjectId(), form.getProcessInsId(), task.getId(), task.getName(),ProcessLogEventTypeEnum.DELEGATE, jsonData)); |
| | | |
| | | return Result.ok("转办成功"); |
| | | } |
| | |
| | | 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(), form.getTaskId(), ProcessLogEventTypeEnum.JUMP, null)); |
| | | publisher.publishEvent(new TaskLogEvent(this, null,SecurityUtils.getUserId(), form.getProjectId(), form.getProcessInsId(), form.getTaskId(), task.getName(),ProcessLogEventTypeEnum.JUMP, new JumpData(form.getDesc()))); |
| | | // 查出该任务绑定的表单 |
| | | |
| | | Map<String, Object> data = new HashMap<>(1); |
| | |
| | | |
| | | @Override |
| | | public Result taskSupervise(TaskSuperviseForm form) { |
| | | Task task = taskService.createTaskQuery().taskId(form.getTaskId()).singleResult(); |
| | | SuperviseData jsonData = new SuperviseData(); |
| | | jsonData.setCreateTime(new Date()); |
| | | jsonData.setContent(form.getContent()); |
| | |
| | | } |
| | | dataList.add(jsonData); |
| | | //添加督办日志 |
| | | publisher.publishEvent(new TaskLogEvent(this, processLog.getId(), processLog.getUserId(), form.getProjectId(), form.getProcessInsId(), form.getTaskId(), ProcessLogEventTypeEnum.SUPERVISE, dataList)); |
| | | publisher.publishEvent(new TaskLogEvent(this, processLog.getId(), processLog.getUserId(), form.getProjectId(), form.getProcessInsId(), form.getTaskId(), task.getName(),ProcessLogEventTypeEnum.SUPERVISE, dataList)); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |
| | | @Override |
| | | public Result taskHangup(TaskHangupForm form) { |
| | | Task task = taskService.createTaskQuery().taskId(form.getTaskId()).singleResult(); |
| | | // 任务挂起只需要存日志,查询待办时如果有这个日志记录,则禁用提交按钮,以此实现任务挂起 |
| | | publisher.publishEvent(new TaskLogEvent(this, |
| | | null, |
| | | SecurityUtils.getUserId(), |
| | | form.getProjectId(), |
| | | form.getProcessInsId(), |
| | | form.getTaskId(), |
| | | task.getName(), |
| | | ProcessLogEventTypeEnum.HANGUP, |
| | | new HangupData(form.getReason()) |
| | | )); |
| | | return Result.ok("操作成功"); |
| | | } |
| | | |