From 035108ae9d6ea2c2daa860921f296fda02a8e410 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 02 九月 2026 10:42:25 +0800
Subject: [PATCH] 1.满意度导出BUG处理 2.三汇电话接口部分 3.外链可以通过subid查询到
---
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 1683cd0..118719e 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -396,7 +396,7 @@
</if>
<if test="deptOrDistrict==2">
AND (1=1
- <if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
+ <if test="leavehospitaldistrictcodes != null">
AND leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="leavehospitaldistrictcode" open="("
separator=","
@@ -404,7 +404,7 @@
#{leavehospitaldistrictcode}
</foreach>
</if>
- <if test=" leaveldeptcodes != null and leaveldeptcodes.size()>0">
+ <if test=" leaveldeptcodes != null">
OR deptcode IN
<foreach collection="leaveldeptcodes" item="leaveldeptcode" open="(" separator=","
close=")">
@@ -3089,6 +3089,56 @@
t.taskid
</select>
+ <!-- 鏂版柟娉曪細鏍规嵁瀛愪换鍔� ID 缁熻闂閫夐」鐧惧垎姣� (鐢ㄤ簬婊℃剰搴︾粺璁� serviceType=6) -->
+ <select id="statQuestionOptionBySubtaskIds" resultType="com.smartor.domain.ServiceSubtaskDetailRatioExport">
+ SELECT
+ d.questiontext AS questiontext,
+ t.taskid AS taskid,
+ t.task_name AS taskName,
+ d.asrtext AS optionresult,
+ COUNT(*) AS count,
+ CONCAT(ROUND(COUNT(*) * 100.0 / t2.total_count, 2), '%') AS ratio
+ FROM
+ service_task t
+ INNER JOIN service_subtask s ON s.taskid = t.taskid
+ INNER JOIN service_subtask_detail d ON d.sub_id = s.id
+ INNER JOIN (
+ SELECT
+ d.questiontext,
+ COUNT(*) AS total_count
+ FROM
+ service_task t
+ INNER JOIN service_subtask s ON s.taskid = t.taskid
+ INNER JOIN service_subtask_detail d ON d.sub_id = s.id
+ WHERE s.id IN
+ <foreach collection="subtaskIds" item="subtaskId" open="(" separator="," close=")">
+ #{subtaskId}
+ </foreach>
+ AND s.sendstate = 6
+ AND d.del_flag=0
+ GROUP BY d.questiontext -- 鈫� 鍏抽敭淇敼锛氭寜棰樼洰鍒嗙粍缁熻姣忎釜棰樼洰鐨勬�绘暟
+ ) t2 ON t2.questiontext = d.questiontext -- 鈫� 鍏宠仈鍒板綋鍓嶉鐩�
+ WHERE s.id IN
+ <foreach collection="subtaskIds" item="subtaskId" open="(" separator="," close=")">
+ #{subtaskId}
+ </foreach>
+ AND s.sendstate = 6
+ AND d.del_flag=0
+ <if test="startOutHospTime != null">
+ AND date_format(s.endtime,'%y%m%d') >= date_format(#{startOutHospTime},'%y%m%d')
+ </if>
+ <if test="endOutHospTime != null">
+ AND date_format(s.endtime,'%y%m%d') <= date_format(#{endOutHospTime},'%y%m%d')
+ </if>
+ GROUP BY
+ t.taskid,
+ d.questiontext,
+ d.asrtext
+ ORDER BY
+ d.questiontext,
+ t.taskid
+ </select>
+
<select id="selectServiceSubtaskListDeadLine" parameterType="com.smartor.domain.entity.ServiceSubtaskEntity"
resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
--
Gitblit v1.9.3