From 5a003a42d2b34e8362910ac1d3e5a8866768e5fe Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期六, 20 十二月 2025 16:50:28 +0800
Subject: [PATCH] 2025.12.20 巡查任务统计相关功能修改

---
 src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SceneRep.kt |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SceneRep.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SceneRep.kt
index 7a8e29e..e29beea 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SceneRep.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SceneRep.kt
@@ -91,6 +91,35 @@
         return isUpdate to r
     }
 
+    fun findSubSceneList(scenes: List<Scense>): List<BaseScene?> {
+        val result = mutableListOf<BaseScene>()
+        scenes.groupBy { it.typeid }.forEach {
+            when (it.key.toString()) {
+                Constant.SceneType.TYPE1.value -> {
+                    sceneConstructionSiteMapper.selectByExample(Example(SceneConstructionSite::class.java).apply {
+                        createCriteria().andIn("sGuid", it.value.map { v-> v.guid })
+                    }).let { s-> result.addAll(s) }
+                }
+                Constant.SceneType.TYPE2.value -> {
+                    sceneWharfMapper.selectByExample(Example(SceneWharf::class.java).apply {
+                        createCriteria().andIn("sGuid", it.value.map { v-> v.guid })
+                    }).let { s-> result.addAll(s) }
+                }
+                Constant.SceneType.TYPE3.value -> {
+                    sceneMixingPlantMapper.selectByExample(Example(SceneMixingPlant::class.java).apply {
+                        createCriteria().andIn("sGuid", it.value.map { v-> v.guid })
+                    }).let { s-> result.addAll(s) }
+                }
+                Constant.SceneType.TYPE14.value -> {
+                    sceneStorageYardMapper.selectByExample(Example(SceneStorageYard::class.java).apply {
+                        createCriteria().andIn("sGuid", it.value.map { v-> v.guid })
+                    }).let { s-> result.addAll(s) }
+                }
+            }
+        }
+        return result
+    }
+
     fun findScene(userId: String?): Scense? {
         val user = userinfoMapper.selectByPrimaryKey(userId) ?: throw BizException("鐢ㄦ埛id涓嶅瓨鍦�")
         return scenseMapper.selectByPrimaryKey(user.dGuid)

--
Gitblit v1.9.3