广州市综治平台后端
xusd
2025-06-07 36306491396230522fa20585c2621a7fc899849a
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
package cn.huge.module.constant;
 
import cn.huge.module.cust.constant.RoleBaseEnum;
import cn.huge.module.cust.dto.CtUserDTO;
import org.apache.commons.lang3.StringUtils;
 
/**
 * @title: 调解相关常量枚举类
 * @description: 调解相关常量枚举类
 * @company: hugeinfo
 * @author: liyj
 * @time: 2021-11-05 16:51:48
 * @version: 1.0.0
 */
public enum ByRoleEnum {
 
    /**
     * 平台基础角色
     */
    ROLE_1("22_00024-1", "运维技术人员"),
    ROLE_2("22_00024-2", "超级管理员"),
    ROLE_3("22_00024-3", "组织管理员"),
    ROLE_4("22_00024-4", "人民调解员"),
    ROLE_5("22_00024-5", "法官"),
    ROLE_6("22_00024-6", "法院"),
    ROLE_7("22_00024-7", "调度人员"),
    ROLE_8("22_00024-8", "法官助理/书记员"),
    ROLE_9("22_00024-9", "调委会管理员"),
    ROLE_10("22_00024-10", "司法局");
 
    /**
     * 代码编号
     */
    private String index;
 
    /**
     * 描述
     */
    private String des;
 
    public String getIndex() {
        return index;
    }
 
    public void setIndex(String index) {
        this.index = index;
    }
 
    public String getDes() {
        return des;
    }
 
    public void setDes(String desc) {
        this.des = desc;
    }
 
    /**
     * 构造方法
     * @param index
     * @param des
     */
    ByRoleEnum(String index, String des) {
        this.index = index;
        this.des = des;
    }
 
    /**
     * 静态方法
     * @param index
     * @return
     */
    public static String getDes(String index) {
        for (ByRoleEnum constantEnum : ByRoleEnum.values()) {
            if (constantEnum.getIndex().equals(index)) {
                return constantEnum.des;
            }
        }
        return null;
    }
 
    /**
     * 根据白云多元化的角色对应获取本平台的角色
     * @param byRoleIndex 白云多元化的角色编号
     * @return
     */
    public static RoleBaseEnum getGzRole(String byRoleIndex) {
        if(ROLE_1.getIndex().equals(byRoleIndex)) {
            return RoleBaseEnum.ROLE_1;
        }
 
        if(ROLE_2.getIndex().equals(byRoleIndex)){
            return RoleBaseEnum.ROLE_2;
        }
 
        if(ROLE_3.getIndex().equals(byRoleIndex)){
            return RoleBaseEnum.ROLE_3;
        }
 
        if(ROLE_4.getIndex().equals(byRoleIndex)){
            return RoleBaseEnum.ROLE_4;
        }
 
        if(ROLE_5.getIndex().equals(byRoleIndex)){
            return RoleBaseEnum.ROLE_4;
        }
 
        if(ROLE_6.getIndex().equals(byRoleIndex)){
            return RoleBaseEnum.ROLE_3;
        }
 
        if(ROLE_7.getIndex().equals(byRoleIndex)){
            return RoleBaseEnum.ROLE_4;
        }
 
        if(ROLE_8.getIndex().equals(byRoleIndex)){
            return RoleBaseEnum.ROLE_4;
        }
 
        if(ROLE_9.getIndex().equals(byRoleIndex)){
            return RoleBaseEnum.ROLE_3;
        }
 
        if(ROLE_10.getIndex().equals(byRoleIndex)){
            return RoleBaseEnum.ROLE_3;
        }
 
        return RoleBaseEnum.ROLE_4;
    }
}