56 lines
1.2 KiB
Java
56 lines
1.2 KiB
Java
|
|
package com.engine.salary.enums;
|
||
|
|
|
||
|
|
import java.util.Objects;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* 审批流程的状态
|
||
|
|
* <p>Copyright: Copyright (c) 2022</p>
|
||
|
|
* <p>Company: 泛微软件</p>
|
||
|
|
*
|
||
|
|
* @author qiantao
|
||
|
|
* @version 1.0
|
||
|
|
**/
|
||
|
|
public enum ApprovalWorkflowStatusEnum implements BaseEnum<Integer> {
|
||
|
|
|
||
|
|
UNAPPROVED(1, "未审批", 0),
|
||
|
|
UNDER_APPROVAL(2, "审批中", 0),
|
||
|
|
APPROVED(3, "已审批", 0),
|
||
|
|
;
|
||
|
|
|
||
|
|
private int value;
|
||
|
|
|
||
|
|
private String defaultLabel;
|
||
|
|
|
||
|
|
private int labelId;
|
||
|
|
|
||
|
|
ApprovalWorkflowStatusEnum(int value, String defaultLabel, int labelId) {
|
||
|
|
this.value = value;
|
||
|
|
this.defaultLabel = defaultLabel;
|
||
|
|
this.labelId = labelId;
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public Integer getValue() {
|
||
|
|
return value;
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public Integer getLabelId() {
|
||
|
|
return labelId;
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public String getDefaultLabel() {
|
||
|
|
return defaultLabel;
|
||
|
|
}
|
||
|
|
|
||
|
|
public static ApprovalWorkflowStatusEnum parseByValue(Integer value) {
|
||
|
|
for (ApprovalWorkflowStatusEnum salaryAcctRecordStatusEnum : ApprovalWorkflowStatusEnum.values()) {
|
||
|
|
if (Objects.equals(salaryAcctRecordStatusEnum.getValue(), value)) {
|
||
|
|
return salaryAcctRecordStatusEnum;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
return null;
|
||
|
|
}
|
||
|
|
}
|