From 0516cba27e632f20efac2752787f38f0c87baafa Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期三, 25 九月 2024 09:24:05 +0800
Subject: [PATCH] 1. 新增自动评估添加和更新接口

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt
index 726afa8..8bf1dba 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImpl.kt
@@ -278,10 +278,10 @@
     override fun getSceneDetail(sceneId: String): BaseResponse<SceneDetail> {
         val sceneDetail = SceneDetail()
 
-        val scene = scenseMapper.selectByPrimaryKey(sceneId)
+        val scene = sceneRep.findScene(sceneId = sceneId)
         sceneDetail.scense = scene
 
-        val mapper = when (scene.typeid.toString()) {
+        val mapper = when (scene?.typeid.toString()) {
             Constant.SceneType.TYPE1.value -> sceneConstructionSiteMapper
             Constant.SceneType.TYPE2.value -> sceneWharfMapper
             Constant.SceneType.TYPE3.value -> sceneMixingPlantMapper
@@ -411,7 +411,7 @@
         val scenes = sceneImport.readFromFile(f)
         // 鏌ユ壘鍦烘櫙鍚嶇О鏄惁閲嶅
         val names = scenes.map { it.name }
-        sceneRep.findScenes(names).map { it?.name }.ifNotEmpty {
+        sceneRep.findSceneList(names).map { it?.name }.ifNotEmpty {
             val str = this.joinToString("锛�")
             throw BizException("瀛樺湪閲嶅鍦烘櫙锛屽涓嬶細${str}")
         }
@@ -423,7 +423,7 @@
 
     override fun createScene(scense: Scense): Scense {
         val names = listOf(scense.name)
-        sceneRep.findScenes(names).map { it?.name }.ifNotEmpty {
+        sceneRep.findSceneList(names).map { it?.name }.ifNotEmpty {
             val str = this.joinToString("锛�")
             throw BizException("瀛樺湪閲嶅鍦烘櫙锛屽涓嬶細${str}")
         }

--
Gitblit v1.9.3