xiangpei
2025-02-17 4cd71c0be46a461432989ae7c5d6d56d9e7bbbed
business/src/main/java/com/ycl/service/impl/FlowTaskServiceImpl.java
@@ -15,6 +15,7 @@
import com.ycl.common.core.domain.entity.SysUser;
import com.ycl.common.enums.FlowComment;
import com.ycl.common.enums.business.ProcessLogEventTypeEnum;
import com.ycl.common.enums.business.TaskStatusEnum;
import com.ycl.common.exception.CustomException;
import com.ycl.common.utils.SecurityUtils;
import com.ycl.domain.dto.FlowCommentDto;
@@ -178,6 +179,7 @@
                projectProcess.getProjectId(),
                projectProcess.getProcessInsId(),
                taskId,
                task.getName(),
                ProcessLogEventTypeEnum.FINISHED,
                null));
        return AjaxResult.success("提交成功");
@@ -318,6 +320,7 @@
                projectProcess.getProjectId(),
                projectProcess.getProcessInsId(),
                flowTaskVo.getTaskId(),
                task.getName(),
                ProcessLogEventTypeEnum.REJECT,
                new RejectData(flowTaskVo.getComment())));
    }
@@ -1252,6 +1255,14 @@
            parameters = taskService.getVariables(taskId);
        }
        List<FormDetailVO> beforeNodes = this.getBeforeNodeForm(parameters, task.getFormKey(), task.getName(), task.getProcessDefinitionId(), task.getTaskDefinitionKey(), Boolean.FALSE);
        // 判断当前任务是否被挂起中
        beforeNodes.stream().forEach(node -> {
            if (node.getCurrent()) {
                if (processLogService.taskIsHangup(taskId, task.getProcessInstanceId())) {
                    node.setTaskStatus(TaskStatusEnum.HANGUP);
                }
            }
        });
        return AjaxResult.success(beforeNodes);
    }