package com.iailab.module.pms.coalquality.common.enums; import lombok.AllArgsConstructor; import lombok.Getter; /** * @author PanZhibao * @Description * @createTime 2023年12月15日 14:00:00 */ @Getter @AllArgsConstructor public enum BcEnums { BB("bb", "白班"), YB("yb", "夜班"); private String code; private String desc; public static BcEnums getEumByCode(String code) { if (code == null) { return null; } for (BcEnums statusEnum : BcEnums.values()) { if (statusEnum.getCode().equals(code)) { return statusEnum; } } return null; } }