From e180e3a496d6f29d3a3b34016400de9d997c6bd9 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期二, 07 四月 2026 14:42:23 +0800
Subject: [PATCH] 省立同德满意度功能提交

---
 smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml |  135 +++++++++++++++++++++++++++++---------------
 1 files changed, 88 insertions(+), 47 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
index dd283ea..1a09422 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskDetailMapper.xml
@@ -18,6 +18,7 @@
         <result property="assigntime" column="assigntime"/>
         <result property="starttime" column="starttime"/>
         <result property="answertime" column="answertime"/>
+
         <result property="silent" column="silent"/>
         <result property="dtmfKey" column="dtmf_key"/>
         <result property="musicpath" column="musicpath"/>
@@ -55,6 +56,9 @@
         <result property="patid" column="patid"/>
         <result property="guid" column="guid"/>
         <result property="extemplateText" column="extemplate_text"/>
+        <result property="templateType" column="template_type"/>
+        <result property="libTemplateid" column="lib_templateid"/>
+        <result property="score" column="score"/>
     </resultMap>
     <resultMap type="com.smartor.domain.ServiceSubtaskDetailTarget" id="ServiceSubtaskDetailTargetResult">
         <result property="targetid" column="targetid"/>
@@ -66,6 +70,7 @@
     <sql id="selectServiceSubtaskDetailVo">
         select id,
                sub_id,
+               lib_templateid,
                targetid,
                answerps,
                scriptid,
@@ -113,6 +118,8 @@
                update_by,
                update_time,
                value_type,
+               template_type,
+               score,
                create_by
         from service_subtask_detail
     </sql>
@@ -120,58 +127,80 @@
     <select id="selectServiceSubtaskDetailList" parameterType="com.smartor.domain.ServiceSubtaskDetail"
             resultMap="ServiceSubtaskDetailResult">
         <include refid="selectServiceSubtaskDetailVo"/>
-        <where>
-            <if test="subId != null">and sub_id = #{subId}</if>
-            <if test="targetid != null">and targetid = #{targetid}</if>
-            <if test="extemplateText != null">and extemplate_text = #{extemplateText}</if>
-            <if test="taskid != null">and taskid = #{taskid}</if>
-            <if test="uuid != null  and uuid != ''">and uuid = #{uuid}</if>
-            <if test="phone != null  and phone != ''">and phone = #{phone}</if>
-            <if test="operate != null  and operate != ''">and operate = #{operate}</if>
-            <if test="displayno != null  and displayno != ''">and displayno = #{displayno}</if>
-            <if test="inbound != null ">and inbound = #{inbound}</if>
-            <if test="incoming != null ">and incoming = #{incoming}</if>
-            <if test="assigntime != null ">and assigntime = #{assigntime}</if>
-            <if test="starttime != null ">and starttime = #{starttime}</if>
-            <if test="answertime != null ">and answertime = #{answertime}</if>
-            <if test="silent != null ">and silent = #{silent}</if>
-            <if test="dtmfKey != null  and dtmfKey != ''">and dtmf_key = #{dtmfKey}</if>
-            <if test="musicpath != null  and musicpath != ''">and musicpath = #{musicpath}</if>
-            <if test="sentIndex != null ">and sent_index = #{sentIndex}</if>
-            <if test="sentBegin != null ">and sent_begin = #{sentBegin}</if>
-            <if test="asrtext != null  and asrtext != ''">and asrtext = #{asrtext}</if>
-            <if test="beginTime != null ">and begin_time = #{beginTime}</if>
-            <if test="endTime != null ">and end_time = #{endTime}</if>
-            <if test="sentEnd != null ">and sent_end = #{sentEnd}</if>
-            <if test="recordpath != null  and recordpath != ''">and recordpath = #{recordpath}</if>
-            <if test="recordurl != null  and recordurl != ''">and recordurl = #{recordurl}</if>
-            <if test="templateid != null  and templateid != ''">and templateid = #{templateid}</if>
-            <if test="templatequestionnum != null ">and templatequestionnum = #{templatequestionnum}</if>
-            <if test="switchid != null ">and switchid = #{switchid}</if>
-            <if test="categoryid != null ">and categoryid = #{categoryid}</if>
-            <if test="questiontext != null  and questiontext != ''">and questiontext = #{questiontext}</if>
-            <if test="questionvoice != null  and questionvoice != ''">and questionvoice = #{questionvoice}</if>
-            <if test="categoryname != null  and categoryname != ''">and categoryname like concat('%', #{categoryname},
-                '%')
-            </if>
-            <if test="targetoptions != null  and targetoptions != ''">and targetoptions = #{targetoptions}</if>
-            <if test="targetvalue != null  and targetvalue != ''">and targetvalue = #{targetvalue}</if>
-            <if test="matchedtext != null  and matchedtext != ''">and matchedtext = #{matchedtext}</if>
-            <if test="addtime != null ">and addtime = #{addtime}</if>
-            <if test="isupload != null ">and isupload = #{isupload}</if>
-            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
-            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
-            <if test="valueType != null  and valueType != ''">and value_type = #{valueType}</if>
-            <if test="answerps != null  and answerps != ''">and answerps = #{answerps}</if>
-            <if test="comment != null  and comment != ''">and comment = #{comment}</if>
-            <if test="scriptid != null ">and scriptid = #{scriptid}</if>
-            <if test=" patid != null">and patid = #{patid}</if>
-        </where>
+        where 1=1
+        <if test="subId != null">and sub_id = #{subId}</if>
+        <if test="templateType != null">and template_type = #{templateType}</if>
+        <if test="libTemplateid != null">and lib_templateid = #{libTemplateid}</if>
+        <if test="targetid != null">and targetid = #{targetid}</if>
+        <if test="extemplateText != null">and extemplate_text = #{extemplateText}</if>
+        <if test="taskid != null">and taskid = #{taskid}</if>
+        <if test="uuid != null  and uuid != ''">and uuid = #{uuid}</if>
+        <if test="phone != null  and phone != ''">and phone = #{phone}</if>
+        <if test="operate != null  and operate != ''">and operate = #{operate}</if>
+        <if test="displayno != null  and displayno != ''">and displayno = #{displayno}</if>
+        <if test="inbound != null ">and inbound = #{inbound}</if>
+        <if test="incoming != null ">and incoming = #{incoming}</if>
+        <if test="assigntime != null ">and assigntime = #{assigntime}</if>
+        <if test="starttime != null ">and starttime = #{starttime}</if>
+        <if test="answertime != null ">and answertime = #{answertime}</if>
+        <if test="silent != null ">and silent = #{silent}</if>
+        <if test="dtmfKey != null  and dtmfKey != ''">and dtmf_key = #{dtmfKey}</if>
+        <if test="musicpath != null  and musicpath != ''">and musicpath = #{musicpath}</if>
+        <if test="sentIndex != null ">and sent_index = #{sentIndex}</if>
+        <if test="sentBegin != null ">and sent_begin = #{sentBegin}</if>
+        <if test="asrtext != null  and asrtext != ''">and asrtext = #{asrtext}</if>
+        <if test="beginTime != null ">and begin_time = #{beginTime}</if>
+        <if test="endTime != null ">and end_time = #{endTime}</if>
+        <if test="sentEnd != null ">and sent_end = #{sentEnd}</if>
+        <if test="recordpath != null  and recordpath != ''">and recordpath = #{recordpath}</if>
+        <if test="recordurl != null  and recordurl != ''">and recordurl = #{recordurl}</if>
+        <if test="templateid != null  and templateid != ''">and templateid = #{templateid}</if>
+        <if test="templatequestionnum != null ">and templatequestionnum = #{templatequestionnum}</if>
+        <if test="switchid != null ">and switchid = #{switchid}</if>
+        <if test="categoryid != null ">and categoryid = #{categoryid}</if>
+        <if test="questiontext != null  and questiontext != ''">and questiontext = #{questiontext}</if>
+        <if test="questionvoice != null  and questionvoice != ''">and questionvoice = #{questionvoice}</if>
+        <if test="categoryname != null  and categoryname != ''">and categoryname like concat('%', #{categoryname},
+            '%')
+        </if>
+        <if test="targetoptions != null  and targetoptions != ''">and targetoptions = #{targetoptions}</if>
+        <if test="targetvalue != null  and targetvalue != ''">and targetvalue = #{targetvalue}</if>
+        <if test="matchedtext != null  and matchedtext != ''">and matchedtext = #{matchedtext}</if>
+        <if test="addtime != null ">and addtime = #{addtime}</if>
+        <if test="isupload != null ">and isupload = #{isupload}</if>
+        <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
+        <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
+        <if test="valueType != null  and valueType != ''">and value_type = #{valueType}</if>
+        <if test="answerps != null  and answerps != ''">and answerps = #{answerps}</if>
+        <if test="comment != null  and comment != ''">and comment = #{comment}</if>
+        <if test="scriptid != null ">and scriptid = #{scriptid}</if>
+        <if test="patid != null">and patid = #{patid}</if>
+        <if test="score != null">and score = #{score}</if>
+
     </select>
 
     <select id="selectServiceSubtaskDetailByCalldetailid" parameterType="String" resultMap="ServiceSubtaskDetailResult">
         <include refid="selectServiceSubtaskDetailVo"/>
         where id = #{id}
+    </select>
+
+    <select id="queryFillCount" resultType="com.smartor.domain.DTO.ServiceSubtaskDetailDTO">
+        select id,questiontext,matchedtext,targetvalue,score
+        from service_subtask_detail
+        where del_flag = 0
+        and sub_id in
+        <foreach item="subid" collection="subids" open="(" separator="," close=")">
+            #{subid}
+        </foreach>
+        <if test="questiontext != null">and questiontext = #{questiontext}</if>
+    </select>
+
+    <select id="isExistServiceSubtaskDetail" resultType="com.smartor.domain.DTO.ServiceSubtaskDetailDTO">
+        select id, questiontext, matchedtext, score
+        from service_subtask_detail
+        where del_flag = 0
+        <if test="subid != null ">and sub_id = #{subid}</if>
+        <if test="scriptid != null">and scriptid = #{scriptid}</if>
     </select>
 
     <insert id="insertServiceSubtaskDetail" parameterType="com.smartor.domain.ServiceSubtaskDetail"
@@ -229,6 +258,9 @@
             <if test=" extemplateText != null">extemplate_text,</if>
             <if test=" guid != null">guid,</if>
             <if test=" categoryid != null">categoryid,</if>
+            <if test="templateType != null">template_type,</if>
+            <if test="libTemplateid != null">lib_templateid,</if>
+            <if test="score != null">score,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -281,6 +313,9 @@
             <if test="extemplateText != null">#{extemplateText},</if>
             <if test="guid != null">#{guid},</if>
             <if test="categoryid != null">#{categoryid},</if>
+            <if test="templateType != null">#{templateType},</if>
+            <if test="libTemplateid != null">#{libTemplateid},</if>
+            <if test="score != null">#{score},</if>
         </trim>
     </insert>
 
@@ -334,8 +369,11 @@
             <if test="scriptid != null ">scriptid = #{scriptid},</if>
             <if test=" patid != null">patid = #{patid},</if>
             <if test=" extemplateText != null">extemplate_text = #{extemplateText},</if>
+            <if test="libTemplateid != null">lib_templateid = #{libTemplateid},</if>
             <if test=" guid != null">guid = #{guid},</if>
             <if test=" categoryid != null">categoryid = #{categoryid},</if>
+            <if test="templateType != null">template_type = #{templateType},</if>
+            <if test="score != null">score = #{score},</if>
         </trim>
         where id = #{id}
     </update>
@@ -393,6 +431,9 @@
             <if test=" extemplateText != null">extemplate_text = #{extemplateText},</if>
             <if test=" guid != null">guid = #{guid},</if>
             <if test=" categoryid != null">categoryid = #{categoryid},</if>
+            <if test="templateType != null">template_type = #{templateType},</if>
+            <if test="libTemplateid != null">lib_templateid = #{libTemplateid},</if>
+            <if test="score != null">score = #{score},</if>
         </trim>
         where patid = #{patid} and scriptid = #{scriptid} and sub_id = #{subId}
     </update>

--
Gitblit v1.9.3