diff --git a/src/main/java/com/emr/controller/FontController.java b/src/main/java/com/emr/controller/FontController.java index 03e74e5..2051b15 100644 --- a/src/main/java/com/emr/controller/FontController.java +++ b/src/main/java/com/emr/controller/FontController.java @@ -52,13 +52,16 @@ public class FontController { * 提供第三方按多个分段id和记账号查询病历pdf * */ @RequestMapping("showRecordByPatientId") - public String showRecordByPatientId(String assortIds, String patientId, Model model){ + public String showRecordByPatientId(String assortIds,String patientId,String visitId, Model model){ if(StringUtils.isBlank(assortIds)){ return retrunErrorPage(model,"病案分类Id不能为空!"); } if(StringUtils.isBlank(patientId)){ return retrunErrorPage(model,"记账号不能为空!"); } + if(StringUtils.isBlank(visitId)){ + return retrunErrorPage(model,"住院次数不能为空!"); + } List list = new ArrayList<>(); //判断工号是否存在 try { @@ -74,11 +77,9 @@ public class FontController { } } //判断记账号是否存在 - Archive_Master master = new Archive_Master(); - master.setPatientId(patientId); - list = archiveMasterService.selectByObject(master); + list = archiveMasterService.selectByObject(patientId,visitId); if(null == list || list.isEmpty()){ - return retrunErrorPage(model,"记账号不存在!"); + return retrunErrorPage(model,"病历不存在!"); } } catch (Exception e) { ExceptionPrintUtil.printException(e); diff --git a/src/main/java/com/emr/dao/Archive_MasterMapper.java b/src/main/java/com/emr/dao/Archive_MasterMapper.java index 184f8d1..be9a4d9 100644 --- a/src/main/java/com/emr/dao/Archive_MasterMapper.java +++ b/src/main/java/com/emr/dao/Archive_MasterMapper.java @@ -2,6 +2,7 @@ package com.emr.dao; import com.emr.entity.Archive_Master; import com.emr.entity.Archive_Master_Vo; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -53,5 +54,5 @@ public interface Archive_MasterMapper { /** * 查询病案是否存在 * */ - List selectByObject(Archive_Master master); + List selectByObject(@Param(value = "patientId") String patientId,@Param(value = "visitId")String visitId); } \ No newline at end of file diff --git a/src/main/java/com/emr/service/Archive_MasterService.java b/src/main/java/com/emr/service/Archive_MasterService.java index 8c35148..83ee37e 100644 --- a/src/main/java/com/emr/service/Archive_MasterService.java +++ b/src/main/java/com/emr/service/Archive_MasterService.java @@ -9,6 +9,7 @@ package com.emr.service; import com.emr.entity.Archive_Master; import com.emr.entity.Archive_Master_Vo; import com.emr.entity.OffsetLimitPage; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -202,7 +203,7 @@ public interface Archive_MasterService { /** * 查询病案是否存在 * */ - List selectByObject(Archive_Master master); + List selectByObject(String patientId,String visitId); } 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 5b5afea..026eb45 100644 --- a/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java +++ b/src/main/java/com/emr/service/ipml/Archive_MasterServiceImpl.java @@ -359,8 +359,8 @@ public class Archive_MasterServiceImpl implements Archive_MasterService { } @Override - public List selectByObject(Archive_Master master) { - return archiveMasterMapper.selectByObject(master); + public List selectByObject(String patientId,String visitId) { + return archiveMasterMapper.selectByObject(patientId,visitId); } } diff --git a/src/main/resources/mapper/Archive_MasterMapper.xml b/src/main/resources/mapper/Archive_MasterMapper.xml index 9a13a9c..90f1d71 100644 --- a/src/main/resources/mapper/Archive_MasterMapper.xml +++ b/src/main/resources/mapper/Archive_MasterMapper.xml @@ -102,11 +102,13 @@