From 72a384981ec78139dbe919597b54efedcc7f33aa Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期五, 27 九月 2024 17:42:55 +0800
Subject: [PATCH] 1. 新增评估结果批量修改相关接口

---
 src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt b/src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt
index 92f0633..f91d3f6 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/business/report/DataSource.kt
@@ -94,14 +94,10 @@
 
         //1. 鏌ユ壘鐗瑰畾鐨勫贰鏌ヤ换鍔℃垨鑰呮墍鏈夌殑璁″垝宸℃煡浠诲姟
         var taskSceneIdList = listOf<String>()
-        val subTaskList = if (config.subTaskIdList?.isNotEmpty() == true ||
-            (config.startTime != null || config.endTime != null)
-        ) {
+        val subTaskList = if (config.subTaskIdList?.isNotEmpty() == true) {
             dbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
                 createCriteria().apply {
-                    if (config.subTaskIdList?.isNotEmpty() == true) {
-                        andIn("stguid", config.subTaskIdList)
-                    }
+                    andIn("stguid", config.subTaskIdList)
                     config.startTime?.let { andGreaterThanOrEqualTo("planstarttime", it) }
                     config.endTime?.let { andLessThanOrEqualTo("planendtime", it) }
                     config.districtCode?.let { andEqualTo("districtcode", it) }
@@ -112,8 +108,9 @@
             taskSceneIdList = dbMapper.scenseMapper.getSceneByType(config.topTaskGuid, config
                 .sceneType, config.townCode).map { it.guid ?: "" }
             dbMapper.subtaskMapper.selectByExample(Example(Subtask::class.java).apply {
-                createCriteria().andIn("scenseid", taskSceneIdList)
-                    .andEqualTo("tguid", config.topTaskGuid)
+                createCriteria().apply {
+                    if (taskSceneIdList.isNotEmpty()) andIn("scenseid", taskSceneIdList)
+                }.andEqualTo("tguid", config.topTaskGuid)
             })
         }
 

--
Gitblit v1.9.3