From c1becf4cbd2e99601ce011c14b8742427249cfb4 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 09 一月 2024 17:25:05 +0800 Subject: [PATCH] 1. 多项调整 --- src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt | 32 +++++++++++++++++++------------- 1 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt index 80d462f..088061b 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/datasource/AopDataSource.kt @@ -47,6 +47,18 @@ } } + fun setResource(subtask: Subtask) { + val scene = aopDbMapper.scenseMapper.selectByPrimaryKey(subtask.scenseid) + val sceneType = scene.typeid?.toInt() + val config = AopDataConfig(topTaskGuid = subtask.tguid, sceneType = sceneType, + districtName = subtask.districtname, townCode = subtask.towncode) + evaluationScene.config = config +// val check = aopSceneTypeCheck.checkSceneType(sceneType) + this.mode = 0 + sceneSourceList.clear() + sceneSourceList.add(scene) + } + /** * 杞鏁版嵁婧� */ @@ -83,12 +95,6 @@ aopDbMapper.scenseMapper.selectByExample(Example(Scense::class.java).apply { createCriteria() .andIn("guid", taskSceneIdList) -// .andEqualTo("provincecode", config.provinceCode) -// .andEqualTo("citycode", config.cityCode) -// .andEqualTo("districtcode", config.districtCode) -// .andEqualTo("towncode", config.townCode) -// .andEqualTo("typeid", config.sceneType) -// .andNotEqualTo("extension1", '0') })?.let { sceneSourceList.addAll(it) } } @@ -166,23 +172,23 @@ val baseScene = InfoProxy<BaseScene> {_,_ -> return@InfoProxy when (config?.sceneType.toString()) { // 鐩戠绯荤粺 - Constant.ScenseType.TYPE1.value -> { + Constant.SceneType.TYPE1.value -> { aopDbMapper.sceneConstructionSiteMapper.selectByPrimaryKey(scene.value?.guid) } - Constant.ScenseType.TYPE2.value -> { + Constant.SceneType.TYPE2.value -> { aopDbMapper.sceneWharfMapper.selectByPrimaryKey(scene.value?.guid) } - Constant.ScenseType.TYPE3.value -> { + Constant.SceneType.TYPE3.value -> { aopDbMapper.sceneMixingPlantMapper.selectByPrimaryKey(scene.value?.guid) } - Constant.ScenseType.TYPE14.value -> { + Constant.SceneType.TYPE14.value -> { aopDbMapper.sceneStorageYardMapper.selectByPrimaryKey(scene.value?.guid) } // 鍙拌处绯荤粺 - Constant.ScenseType.TYPE5.value -> { + Constant.SceneType.TYPE5.value -> { aopDbMapper.restaurantBaseInfoMapper.selectByPrimaryKey(userInfoTZ.value?.guid) } - Constant.ScenseType.TYPE6.value -> { + Constant.SceneType.TYPE6.value -> { aopDbMapper.vehicleBaseInfoMapper.selectByPrimaryKey(userInfoTZ.value?.guid) } else -> null @@ -295,7 +301,7 @@ //蹇呭~鍙拌处鏁伴噺 val ledgerCount = InfoProxy<Int>(config?.sceneType.toString()) {_, cacheMap -> - val tzSceneType = Constant.ScenseType.typeMap(scene.value?.typeid) + val tzSceneType = Constant.SceneType.typeMap(scene.value?.typeid) val list = aopDbMapper.ledgerSubTypeMapper.selectCountByExample(Example(LedgerSubType::class.java).apply { createCriteria().andEqualTo("lScenetype", tzSceneType).andEqualTo("lNeedupdate", true) }) -- Gitblit v1.9.3