From 9558ad87cc950bd67306aa31e5f3b7de367258ae Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 20 一月 2026 17:29:23 +0800
Subject: [PATCH] 2026.1.20 1. 新增自巡查承诺功能接口
---
src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/SceneType.kt | 40 ++++++++++++++++++++++++++++------------
1 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/SceneType.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/SceneType.kt
index 5fb37a2..0453055 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/SceneType.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/enumeration/SceneType.kt
@@ -1,6 +1,6 @@
package cn.flightfeather.supervision.domain.enumeration
-enum class SceneType(val value: Int, val des: String) {
+enum class SceneType(val value: Int, val des: String) {
NoType(0, "鏃犵被鍨�"),
Restaurant(1, "椁愰ギ"),
Construction(2, "宸ュ湴"),
@@ -8,19 +8,35 @@
StorageYard(4, "鍫嗗満"),
MixingPlant(5, "鎼呮媽绔�"),
Industrial(6, "宸ヤ笟浼佷笟"),
- VehicleRepair(7, "姹戒慨");
+ VehicleRepair(7, "姹戒慨"),
+ Laboratory(8, "瀹為獙瀹�"),
+ MedicalInstitution(9, "鍖荤枟鏈烘瀯");
companion object {
- fun getNameByValue(value: Int): String = when (value) {
- 0 -> NoType.des
- 1 -> Restaurant.des
- 2 -> Construction.des
- 3 -> Wharf.des
- 4 -> StorageYard.des
- 5 -> MixingPlant.des
- 6 -> Industrial.des
- 7 -> VehicleRepair.des
- else -> NoType.des
+ fun getByValue(value: Int?): SceneType = when (value) {
+ 0 -> NoType
+ 1 -> Restaurant
+ 2 -> Construction
+ 3 -> Wharf
+ 4 -> StorageYard
+ 5 -> MixingPlant
+ 6 -> Industrial
+ 7 -> VehicleRepair
+ 8 -> Laboratory
+ 9 -> MedicalInstitution
+ else -> NoType
}
+
+ fun toPairList() = listOf(
+ Pair(Construction.value.toString(), Construction.des),
+ Pair(Wharf.value.toString(), Wharf.des),
+ Pair(StorageYard.value.toString(), StorageYard.des),
+ Pair(MixingPlant.value.toString(), MixingPlant.des),
+ Pair(Restaurant.value.toString(), Restaurant.des),
+ Pair(Industrial.value.toString(), Industrial.des),
+ Pair(VehicleRepair.value.toString(), VehicleRepair.des),
+ Pair(Laboratory.value.toString(), Laboratory.des),
+ Pair(MedicalInstitution.value.toString(), MedicalInstitution.des),
+ )
}
}
\ No newline at end of file
--
Gitblit v1.9.3