package com.panzhihua.common.enums;
|
|
import lombok.Getter;
|
|
/**
|
* 政治面貌
|
*
|
* @author huanghongfa
|
*/
|
@Getter
|
public enum PopulPoliticalOutlookEnum
|
{
|
PARTY_MEMBER(1, "中共党员"),
|
PROBATIONARY_PARTY_MEMBER(2, "中共预备党员"),
|
COMMUNIST_YOUTH_LEAGUE_MEMBER(3, "共青团员"),
|
MEMBERS_OF_THE_DEMOCRATIC_REVOLUTION(4, "民革党员"),
|
LEAGUE_MEMBER(5, "民盟盟员"),
|
MEMBER_OF_CIVIL_CONSTRUCTION(6, "民建会员"),
|
A_MEMBER_OF_THE_RURAL_LABOR_PARTY(8, "农工党党员"),
|
ZHIGONG_PARTY_MEMBER(9, "致公党党员"),
|
MEMBER_OF_JIUSAN_SOCIETY(10, "九三学社社员"),
|
MEMBER_OF_THE_TAIWAN_LEAGUE(11, "台盟盟员"),
|
INDEPENDENTS(12, "无党派人士"),
|
THE_MASSES(13, "群众");
|
|
private final Integer code;
|
private final String name;
|
|
PopulPoliticalOutlookEnum(Integer code, String name)
|
{
|
this.code = code;
|
this.name = name;
|
}
|
|
public static int getCodeByName(String name) {
|
for (PopulPoliticalOutlookEnum item : PopulPoliticalOutlookEnum.values()) {
|
if (item.name.equals(name)) {
|
return item.getCode();
|
}
|
}
|
return 13;
|
}
|
|
public static String getCnDescByName(Integer code) {
|
for (PopulPoliticalOutlookEnum item : PopulPoliticalOutlookEnum.values()) {
|
if (item.code.equals(code)) {
|
return item.getName();
|
}
|
}
|
return "群众";
|
}
|
|
}
|