package com.iailab.module.model.enums; import lombok.AllArgsConstructor; import lombok.Getter; /** * @author PanZhibao * @Description * @createTime 2023年11月26日 10:17:00 */ @Getter @AllArgsConstructor public enum ModelResultEnum { OK(200, "正常", ""), BAD(401, "输入值非法", ""), HJTW(402, "合介桶位异常,请切回手动控制", "Result402"), XJTW(403, "稀介桶位异常,请切回手动控制", "Result403"), HJMD(404, "合介密度异常,请切回手动控制", "Result404"), JMHF(405, "精煤灰分异常,请切回手动控制", "Result405"), YLND(406, "溢流浊度异常,请切回手动控制", "Result406"), DLND(407, "底流浓度异常,请切回手动控制", "Result407"), QSWG(408, "清水位高度异常,请切回手动控制", "Result408"); private Integer code; private String desc; private String point; public static ModelResultEnum getEumByCode(Integer code) { if (code == null) { return null; } for (ModelResultEnum statusEnum : ModelResultEnum.values()) { if (statusEnum.getCode().equals(code)) { return statusEnum; } } return null; } }