52 lines
1.2 KiB
Java
52 lines
1.2 KiB
Java
package cn.palmte.work.bean;
|
|
|
|
/**
|
|
* @author xiongshiyan at 2021/11/1 , contact me with email yanshixiong@126.com or phone 15208384257
|
|
*/
|
|
public enum StatusEnum {
|
|
ESTIMATE_ACCOUNTS(1,"项目创建(概算)"),
|
|
BUDGET_ACCOUNTS(5,"预算"),
|
|
SETTLE_ACCOUNTS(10,"结算"),
|
|
FINAL_ACCOUNTS(15,"决算");
|
|
|
|
private int status;
|
|
private String statusDesc;
|
|
|
|
private StatusEnum(int status, String statusDesc) {
|
|
this.status = status;
|
|
this.statusDesc = statusDesc;
|
|
}
|
|
|
|
public int getStatus() {
|
|
return status;
|
|
}
|
|
|
|
public void setStatus(int status) {
|
|
this.status = status;
|
|
}
|
|
|
|
public String getStatusDesc() {
|
|
return statusDesc;
|
|
}
|
|
|
|
public void setStatusDesc(String statusDesc) {
|
|
this.statusDesc = statusDesc;
|
|
}
|
|
|
|
public static StatusEnum parseStatus(int status){
|
|
if(status == 1){
|
|
return ESTIMATE_ACCOUNTS;
|
|
}
|
|
if(status == 5){
|
|
return BUDGET_ACCOUNTS;
|
|
}
|
|
if(status == 10){
|
|
return SETTLE_ACCOUNTS;
|
|
}
|
|
if(status == 15){
|
|
return FINAL_ACCOUNTS;
|
|
}
|
|
throw new IllegalArgumentException("Unkown status:"+status);
|
|
}
|
|
}
|