From 2e952232f71eae1bf92590471fc7f5d20a1af873 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 31 七月 2025 11:30:48 +0800
Subject: [PATCH] 代码提交

---
 smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
index 2b6dc92..1dc9730 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
@@ -266,6 +266,15 @@
         where id = #{id} and del_flag=0
     </select>
 
+    <select id="selectPatArchiveByPatnos" resultMap="PatArchiveResult">
+        SELECT id, patientno
+        FROM pat_archive
+        WHERE patientno IN
+        <foreach item="patno" collection="patnos" open="(" separator="," close=")">
+            #{patno}
+        </foreach>
+    </select>
+
     <insert id="insertPatArchiveSingle" parameterType="com.smartor.domain.PatArchive" useGeneratedKeys="true"
             keyProperty="id">
         insert into pat_archive
@@ -369,7 +378,7 @@
         </trim>
     </insert>
 
-    <insert id="insertPatArchive">
+    <insert id="insertPatArchive" useGeneratedKeys="true" keyProperty="id">
         insert into
         pat_archive(name,viptype,sex,idcardno,birthdate,place_of_residence,age,age2,sourcefrom,archivetime,archiveby,telcode,relativetelcode,idcardtype,orgid,openid,dduserid,update_by,update_time
         ,create_by,create_time,isupload,upload_time,pattype,nation,birthplace,native_place,patientno,patid_his,sd_flag,age_unit,age_unit2,notrequired_flag,notrequiredreason,care_facilities,case_path,
@@ -919,6 +928,12 @@
             <if test="endtime != null">
                 AND d.endtime = #{endtime}
             </if>
+            <if test="drname != null and drname != ''">
+                AND d.drname LIKE concat('%',#{drname}, '%')
+            </if>
+            <if test="drcode != null">
+                AND d.drcode = #{drcode}
+            </if>
             <if test="cry != null and cry == 0 ">and d.endtime is null</if>
             <if test="cry != null and cry == 1 ">and d.endtime is not null</if>
             <if test="visitno != null and visitno != ''">
@@ -996,8 +1011,6 @@
         a.place_of_residence,
         a.birthplace,
         a.birthdate,
-        -- a.icd10code as leaveicd10code,
-        -- a.diagname as leavediagname,
         a.age,
         a.age2,
         a.viptype,
@@ -1052,6 +1065,9 @@
             <if test="drname != null and drname != ''">
                 AND d.drname LIKE concat('%',#{drname}, '%')
             </if>
+            <if test="drcode != null">
+                AND d.drcode = #{drcode}
+            </if>
             <if test="pids != null">
                 AND a.id NOT IN
                 <foreach collection="pids" item="pid" open="(" separator="," close=")">

--
Gitblit v1.9.3