From f75ff7a0fc566dc18b60987b3fa2e65cae4665da Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期三, 30 七月 2025 16:01:41 +0800
Subject: [PATCH] 2025.7.30 1. 新增基础数据产品相关接口(待完成)

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomainitemServiceImpl.kt |   61 ++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomainitemServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomainitemServiceImpl.kt
index 4b27486..9baf7f1 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomainitemServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomainitemServiceImpl.kt
@@ -96,4 +96,65 @@
             orderBy("index")
         })
     }
+
+    override fun getTaskType(): List<Domainitem> {
+        return domainitemMapper.selectByExample(Example(Domainitem::class.java).apply {
+            createCriteria().andEqualTo("dcguid", Constant.DOMAIN_GUID_TASK_TYPE)
+            orderBy("index")
+        })
+    }
+
+    override fun getDeadlineType(): List<Domainitem> {
+        return domainitemMapper.selectByExample(Example(Domainitem::class.java).apply {
+            createCriteria().andEqualTo("dcguid", Constant.DOMAIN_GUID_TASK_DEADLINE_TYPE)
+            orderBy("index")
+        })
+    }
+
+    override fun getLevelType(): List<Domainitem> {
+        return domainitemMapper.selectByExample(Example(Domainitem::class.java).apply {
+            createCriteria().andEqualTo("dcguid", Constant.DOMAIN_GUID_TASK_LEVEL)
+            orderBy("index")
+        })
+    }
+
+    override fun getMediaFileType(sceneType: Int?): MutableMap<String?, String?> {
+        val res = mutableMapOf<String?, String?>()
+        val type = Constant.SceneType.getByValue(sceneType.toString())
+        when (type) {
+            // 宸ュ湴
+            Constant.SceneType.TYPE1 -> {
+                val domainItems = domainitemMapper.selectByExample(Example(Domainitem::class.java).apply {
+                    createCriteria().andEqualTo("dcguid", Constant.MEDIA_FILE_TYPE_INDUSTRY)
+                    orderBy("index")
+                })
+                domainItems.forEach { res[it.value] = it.text }
+                // 宸ュ湴涓殑浠绘剰鎷嶅寘鍚�滃父瑙勮褰曗�濈被鍨�
+                res[Constant.MediaFileType.RoutineRecord.value.toString()] = Constant.MediaFileType.RoutineRecord.des
+                return res
+            }
+            // 椁愰ギ
+            Constant.SceneType.TYPE5 -> {
+                val domainItems = domainitemMapper.selectByExample(Example(Domainitem::class.java).apply {
+                    createCriteria().andEqualTo("dcguid", Constant.MEDIA_FILE_TYPE_RESTAURANT)
+                    orderBy("index")
+                })
+                domainItems.forEach { res[it.value] = it.text }
+                // 椁愰ギ涓殑浠绘剰鎷嶅寘鍚�滃父瑙勮褰曗�濈被鍨�
+                res[Constant.MediaFileType.RoutineRecord.value.toString()] = Constant.MediaFileType.RoutineRecord.des
+                return res
+            }
+            // 鍏朵綑绫诲瀷鍦烘櫙锛屼娇鐢ㄩ粯璁ょ殑鍒嗙被
+            else -> {
+                listOf(
+                    Constant.MediaFileType.Nameplate,
+                    Constant.MediaFileType.MonitorDevice,
+                    Constant.MediaFileType.RoutineRecord,
+                ).forEach {
+                    res[it.value.toString()] = it.des
+                }
+            }
+        }
+        return res
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3