Commit 57e02e7ace8ff1b3401d137e97e46db35b9dce6a

Authored by liquanyu
1 parent 7781b19b2d

code update

Showing 2 changed files with 7 additions and 6 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BookbuildingController.java View file @ 57e02e7
... ... @@ -83,11 +83,12 @@
83 83 */
84 84 @RequestMapping(value = "/queryPregnantBuildRecord", method = RequestMethod.GET)
85 85 @ResponseBody
86   - public BaseListResponse queryPregnantBuildRecord(@RequestParam(required = false) String vcCardNo,@RequestParam(required = false) String cardNo){
  86 + public BaseListResponse queryPregnantBuildRecord(@RequestParam(required = false) String vcCardNo,@RequestParam(required = false) String cardNo,HttpServletRequest httpServletRequest){
87 87 BookbuildingQueryRequest bookbuildingQueryRequest = new BookbuildingQueryRequest();
88 88 bookbuildingQueryRequest.setVcCardNo(vcCardNo);
89 89 bookbuildingQueryRequest.setCardNo(cardNo);
90   - BaseListResponse listResponse = bookbuildingFacade.queryPregnantBuildRecord(bookbuildingQueryRequest);
  90 + LoginContext loginState = (LoginContext) httpServletRequest.getAttribute("loginContext");
  91 + BaseListResponse listResponse = bookbuildingFacade.queryPregnantBuildRecord(bookbuildingQueryRequest,loginState.getId());
91 92 return listResponse;
92 93 }
93 94  
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BookbuildingFacade.java View file @ 57e02e7
... ... @@ -508,7 +508,7 @@
508 508 * @param bookbuildingQueryRequest
509 509 * @return
510 510 */
511   - public BaseListResponse queryPregnantBuildRecord(BookbuildingQueryRequest bookbuildingQueryRequest) {
  511 + public BaseListResponse queryPregnantBuildRecord(BookbuildingQueryRequest bookbuildingQueryRequest,Integer userId) {
512 512 List<Patients> patients = new ArrayList<>();
513 513 Map<String,List> typeMap = new HashMap<>();
514 514 PatientsQuery patientsQuery = new PatientsQuery();
515 515  
516 516  
... ... @@ -521,10 +521,11 @@
521 521 patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery,"bookbuildingDate", Sort.Direction.DESC);
522 522 }
523 523 //否则用就诊卡号 查询到这个孕妇的身份证号码 再用身份证号码查询该孕妇的所有建档 包括产妇记录
524   - else if (!StringUtils.isEmpty(bookbuildingQueryRequest.getVcCardNo()) && !StringUtils.isEmpty(String.valueOf(bookbuildingQueryRequest.getHospitalId())))
  524 + else if (!StringUtils.isEmpty(bookbuildingQueryRequest.getVcCardNo()))
525 525 {
  526 + String hospitalId = autoMatchFacade.getHospitalId(userId);
526 527 patientsQuery.setVcCardNo(bookbuildingQueryRequest.getVcCardNo());
527   - patientsQuery.setHospitalId(bookbuildingQueryRequest.getHospitalId());
  528 + patientsQuery.setHospitalId(hospitalId);
528 529 List<Patients> patientsVc = yunBookbuildingService.queryPregnantWithQuery(patientsQuery);
529 530 if (CollectionUtils.isNotEmpty(patientsVc))
530 531 {
... ... @@ -933,7 +934,6 @@
933 934 String hospital = autoMatchFacade.getHospitalId(userId);
934 935 Patients patients = yunBookbuildingService.findOneById(id);
935 936  
936   - ;
937 937 // if (CollectionUtils.isNotEmpty(antExChulist))
938 938 if(!deleteProcessHandler.deleteBookBuild(patients.getPid(),patients.getBookbuildingDate(),hospital))
939 939 {