public enum ZDJGJD { YSZ("01",0.3,"取得预售许可"),JGFD("02",0.6,"单位结构封顶"),ZTYS("03",0.8,"单位工程主体验收"),GCJG("04",0.9,"工程竣工验收备案"),CSDJ("05",1.0,"完成房屋初始登记"); private String jgValue;// 监管节点值 private Double jgRatio; // 监管额度比例 private String jgName; // 监管节点名称 ZDJGJD(String jgValue, Double jgRatio, String jgName) { this.jgValue = jgValue; this.jgRatio = jgRatio; this.jgName = jgName; } public String getJgValue() { return jgValue; } public void setJgValue(String jgValue) { this.jgValue = jgValue; } public Double getJgRatio() { return jgRatio; } public void setJgRatio(Double jgRatio) { this.jgRatio = jgRatio; } public String getJgName() { return jgName; } public void setJgName(String jgName) { this.jgName = jgName; } // 根据节点值获取监管额度 public static Double getRatio(String jgValue){ for (ZDJGJD jgjd: ZDJGJD.values()){ if(jgjd.jgValue.equals(jgValue)){ return jgjd.jgRatio; } } return new Double(0); } // 根据几点值获取监管节点名称 public static String getName(String jgValue){ for (ZDJGJD jgjd: ZDJGJD.values()){ if(jgjd.jgValue.equals(jgValue)){ return jgjd.jgName; } } return "无"; } }