From 8c15c9cc0d6474ed77e313258f9b09f7f2d6366e Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期三, 17 九月 2025 17:29:47 +0800 Subject: [PATCH] 2025.9.17 1. 新增数据产品接口 --- src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/DomainitemServiceImpl.kt | 70 +++++++++++++++++++++++++++++++++- 1 files changed, 67 insertions(+), 3 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 41116a1..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 @@ -82,9 +82,12 @@ override fun getLocation(sceneType: Int): List<Domainitem> { val lId = when (sceneType.toString()) { - Constant.ScenseType.TYPE1.value -> Constant.INDUSTRY_LOCATION_ID - Constant.ScenseType.TYPE5.value -> Constant.RESTAURANT_LOCATION_ID - Constant.ScenseType.TYPE6.value -> Constant.Vehicle_LOCATION_ID + Constant.SceneType.TYPE1.value -> Constant.INDUSTRY_LOCATION_ID + Constant.SceneType.TYPE2.value -> Constant.WHARF_LOCATION_ID + Constant.SceneType.TYPE14.value -> Constant.STORAGE_YARD_LOCATION_ID + Constant.SceneType.TYPE3.value -> Constant.MIX_LOCATION_ID + Constant.SceneType.TYPE5.value -> Constant.RESTAURANT_LOCATION_ID + Constant.SceneType.TYPE6.value -> Constant.Vehicle_LOCATION_ID else -> Constant.INDUSTRY_LOCATION_ID } @@ -93,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