Commit 88059d1089eb2e633ec317a078992a4daaac6252
1 parent
69cb5c2960
Exists in
master
and in
6 other branches
打印
Showing 3 changed files with 77 additions and 44 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
88059d1
... | ... | @@ -589,8 +589,8 @@ |
589 | 589 | @RequestMapping(value = "/findMatDeliverPrint", method = RequestMethod.GET) |
590 | 590 | @ResponseBody |
591 | 591 | @TokenRequired |
592 | - public BaseObjectResponse findMatDeliverPrint(@RequestParam(required = true) String id) { | |
593 | - return viewFacade.findMatDeliverPrint(id); | |
592 | + public BaseObjectResponse findMatDeliverPrint(@RequestParam(required = true) String id,@RequestParam(required = true) String babyId) { | |
593 | + return viewFacade.findMatDeliverPrint(id,babyId); | |
594 | 594 | } |
595 | 595 | |
596 | 596 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
View file @
88059d1
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | @Component |
38 | 38 | public class RiskReportFacade { |
39 | 39 | |
40 | - private static final Map<String,String> HighLevelMap = new HashMap(); | |
40 | + private static final Map<String,String> HighLevelMap = new LinkedHashMap<>(); | |
41 | 41 | static |
42 | 42 | { |
43 | 43 | HighLevelMap.put("绿色预警", "低风险"); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
88059d1
... | ... | @@ -2428,6 +2428,7 @@ |
2428 | 2428 | if (CollectionUtils.isNotEmpty(data.getBaby())) { |
2429 | 2429 | for (MaternalDeliverModel.Baby temp : data.getBaby()) { |
2430 | 2430 | Map<String, Object> babyMap = new HashMap<>(); |
2431 | + babyMap.put("babyId",temp.getId()); | |
2431 | 2432 | babyMap.put("dueTime", temp.getDueTime()); |
2432 | 2433 | babyMap.put("pregnancyOut", temp.getPregnancyOut() == null ? "" : RenShenJieJuEnums.getTitle(temp.getPregnancyOut())); |
2433 | 2434 | babyMap.put("deformity", temp.getDeformity() == null ? "" : temp.getDeformity() == 1 ? "是" : "否"); |
... | ... | @@ -3732,7 +3733,7 @@ |
3732 | 3733 | return RespBuilder.buildSuccess(); |
3733 | 3734 | } |
3734 | 3735 | |
3735 | - public BaseObjectResponse findMatDeliverPrint(String id) { | |
3736 | + public BaseObjectResponse findMatDeliverPrint(String id,String babyId) { | |
3736 | 3737 | BaseObjectResponse br = new BaseObjectResponse(); |
3737 | 3738 | MaternalDeliverModel data = matDeliverService.getOneMatDeliver(id); |
3738 | 3739 | if (data == null || data.getYn() == YnEnums.NO.getId()) { |
3739 | 3740 | |
3740 | 3741 | |
... | ... | @@ -3756,21 +3757,28 @@ |
3756 | 3757 | List<Map<String, Object>> babyList = new ArrayList<>(); |
3757 | 3758 | if (CollectionUtils.isNotEmpty(data.getBaby())) { |
3758 | 3759 | for (MaternalDeliverModel.Baby temp : data.getBaby()) { |
3759 | - Map<String, Object> babyMap = new HashMap<>(); | |
3760 | + if (StringUtils.isNotEmpty(babyId) && babyId.equals(temp.getId())) | |
3761 | + { | |
3762 | + //性别 | |
3763 | + map.put("babyGender", temp.getBabyGender() == null ? "" : SexEnum.getTextById( | |
3764 | + Integer.parseInt(temp.getBabyGender()))); | |
3760 | 3765 | |
3761 | - //性别 | |
3762 | - babyMap.put("babyGender", temp.getBabyGender() == null ? "" : SexEnum.getTextById( | |
3763 | - Integer.parseInt(temp.getBabyGender()))); | |
3764 | - //分娩时间 | |
3765 | - babyMap.put("dueTime", temp.getDueTime()); | |
3766 | - //体重 | |
3767 | - babyMap.put("babyWeight", UnitUtils.unitSplice(temp.getBabyWeight(), UnitConstants.G)); | |
3768 | - //身高 | |
3769 | - babyMap.put("babyHeight", UnitUtils.unitSplice(temp.getBabyHeight(), UnitConstants.CM)); | |
3770 | - //健康状态 | |
3771 | - babyMap.put("babyHealthy", temp.getBabyHealthy()); | |
3766 | + Date dueTime = DateUtil.parseYMDHM(temp.getDueTime()); | |
3767 | + String time = DateUtil.getymdhm(dueTime); | |
3772 | 3768 | |
3773 | - babyList.add(babyMap); | |
3769 | + //分娩时间 | |
3770 | + map.put("dueTimeYear", time.substring(0,4)); | |
3771 | + map.put("dueTimeMonth", time.substring(5, 6)); | |
3772 | + map.put("dueTimeDay", time.substring(7, 8)); | |
3773 | + map.put("dueTimeHour", time.substring(9, 10)); | |
3774 | + map.put("dueTimeMinute",time.substring(11, 12)); | |
3775 | + //体重 | |
3776 | + map.put("babyWeight", temp.getBabyWeight() == null? "" : UnitUtils.unitSplice(temp.getBabyWeight(), UnitConstants.G)); | |
3777 | + //身高 | |
3778 | + map.put("babyHeight", temp.getBabyHeight() == null ? "" : UnitUtils.unitSplice(temp.getBabyHeight(), UnitConstants.CM)); | |
3779 | + //健康状态 | |
3780 | + map.put("babyHealthy", temp.getBabyHealthy()); | |
3781 | + } | |
3774 | 3782 | } |
3775 | 3783 | } |
3776 | 3784 | |
... | ... | @@ -3779,7 +3787,6 @@ |
3779 | 3787 | antExChuQuery.setParentId(patients.getId()); |
3780 | 3788 | List<AntExChuModel> list = antenatalExaminationService.queryAntExChu(antExChuQuery); |
3781 | 3789 | |
3782 | - | |
3783 | 3790 | String tc = ""; |
3784 | 3791 | String cc = ""; |
3785 | 3792 | if (CollectionUtils.isNotEmpty(list)) |
3786 | 3793 | |
3787 | 3794 | |
3788 | 3795 | |
3789 | 3796 | |
... | ... | @@ -3793,15 +3800,31 @@ |
3793 | 3800 | |
3794 | 3801 | map.put("baby", babyList); |
3795 | 3802 | //胎次 |
3796 | - map.put("tc", ""); | |
3803 | + map.put("tc", tc); | |
3797 | 3804 | //产次 |
3798 | - map.put("cc", ""); | |
3805 | + map.put("cc", cc); | |
3799 | 3806 | |
3800 | 3807 | //双胎 |
3801 | - map.put("isShuangTai", ""); | |
3808 | + map.put("tireNumber",data.getTireNumber()); | |
3802 | 3809 | |
3810 | + String deliveryMode = "2"; //为2的时候剖宫产,其他的不选 | |
3811 | + if (StringUtils.isNotEmpty(data.getDeliveryMode())) { | |
3812 | + Map m = JsonUtil.str2Obj(data.getDeliveryMode(), Map.class); | |
3813 | + String fmfs = null; | |
3814 | + if (m != null) { | |
3815 | + Object b = m.get("fmfs"); | |
3816 | + if (b != null) { | |
3817 | + fmfs = b.toString(); | |
3818 | + if (fmfs != null) { | |
3819 | + if (fmfs.equals("2")) { | |
3820 | + | |
3821 | + } | |
3822 | + } | |
3823 | + } | |
3824 | + } | |
3825 | + } | |
3803 | 3826 | //生产状况 |
3804 | - map.put("scStatus", ""); | |
3827 | + map.put("deliveryStatus", deliveryMode); | |
3805 | 3828 | |
3806 | 3829 | //接生方法 |
3807 | 3830 | map.put("jsff", ""); |
3808 | 3831 | |
3809 | 3832 | |
3810 | 3833 | |
3811 | 3834 | |
3812 | 3835 | |
3813 | 3836 | |
3814 | 3837 | |
3815 | 3838 | |
3816 | 3839 | |
3817 | 3840 | |
3818 | 3841 | |
3819 | 3842 | |
3820 | 3843 | |
3821 | 3844 | |
... | ... | @@ -3811,51 +3834,57 @@ |
3811 | 3834 | |
3812 | 3835 | |
3813 | 3836 | //母亲姓名 |
3814 | - map.put("username", patients.getUsername()); | |
3837 | + map.put("motherName", patients.getUsername()); | |
3838 | + | |
3815 | 3839 | //母亲年龄 |
3816 | - map.put("age", UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()), UnitConstants.SUI)); | |
3840 | + map.put("motheAge", UnitUtils.unitSplice(DateUtil.getAge(patients.getBirth()), UnitConstants.SUI)); | |
3841 | + | |
3842 | +// String addressRegister = CommonsHelper.getResidence(patients.getProvinceRegisterId(), patients.getCityRegisterId(), | |
3843 | +// patients.getAreaRegisterId(), patients.getStreetRegisterId(), patients.getAddressRegister(), basicConfigService); | |
3844 | + String liveAddress = CommonsHelper.getResidence(patients.getProvinceId(), patients.getCityId(), | |
3845 | + patients.getAreaId(), patients.getStreetId(), patients.getAddress(), basicConfigService); | |
3817 | 3846 | //母亲地址 |
3818 | - map.put("motherAddr", ""); | |
3847 | + map.put("motherAddr", liveAddress); | |
3819 | 3848 | |
3820 | 3849 | //父亲姓名 |
3821 | - map.put("fatherName",patients.getHusbandName()); | |
3850 | + map.put("fatherName",patients.getHusbandName() == null ? "" : patients.getHusbandName()); | |
3822 | 3851 | //父亲年龄 |
3823 | - map.put("fatherAge", UnitUtils.unitSplice(DateUtil.getAge(patients.getHusbandBirth()), UnitConstants.SUI)); | |
3852 | + map.put("fatherAge",patients.getHusbandBirth() == null ? "" : UnitUtils.unitSplice(DateUtil.getAge(patients.getHusbandBirth()), UnitConstants.SUI)); | |
3824 | 3853 | //父亲工作单位 |
3825 | - map.put("fatherWorkUnit", patients.getHworkUnit()); | |
3854 | + map.put("fatherWorkUnit", patients.getHworkUnit() == null ? "" : patients.getHworkUnit()); | |
3826 | 3855 | |
3827 | - | |
3828 | - //出生地点(县) | |
3829 | - map.put("csAddress", ""); | |
3830 | - | |
3831 | - | |
3832 | 3856 | String fmHospital = ""; |
3857 | + String cityId = null; | |
3833 | 3858 | if (StringUtils.isNotEmpty(data.getFmHospital())) { |
3834 | 3859 | if (com.lyms.platform.common.utils.StringUtils.isNum(data.getFmHospital())) { |
3835 | 3860 | Organization organization = organizationService.getOrganization(Integer.parseInt(data.getFmHospital())); |
3836 | 3861 | if (organization != null && organization.getYn() == YnEnums.YES.getId()) { |
3837 | 3862 | fmHospital = organization.getName(); |
3863 | + cityId = organization.getAreaId(); | |
3838 | 3864 | } |
3839 | 3865 | } else { |
3840 | 3866 | fmHospital = data.getFmHospital(); |
3841 | 3867 | } |
3842 | - | |
3843 | 3868 | } |
3869 | + | |
3870 | + //出生地点(县) | |
3871 | + map.put("bornAddress", CommonsHelper.getName1(cityId,basicConfigService)); | |
3872 | + | |
3844 | 3873 | //分娩医院 |
3845 | 3874 | map.put("fmHospital", fmHospital); |
3846 | 3875 | |
3847 | - //新生儿缺陷 | |
3848 | - map.put("xseqx", ""); | |
3876 | +// //新生儿缺陷 | |
3877 | +// map.put("xseqx", ""); | |
3878 | +// | |
3879 | +// //诊断 | |
3880 | +// map.put("zhenDuan", ""); | |
3849 | 3881 | |
3850 | - //诊断 | |
3851 | - map.put("zhenDuan", ""); | |
3852 | 3882 | |
3853 | - | |
3854 | 3883 | //母亲身份证号码 |
3855 | 3884 | map.put("motherCardNo", patients.getCardNo()); |
3856 | 3885 | |
3857 | 3886 | //父亲身份证号码 |
3858 | - map.put("motherCardNo", patients.getHcertificateNum()); | |
3887 | + map.put("fatherCardNo", patients.getHcertificateNum() == null ? "" : patients.getHcertificateNum()); | |
3859 | 3888 | |
3860 | 3889 | String deliverDoctor = ""; |
3861 | 3890 | |
3862 | 3891 | |
3863 | 3892 | |
3864 | 3893 | |
3865 | 3894 | |
... | ... | @@ -3873,17 +3902,21 @@ |
3873 | 3902 | //接生者 |
3874 | 3903 | map.put("deliverDoctor", deliverDoctor); |
3875 | 3904 | |
3905 | + | |
3906 | + String qfDate = DateUtil.getYmd(new Date()); | |
3876 | 3907 | //签发日期 |
3877 | - map.put("qfDate", DateUtil.getyyyy_MM_dd(new Date())); | |
3908 | + map.put("signDateYear", qfDate.substring(0,4)); | |
3909 | + map.put("signDateMonth", qfDate.substring(5,6)); | |
3910 | + map.put("signDateDay", qfDate.substring(7,8)); | |
3878 | 3911 | |
3879 | 3912 | //母亲国籍 |
3880 | - map.put("motherGj", ""); | |
3913 | + map.put("motherCountry", getBasicConfig(patients.getPcountryId())); | |
3881 | 3914 | |
3882 | 3915 | //母亲民族 |
3883 | - map.put("motherMz", ""); | |
3916 | + map.put("motherNation", getBasicConfig(patients.getPnationId())); | |
3884 | 3917 | |
3885 | 3918 | //家庭住址 |
3886 | - map.put("homeAddress", ""); | |
3919 | + map.put("homeAddress", liveAddress); | |
3887 | 3920 | |
3888 | 3921 | br.setErrorcode(ErrorCodeConstants.SUCCESS); |
3889 | 3922 | br.setErrormsg("成功"); |