1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
| package com.ruoyi.common.enums;
|
| import lombok.AllArgsConstructor;
| import lombok.Getter;
|
| /**
| * <br>
| * 审批类型枚举
| * </br>
| *
| * @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 "";
| }
| }
|
|