From 2013ea208bc8fa12fb6f8d22497f2a8b5f69855f Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 11 九月 2026 11:18:30 +0800
Subject: [PATCH] 1.省立同德的满意度功能处理 2.省立同德、南华采集时间缩短 3.给保存问卷接口,加一下防止重复提前的注解@RepeatSubmit 4.省立同德新增“报备科室责任人”字段 5.登陆接口加“用户类型”字段,不影响当前登陆逻辑
---
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 81 ++++++++++++++++++++++++++++++++--------
1 files changed, 65 insertions(+), 16 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 4910e68..31c1134 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -380,6 +380,12 @@
<if test="endSendDateTime != null">
AND date_format(visit_time,'%y%m%d') <= date_format(#{endSendDateTime},'%y%m%d')
</if>
+ <if test="finishtimeStart != null">
+ AND date_format(finishtime,'%y%m%d') >= date_format(#{finishtimeStart},'%y%m%d')
+ </if>
+ <if test="finishtimeEnd != null">
+ AND date_format(finishtime,'%y%m%d') <= date_format(#{finishtimeEnd},'%y%m%d')
+ </if>
<if test="longSendTime != null">
AND date_format(long_send_time,'%y%m%d') <= date_format(#{longSendTime},'%y%m%d')
</if>
@@ -3050,6 +3056,9 @@
t.taskid AS taskid,
t.task_name AS taskName,
d.asrtext AS optionresult,
+ d.score AS score,
+ d.targetvalue AS targetvalue,
+ d.value_type AS valueType,
COUNT(*) AS count,
CONCAT(ROUND(COUNT(*) * 100.0 / t2.total_count, 2), '%') AS ratio
FROM
@@ -3065,32 +3074,53 @@
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 t.taskid IN
- <foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
- #{taskId}
- </foreach>
+ WHERE 1=1
+ <if test="taskIds != null and taskIds.size() > 0">
+ AND t.taskid IN
+ <foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
+ #{taskId}
+ </foreach>
+ </if>
+ <if test="valueType != null">AND d.value_type = #{valueType}</if>
+ <if test="scoreStart != null">AND d.score >= #{scoreStart}</if>
+ <if test="scoreEnd != null">AND d.score <= #{scoreEnd}</if>
+ <if test="questiontext != null and questiontext != ''">and d.questiontext like concat('%', #{questiontext},
+ '%')
+ </if>
and s.sendstate=6
and d.del_flag=0
GROUP BY
t.taskid,
d.questiontext
) t2 ON t2.taskid = t.taskid AND t2.questiontext = d.questiontext
- WHERE t.taskid IN
- <foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
- #{taskId}
- </foreach>
+ WHERE 1=1
+ <if test="taskIds != null and taskIds.size() > 0">
+ AND t.taskid IN
+ <foreach collection="taskIds" item="taskId" open="(" separator="," close=")">
+ #{taskId}
+ </foreach>
+ </if>
+ <if test="valueType != null">AND d.value_type = #{valueType}</if>
+ <if test="scoreStart != null">AND d.score >= #{scoreStart}</if>
+ <if test="scoreEnd != null">AND d.score <= #{scoreEnd}</if>
+ <if test="questiontext != null and questiontext != ''">and d.questiontext like concat('%', #{questiontext},
+ '%')
+ </if>
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="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
+ d.score,
+ d.targetvalue,
+ d.asrtext,
+ d.value_type
ORDER BY
d.questiontext,
t.taskid
@@ -3103,6 +3133,9 @@
t.taskid AS taskid,
t.task_name AS taskName,
d.asrtext AS optionresult,
+ d.score AS score,
+ d.targetvalue AS targetvalue,
+ d.value_type AS valueType,
COUNT(*) AS count,
CONCAT(ROUND(COUNT(*) * 100.0 / t2.total_count, 2), '%') AS ratio
FROM
@@ -3117,20 +3150,34 @@
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
+ WHERE 1=1
+ <if test="subtaskIds != null and subtaskIds.size() > 0">
+ AND s.id IN
<foreach collection="subtaskIds" item="subtaskId" open="(" separator="," close=")">
#{subtaskId}
</foreach>
+ </if>
+ <if test="valueType != null">AND d.value_type >= #{valueType}</if>
+ <if test="scoreStart != null">AND d.score = #{scoreStart}</if>
+ <if test="scoreEnd != null">AND d.score <= #{scoreEnd}</if>
+ <if test="questiontext != null and questiontext != ''">and d.questiontext like concat('%', #{questiontext}, '%')</if>
AND s.sendstate = 6
AND d.del_flag=0
- GROUP BY d.questiontext -- 鈫� 鍏抽敭淇敼锛氭寜棰樼洰鍒嗙粍缁熻姣忎釜棰樼洰鐨勬�绘暟
- ) t2 ON t2.questiontext = d.questiontext -- 鈫� 鍏宠仈鍒板綋鍓嶉鐩�
- WHERE s.id IN
+ GROUP BY d.questiontext
+ ) t2 ON t2.questiontext = d.questiontext
+ WHERE 1=1
+ <if test="subtaskIds != null and subtaskIds.size() > 0">
+ AND s.id IN
<foreach collection="subtaskIds" item="subtaskId" open="(" separator="," close=")">
#{subtaskId}
</foreach>
+ </if>
AND s.sendstate = 6
AND d.del_flag=0
+ <if test="valueType != null">AND d.value_type >= #{valueType}</if>
+ <if test="scoreStart != null">AND d.score >= #{scoreStart}</if>
+ <if test="scoreEnd != null">AND d.score <= #{scoreEnd}</if>
+ <if test="questiontext != null and questiontext != ''">and d.questiontext like concat('%', #{questiontext}, '%')</if>
<if test="startOutHospTime != null">
AND date_format(s.endtime,'%y%m%d') >= date_format(#{startOutHospTime},'%y%m%d')
</if>
@@ -3140,6 +3187,8 @@
GROUP BY
t.taskid,
d.questiontext,
+ d.score,
+ d.targetvalue,
d.asrtext
ORDER BY
d.questiontext,
--
Gitblit v1.9.3