From 9fc52256df321e14a179811eda954491f5b71fea Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 09 一月 2026 17:55:19 +0800
Subject: [PATCH] 【市一】问题统计接口调整
---
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index f75750b..7286c66 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -1330,12 +1330,18 @@
<select id="getSfStatisticsCategory" parameterType="com.smartor.domain.ServiceSubtaskCountReq"
resultMap="ServiceSubtaskResult2">
- SELECT a.sub_id as subTaskId,
+ SELECT
+ <if test="configValue != null and configValue != ''">
+ SUM(CASE WHEN a.categoryid IN(${configValue})
+ AND IFNULL(a.matchedtext,a.asrtext) IS NOT NULL
+ AND IFNULL(a.matchedtext,a.asrtext) != ''
+ THEN 1 ELSE 0 END) AS joyCount,
+ </if>
<if test="configValue != null and configValue != ''">
SUM(CASE WHEN a.categoryid IN(${configValue})
THEN 1 ELSE 0 END) AS joyAllCount,
</if>
- COUNT(sub_id) joyCount
+ a.sub_id as subTaskId
FROM service_subtask_detail a
INNER JOIN service_subtask t ON a.sub_id = t.id
where 1=1
--
Gitblit v1.9.3