From 3d047130b059efd46f56be37465a751ab16ee8cb Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 11 十一月 2026 14:06:56 +0800
Subject: [PATCH] Merge branch 'smartor_ls_merge' into 20261111-妇幼档案随访
---
ruoyi-task/src/main/resources/mapper/task/ServiceSubtaskMapper.xml | 83 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 81 insertions(+), 2 deletions(-)
diff --git a/ruoyi-task/src/main/resources/mapper/task/ServiceSubtaskMapper.xml b/ruoyi-task/src/main/resources/mapper/task/ServiceSubtaskMapper.xml
index 789a25d..3d91a94 100644
--- a/ruoyi-task/src/main/resources/mapper/task/ServiceSubtaskMapper.xml
+++ b/ruoyi-task/src/main/resources/mapper/task/ServiceSubtaskMapper.xml
@@ -109,6 +109,8 @@
<result property="isManuallyCalled" column="is_manually_called"/>
<result property="campusid" column="campusid"/>
<result property="diagType" column="diag_type"/>
+ <!-- 2026-11锛氶噸瑕佹�ф爣璁扮紪鐮侊紙鏃ラ棿鎵嬫湳/鏃ラ棿璇婄枟/鏃犫�︼級锛屽缓浠诲姟鏃跺彇鑷� pat_med_inhosp -->
+ <result property="importanceFlagCode" column="importance_flag_code"/>
</resultMap>
<resultMap type="com.ruoyi.task.domain.ServiceSubtaskCount" id="ServiceSubtaskResult2">
@@ -244,6 +246,7 @@
hospitaldistrictname,
deptcode,
deptname,
+ importance_flag_code,
stop_state,
leavehospitaldistrictcode,
leavehospitaldistrictname,
@@ -384,16 +387,34 @@
<sql id="filterLeaveDimAnd">
/* f-v3 */
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
- AND leavehospitaldistrictcode IN
+ AND (
+ leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="lvWardCodeItem" open="(" separator="," close=")">
#{lvWardCodeItem}
</foreach>
+ <!-- 寤剁画鎶ょ悊浠诲姟锛坰ervice_type='99'锛夊彲浠ュ湪鎮h�呰繕娌″嚭闄㈡椂鐢熸垚锛�
+ 杩欑被璁板綍鍙湁銆屽湪闄㈢淮搴︺�嶏紙hospitaldistrictcode / deptcode锛夛紝鍑洪櫌缁村害鏄� NULL銆�
+ NULL 涓嶅尮閰嶄换浣� IN锛屼换鍔′細銆屾彁绀虹敓鎴愭垚鍔熴�佸垪琛ㄩ噷鍗存煡涓嶅埌銆嶏紝
+ 鎵�浠ュ嚭闄㈢淮搴︿负绌烘椂鐢ㄥ悓涓�濂楃紪鐮佷綋绯荤殑鍦ㄩ櫌缁村害鍏滃簳銆� -->
+ OR (service_type = '99' AND (leavehospitaldistrictcode IS NULL OR leavehospitaldistrictcode = '')
+ AND hospitaldistrictcode IN
+ <foreach collection="leavehospitaldistrictcodes" item="lvWardCodeItem" open="(" separator="," close=")">
+ #{lvWardCodeItem}
+ </foreach>)
+ )
</if>
<if test="leaveldeptcodes != null and leaveldeptcodes.size() > 0">
- AND leaveldeptcode IN
+ AND (
+ leaveldeptcode IN
<foreach collection="leaveldeptcodes" item="lvDeptCodeItem" open="(" separator="," close=")">
#{lvDeptCodeItem}
</foreach>
+ OR (service_type = '99' AND (leaveldeptcode IS NULL OR leaveldeptcode = '')
+ AND deptcode IN
+ <foreach collection="leaveldeptcodes" item="lvDeptCodeItem" open="(" separator="," close=")">
+ #{lvDeptCodeItem}
+ </foreach>)
+ )
</if>
</sql>
@@ -434,20 +455,38 @@
or (leaveldeptcodes != null and leaveldeptcodes.size() > 0)">
AND (
<if test="leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0">
+ (
leavehospitaldistrictcode IN
<foreach collection="leavehospitaldistrictcodes" item="lvWardCodeItem" open="(" separator="," close=")">
#{lvWardCodeItem}
</foreach>
+ <!-- 寤剁画鎶ょ悊浠诲姟锛坰ervice_type='99'锛夊彲浠ュ湪鎮h�呰繕娌″嚭闄㈡椂鐢熸垚锛�
+ 杩欑被璁板綍鍙湁銆屽湪闄㈢淮搴︺�嶏紙hospitaldistrictcode / deptcode锛夛紝鍑洪櫌缁村害鏄� NULL銆�
+ NULL 涓嶅尮閰嶄换浣� IN锛屼换鍔′細銆屾彁绀虹敓鎴愭垚鍔熴�佸垪琛ㄩ噷鍗存煡涓嶅埌銆嶏紝
+ 鎵�浠ュ嚭闄㈢淮搴︿负绌烘椂鐢ㄥ悓涓�濂楃紪鐮佷綋绯荤殑鍦ㄩ櫌缁村害鍏滃簳銆� -->
+ OR (service_type = '99' AND (leavehospitaldistrictcode IS NULL OR leavehospitaldistrictcode = '')
+ AND hospitaldistrictcode IN
+ <foreach collection="leavehospitaldistrictcodes" item="lvWardCodeItem" open="(" separator="," close=")">
+ #{lvWardCodeItem}
+ </foreach>)
+ )
</if>
<if test="(leavehospitaldistrictcodes != null and leavehospitaldistrictcodes.size() > 0)
and (leaveldeptcodes != null and leaveldeptcodes.size() > 0)">
OR
</if>
<if test="leaveldeptcodes != null and leaveldeptcodes.size() > 0">
+ (
leaveldeptcode IN
<foreach collection="leaveldeptcodes" item="lvDeptCodeItem" open="(" separator="," close=")">
#{lvDeptCodeItem}
</foreach>
+ OR (service_type = '99' AND (leaveldeptcode IS NULL OR leaveldeptcode = '')
+ AND deptcode IN
+ <foreach collection="leaveldeptcodes" item="lvDeptCodeItem" open="(" separator="," close=")">
+ #{lvDeptCodeItem}
+ </foreach>)
+ )
</if>
)
</if>
@@ -684,6 +723,26 @@
<if test="operatorNo != null and operatorNo != ''">and operator_no = #{operatorNo}</if>
<if test="wechat != null and wechat != ''">and wechat = #{wechat}</if>
<if test="hospType != null and hospType != ''">and hosp_type = #{hospType}</if>
+ <!--
+ 2026-11锛氶噸瑕佹�ф爣璁扮瓫閫夛紙瀵瑰簲 service_subtask.importance_flag_code锛屽缓浠诲姟鏃跺彇鑷�
+ pat_med_inhosp.importance_flag_code锛夈�備袱绉嶅啓娉曪細
+ 鈶� 绮剧‘鍗曞�� importanceFlagCode = 'FH0165.01'锛堟垨鎻忚堪鍙e緞 '鏃ラ棿鎵嬫湳'锛�
+ 鈶� 绮剧‘澶氬�� importanceFlagCodes = ['FH0165.01','FH0165.02']
+ 璇ュ垪閲囬泦鏃跺氨琚嫾鎴�**鎻忚堪涓�**锛圛mportFlagEnum 鐨� desc锛夛紝澶氬�肩敤鑻辨枃閫楀彿鎷兼帴锛�
+ 濡� '鏃�,鏃ラ棿鎵嬫湳'锛堣 ServiceSLTDHealthcareRecordServiceImpl#hospitalizedApply锛夆�斺��
+ 绛夊��/IN 鍙懡涓崟鍊艰锛涘鍊艰锛堢幇鍦轰粎 7 鏉★紝閮藉湪鍑洪櫌璁板綍涓婏級瑕佺瓫鍏ㄩ渶鑷鍐�
+ find_in_set銆備袱绉嶅彛寰勫苟瀛橈紙鏈夊簱瀛樻灇涓剧紪鐮併�佹湁搴撳瓨涓枃鎻忚堪锛夛紝浼犱粈涔堟寜浠�涔堢簿纭瘮锛�
+ 涓嶅仛鍊煎煙褰掍竴銆�
+ -->
+ <if test="importanceFlagCode != null and importanceFlagCode != ''">
+ and importance_flag_code = #{importanceFlagCode}
+ </if>
+ <if test="importanceFlagCodes != null and importanceFlagCodes.size() > 0">
+ AND importance_flag_code IN
+ <foreach collection="importanceFlagCodes" item="impFlagItem" open="(" separator="," close=")">
+ #{impFlagItem}
+ </foreach>
+ </if>
<if test="libtemplateid != null ">and libtemplateid = #{libtemplateid}</if>
<if test="libtemplatename != null ">and libtemplatename = #{libtemplatename}</if>
<if test="openid != null ">and openid = #{openid}</if>
@@ -1100,6 +1159,23 @@
where id = #{id}
</select>
+ <select id="selectCompletedInhospFollowups" resultMap="ServiceSubtaskResult">
+ <include refid="selectServiceSubtaskVo"/>
+ where del_flag = '0'
+ and sendstate = 6
+ and hosp_type in ('2', '6')
+ and orgid = #{orgid}
+ and finishtime >= #{startTime}
+ <if test="serviceTypes != null and serviceTypes.size() > 0">
+ and service_type in
+ <foreach collection="serviceTypes" item="serviceType" open="(" separator="," close=")">
+ #{serviceType}
+ </foreach>
+ </if>
+ order by id asc
+ limit #{limit}
+ </select>
+
<select id="selectServiceSubtaskByDiagname" parameterType="com.ruoyi.task.domain.ServiceSubtask"
resultMap="ServiceSubtaskResult">
select sendstate,starttime,endtime,nurse_name,phone,sex,task_name,sendname,leavediagname,visit_time FROM
@@ -1155,6 +1231,8 @@
<if test="hospitaldistrictname != null and hospitaldistrictname != ''">hospitaldistrictname,</if>
<if test="deptcode != null and deptcode != ''">deptcode,</if>
<if test="deptname != null and deptname != ''">deptname,</if>
+ <!-- 2026-11锛氶噸瑕佹�ф爣璁扮紪鐮侊紙鏃ラ棿鎵嬫湳/鏃ラ棿璇婄枟鈥︼級锛屽缓浠诲姟鏃朵粠 pat_med_inhosp 鍚屾 -->
+ <if test="importanceFlagCode != null and importanceFlagCode != ''">importance_flag_code,</if>
<if test="labelstatus != null">labelstatus,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
@@ -1264,6 +1342,7 @@
<if test="hospitaldistrictname != null and hospitaldistrictname != ''">#{hospitaldistrictname},</if>
<if test="deptcode != null and deptcode != ''">#{deptcode},</if>
<if test="deptname != null and deptname != ''">#{deptname},</if>
+ <if test="importanceFlagCode != null and importanceFlagCode != ''">#{importanceFlagCode},</if>
<if test="labelstatus != null">#{labelstatus},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
--
Gitblit v1.9.3