From 6904763f0e74d9a9fa4dbc39f635d2aee39416c6 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 30 九月 2025 09:34:22 +0800
Subject: [PATCH] 2025.9.30
---
src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/NotificationType.kt | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/NotificationType.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/NotificationType.kt
index 5b14e94..0a73cf4 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/NotificationType.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/NotificationType.kt
@@ -7,12 +7,36 @@
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)
+ }
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3