feiyu02
2024-11-19 752e00503f672ddfe2066afb6c235721a3a912b5
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.flightfeather.taizhang.model.enumeration
 
/**
 * @author riku
 * Date: 2020/4/10
 */
enum class NotificationType(val value: Int, val des: String) {
    System(1, "系统通知"),
    Work(2, "工作通知"),
    Alarm(3, "警报信息");
 
    companion object {
        fun getByValue(value1: Int) = when (value1) {
            System.value -> System.des
            Work.value -> Work.des
            Alarm.value -> Alarm.des
            else -> ""
        }
    }
 
}
 
enum class WorkSubType(val value: Int, val des: String) {
    All(0, "全部"),
    Requirement(1, "工作要求"),
    Law(2, "执法通知"),
    Supervision(3, "监管通知"),
    Meeting(4, "会议通知");
 
    companion object {
        fun getByValue(value1: Int, value2: Int) = when (value1) {
            NotificationType.Work.value -> when (value2) {
                Requirement.value -> Requirement.des
                Law.value -> Law.des
                Supervision.value -> Supervision.des
                Meeting.value -> Meeting.des
                else -> All.des
            }
            else -> NotificationType.getByValue(value1)
        }
    }
}