【8.1.1】【sys】跟新一个审批人类型的枚举

pull/60/head
fengshuonan 2024-02-25 15:07:39 +08:00
parent fbd8628b26
commit 2793939dcb
1 changed files with 127 additions and 0 deletions

View File

@ -0,0 +1,127 @@
/*
* Copyright [2020-2030] [https://www.stylefeng.cn]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* GunsAPACHE LICENSE 2.0使
*
* 1.LICENSE
* 2.Guns
* 3.
* 4. https://gitee.com/stylefeng/guns
* 5. https://gitee.com/stylefeng/guns
* 6.
*/
package cn.stylefeng.roses.kernel.sys.api.enums.org;
import lombok.Getter;
/**
* 1-2-3-4-5-6-7-HRBP8-9-10-
*
* @author fengshuonan
* @since 2024-02-25 15:04
*/
@Getter
public enum OrgApproverTypeEnum {
/**
*
*/
FZR(1, "负责人"),
/**
*
*/
BZ(2, "部长"),
/**
*
*/
TXFZR(3, "体系负责人"),
/**
*
*/
BMZL(4, "部门助理"),
/**
*
*/
ZCZL(5, "资产助理(专员)"),
/**
*
*/
KQZY(6, "考勤专员"),
/**
* HRBP
*/
HRBP(7, "HRBP"),
/**
*
*/
MJY(8, "门禁员"),
/**
*
*/
BGZHY(9, "办公账号员"),
/**
*
*/
ZGXZY(10, "转岗须知员");
private final Integer code;
private final String message;
OrgApproverTypeEnum(Integer code, String message) {
this.code = code;
this.message = message;
}
/**
* codeenum
*
* @author fengshuonan
* @since 2024-02-18 16:11
*/
public static OrgApproverTypeEnum toEnum(Integer code) {
for (OrgApproverTypeEnum orgTypeEnum : OrgApproverTypeEnum.values()) {
if (orgTypeEnum.getCode().equals(code)) {
return orgTypeEnum;
}
}
return null;
}
/**
* codemessage
*
* @author fengshuonan
* @since 2024-02-18 16:11
*/
public static String getCodeMessage(Integer code) {
OrgApproverTypeEnum orgTypeEnum = toEnum(code);
if (orgTypeEnum != null) {
return orgTypeEnum.getMessage();
} else {
return "";
}
}
}