Files
NoticeService/src/main/java/com/yunhai/notice/enums/FlowAuditStatusEnum.java
T
chenxing 138b226ab0
build / build-push (push) Successful in 2m29s
先审后发
2026-09-15 22:09:43 +08:00

43 lines
1.1 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.yunhai.notice.enums;
import lombok.Getter;
/**
* 通知审核状态(audit_status 列,对齐 flow-center FlwEnums.InstanceStatus 与 svc-hall ApplyFlowStatusEnum;
* 未提交 0 为 Notice 特有——apply 尚未成功的暂态)。仅在绑定了审核流程(flow_guid 非空)时有意义。
*/
@Getter
public enum FlowAuditStatusEnum {
PENDING_SUBMIT(0, "待提交"),
APPROVING(10, "审批中"),
APPROVED(20, "已通过"),
REJECTED(30, "已驳回"),
WITHDRAWN(40, "已撤回");
private final int code;
private final String desc;
FlowAuditStatusEnum(int code, String desc) {
this.code = code;
this.desc = desc;
}
public static FlowAuditStatusEnum of(Integer code) {
if (code == null) {
return null;
}
for (FlowAuditStatusEnum e : values()) {
if (e.code == code) {
return e;
}
}
return null;
}
public static String descOf(Integer code) {
FlowAuditStatusEnum e = of(code);
return e == null ? null : e.getDesc();
}
}