From 19dde21187ef9edfdb38f60fbe764bddf3d2466d Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期六, 13 九月 2025 14:39:29 +0800
Subject: [PATCH] 登录用户没取科室病区

---
 ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml |   22 +++++++++++++++++++---
 1 files changed, 19 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 ab2ed3a..358f030 100644
--- a/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
+++ b/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
@@ -372,8 +372,7 @@
     </select>
 
     <select id="yhyksxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserDeptResult">
-        select user_id, user_code, dept_type,dept_code as
-        dept_id,dept_name,deptparent,del_flag,orgid
+        select user_id, user_code, dept_type,dept_code as dept_id,dept_code,dept_name,deptparent,del_flag,orgid
         FROM healthy_user_dept
         <where>
             user_id != 'admin'
@@ -414,6 +413,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="lastStartTime != null and lastStartTime != ''">
+                and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime}
+            </if>
+            <if test="lastEndTime != null and lastEndTime != ''">
+                and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') &lt;= #{lastEndTime}
+            </if>
         </where>
     </select>
 
@@ -511,6 +516,12 @@
             <if test="outWayId != null ">and b.out_way_id = #{outWayId}</if>
             <if test="outWayName != null ">and b.out_way_name = #{outWayName}</if>
             <if test="orgid != null ">and b.orgid = #{orgid}</if>
+            <if test="lastStartTime != null and lastStartTime != ''">
+                and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime}
+            </if>
+            <if test="lastEndTime != null and lastEndTime != ''">
+                and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') &lt;= #{lastEndTime}
+            </if>
         </where>
     </select>
 
@@ -546,7 +557,12 @@
             <if test="endTime != null ">
                 and to_char(admitdate, 'YYYY-MM-DD HH24:MI:SS') &lt;= to_char(#{endTime}, 'YYYY-MM-DD HH24:MI:SS')
             </if>
-
+            <if test="lastStartTime != null and lastStartTime != ''">
+                and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime}
+            </if>
+            <if test="lastEndTime != null and lastEndTime != ''">
+                and to_char(last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') &lt;= #{lastEndTime}
+            </if>
         </where>
     </select>
 

--
Gitblit v1.9.3