package com.ouyeelbuy.srm.common.srmEnum;
/**
* @author robin.zhang
* @Package com.ouyeelbuy.srm.web.srmEnum
* @Description:
* @date 2020/3/1614:00
*/
public enum ApproveStatusEnum {
//20、審批中 40、掛起 50、終止 60、審批通過 70、審批駁回
AFWAPPROVED("20","審批中"), AFWKEEP("40","掛起"), AFWEND("50","終止"),AFWPASS("60","審批通過"),AFWREJECT("70","審批駁回");
private String code;
private String value;
ApproveStatusEnum(String code, String value) {
this.value = value;
this.code = code;
}
public String getCode() {
return this.code;
}
public String getValue() {
return this.value;
}
public static String get(String code) {
for (ApproveStatusEnum val : ApproveStatusEnum.values()) {
if (val.getCode().equals(code)) {
return val.getValue();
}
}
return "";
}
}
在使用的時候只需要調用get方法傳入對應的code值即可。