| | |
| | | * 任务id |
| | | */ |
| | | private String taskId; |
| | | /** |
| | | * 任务名 |
| | | */ |
| | | private String taskName; |
| | | |
| | | /** |
| | | * 事件类型 |
| | |
| | | * @param taskId 任务id |
| | | * @param otherData 其它数据 |
| | | */ |
| | | public TaskLogEvent(Object source,Long id,Long userId, Long projectId, String processInsId, String taskId, ProcessLogEventTypeEnum eventType, Object otherData) { |
| | | public TaskLogEvent(Object source,Long id,Long userId, Long projectId, String processInsId, String taskId, String taskName,ProcessLogEventTypeEnum eventType, Object otherData) { |
| | | super(source); |
| | | this.id = id; |
| | | this.userId = userId; |
| | |
| | | this.processInsId = processInsId; |
| | | this.eventType = eventType; |
| | | this.taskId = taskId; |
| | | this.taskName = taskName; |
| | | this.otherData = otherData; |
| | | } |
| | | } |
| | |
| | | log.setProcessInsId(event.getProcessInsId()); |
| | | log.setProjectId(event.getProjectId()); |
| | | log.setTaskId(event.getTaskId()); |
| | | log.setTaskName(event.getTaskName()); |
| | | log.setUserId(SecurityUtils.getUserId()); |
| | | if (Objects.nonNull(event.getOtherData())) { |
| | | log.setEventDataJson(JSON.toJSONString(event.getOtherData())); |
| | |
| | | projectProcess.getProjectId(), |
| | | projectProcess.getProcessInsId(), |
| | | taskId, |
| | | task.getName(), |
| | | ProcessLogEventTypeEnum.FINISHED, |
| | | null)); |
| | | return AjaxResult.success("提交成功"); |
| | |
| | | projectProcess.getProjectId(), |
| | | projectProcess.getProcessInsId(), |
| | | flowTaskVo.getTaskId(), |
| | | task.getName(), |
| | | ProcessLogEventTypeEnum.REJECT, |
| | | new RejectData(flowTaskVo.getComment()))); |
| | | } |
| | |
| | | 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, new JumpData(form.getDesc()))); |
| | | 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("操作成功"); |
| | | } |
| | | |
| | |
| | | /** 任务id */ |
| | | private String taskId; |
| | | |
| | | @TableField("task_name") |
| | | /** 任务名 */ |
| | | private String taskName; |
| | | @TableField("event_type") |
| | | /** 事件日志类型 */ |
| | | private ProcessLogEventTypeEnum eventType; |