| | |
| | | enum class NotificationType(val value: Int, val des: String) { |
| | | System(1, "系统通知"), |
| | | Work(2, "工作通知"), |
| | | Alarm(3, "警报信息") |
| | | 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, "会议通知") |
| | | 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) |
| | | } |
| | | } |
| | | } |