Commit 4e768fd77596f0fd11ec661d05f209e42dde9a04
1 parent
d4ad0b3072
Exists in
master
and in
6 other branches
出生证明院外签发 获取母亲父亲信息
Showing 2 changed files with 82 additions and 0 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
4e768fd
... | ... | @@ -876,6 +876,22 @@ |
876 | 876 | |
877 | 877 | |
878 | 878 | /** |
879 | + * 对接出生医学证明院外签发 只查询孕妇信息 | |
880 | + * | |
881 | + * @param hospital | |
882 | + * @param cardNo | |
883 | + * @return | |
884 | + */ | |
885 | + @RequestMapping(value = "/getOutDeliveryInfo", method = RequestMethod.GET) | |
886 | + @ResponseBody | |
887 | + public Object getMatDeliverInfo(@RequestParam(required = true) String hospital, | |
888 | + @RequestParam(required = false) String cardNo) { | |
889 | + | |
890 | + return viewFacade.getMatDeliverInfo(hospital, cardNo); | |
891 | + } | |
892 | + | |
893 | + | |
894 | + /** | |
879 | 895 | * 滦平获取高危信息 |
880 | 896 | * 定制需求开发 |
881 | 897 | * |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
4e768fd
... | ... | @@ -5717,6 +5717,72 @@ |
5717 | 5717 | return deliverMap; |
5718 | 5718 | } |
5719 | 5719 | |
5720 | + public Map<String, Object> getMatDeliverInfo(String hospitalName, String idCard) { | |
5721 | + | |
5722 | + Map<String, Object> patientMap = new HashMap<>(); | |
5723 | + PatientsQuery patientsQuery = new PatientsQuery(); | |
5724 | + if (StringUtils.isNotEmpty(hospitalName)) { | |
5725 | + OrganizationQuery query = new OrganizationQuery(); | |
5726 | + query.setName(hospitalName.trim()); | |
5727 | + query.setYn(YnEnums.YES.getId()); | |
5728 | + List<Organization> organizations = organizationService.queryOrganization(query); | |
5729 | + if (CollectionUtils.isNotEmpty(organizations)) { | |
5730 | + patientsQuery.setHospitalId(String.valueOf(organizations.get(0).getId())); | |
5731 | + } else { | |
5732 | + return patientMap; | |
5733 | + } | |
5734 | + } else { | |
5735 | + return patientMap; | |
5736 | + } | |
5737 | + patientsQuery.setCardNo(idCard); | |
5738 | + List<Patients> list = patientsService.queryPatient1(patientsQuery, "created"); | |
5739 | + if (CollectionUtils.isNotEmpty(list)) { | |
5740 | + Patients patients = list.get(0); | |
5741 | + patientMap.put("mname", patients.getUsername());//母亲姓名 | |
5742 | + patientMap.put("mcountry", getBasicConfig(patients.getPcountryId()));//母亲国籍 | |
5743 | + patientMap.put("mnation", getBasicConfig(patients.getPnationId()));//母亲民族 | |
5744 | + patientMap.put("mbirthday", DateUtil.getyyyy_MM_dd(patients.getBirth()));//母亲出生日期 | |
5745 | + patientMap.put("mcardtype", getBasicConfig(patients.getPcerteTypeId()));//母亲证件类型 | |
5746 | + patientMap.put("mcardnum", patients.getCardNo());//母亲证件号码 | |
5747 | + patientMap.put("maddress", CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), | |
5748 | + patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService));//母亲户籍地址 | |
5749 | + | |
5750 | + if (StringUtils.isNotEmpty(patients.getHusbandName())) { | |
5751 | + patientMap.put("fname", StringUtils.isNotEmpty(patients.getHusbandName()) ? patients.getHusbandName() : "");//父亲姓名 | |
5752 | + | |
5753 | + patientMap.put("fcountry", getBasicConfig(patients.getHcountryId()));//父亲国籍 | |
5754 | + patientMap.put("fnation", getBasicConfig(patients.getHnationId()));//父亲民族 | |
5755 | + String fbirthday = ""; | |
5756 | + if (StringUtils.isNotEmpty(patients.getHcertificateTypeId()) && StringUtils.isNotEmpty(patients.getHcertificateNum()) && | |
5757 | + patients.getHcertificateNum().length() == 18 && | |
5758 | + "70ae1d93-2964-46bc-83fa-bec9ff605b1c".equals(patients.getHcertificateTypeId())) { | |
5759 | + String cardNo = patients.getHcertificateNum().substring(6, 14); | |
5760 | + Date date = DateUtil.parseYYYYMMDD(cardNo); | |
5761 | + fbirthday = DateUtil.getyyyy_MM_dd(date); | |
5762 | + } | |
5763 | + | |
5764 | + patientMap.put("fbirthday", fbirthday);//父亲出生日期 | |
5765 | + patientMap.put("fcardtype", getBasicConfig(patients.getHcertificateTypeId()));//父亲证件类型 | |
5766 | + | |
5767 | + | |
5768 | + patientMap.put("fcardnum", StringUtils.isNotEmpty(patients.getHcertificateNum()) ? patients.getHcertificateNum() : "");//父亲证件号码 | |
5769 | + patientMap.put("faddress", CommonsHelper.getResidence(patients.getHprovinceRegisterId(), patients.getHcityRegisterId(), | |
5770 | + patients.getHareaRegisterId(), patients.getHstreetRegisterId(), patients.getHaddressRegister(), | |
5771 | + basicConfigService));//父亲户籍地址 | |
5772 | + } else { | |
5773 | + patientMap.put("fname", "");//父亲姓名 | |
5774 | + patientMap.put("fcountry", "");//父亲国籍 | |
5775 | + patientMap.put("fnation", "");//父亲民族 | |
5776 | + patientMap.put("fbirthday", "");//父亲出生日期 | |
5777 | + patientMap.put("fcardtype", "");//父亲证件类型 | |
5778 | + patientMap.put("fcardnum", "");//父亲证件号码 | |
5779 | + patientMap.put("faddress", "");//父亲户籍地址 | |
5780 | + } | |
5781 | + | |
5782 | + } | |
5783 | + return patientMap; | |
5784 | + } | |
5785 | + | |
5720 | 5786 | |
5721 | 5787 | public String getPatientRiskInfo(String cardNo, String vcCardNo) { |
5722 | 5788 | Document document = DocumentHelper.createDocument();// 建立document对象,用来操作xml文件 |