package com.ruoyi.common.enums; import lombok.AllArgsConstructor; import lombok.Getter; /** *
* 审批类型枚举 *
* * @author deslrey * @version 1.0 * @since 2026/1/27 17:10 */ @Getter @AllArgsConstructor public enum ApproveTypeEnum { PUBLIC_AFFAIRS(1, "公出管理"), LEAVE(2, "请假管理"), BUSINESS_TRIP(3, "出差管理"), REIMBURSEMENT(4, "报销管理"), PURCHASE(5, "采购审批"), QUOTATION(6, "报价审批"), DELIVERY(7, "发货审批"); private final Integer code; private final String name; /** * 根据 code 获取对应的名称 */ public static String getNameByCode(Integer code) { if (code == null) return null; for (ApproveTypeEnum type : ApproveTypeEnum.values()) { if (type.getCode().equals(code)) { return type.getName(); } } return ""; } }