2024-10-18 09:01:41 +00:00
|
|
|
|
package cn.palmte.work.bean;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @author xiongshiyan at 2021/11/1 , contact me with email yanshixiong@126.com or phone 15208384257
|
|
|
|
|
|
*/
|
|
|
|
|
|
public enum CertaintyEnum {
|
|
|
|
|
|
PLAN_O(-1,""),
|
|
|
|
|
|
PLAN_A(1,"A:项目成功率80%-100%"),
|
|
|
|
|
|
PLAN_B(2,"B:项目成功率60%-80%"),
|
|
|
|
|
|
PLAN_C(3,"C:项目成功率40%-60%");
|
|
|
|
|
|
|
|
|
|
|
|
private int certainty;
|
|
|
|
|
|
private String certaintyStr;
|
|
|
|
|
|
|
|
|
|
|
|
private CertaintyEnum(int certainty, String certaintyStr) {
|
|
|
|
|
|
this.certainty = certainty;
|
|
|
|
|
|
this.certaintyStr = certaintyStr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public int getCertainty() {
|
|
|
|
|
|
return certainty;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setCertainty(int certainty) {
|
|
|
|
|
|
this.certainty = certainty;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public String getCertaintyStr() {
|
|
|
|
|
|
return certaintyStr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void setCertaintyStr(String certaintyStr) {
|
|
|
|
|
|
this.certaintyStr = certaintyStr;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static CertaintyEnum parseCertainty(int certainty){
|
|
|
|
|
|
if(certainty == 1){
|
|
|
|
|
|
return PLAN_A;
|
|
|
|
|
|
}
|
|
|
|
|
|
if(certainty == 2){
|
|
|
|
|
|
return PLAN_B;
|
|
|
|
|
|
}
|
|
|
|
|
|
if(certainty == 3){
|
|
|
|
|
|
return PLAN_C;
|
|
|
|
|
|
}
|
|
|
|
|
|
throw new IllegalArgumentException("Unkown certainty:"+certainty);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|