From 6e1095e946997e406926c204ceeb5c820dbd07c1 Mon Sep 17 00:00:00 2001 From: Riku <risaku@163.com> Date: 星期二, 13 八月 2024 23:51:47 +0800 Subject: [PATCH] 1. 修复文件扩展名获取错误问题 2. 调试完善设备信息相关接口 --- src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt b/src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt index 8cf5bbb..f6c61e5 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/common/utils/Constant.kt @@ -130,6 +130,23 @@ } } + //璁惧绫诲瀷 + enum class DeviceType(val value: Byte, val text: String){ + MONITOR_DEVICE(0, "鐩戞帶璁惧"), + TREATMENT_DEVICE(1, "娌荤悊璁惧"), + PRODUCTION_DEVICE(2, "鐢熶骇璁惧"); + + companion object { + fun fromValue(value: Byte) = when (value.toInt()) { + 0 -> MONITOR_DEVICE + 1 -> TREATMENT_DEVICE + 2 -> PRODUCTION_DEVICE + else -> MONITOR_DEVICE + } + } + } + + companion object { //闂瀹℃牳 const val PROBLEM_CHECK_PASS = "pass"//闂瀹℃牳閫氳繃 -- Gitblit v1.9.3