package com.panzhihua.common.enums;
|
|
import lombok.Getter;
|
|
/**
|
* @author lyq
|
* 党员双报道单位类型枚举
|
*/
|
@Getter
|
public enum ComPbCheckUnitTypeEnum {
|
|
GYQY(1, "国有企业"), GYKGQY(2, "国有控股企业"), WZQY(3, "外资企业")
|
, HZQY(4, "合资企业"), SYQY(5, "私营企业"), SYDW(6, "事业单位")
|
, GJXZJG(7, "国家行政机关"), ZF(6, "政府");
|
|
private final Integer code;
|
private final String name;
|
|
ComPbCheckUnitTypeEnum(Integer code, String name) {
|
this.code = code;
|
this.name = name;
|
}
|
|
public static int getCodeByName(String name) {
|
for (ComPbCheckUnitTypeEnum item : ComPbCheckUnitTypeEnum.values()) {
|
if (item.name.equals(name)) {
|
return item.getCode();
|
}
|
}
|
return 0;
|
}
|
|
public static String getCnDescByName(Integer code) {
|
for (ComPbCheckUnitTypeEnum item : ComPbCheckUnitTypeEnum.values()) {
|
if (item.code.equals(code)) {
|
return item.getName();
|
}
|
}
|
return "";
|
}
|
}
|