From 0d69a2731496b055c61b91c02252272577202c3f Mon Sep 17 00:00:00 2001 From: hujl Date: Tue, 8 Feb 2022 11:07:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=A4=E4=B8=AA=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=9F=A5=E8=AF=A2:=E8=BF=87=E6=BB=A4=E7=95=99?= =?UTF-8?q?=E8=A7=82=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/mapper/Archive_MasterMapper.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/resources/mapper/Archive_MasterMapper.xml b/src/main/resources/mapper/Archive_MasterMapper.xml index 1de6513b..79576a5f 100644 --- a/src/main/resources/mapper/Archive_MasterMapper.xml +++ b/src/main/resources/mapper/Archive_MasterMapper.xml @@ -971,7 +971,7 @@ and CONVERT(VARCHAR(10),discharge_date_time,120) <= #{endDateTo,jdbcType=NCHAR} - AND Is_Valid != 1 THEN 1 ELSE 0 END) as checkDoctor, + AND Is_Valid != 1 and patindex('%B%',inp_no) = 0 and inp_no not like 'LG%' THEN 1 ELSE 0 END) as checkDoctor, SUM(CASE WHEN ArchiveState is not null and ArchiveState!='' and ArchiveState IN ('归档中','提交','主任退回','复审退回') @@ -984,8 +984,8 @@ and CONVERT(VARCHAR(10),discharge_date_time,120) <= #{endDateTo,jdbcType=NCHAR} - AND Is_Valid != 1 THEN 1 ELSE 0 END) as lockinfo, - SUM(CASE WHEN ArchiveState is not null and ArchiveState not IN ('已封存','归档中','提交','主任退回','复审退回','') + AND Is_Valid != 1 and patindex('%B%',inp_no) = 0 and inp_no not like 'LG%' THEN 1 ELSE 0 END) as lockinfo, + SUM(CASE WHEN ArchiveState is not null and ArchiveState not IN ('已封存','归档中','提交','主任退回','复审退回','','作废') and CONVERT(VARCHAR(10),discharge_date_time,120) between CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120) and #{endDateTo,jdbcType=NCHAR} @@ -997,8 +997,8 @@ and CONVERT(VARCHAR(10),discharge_date_time,120) <= #{endDateTo,jdbcType=NCHAR} - AND Is_Valid != 1 THEN 1 ELSE 0 END) as inpNo, - SUM(CASE WHEN ArchiveState is not null and ArchiveState not IN ('已封存','归档中','提交','主任退回','复审退回','') + AND Is_Valid != 1 and patindex('%B%',inp_no) = 0 and inp_no not like 'LG%' THEN 1 ELSE 0 END) as inpNo, + SUM(CASE WHEN ArchiveState is not null and ArchiveState not IN ('已封存','归档中','提交','主任退回','复审退回','','作废') and CONVERT(VARCHAR(10),discharge_date_time,120) between CONVERT(VARCHAR(10),#{startDateTo,jdbcType=NCHAR},120) and #{endDateTo,jdbcType=NCHAR} @@ -1010,7 +1010,7 @@ and CONVERT(VARCHAR(10),discharge_date_time,120) <= #{endDateTo,jdbcType=NCHAR} - AND Is_Valid != 1 + AND Is_Valid != 1 and patindex('%B%',inp_no) = 0 and inp_no not like 'LG%' and CEILING(DATEDIFF(hour,discharge_date_time,GETDATE())/24.00)>#{remark,jdbcType=NCHAR} @@ -1049,7 +1049,7 @@ select code,name from emr_dictionary where parent_id=(select id from emr_dictionary where typeCode='dept_code' ) ) E ON U.dept_name=E.code - 1=1 and U.ArchiveState in('归档中','提交','主任退回','复审退回') AND U.Is_Valid != 1 + 1=1 and U.ArchiveState in('归档中','提交','主任退回','复审退回') AND U.Is_Valid != 1 and patindex('%B%',inp_no) = 0 and inp_no not like 'LG%' and CEILING(DATEDIFF(hour,U.discharge_date_time,GETDATE())/24.00)>#{remark,jdbcType=NCHAR}