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

---
 ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml |   42 ++++++++++++++++++++----------------------
 1 files changed, 20 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..db370cf 100644
--- a/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
+++ b/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
@@ -367,26 +367,31 @@
         select user_id, role_id, orgid
         FROM healthy_user_role
         WHERE 1=1
-
-            <if test="hisUserId != null ">and user_id = #{hisUserId}</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>
-        
+        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="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 +428,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 +501,6 @@
         FROM
         healthy_inhosp b
         WHERE 1=1
-
-
             <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 +529,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 +556,6 @@
         mainsuit
         from healthy_outhosp
         WHERE 1=1
-
-
             <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 +568,9 @@
             <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>
 
 
@@ -585,7 +584,6 @@
         icdpym
         from healthy_disease
         WHERE 1=1
-
             <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 +594,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 +604,6 @@
         u.birthday,u.orgid,u.job_phone,u.phonenumber, u.sex, u.status
         from healthy_user u
         WHERE 1=1
-
             <if test="userId != null and userId != 0">
                 AND u.user_id = #{userId}
             </if>
@@ -638,7 +634,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