| | |
| | | import com.ycl.domain.dto.FlowTaskDto; |
| | | import com.ycl.domain.dto.FlowViewerDto; |
| | | import com.ycl.domain.entity.ProcessCoding; |
| | | import com.ycl.domain.entity.ProcessLog; |
| | | import com.ycl.domain.entity.ProjectProcess; |
| | | import com.ycl.domain.entity.SysForm; |
| | | import com.ycl.domain.json.RejectData; |
| | |
| | | |
| | | import java.io.InputStream; |
| | | import java.lang.reflect.Field; |
| | | import java.math.BigDecimal; |
| | | import java.nio.charset.StandardCharsets; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | |
| | | * |
| | | * @param taskId 任务id |
| | | * @param variables 表单数据 |
| | | * @param addLog |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult completeSubmitForm(String taskId, Map<String, Object> variables) { |
| | | public AjaxResult completeSubmitForm(String taskId, Map<String, Object> variables, Boolean addLog) { |
| | | Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); |
| | | if (Objects.isNull(task)) { |
| | | return AjaxResult.error("任务不存在"); |
| | |
| | | taskService.complete(taskId, newV); |
| | | } |
| | | // 保存日志 |
| | | publisher.publishEvent(new TaskLogEvent(this, null, |
| | | SecurityUtils.getUserId(), |
| | | projectProcess.getProjectId(), |
| | | projectProcess.getProcessInsId(), |
| | | taskId, |
| | | task.getTaskDefinitionKey(), |
| | | task.getName(), |
| | | ProcessLogEventTypeEnum.FINISHED, |
| | | null)); |
| | | if (addLog) { |
| | | publisher.publishEvent(new TaskLogEvent(this, null, |
| | | SecurityUtils.getUserId(), |
| | | projectProcess.getProjectId(), |
| | | projectProcess.getProcessInsId(), |
| | | taskId, |
| | | task.getTaskDefinitionKey(), |
| | | task.getName(), |
| | | ProcessLogEventTypeEnum.FINISHED, |
| | | null)); |
| | | } |
| | | return AjaxResult.success("提交成功"); |
| | | } |
| | | |
| | |
| | | } |
| | | // 判断任务是否存在特殊操作(如跳过、转办等),需要在前端展示出来 |
| | | ProcessLogQuery query = new ProcessLogQuery(); |
| | | query.setTaskId(taskId); |
| | | query.setTaskDefKey(node.getUserTask().getId()); |
| | | query.setProcessInsId(finalProcessInsId); |
| | | Result result = processLogService.projectProcessLogPage(query); |
| | | List<ProcessLogVO> logList = (List<ProcessLogVO>) result.get("data"); |
| | |
| | | } |
| | | // 判断任务是否存在特殊操作(如跳过、转办等),需要在前端展示出来 |
| | | ProcessLogQuery query = new ProcessLogQuery(); |
| | | query.setTaskId(hisTask.getId()); |
| | | query.setTaskDefKey(node.getUserTask().getId()); |
| | | query.setProcessInsId(hisTask.getProcessInstanceId()); |
| | | Result result = processLogService.projectProcessLogPage(query); |
| | | List<ProcessLogVO> logList = (List<ProcessLogVO>) result.get("data"); |
| | |
| | | } |
| | | // 判断任务是否存在特殊操作(如跳过、转办等),需要在前端展示出来 |
| | | ProcessLogQuery query = new ProcessLogQuery(); |
| | | query.setTaskId(task.getId()); |
| | | query.setTaskDefKey(node.getUserTask().getId()); |
| | | query.setProcessInsId(task.getProcessInstanceId()); |
| | | Result result = processLogService.projectProcessLogPage(query); |
| | | List<ProcessLogVO> logList = (List<ProcessLogVO>) result.get("data"); |