Commit e00eee44525a14c76fff4403ff0f92136987b553

Authored by zhangchao
1 parent 76df7f227c
Exists in dev

#fix:新增小程序获取产妇信息相关接口

Showing 3 changed files with 27 additions and 2 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java View file @ e00eee4
... ... @@ -585,6 +585,16 @@
585 585 }
586 586  
587 587 /**
  588 + * 获取产妇基本信息
  589 + * 上面的有bug
  590 + */
  591 + @RequestMapping(value = "/wx/findp2", method = RequestMethod.GET)
  592 + @ResponseBody
  593 + public BaseResponse getWxPatent2(PatientQueryRequest request) {
  594 + return patientFacade.findPatient2(request, null);
  595 + }
  596 +
  597 + /**
588 598 * @author dongqin
589 599 * @description 根据身份证号,获取孕妇基本信息,此接口是对第三方提供服务的
590 600 * @date 10:09 2019/11/18
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ e00eee4
... ... @@ -3724,11 +3724,17 @@
3724 3724 }
3725 3725  
3726 3726 public BaseResponse findPatient2(PatientQueryRequest patientQueryRequest, Integer userId) {
3727   - String hospitalId= autoMatchFacade.getHospitalId(userId);
  3727 + String hospitalId;
  3728 + if (userId==null){
  3729 + hospitalId=patientQueryRequest.getHospitalId();
  3730 + }else {
  3731 + hospitalId= autoMatchFacade.getHospitalId(userId);
  3732 + }
  3733 +
3728 3734 Integer type = patientQueryRequest.getType() != null ? patientQueryRequest.getType() : -1;
3729 3735  
3730 3736 Patients patients = antenatalExaminationFacade.findOnePatient(patientQueryRequest.getCardNo(),
3731   - patientQueryRequest.getVcCardNo(), patientQueryRequest.getId(), groupsFacade.findGroupHospital(userId, false), type, false, patientQueryRequest.getPid(), false);
  3737 + patientQueryRequest.getVcCardNo(), patientQueryRequest.getId(), userId!=null?groupsFacade.findGroupHospital(userId, false):null, type, false, patientQueryRequest.getPid(), false);
3732 3738 PatientBaseResult patientBaseResult = new PatientBaseResult();
3733 3739 if (null != patients) {
3734 3740 if (type==3){
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/PatientQueryRequest.java View file @ e00eee4
... ... @@ -10,6 +10,15 @@
10 10 private String pid;
11 11 private String vcCardNo;
12 12 private Integer type;
  13 + private String hospitalId;
  14 +
  15 + public String getHospitalId() {
  16 + return hospitalId;
  17 + }
  18 +
  19 + public void setHospitalId(String hospitalId) {
  20 + this.hospitalId = hospitalId;
  21 + }
13 22  
14 23 public Integer getType() {
15 24 return type;