Commit ea68330832b44cd3e652623c7566cedfeecda132
1 parent
406ad49c8b
Exists in
master
and in
6 other branches
威海妇幼建档套打
Showing 2 changed files with 80 additions and 1 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
ea68330
| ... | ... | @@ -590,9 +590,22 @@ |
| 590 | 590 | @ResponseBody |
| 591 | 591 | @TokenRequired |
| 592 | 592 | public BaseObjectResponse findMatDeliverPrint(@RequestParam(required = true) String id,@RequestParam(required = true) String babyId) { |
| 593 | - return viewFacade.findMatDeliverPrint(id,babyId); | |
| 593 | + return viewFacade.findMatDeliverPrint(id, babyId); | |
| 594 | 594 | } |
| 595 | 595 | |
| 596 | + | |
| 597 | + /** | |
| 598 | + * 威海妇幼孕妇建档套打接口 | |
| 599 | + * | |
| 600 | + * @param id 孕妇ID | |
| 601 | + * @return | |
| 602 | + */ | |
| 603 | + @RequestMapping(value = "/getWhfyPatientPrint", method = RequestMethod.GET) | |
| 604 | + @ResponseBody | |
| 605 | + @TokenRequired | |
| 606 | + public BaseObjectResponse getWhfyPatientPrint(@RequestParam("id") String id) { | |
| 607 | + return viewFacade.getWhfyPatientPrint(id); | |
| 608 | + } | |
| 596 | 609 | |
| 597 | 610 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
ea68330
| ... | ... | @@ -3955,5 +3955,71 @@ |
| 3955 | 3955 | br.setData(map); |
| 3956 | 3956 | return br; |
| 3957 | 3957 | } |
| 3958 | + | |
| 3959 | + public BaseObjectResponse getWhfyPatientPrint(String id) { | |
| 3960 | + BaseObjectResponse br = new BaseObjectResponse(); | |
| 3961 | + if (org.apache.commons.lang.StringUtils.isEmpty(id)) { | |
| 3962 | + br.setErrorcode(ErrorCodeConstants.PARAMETER_ERROR); | |
| 3963 | + br.setErrormsg("id为空"); | |
| 3964 | + return br; | |
| 3965 | + } | |
| 3966 | + | |
| 3967 | + Patients data = patientsService.findOnePatientById(id); | |
| 3968 | + if (data == null || data.getYn() == YnEnums.NO.getId()) { | |
| 3969 | + br.setErrorcode(ErrorCodeConstants.NO_DATA); | |
| 3970 | + br.setErrormsg("没有查询到数据"); | |
| 3971 | + return br; | |
| 3972 | + } | |
| 3973 | + | |
| 3974 | + Map<String, Object> map = new HashMap<>(); | |
| 3975 | + | |
| 3976 | + map.put("id", data.getId()); | |
| 3977 | + /* 孕妇基础数据 */ | |
| 3978 | + map.put("username", data.getUsername()); | |
| 3979 | + map.put("age", DateUtil.getAge(data.getBirth())); | |
| 3980 | + map.put("nation", getBasicConfig(data.getPnationId())); | |
| 3981 | + | |
| 3982 | + map.put("professionType", getBasicConfig(data.getPprofessionTypeId())); | |
| 3983 | + map.put("workUnit", data.getPworkUnit()); | |
| 3984 | + map.put("phone", data.getPhone()); | |
| 3985 | + map.put("cardNo", data.getCardNo()); | |
| 3986 | + | |
| 3987 | + | |
| 3988 | + /* 孕妇联系方式 */ | |
| 3989 | + map.put("residence", CommonsHelper.getResidence(data.getProvinceId(), data.getCityId(), | |
| 3990 | + data.getAreaId(), data.getStreetId(), data.getAddress(), basicConfigService)); | |
| 3991 | + map.put("register", CommonsHelper.getResidence(data.getProvinceRegisterId(), data.getCityRegisterId(), | |
| 3992 | + data.getAreaRegisterId(), data.getStreetRegisterId(), data.getAddressRegister(), basicConfigService)); | |
| 3993 | + map.put("postRest", CommonsHelper.getResidence(data.getProvincePostRestId(), data.getCityPostRestId(), | |
| 3994 | + data.getAreaPostRestId(), data.getStreetPostRestId(), data.getAddressPostRest(), basicConfigService)); | |
| 3995 | + | |
| 3996 | + /* 丈夫信息 */ | |
| 3997 | + map.put("husbandName", data.getHusbandName()); | |
| 3998 | + String fage = ""; | |
| 3999 | + if (StringUtils.isNotEmpty(data.getHcertificateTypeId()) && StringUtils.isNotEmpty(data.getHcertificateNum()) && | |
| 4000 | + data.getHcertificateNum().length() == 18 && | |
| 4001 | + "70ae1d93-2964-46bc-83fa-bec9ff605b1c".equals(data.getHcertificateTypeId())) | |
| 4002 | + { | |
| 4003 | + String cardNo = data.getHcertificateNum().substring(6, 14); | |
| 4004 | + Date date = DateUtil.parseYYYYMMDD(cardNo); | |
| 4005 | + Integer age = DateUtil.getAge(date); | |
| 4006 | + fage = String.valueOf(age); | |
| 4007 | + } | |
| 4008 | + | |
| 4009 | + //丈夫年龄 | |
| 4010 | + map.put("husbandAge",fage); | |
| 4011 | + map.put("husbandNation", getBasicConfig(data.getHnationId())); | |
| 4012 | + map.put("husbandProfessionType", getBasicConfig(data.getHprofessionTypeId())); | |
| 4013 | + map.put("husbandRegister", CommonsHelper.getResidence(data.getHprovinceRegisterId(), data.getHcityRegisterId(), | |
| 4014 | + data.getHareaRegisterId(), data.getHstreetRegisterId(), data.getHaddressRegister(), | |
| 4015 | + basicConfigService)); | |
| 4016 | + map.put("husbandCardNo", data.getHcertificateNum()); | |
| 4017 | + map.put("husbandPhone", data.getHusbandPhone()); | |
| 4018 | + | |
| 4019 | + br.setData(map); | |
| 4020 | + br.setErrorcode(ErrorCodeConstants.SUCCESS); | |
| 4021 | + br.setErrormsg("成功"); | |
| 4022 | + return br; | |
| 4023 | + } | |
| 3958 | 4024 | } |