Commit b9cd9b392b103b3dda479460fba1091ec52e6e7e

Authored by zhangchao
1 parent 6c83dfefee
Exists in luanping and in 1 other branch dev

#新增医心照护根据身份证查询孕周接口

Showing 1 changed file with 24 additions and 0 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PatientServiceController.java View file @ b9cd9b3
... ... @@ -8,6 +8,7 @@
8 8 import com.lyms.platform.common.enums.YnEnums;
9 9 import com.lyms.platform.common.result.BaseListResponse;
10 10 import com.lyms.platform.common.result.BaseResponse;
  11 +import com.lyms.platform.common.utils.DateUtil;
11 12 import com.lyms.platform.common.utils.StringUtils;
12 13 import com.lyms.platform.operate.web.facade.AutoMatchFacade;
13 14 import com.lyms.platform.operate.web.facade.PatientServiceFacade;
... ... @@ -98,6 +99,29 @@
98 99 return patientServiceFacade.findPatientServiceList(pid);
99 100 }
100 101  
  102 + /**
  103 + * 医心照护系统通过身份证获取患者孕周
  104 + * @param idNo
  105 + * @return
  106 + */
  107 + @ResponseBody
  108 + @RequestMapping(value = "/patient/lastMenses", method = RequestMethod.GET)
  109 + public BaseResponse findPatientLastMenses(String idNo) {
  110 + BaseResponse baseResponse = new BaseResponse();
  111 + baseResponse.setErrorcode(ErrorCodeConstants.SUCCESS);
  112 + PatientsQuery patientsQuery = new PatientsQuery();
  113 + patientsQuery.setCardNo(idNo);
  114 + patientsQuery.setYn(YnEnums.YES.getId());
  115 + patientsQuery.setType(1);
  116 + List<Patients> patientsList = patientsService.queryPatient(patientsQuery);
  117 + if (CollectionUtils.isNotEmpty(patientsList)){
  118 + Patients patients= patientsList.get(0);
  119 + baseResponse.setObject(DateUtil.getSecond( patients.getLastMenses()));
  120 + return baseResponse;
  121 + }else {
  122 + return baseResponse;
  123 + }
  124 + }
101 125 /**
102 126 * 医心照护系统购买订单后增加服务开通
103 127 * @param yxzhVO