package com.iailab.module.data.common.enums; import lombok.AllArgsConstructor; import lombok.Getter; @Getter @AllArgsConstructor public enum IndStatFuncEnum { SUM("SUM", "求和"), COUNT("COUNT", "计数"), AVG("AVG", "平均值"), MAX("MAX", "最大值"), MIN("MIN", "最小值"), DEFAULT("DEFAULT", "默认值"); private String code; private String desc; public static IndStatFuncEnum getEumByCode(String code) { if (code == null) { return null; } for (IndStatFuncEnum statusEnum : IndStatFuncEnum.values()) { if (statusEnum.getCode().equals(code)) { return statusEnum; } } return null; } }