From 14c05113b72698a331259ce7c34c7ae8dd69ffd7 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 09 一月 2026 14:34:03 +0800
Subject: [PATCH] 【市一】问题统计接口调整

---
 smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index ea1985a..86fe53d 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -1452,12 +1452,15 @@
         <if test="configValue != null and configValue != ''">
             AND ssd.categoryid IN (${configValue})
         </if>
-        <!-- 閫傜敤鍗曟潯鏌ヨ -->
-        <if test="scriptids != null">
-            AND ssd.scriptid in (${scriptids})
-        </if>
         group by ssd.scriptid) b
         ON a.id = b.scriptid
+        <!-- 閫傜敤鍗曟潯鏌ヨ -->
+        <if test="scriptids != null">
+            AND a.scriptid in
+            (SELECT lib_script.scriptid FROM
+            svy_lib_template_script lib_script
+            WHERE lib_script.scriptid in (${scriptids}))
+        </if>
     </select>
 
     <select id="getSfStatisticsScriptItemDetails" parameterType="com.smartor.domain.ServiceSubtaskCountReq"

--
Gitblit v1.9.3