From fedd5240da9961f3b0f0e2582122632136aec44c Mon Sep 17 00:00:00 2001 From: zengwh <81383286@qq.com> Date: Wed, 2 Mar 2022 02:31:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=B7=B2=E6=89=93=E5=8D=B0?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ipml/Archive_MasterServiceImpl.java | 8 ++-- .../resources/mapper/Archive_MasterMapper.xml | 42 +++++-------------- 2 files changed, 14 insertions(+), 36 deletions(-) diff --git a/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java b/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java index c6c93229..64df5750 100644 --- a/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java +++ b/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java @@ -130,7 +130,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService { @Override public List selectByLastByColumn(Archive_Master_Vo archiveMasterVo,Integer offset, Integer limit) { //判断并设置查询是否打印权限 - setIdByPrintNum(archiveMasterVo); + //setIdByPrintNum(archiveMasterVo); //根据条件查询记录 if(null != offset && null != limit) { PageHelper.offsetPage(offset, limit); @@ -174,7 +174,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService { @Override public List selectBeHospitalByColumn(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) { //判断并设置查询是否打印权限 - setIdByPrintNum(archiveMasterVo); + //setIdByPrintNum(archiveMasterVo); //根据条件查询记录 if(null != offset && null != limit) { PageHelper.offsetPage(offset, limit); @@ -308,7 +308,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService { @Override public List selectByUnfileAndColumn(Archive_Master_Vo archiveMasterVo,Integer offset, Integer limit) { //判断并设置查询是否打印权限 - setIdByPrintNum(archiveMasterVo); + //setIdByPrintNum(archiveMasterVo); //根据条件查询记录 if(null != offset && null != limit) { PageHelper.offsetPage(offset, limit); @@ -576,7 +576,7 @@ public class Archive_MasterServiceImpl implements Archive_MasterService { @Override public List selectByCmtByColumn(Archive_Master_Vo archiveMasterVo, Integer offset, Integer limit) { //判断并设置查询是否打印权限 - setIdByPrintNum(archiveMasterVo); + //setIdByPrintNum(archiveMasterVo); //根据条件查询记录 if(null != offset && null != limit) { PageHelper.offsetPage(offset, limit); diff --git a/src/main/resources/mapper/Archive_MasterMapper.xml b/src/main/resources/mapper/Archive_MasterMapper.xml index de5d622f..62f3520e 100644 --- a/src/main/resources/mapper/Archive_MasterMapper.xml +++ b/src/main/resources/mapper/Archive_MasterMapper.xml @@ -297,6 +297,8 @@ LEFT JOIN (select zyh,jzh,COUNT(*) num from archive_other_ext where T2!='1801-02-03 00:00:00.000' group by zyh,jzh) extNurse on m.inp_no=extNurse.zyh and m.visit_id=extNurse.jzh + LEFT JOIN (select MasterID,COUNT(*) num from archive_printInfo group by MasterID) printTable + on m.id=printTable.MasterID where 1=1 and ArchiveState in('归档中','提交','主任退回') and m.Is_Valid!=1 and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%' @@ -308,18 +310,12 @@ - and m.id - in + and printTable.MasterID is not null - not in + and printTable.MasterID is null - ( - - #{item} - - ) and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%' @@ -434,18 +430,12 @@ where 1=1 and ArchiveState in('初审') and m.Is_Valid!=1 and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%' - and m.id - in + and printTable.MasterID is not null - not in + and printTable.MasterID is null - ( - - #{item} - - ) and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%' @@ -708,18 +698,12 @@ and patindex('%B%',m.inp_no) in (0,1) and m.ArchiveState not in('作废','已封存') and m.Is_Valid!=1 and inp_no not like 'LG%' - and m.id - in + and printTable.MasterID is not null - not in + and printTable.MasterID is null - ( - - #{item} - - ) and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%' @@ -848,18 +832,12 @@ where 1=1 and ArchiveState in('提交','主任退回','归档中','复审退回') and patindex('%B%',m.inp_no) = 0 and inp_no not like 'LG%' and m.Is_Valid!=1 - and m.id - in + and printTable.MasterID is not null - not in + and printTable.MasterID is null - ( - - #{item} - - ) and m.inp_no like '%'+#{inpNo,jdbcType=NCHAR}+'%'