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 cn.flightfeather.supervision.domain.enumeration
|
| enum class SceneType(val value: Int, val des: String) {
| NoType(0, "无类型"),
| Restaurant(1, "餐饮"),
| Construction(2, "工地"),
| Wharf(3, "码头"),
| StorageYard(4, "堆场"),
| MixingPlant(5, "搅拌站"),
| Industrial(6, "工业企业"),
| VehicleRepair(7, "汽修"),
| Laboratory(8, "实验室"),
| MedicalInstitution(9, "医疗机构");
|
| companion object {
| 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),
| )
| }
| }
|
|