You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

55 lines
1.1 KiB

package com.epmet.enums;
import org.apache.commons.lang3.StringUtils;
/**
* 居民信息里的人户状况枚举类
*/
public enum RenHuConditionEnum {
/**
* 人户一致,人在户不在,户在人不在,
* 为空的 暂不清楚
*/
RHYZ("rhyz","人户一致"),
RZHBZ("rzhbz","人在户不在"),
HZRBZ("hzrbz","户在人不在"),
ZBQC("","暂不清楚"),
;
private String code;
private String name;
public static String getNameByCode(String code){
if (StringUtils.isBlank(code)){
return ZBQC.name;
}
for (RenHuConditionEnum e : values()) {
if (e.getCode().equals(code)){
return e.getName();
}
}
return ZBQC.name;
}
RenHuConditionEnum(String code, String name) {
this.code = code;
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}