Commit 6d083b4d40b6df11ae6b946ac5d3a57878001a37

Authored by liquanyu
1 parent c2fb4472d1

查询孕妇基本信息接口

Showing 2 changed files with 38 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyBookbuildingController.java View file @ 6d083b4
... ... @@ -209,6 +209,8 @@
209 209 return babyBookbuildingFacade.sendBabyGuideSms(request);
210 210 }
211 211  
  212 +
  213 +
212 214 /**
213 215 * 获取小孩电子病历
214 216 *
... ... @@ -236,6 +238,18 @@
236 238 public BaseResponse getBabyBase(@RequestParam("babyId") String babyId){
237 239  
238 240 return babyBookbuildingFacade.getBabyBase(babyId);
  241 + }
  242 +
  243 +
  244 + /**
  245 + * 查询孕妇基本信息通过身份证号码
  246 + * @param cardNo
  247 + * @return
  248 + */
  249 + @RequestMapping(method = RequestMethod.GET, value = "/queryPatientBaseInfo")
  250 + @ResponseBody
  251 + public BaseResponse queryYunBaseInfo(@RequestParam(value = "cardNo", required = true) String cardNo) {
  252 + return babyBookbuildingFacade.queryYunBaseInfo(cardNo);
239 253 }
240 254 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyBookbuildingFacade.java View file @ 6d083b4
... ... @@ -1150,5 +1150,29 @@
1150 1150 }
1151 1151  
1152 1152  
  1153 + /**
  1154 + * 通过身份证号码查询孕妇的基本信息
  1155 + * @param cardNo
  1156 + * @return
  1157 + */
  1158 + public BaseResponse queryYunBaseInfo(String cardNo) {
  1159 + PatientsQuery patientsQuery = new PatientsQuery();
  1160 + patientsQuery.setYn(YnEnums.YES.getId());
  1161 + Patients obj = null;
  1162 + if (!StringUtils.isEmpty(cardNo));
  1163 + {
  1164 + patientsQuery.setCardNo(cardNo);
  1165 + List<Patients> patients = yunBookbuildingService.queryPregnantWithQuery(patientsQuery);
  1166 + if (CollectionUtils.isNotEmpty(patients))
  1167 + {
  1168 + obj = patients.get(0);
  1169 + }
  1170 + }
  1171 + BaseObjectResponse objectResponse = new BaseObjectResponse();
  1172 + objectResponse.setData(obj);
  1173 + objectResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
  1174 + objectResponse.setErrormsg("成功");
  1175 + return objectResponse;
  1176 + }
1153 1177 }