diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BookbuildingController.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BookbuildingController.java index cb0557a..9b405c8 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BookbuildingController.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BookbuildingController.java @@ -83,11 +83,12 @@ public class BookbuildingController extends BaseController{ */ @RequestMapping(value = "/queryPregnantBuildRecord", method = RequestMethod.GET) @ResponseBody - public BaseListResponse queryPregnantBuildRecord(@RequestParam(required = false) String vcCardNo,@RequestParam(required = false) String cardNo){ + public BaseListResponse queryPregnantBuildRecord(@RequestParam(required = false) String vcCardNo,@RequestParam(required = false) String cardNo,HttpServletRequest httpServletRequest){ BookbuildingQueryRequest bookbuildingQueryRequest = new BookbuildingQueryRequest(); bookbuildingQueryRequest.setVcCardNo(vcCardNo); bookbuildingQueryRequest.setCardNo(cardNo); - BaseListResponse listResponse = bookbuildingFacade.queryPregnantBuildRecord(bookbuildingQueryRequest); + LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext"); + BaseListResponse listResponse = bookbuildingFacade.queryPregnantBuildRecord(bookbuildingQueryRequest,loginState.getId()); return listResponse; } diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java index d1abda2..445d50e 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java @@ -508,7 +508,7 @@ public class BookbuildingFacade { * @param bookbuildingQueryRequest * @return */ - public BaseListResponse queryPregnantBuildRecord(BookbuildingQueryRequest bookbuildingQueryRequest) { + public BaseListResponse queryPregnantBuildRecord(BookbuildingQueryRequest bookbuildingQueryRequest,Integer userId) { List patients = new ArrayList<>(); Map typeMap = new HashMap<>(); PatientsQuery patientsQuery = new PatientsQuery(); @@ -521,10 +521,11 @@ public class BookbuildingFacade { patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery,"bookbuildingDate", Sort.Direction.DESC); } //否则用就诊卡号 查询到这个孕妇的身份证号码 再用身份证号码查询该孕妇的所有建档 包括产妇记录 - else if (!StringUtils.isEmpty(bookbuildingQueryRequest.getVcCardNo()) && !StringUtils.isEmpty(String.valueOf(bookbuildingQueryRequest.getHospitalId()))) + else if (!StringUtils.isEmpty(bookbuildingQueryRequest.getVcCardNo())) { + String hospitalId = autoMatchFacade.getHospitalId(userId); patientsQuery.setVcCardNo(bookbuildingQueryRequest.getVcCardNo()); - patientsQuery.setHospitalId(bookbuildingQueryRequest.getHospitalId()); + patientsQuery.setHospitalId(hospitalId); List patientsVc = yunBookbuildingService.queryPregnantWithQuery(patientsQuery); if (CollectionUtils.isNotEmpty(patientsVc)) { @@ -933,7 +934,6 @@ public class BookbuildingFacade { String hospital = autoMatchFacade.getHospitalId(userId); Patients patients = yunBookbuildingService.findOneById(id); - ; // if (CollectionUtils.isNotEmpty(antExChulist)) if(!deleteProcessHandler.deleteBookBuild(patients.getPid(),patients.getBookbuildingDate(),hospital)) {