From 2527a2bdf9aede89812c008feb504172e77d8ebe Mon Sep 17 00:00:00 2001 From: xuhx <1216720373@qq.com> Date: Mon, 16 Aug 2021 19:10:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E7=BA=B8=E5=8C=96=E5=BD=92=E6=A1=A3?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mapper/Archive_DetailMapper.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/resources/mapper/Archive_DetailMapper.xml b/src/main/resources/mapper/Archive_DetailMapper.xml index 9bb313aa..da8a91b7 100644 --- a/src/main/resources/mapper/Archive_DetailMapper.xml +++ b/src/main/resources/mapper/Archive_DetailMapper.xml @@ -57,7 +57,7 @@ and id=#{patientId,jdbcType=VARCHAR} )+'%' - and visit_id=(select visit_id from Archive_Master where 1=1 + and admission_date_time=(select admission_date_time from Archive_Master where 1=1 and id=#{patientId,jdbcType=VARCHAR} ) @@ -86,7 +86,7 @@ and id=#{patientId,jdbcType=VARCHAR} )+'%' - and visit_id=(select visit_id from Archive_Master where 1=1 + and admission_date_time=(select admission_date_time from Archive_Master where 1=1 and id=#{patientId,jdbcType=VARCHAR} ) @@ -202,7 +202,7 @@ and id=#{patientId,jdbcType=VARCHAR} - and visit_id=(select visit_id from Archive_Master where 1=1 + and admission_date_time=(select admission_date_time from Archive_Master where 1=1 and id=#{patientId,jdbcType=VARCHAR} ) @@ -223,6 +223,10 @@ and id=#{patientId,jdbcType=VARCHAR} )+'%' + and admission_date_time=(select admission_date_time from Archive_Master where 1=1 + + and id=#{patientId,jdbcType=VARCHAR} + ) and patindex('%B%',inp_no) != 0 union select id from archive_master where id=#{patientId,jdbcType=VARCHAR}