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 |   48 ++++++++++++++++++++++++++----------------------
 1 files changed, 26 insertions(+), 22 deletions(-)

diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
index 0dd6b83..10f3c7c 100644
--- a/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
+++ b/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
@@ -367,26 +367,34 @@
         select user_id, role_id, orgid
         FROM healthy_user_role
         WHERE 1=1
-
-            <if test="hisUserId != null ">and user_id = #{hisUserId}</if>
-        
+            <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
+        <if test="hisUserId != null ">
+            AND user_id = #{hisUserId}
+        </if>
+        <if test="orgid != null and orgid != ''">
+            AND orgid = #{orgid}
+        </if>
     </select>
 
     <select id="yhyksxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserDeptResult">
         select user_id , user_code , dept_type ,dept_code,dept_name,deptparent,del_flag,orgid
         FROM healthy_user_dept
         WHERE 1=1
-
-            AND user_id != 'admin'
-            <if test="hisUserId != null ">and user_id = #{hisUserId}</if>
-        
+            <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if>
+        AND user_id != 'admin'
+        <if test="hisUserId != null ">
+            AND user_id = #{hisUserId}
+        </if>
+        <if test="orgid != null and orgid != ''">
+            AND orgid = #{orgid}
+        </if>
     </select>
 
 
     <select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult">
         <include refid="selectPatArchiveVo"/>
-        WHERE 1=1
-
+            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>
@@ -423,9 +431,6 @@
                 and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') &lt;= #{lastEndTime}
             </if>
             <if test="pageSize != null and pageSize!='' ">and rownum&lt;#{pageSize}</if>
-
-
-        
     </select>
 
 
@@ -499,8 +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>
@@ -529,7 +533,6 @@
             <if test="lastEndTime != null and lastEndTime != ''">
                 and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') &lt;= #{lastEndTime}
             </if>
-        
     </select>
 
 
@@ -557,8 +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>
@@ -571,7 +575,6 @@
             <if test="lastEndTime != null and lastEndTime != ''">
                 and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') &lt;= #{lastEndTime}
             </if>
-        
     </select>
 
 
@@ -585,7 +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>
@@ -596,7 +599,6 @@
             <if test="pid != null ">and pid = #{pid}</if>
             <if test="guid != null  and guid != ''">and guid = #{guid}</if>
             <if test="hisIcdid != null  and hisIcdid != ''">and his_icdid = #{hisIcdid}</if>
-        
     </select>
 
 
@@ -607,7 +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>
@@ -638,7 +640,9 @@
             <if test="phonenumber != null and phonenumber != ''">
                 AND u.phonenumber like concat('%', #{phonenumber}, '%')
             </if>
-        
+            <if test="orgid != null and orgid != ''">
+                AND u.orgid = #{orgid}
+            </if>
     </select>
 
     <select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult">

--
Gitblit v1.9.3