| | |
| | | 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("提交成功"); |
| | | } |
| | | |