From 7cd8d2a1e96de3d173bf5af64b4adc29c497db2a Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期六, 12 十月 2024 17:38:07 +0800
Subject: [PATCH] 1. 新增评估结果批量修改相关接口(完成)

---
 src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SceneRep.kt |   33 ++++++++++++++++++---------------
 1 files changed, 18 insertions(+), 15 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 cec2e1a..56e16a5 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
@@ -5,7 +5,6 @@
 import cn.flightfeather.supervision.domain.ds1.entity.Scense
 import cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper
 import cn.flightfeather.supervision.domain.ds1.mapper.UserinfoMapper
-import javafx.scene.Scene
 import org.springframework.stereotype.Repository
 import tk.mybatis.mapper.entity.Example
 import java.util.*
@@ -20,18 +19,11 @@
     private val subTaskRep: SubTaskRep,
 ) {
 
-    fun insert(scense: Scense?):Int {
-        scense ?: return 0
-        if (scense.guid == null) scense.guid = UUIDGenerator.generate16ShortUUID()
-        scense.createdate = Date()
-        return scenseMapper.insertSelective(scense)
-    }
-
-    /**
-     * 鏌ユ壘鍦烘櫙
-     */
-    fun findScene(topTaskId: String, sceneTypeId: Int? = null, townCode: String? = null): List<Scense?> {
-        return scenseMapper.getSceneByType(topTaskId, sceneTypeId, townCode)
+    fun insert(scene: Scense?):Int {
+        scene ?: return 0
+        if (scene.guid == null) scene.guid = UUIDGenerator.generate16ShortUUID()
+        scene.createdate = Date()
+        return scenseMapper.insertSelective(scene)
     }
 
     fun findScene(userId: String?): Scense? {
@@ -46,14 +38,25 @@
         })
     }
 
-    fun findScenes(nameList: List<String?>): List<Scense?> {
+    fun findSceneList(scene: Scense): List<Scense?> {
+        return scenseMapper.select(scene)
+    }
+
+    fun findSceneList(nameList: List<String?>): List<Scense?> {
         return scenseMapper.selectByExample(Example(Scense::class.java).apply {
             createCriteria().andIn("name", nameList)
         })
     }
 
+    /**
+     * 鏌ユ壘鍦烘櫙
+     */
+    fun findSceneList(topTaskId: String, sceneTypeId: Int? = null, townCode: String? = null): List<Scense?> {
+        return scenseMapper.getSceneByType(topTaskId, sceneTypeId, townCode)
+    }
+
     fun findBySubTask(subTaskId: String): Scense? {
-        val subtask = subTaskRep.find(subTaskId)
+        val subtask = subTaskRep.findOne(subTaskId)
         return scenseMapper.selectByPrimaryKey(subtask?.scenseid)
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3