From 987e38327f849e1b13d8541246dde08d877db0e8 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 07 一月 2026 14:10:43 +0800
Subject: [PATCH] 【市一】调整mapper获取ordid

---
 ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
index db370cf..10f3c7c 100644
--- a/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
+++ b/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
@@ -367,6 +367,7 @@
         select user_id, role_id, orgid
         FROM healthy_user_role
         WHERE 1=1
+            <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
         <if test="hisUserId != null ">
             AND user_id = #{hisUserId}
         </if>
@@ -379,6 +380,7 @@
         select user_id , user_code , dept_type ,dept_code,dept_name,deptparent,del_flag,orgid
         FROM healthy_user_dept
         WHERE 1=1
+            <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
         AND user_id != 'admin'
         <if test="hisUserId != null ">
             AND user_id = #{hisUserId}
@@ -392,6 +394,7 @@
     <select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult">
         <include refid="selectPatArchiveVo"/>
             WHERE 1=1
+            <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>
@@ -501,6 +504,7 @@
         FROM
         healthy_inhosp b
         WHERE 1=1
+            <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
             <if test="startOutHospTime != null ">
                 and to_char(b.endtime, 'YYYY-MM-DD HH24:MI:SS') &gt;=to_char(#{startOutHospTime},'YYYY-MM-DD HH24:MI:SS')
             </if>
@@ -556,6 +560,9 @@
         mainsuit
         from healthy_outhosp
         WHERE 1=1
+            <if test="orgid != null and orgid != ''">
+                and orgid = #{orgid}
+            </if>
             <if test="beginTime != null ">
                 and to_char(admitdate, 'YYYY-MM-DD HH24:MI:SS') &gt;= to_char(#{beginTime}, 'YYYY-MM-DD HH24:MI:SS')
             </if>
@@ -567,9 +574,6 @@
             </if>
             <if test="lastEndTime != null and lastEndTime != ''">
                 and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') &lt;= #{lastEndTime}
-            </if>
-            <if test="orgid != null and orgid != ''">
-                AND orgid = #{orgid}
             </if>
     </select>
 
@@ -584,6 +588,7 @@
         icdpym
         from healthy_disease
         WHERE 1=1
+            <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
             <if test="icdcode != null  and icdcode != ''">and icdcode = #{icdcode}</if>
             <if test="lastflag != null  and lastflag != ''">and lastflag = #{lastflag}</if>
             <if test="chimedflag != null  and chimedflag != ''">and chimedflag = #{chimedflag}</if>
@@ -604,6 +609,7 @@
         u.birthday,u.orgid,u.job_phone,u.phonenumber, u.sex, u.status
         from healthy_user u
         WHERE 1=1
+            <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
             <if test="userId != null and userId != 0">
                 AND u.user_id = #{userId}
             </if>

--
Gitblit v1.9.3