From eb845e8be695ed1280a7cbf854a4d1dedf9db30d Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 30 十月 2026 15:02:55 +0800
Subject: [PATCH] 【丽水】/smartor/serviceSubtask/getSfStatisticsHyperlink 和 /smartor/serviceSubtask/getSfStatistics 统计的时候,对于 service_subtask.current_preachForm 为空的数据 当成 service_subtask.preachform 字符串的第一个执行方式、首次待随访全部(visitCount = 1 && sendstate in (1、2、3、7)) 区别于原先的待随访,这个是给市一使用的 再次待随访全部(visitCount > 1 && sendstate in (1、2、3、7)) 区别于原先的待随访,这个是给市一使用的 首次待随访待发送(visitCount = 1 && sendstate in (1、2)) 再次待随访待发送(visitCount > 1 && sendstate in (1、2)) 首次待随访已发送(visitCount = 1 && sendstate = in (3、7)) 再次待随访已发送(visitCount > 1 && sendstate = in (3、7)) 首次已发送(visitCount = 1 && sendstate = 3) 再次已发送(visitCount > 1 && sendstate = 3)
---
smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 51 insertions(+), 5 deletions(-)
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
index 903ceaa..de5d42f 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -185,6 +185,7 @@
<include refid="selectPatArchiveVo"/>
where 1=1
and del_flag = 0
+ <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if>
<if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if>
@@ -213,6 +214,12 @@
<if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if>
<if test="filterDrname != null ">and filter_drname = #{filterDrname}</if>
<if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if>
+ <if test="createTimeStart != null">
+ AND date_format(create_time,'%y%m%d') >= date_format(#{createTimeStart},'%y%m%d')
+ </if>
+ <if test="createTimeEnd != null">
+ AND date_format(create_time,'%y%m%d') <= date_format(#{createTimeEnd},'%y%m%d ')
+ </if>
<if test="pageSize != null and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
</select>
@@ -261,6 +268,12 @@
<if test="idcardno != null and idcardno != ''">and idcardno = #{idcardno}</if>
<if test="telcode != null and telcode != ''">and telcode = #{telcode}</if>
<if test="campusid != null and campusid != ''">and campusid = #{campusid}</if>
+ <if test="createTimeStart != null">
+ AND date_format(a.create_time,'%y%m%d') >= date_format(#{createTimeStart},'%y%m%d')
+ </if>
+ <if test="createTimeEnd != null">
+ AND date_format(a.create_time,'%y%m%d') <= date_format(#{createTimeEnd},'%y%m%d ')
+ </if>
<if test="tagIds != null and tagIds != ''">and c.tagid in
<foreach collection="tagIds" item="tagId" open="(" separator="," close=")">
#{tagId}
@@ -271,6 +284,14 @@
<select id="selectPatArchiveByPatid" parameterType="Long" resultMap="PatArchiveResult">
<include refid="selectPatArchiveVo"/>
where id = #{id} and del_flag=0
+ </select>
+
+ <!-- 涓茶鍖栧悓涓�鎮h�呯殑浜哄伐闅忚鍒涘缓锛岄伩鍏嶅苟鍙戦噸澶嶆牎楠屽け鏁� -->
+ <select id="lockPatArchiveByPatid" resultType="java.lang.Long">
+ select id
+ from pat_archive
+ where id = #{patid} and del_flag = 0
+ for update
</select>
<select id="selectPatArchiveByPatnos" resultMap="PatArchiveResult">
@@ -542,6 +563,12 @@
#{tagId}
</foreach>
</if>
+ <if test="createTimeStart != null">
+ AND date_format(a.create_time,'%y%m%d') >= date_format(#{createTimeStart},'%y%m%d')
+ </if>
+ <if test="createTimeEnd != null">
+ AND date_format(a.create_time,'%y%m%d') <= date_format(#{createTimeEnd},'%y%m%d ')
+ </if>
order by a.update_time desc
<if test="pn != null and ps != null">limit ${pn},${ps}</if>
@@ -773,6 +800,12 @@
#{pid}
</foreach>
</if>
+ <if test="createTimeStart != null">
+ AND date_format(a.create_time,'%y%m%d') >= date_format(#{createTimeStart},'%y%m%d')
+ </if>
+ <if test="createTimeEnd != null">
+ AND date_format(a.create_time,'%y%m%d') <= date_format(#{createTimeEnd},'%y%m%d ')
+ </if>
<if test="isFilter == true">
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
@@ -864,6 +897,12 @@
#{pid}
</foreach>
</if>
+ <if test="createTimeStart != null">
+ AND date_format(a.create_time,'%y%m%d') >= date_format(#{createTimeStart},'%y%m%d')
+ </if>
+ <if test="createTimeEnd != null">
+ AND date_format(a.create_time,'%y%m%d') <= date_format(#{createTimeEnd},'%y%m%d ')
+ </if>
<if test="isFilter == true">
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
@@ -940,6 +979,12 @@
<if test="pid != null and pid != ''">and a.id = #{id}</if>
<if test="telcode != null and telcode != ''">and a.telcode = #{telcode}</if>
<if test="notrequiredFlag != null and notrequiredFlag != ''">and a.notrequired_flag = #{notrequiredFlag}
+ </if>
+ <if test="createTimeStart != null">
+ AND date_format(a.create_time,'%y%m%d') >= date_format(#{createTimeStart},'%y%m%d')
+ </if>
+ <if test="createTimeEnd != null">
+ AND date_format(a.create_time,'%y%m%d') <= date_format(#{createTimeEnd},'%y%m%d ')
</if>
<if test="hospitalname != null and hospitalname != ''">
AND d.hospitalname = #{hospitalname}
@@ -1190,6 +1235,12 @@
#{pid}
</foreach>
</if>
+ <if test="createTimeStart != null">
+ AND date_format(a.create_time,'%y%m%d') >= date_format(#{createTimeStart},'%y%m%d')
+ </if>
+ <if test="createTimeEnd != null">
+ AND date_format(a.create_time,'%y%m%d') <= date_format(#{createTimeEnd},'%y%m%d ')
+ </if>
<if test="isFilter == true">
AND NOT exists ( SELECT 1 FROM pat_filterlist f where d.patid=f.patid)
</if>
@@ -1204,11 +1255,6 @@
WHERE 1=1
AND d.del_flag != 1
AND d.orgid = #{orgid}
- <if test="name != null and name != ''">AND a.name like concat('%', #{name}, '%')</if>
- <if test="idcardno != null and idcardno != ''">AND a.idcardno = #{idcardno}</if>
- <if test="pid != null and pid != ''">AND a.id = #{id}</if>
- <if test="telcode != null and telcode != ''">AND a.telcode = #{telcode}</if>
- <if test="notrequiredFlag != null and notrequiredFlag != ''">AND a.notrequired_flag = #{notrequiredFlag}</if>
<if test="hospitalname != null and hospitalname != ''">AND d.hospitalname = #{hospitalname}</if>
<if test="hospitaldistrictname != null and hospitaldistrictname != ''">AND d.hospitaldistrictname LIKE concat('%',#{hospitaldistrictname}, '%')</if>
<if test="leaveicd10code != null and leaveicd10code != ''">AND d.leaveicd10code LIKE concat('%',#{leaveicd10code}, '%')</if>
--
Gitblit v1.9.3