Commit 27d06256cba3aae2b12ac7533da98faa9b635f4e
Exists in
master
and in
6 other branches
Merge remote-tracking branch 'origin/master'
Showing 4 changed files
- platform-operate-api/src/main/java/com/lyms/hospitalapi/whfy/VirtualCallService.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/RiskReportFacade.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
platform-operate-api/src/main/java/com/lyms/hospitalapi/whfy/VirtualCallService.java
View file @
27d0625
| ... | ... | @@ -51,8 +51,17 @@ |
| 51 | 51 | |
| 52 | 52 | String doctorAccount = user.getAccount(); |
| 53 | 53 | String doctorName = user.getName(); |
| 54 | +// | |
| 55 | +// Enumeration<String> e = request.getHeaderNames(); | |
| 56 | +// while(e.hasMoreElements()){ | |
| 57 | +// String headerName = e.nextElement(); | |
| 58 | +// Enumeration<String> headerValues = request.getHeaders(headerName); | |
| 59 | +// while(headerValues.hasMoreElements()){ | |
| 60 | +// System.out.println(headerName+":"+headerValues.nextElement()); | |
| 61 | +// } | |
| 62 | +// } | |
| 54 | 63 | |
| 55 | - String ip = request.getRemoteAddr(); | |
| 64 | + String ip = request.getHeader("x-real-ip"); | |
| 56 | 65 | String mac = getMACAddress(ip); |
| 57 | 66 | |
| 58 | 67 | System.out.println("time="+ DateUtil.getyyyy_MM_dd_hms(new Date())+";code="+code+";deptName="+deptName+";doctorAccount="+doctorAccount+";doctorName="+doctorName |
| ... | ... | @@ -73,6 +82,17 @@ |
| 73 | 82 | // cs.setString(6, doctorName); |
| 74 | 83 | // cs.setString(7, mac); |
| 75 | 84 | // ResultSet rs = cs.executeQuery(); |
| 85 | +// | |
| 86 | +// int count = rs.getMetaData().getColumnCount(); | |
| 87 | +// while (rs.next()) { | |
| 88 | +// for (int i = 1; i <= count; i++) | |
| 89 | +// { | |
| 90 | +// String columnName = rs.getMetaData().getColumnName(i); | |
| 91 | +// Object obj = rs.getObject(columnName); | |
| 92 | +// System.out.println("columName=" + columnName+ ";value="+obj); | |
| 93 | +// } | |
| 94 | +// } | |
| 95 | +// | |
| 76 | 96 | // } |
| 77 | 97 | // catch (SQLException e) |
| 78 | 98 | // { |
| ... | ... | @@ -93,7 +113,7 @@ |
| 93 | 113 | public BaseResponse callLoginOut(HttpServletRequest request, Integer userId) { |
| 94 | 114 | |
| 95 | 115 | BaseResponse result = new BaseResponse(); |
| 96 | - String ip = request.getRemoteAddr(); | |
| 116 | + String ip = request.getHeader("X-Real-IP"); | |
| 97 | 117 | System.out.println("time="+ DateUtil.getyyyy_MM_dd_hms(new Date())+";ip="+ip); |
| 98 | 118 | |
| 99 | 119 | // Connection conn = null; |
| 100 | 120 | |
| ... | ... | @@ -381,19 +401,18 @@ |
| 381 | 401 | return macAddress; |
| 382 | 402 | } |
| 383 | 403 | |
| 384 | - //获取非本地IP的MAC地址 | |
| 385 | - Process p = Runtime.getRuntime().exec("nbtstat -A " + ip); | |
| 386 | - InputStreamReader isr = new InputStreamReader(p.getInputStream()); | |
| 387 | - BufferedReader br = new BufferedReader(isr); | |
| 388 | - while ((line = br.readLine()) != null) { | |
| 389 | - if (line != null) { | |
| 390 | - int index = line.indexOf(MAC_ADDRESS_PREFIX); | |
| 391 | - if (index != -1) { | |
| 392 | - macAddress = line.substring(index + MAC_ADDRESS_PREFIX.length()).trim().toUpperCase(); | |
| 393 | - } | |
| 394 | - } | |
| 404 | + Process process = Runtime.getRuntime().exec("arp "+ip); | |
| 405 | + InputStreamReader ir = new InputStreamReader(process.getInputStream()); | |
| 406 | + LineNumberReader input = new LineNumberReader(ir); | |
| 407 | + StringBuffer s = new StringBuffer(); | |
| 408 | + while ((line = input.readLine()) != null) { | |
| 409 | + s.append(line); | |
| 395 | 410 | } |
| 396 | - br.close(); | |
| 411 | + macAddress = s.toString(); | |
| 412 | + System.out.println(macAddress); | |
| 413 | + if (macAddress != null) { | |
| 414 | + macAddress = macAddress.substring(macAddress.indexOf(":") - 2, macAddress.lastIndexOf(":") + 3); | |
| 415 | + } | |
| 397 | 416 | } catch (IOException e) { |
| 398 | 417 | e.printStackTrace(System.out); |
| 399 | 418 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ViewController.java
View file @
27d0625
| ... | ... | @@ -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 @
27d0625
| ... | ... | @@ -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("绿色预警", "低风险"); |
| ... | ... | @@ -494,7 +494,7 @@ |
| 494 | 494 | int total = 0; |
| 495 | 495 | for (List<String> items : result) |
| 496 | 496 | { |
| 497 | - if (items.contains(level.getName())) | |
| 497 | + if (items.contains(HighLevelMap.get(level.getName()))) | |
| 498 | 498 | { |
| 499 | 499 | total+=Integer.valueOf(items.get(i)); |
| 500 | 500 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java
View file @
27d0625
| ... | ... | @@ -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("成功"); |