From 6659135780e718758417efde4c8c351c69e3755b Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 11 十二月 2025 15:52:19 +0800
Subject: [PATCH] 代码提交
---
smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml | 42 ++++++++++++++++++++++++++++++++----------
1 files changed, 32 insertions(+), 10 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index f7a491e..9efefee 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -197,12 +197,16 @@
<include refid="selectServiceSubtaskVo"/>
<where>
del_flag=0
- and taskid = #{taskid}
- AND sendstate IN
- <foreach collection="sendstates" item="sendstate" open="(" separator=","
- close=")">
- #{sendstate}
- </foreach>
+ <if test="taskid != null ">and taskid = #{taskid}</if>
+ <if test="serviceType != null ">and service_type = #{serviceType}</if>
+ <if test="patid != null ">and patid = #{patid}</if>
+ <if test="sendstates!=null">
+ AND sendstate IN
+ <foreach collection="sendstates" item="sendstate" open="(" separator=","
+ close=")">
+ #{sendstate}
+ </foreach>
+ </if>
</where>
</select>
@@ -475,9 +479,14 @@
<select id="selectSendstateByCondition" parameterType="com.smartor.domain.ServiceSubtask" resultType="Integer">
SELECT b.sendstate
from service_task a
- JOIN service_subtask b on a.taskid = b.taskid and a.pat_cycle = 0 and b.del_flag = 0
- where b.taskid = #{taskid}
- and b.patid = #{patid}
+ JOIN service_subtask b on a.taskid = b.taskid and a.pat_cycle = 0 and b.del_flag = 0
+ <where>b.taskid = #{taskid}
+ and b.patid = #{patid}
+ <if test="createTime != null and createTime != ''">
+ DATE_FORMAT(b.create_time, '%Y-%m-%d') LIKE CONCAT(#{createTimeNew}, '%')
+ </if>
+ <if test="sendstate != null ">and b.sendstate = #{sendstate}</if>
+ </where>
</select>
<select id="selectTimelyRate" parameterType="com.smartor.domain.ServiceSubtask" resultType="double">
@@ -545,6 +554,20 @@
<select id="selectServiceSubtaskById" parameterType="Long" resultMap="ServiceSubtaskResult">
<include refid="selectServiceSubtaskVo"/>
where id = #{id}
+ </select>
+
+ <select id="selectServiceSubtaskByDiagname" parameterType="com.smartor.domain.ServiceSubtask"
+ resultMap="ServiceSubtaskResult">
+ select sendstate,starttime,endtime,nurse_name,phone,sex,task_name,sendname,leavediagname,visit_time FROM
+ service_subtask WHERE del_flag=0
+ <if test="leavediagname != null">and leavediagname like concat('%',#{leavediagname}, '%')</if>
+ <if test="sendname != null">and sendname like concat('%',#{sendname}, '%')</if>
+ <if test="taskName != null">and task_name like concat('%',#{taskName}, '%')</if>
+ <if test="sendstate != null">and sendstate = #{sendstate}</if>
+ <if test="orgid != null">and orgid =#{orgid}</if>
+ GROUP BY sendname,sendstate,starttime,endtime,nurse_name,phone,sex,task_name,leavediagname,visit_time ORDER BY
+ visit_time
+ <if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
</select>
<insert id="insertServiceSubtask" parameterType="com.smartor.domain.ServiceSubtask" useGeneratedKeys="true"
@@ -1394,7 +1417,6 @@
SUM(pmiCount) AS pmiCount,
SUM(pmoCount) AS pmoCount
FROM (
- -- 闅忚鏁版嵁
SELECT
<choose>
<when test="timeType == 'day'">
--
Gitblit v1.9.3