From 25c9ca5313fbed298f1faf3893b7b0c780b6e1b2 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期四, 03 九月 2026 16:33:02 +0800
Subject: [PATCH] 【丽水】手术撤销

---
 smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml b/smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml
index c038d99..ec8da0d 100644
--- a/smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/PatMedOperationItemMapper.xml
@@ -444,6 +444,14 @@
                where opid = #{opid}
     </delete>
 
+    <update id="deleteSoftPatMedOperationItemByOpId" parameterType="String">
+        update pat_med_operation_item
+        <trim prefix="SET" suffixOverrides=",">
+            del_flag =1
+        </trim>
+        where opid = #{opid}
+    </update>
+
     <select id="selectOperationItemList" parameterType="com.smartor.domain.PatMedOperationItem"
             resultMap="PatMedOperationItemResult">
         select pmoi.id, pmoi.operationid, pmoi.opid, pmoi.opcode, pmoi.opdesc, pmoi.main_flag, pmoi.incitypecode,
@@ -457,7 +465,7 @@
         from pat_med_operation pmo
         join pat_med_operation_item pmoi
         on pmoi.opid = pmo.opid
-        left join pat_med_inhosp pmi
+        join pat_med_inhosp pmi
         on pmo.serialnum = pmi.serialnum
         where
         pmo.del_flag = '0'
@@ -514,6 +522,9 @@
         </if>
         <if test="inhospstate != null and inhospstate != ''">
             and pmi.inhospstate = #{inhospstate}
+            <if test="inhospstate == '1'">
+                and pmi.endtime is not null
+            </if>
         </if>
         <if test="serialnum != null and serialnum != ''">
             and pmo.serialnum = #{serialnum}

--
Gitblit v1.9.3