【代码评审】BPM:获取审批任务的记录列表

This commit is contained in:
YunaiV 2024-09-17 11:06:38 +08:00
parent da398dfefc
commit 98e62211c6
6 changed files with 23 additions and 10 deletions

View File

@ -36,7 +36,9 @@ public enum BpmSimpleModelNodeType implements IntArrayValuable {
;
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BpmSimpleModelNodeType::getType).toArray();
public static final String BPMN_USER_TASK_TYPE ="userTask";
public static final String BPMN_USER_TASK_TYPE = "userTask";
private final Integer type;
private final String bpmnType;
private final String name;

View File

@ -12,6 +12,7 @@ import lombok.Getter;
@Getter
@AllArgsConstructor
public enum BpmTaskStatusEnum {
NOT_START(-1, "未开始"),
RUNNING(1, "审批中"),
APPROVE(2, "审批通过"),

View File

@ -15,7 +15,7 @@ public class BpmProcessInstanceProgressRespVO {
private Integer status; // 参见 BpmProcessInstanceStatusEnum 枚举
@Schema(description = "审批信息列表", requiredMode = Schema.RequiredMode.REQUIRED)
private List<ApproveNodeInfo> approveNodeList;
private List<ApproveNodeInfo> approveNodes;
@Schema(description = "审批节点信息")
@Data
@ -56,28 +56,30 @@ public class BpmProcessInstanceProgressRespVO {
@Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
private String nickname;
@Schema(description = "用户头像", example = "芋艿")
@Schema(description = "用户头像", example = "https://www.iocoder.cn/1.png")
private String avatar;
}
@Schema(description = "审批任务信息")
@Data
public static class ApproveTaskInfo {
@Schema(description = "任务编号", example = "1")
@Schema(description = "任务编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private String id;
@Schema(description = "任务所属人")
@Schema(description = "任务所属人", example = "1024")
private User ownerUser;
@Schema(description = "任务分配人")
@Schema(description = "任务分配人", example = "2048")
private User assigneeUser;
@Schema(description = "任务状态", example = "1")
@Schema(description = "任务状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
private Integer status; // 参见 BpmTaskStatusEnum 枚举
@Schema(description = "审批意见", example = "同意")
private String reason;
}
}

View File

@ -110,7 +110,7 @@ public interface BpmnModelConstants {
String START_EVENT_NODE_NAME = "开始";
/**
* 发起人节点 Id
* 发起人节点 ID
*/
String START_USER_NODE_ID = "StartUserNode";

View File

@ -8,13 +8,21 @@ import java.util.Set;
import static cn.iocoder.yudao.module.bpm.controller.admin.task.vo.instance.BpmProcessInstanceProgressRespVO.ApproveNodeInfo;
/**
* 已经进行中的审批节点 Response BO
*
* @author jason
*/
@Data
public class AlreadyRunApproveNodeRespBO {
private List<ApproveNodeInfo> approveNodeList;
/**
* 审批节点信息数组
*/
private List<ApproveNodeInfo> approveNodes;
/**
* 进行中的节点 ID 数组
*/
private Set<String> runNodeIds;
}