From f0a09ee996ab2605869844d6a3d812709e2bf0fa Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期五, 16 十月 2026 16:07:25 +0800
Subject: [PATCH] 任务模块、电话模块

---
 ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml |   75 ++++++++++++++++++++++++-------------
 1 files changed, 48 insertions(+), 27 deletions(-)

diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
index 3e02cfd..2f1c169 100644
--- a/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
+++ b/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
@@ -32,7 +32,7 @@
     </resultMap>
 
 
-    <resultMap type="com.smartor.domain.PatArchive" id="PatArchiveResult">
+    <resultMap type="com.ruoyi.common.core.domain.entity.PatArchive" id="PatArchiveResult">
         <result property="id" column="id"/>
         <result property="patientno" column="patientno"/>
         <result property="sourcefrom" column="sourcefrom"/>
@@ -153,7 +153,7 @@
         <result property="filterDrcode" column="filter_drcode"/>
     </resultMap>
 
-    <resultMap type="com.smartor.domain.PatMedInhosp" id="PatMedInhospResult">
+    <resultMap type="com.ruoyi.inhospvisit.domain.PatMedInhosp" id="PatMedInhospResult">
         <result property="inhospid" column="inhospid"/>
         <result property="inhospno" column="inhospno"/>
         <result property="serialnum" column="serialnum"/>
@@ -223,10 +223,10 @@
         <result property="fuspecialadvice" column="fuspecialadvice"/>
     </resultMap>
 
-    <resultMap type="com.smartor.domain.PatMedOuthosp" id="PatMedOuthospResult">
+    <resultMap type="com.ruoyi.outpatientvisit.domain.PatMedOuthosp" id="PatMedOuthospResult">
         <result property="id" column="id"/>
         <result property="serialnum" column="serialnum"/>
-        <result property="patid" column="patid"/>
+        <result property="patidHis" column="patid"/>
         <result property="hospitalname" column="hospitalname"/>
         <result property="hospitalcode" column="hospitalcode"/>
         <result property="icd10code" column="icd10code"/>
@@ -336,9 +336,9 @@
         <result property="guid" column="guid"/>
     </resultMap>
 
-    <resultMap type="com.smartor.domain.PatMedOperation" id="PatMedOperationResult">
+    <resultMap type="com.ruoyi.othervisit.domain.PatMedOperation" id="PatMedOperationResult">
         <result property="id" column="id"/>
-        <result property="patid" column="patid"/>
+        <result property="patidHis" column="patid_his"/>
         <result property="patcode" column="patcode"/>
         <result property="paname" column="paname"/>
         <result property="opreqid" column="opreqid"/>
@@ -395,6 +395,10 @@
         <result property="deptname" column="deptname"/>
         <result property="hospitaldistrictcode" column="hospitaldistrictcode"/>
         <result property="hospitaldistrictname" column="hospitaldistrictname"/>
+        <result property="leaveldeptcode" column="leaveldeptcode"/>
+        <result property="leaveldeptname" column="leaveldeptname"/>
+        <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/>
+        <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/>
         <result property="roomno" column="roomno"/>
         <result property="bedNo" column="bed_no"/>
         <result property="drcode" column="drcode"/>
@@ -410,7 +414,7 @@
         <result property="opleveldesc" column="opleveldesc"/>
     </resultMap>
 
-    <resultMap type="com.smartor.domain.PatMedOperationItem" id="PatMedOperationItemResult">
+    <resultMap type="com.ruoyi.othervisit.domain.PatMedOperationItem" id="PatMedOperationItemResult">
         <result property="id" column="id"/>
         <result property="operationid" column="operationid"/>
         <result property="opid" column="opid"/>
@@ -545,7 +549,7 @@
         </if>
     </select>
 
-    <select id="selectPatArchiveList" parameterType="com.smartor.domain.PatArchive" resultMap="PatArchiveResult">
+    <select id="selectPatArchiveList" parameterType="com.ruoyi.common.core.domain.entity.PatArchive" resultMap="PatArchiveResult">
         <include refid="selectPatArchiveVo"/>
         where 1=1
             <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
@@ -589,7 +593,7 @@
     </select>
 
 
-    <select id="selectPatMedInhospListCount" parameterType="com.smartor.domain.PatMedInhosp" resultType="Long">
+    <select id="selectPatMedInhospListCount" parameterType="com.ruoyi.inhospvisit.domain.PatMedInhosp" resultType="Long">
         select count(*)
         FROM healthy_inhosp
     </select>
@@ -613,22 +617,20 @@
         WHERE row_num > #{lastRowNumber} LIMIT #{ps}
     </select>
 
-    <select id="selectPatArchiveCount" parameterType="com.smartor.domain.PatMedInhosp" resultType="Long">
+    <select id="selectPatArchiveCount" parameterType="com.ruoyi.inhospvisit.domain.PatMedInhosp" resultType="Long">
         select count(*)
         FROM healthy_archive
     </select>
 
 
-    <select id="selectPatMedInhospList" parameterType="com.smartor.domain.PatMedInhosp" resultMap="PatMedInhospResult">
+    <select id="selectPatMedInhospList" parameterType="com.ruoyi.inhospvisit.domain.PatMedInhosp" resultMap="PatMedInhospResult">
         select
         b.nurse_id,
         b.nurse_name,
         b.patname,
         b.out_way_id,
         b.out_way_name,
-        (CASE WHEN b.inhospstate = '1' THEN '1'
-            WHEN b.inhospstate = '3' THEN '1'
-            ELSE b.inhospstate END) AS inhospstate,
+        b.inhospstate,
         b.patno,
         b.inhospno,
         b.serialnum,
@@ -656,7 +658,8 @@
         b.leavehospitaldistrictname,
         b.leavehospitaldistrictid,
         b.deptid,
-        b.leaveldeptid
+        b.leaveldeptid,
+        b.del_flag
         FROM
         healthy_inhosp b
         where 1=1
@@ -691,7 +694,7 @@
     </select>
 
 
-    <select id="selectPatMedOuthospList" parameterType="com.smartor.domain.PatMedOuthosp"
+    <select id="selectPatMedOuthospList" parameterType="com.ruoyi.outpatientvisit.domain.PatMedOuthosp"
             resultMap="PatMedOuthospResult">
         select
         outhospno,
@@ -816,14 +819,15 @@
 
     </select>
 
-    <select id="selectOperList" parameterType="com.smartor.domain.PatMedOperation"
+    <select id="selectOperList" parameterType="com.ruoyi.othervisit.domain.PatMedOperation"
             resultMap="PatMedOperationResult">
         select
-        o.patid,
+        o.patid_his,
         o.patcode,
         o.paname,
         o.opreqid,
         o.opreqcode,
+        o.canceltime,
         o.opsstatus,
         o.optypecode,
         o.optypename,
@@ -873,6 +877,10 @@
         o.deptname ,
         o.hospitaldistrictcode,
         o.hospitaldistrictname ,
+        o.deptcode as leaveldeptcode,
+        o.deptname as leaveldeptname,
+        o.hospitaldistrictcode as leavehospitaldistrictcode,
+        o.hospitaldistrictname as leavehospitaldistrictname,
         o.roomno  ,
         o.bed_no ,
         o.drcode  ,
@@ -881,29 +889,33 @@
         o.nurse_name ,
         o.check_flag ,
         o.long_task_reason,
-        o.opid ,
-        o.vopcode ,
+        null as opid ,
+        o.opcode ,
         o.opdesc,
         o.oplevelcode ,
-        o.opleveldesc
+        o.opleveldesc,
+        o.last_Update_Time
         from HEALTHY_PAT_MED_OPERATION o
         where 1=1
         <if test="orgid != null and orgid != ''">
             AND o.orgid = #{orgid}
         </if>
+        <if test="opreqid != null and opreqid != ''">
+            AND o.opreqid = #{opreqid}
+        </if>
         <if test="lastStartTime != null and lastStartTime != ''">
-            and to_char(o.opreqtime, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime}
+            and to_char(o.last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') >= #{lastStartTime}
         </if>
         <if test="lastEndTime != null and lastEndTime != ''">
-            and to_char(o.opreqtime, 'YYYY-MM-DD HH24:MI:SS') &lt;= #{lastEndTime}
+            and to_char(o.last_Update_Time, 'YYYY-MM-DD HH24:MI:SS') &lt;= #{lastEndTime}
         </if>
     </select>
 
-    <select id="selectOperItemList" parameterType="com.smartor.domain.PatMedOperationItem"
+    <select id="selectOperItemList" parameterType="com.ruoyi.othervisit.domain.PatMedOperationItem"
             resultMap="PatMedOperationItemResult">
         select
                oi.operationid,
-               oi.opid,
+               null as opid,
                oi.opcode,
                oi.opdesc,
                oi.main_flag,
@@ -923,8 +935,8 @@
                oi.pguid,
                oi.guid,
                oi.pid,
-               oi.opercheck_flag,
-               oi.long_task_reason
+               oi.long_task_reason,
+               oi.last_Update_Time
         from HEALTHY_PAT_MED_OPERATION_ITEM oi
         where 1=1
         <if test="orgid != null and orgid != ''">
@@ -933,5 +945,14 @@
         <if test="opid != null and opid != ''">
             AND oi.opid = #{opid}
         </if>
+        <if test="operationid != null and operationid != ''">
+            AND oi.operationid = #{operationid}
+        </if>
+        <if test="lastStartTime != null and lastStartTime != ''">
+            and oi.last_Update_Time &gt;= to_date(#{lastStartTime}, 'YYYY-MM-DD HH24:MI:SS')
+        </if>
+        <if test="lastEndTime != null and lastEndTime != ''">
+            and oi.last_Update_Time &lt;= to_date(#{lastEndTime}, 'YYYY-MM-DD HH24:MI:SS')
+        </if>
     </select>
 </mapper>

--
Gitblit v1.9.3