Commit f407a3a230b3af43db4a9362858f847a0bb8b9e0
1 parent
7e6584b669
Exists in
master
and in
6 other branches
bbbbbb
Showing 2 changed files with 28 additions and 14 deletions
platform-common/src/main/java/com/lyms/platform/common/enums/FetalPositionEnums.java
View file @
f407a3a
| ... | ... | @@ -45,6 +45,17 @@ |
| 45 | 45 | return null; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | + public static String getTitle2(String id){ | |
| 49 | + if (StringUtils.isNotEmpty(id)){ | |
| 50 | + for (FetalPositionEnums fetalPositionEnums:FetalPositionEnums.values()){ | |
| 51 | + if (fetalPositionEnums.getId().equals(id)){ | |
| 52 | + return fetalPositionEnums.getName(); | |
| 53 | + } | |
| 54 | + } | |
| 55 | + } | |
| 56 | + return "--"; | |
| 57 | + } | |
| 58 | + | |
| 48 | 59 | |
| 49 | 60 | private FetalPositionEnums(String name,String id){ |
| 50 | 61 | this.name=name; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
f407a3a
| ... | ... | @@ -4,10 +4,7 @@ |
| 4 | 4 | import com.alibaba.fastjson.JSONObject; |
| 5 | 5 | import com.lyms.hospitalapi.pojo.ReportModel; |
| 6 | 6 | import com.lyms.platform.biz.service.CommonService; |
| 7 | -import com.lyms.platform.common.enums.CouponEnums; | |
| 8 | -import com.lyms.platform.common.enums.FetalEnums; | |
| 9 | -import com.lyms.platform.common.enums.FuZhongEnums; | |
| 10 | -import com.lyms.platform.common.enums.YnEnums; | |
| 7 | +import com.lyms.platform.common.enums.*; | |
| 11 | 8 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 12 | 9 | import com.lyms.platform.common.result.PageResult; |
| 13 | 10 | import com.lyms.platform.common.result.RespBuilder; |
| ... | ... | @@ -609,8 +606,8 @@ |
| 609 | 606 | if(p == null) { |
| 610 | 607 | return RespBuilder.buildSuccess(); |
| 611 | 608 | } |
| 612 | - AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("parentId").is(p.getId()).and("yn").is(1).and("checkTime").gte(p.getLastMenses())).with(new Sort(Sort.Direction.DESC, "checkTime")), AntExChuModel.class); | |
| 613 | - List<AntenatalExaminationModel> antexModels = mongoTemplate.find(Query.query(Criteria.where("parentId").is(p.getId()).and("yn").is(1).and("checkDate").gte(p.getLastMenses())).with(new Sort(Sort.Direction.DESC, "checkDate")), AntenatalExaminationModel.class); | |
| 609 | + AntExChuModel antExChuModel = mongoTemplate.findOne(Query.query(Criteria.where("pid").is(p.getPid()).and("yn").is(1).and("checkTime").gte(p.getLastMenses())).with(new Sort(Sort.Direction.DESC, "checkTime")), AntExChuModel.class); | |
| 610 | + List<AntenatalExaminationModel> antexModels = mongoTemplate.find(Query.query(Criteria.where("pid").is(p.getPid()).and("yn").is(1).and("checkDate").gte(p.getLastMenses())).with(new Sort(Sort.Direction.DESC, "checkDate")), AntenatalExaminationModel.class); | |
| 614 | 611 | |
| 615 | 612 | Map<String, Object> xyMap = new HashMap<>(); |
| 616 | 613 | List<Integer> szyMin = new ArrayList<>(); |
| ... | ... | @@ -652,9 +649,9 @@ |
| 652 | 649 | String fetalPresentation = ""; // 先露 |
| 653 | 650 | if(CollectionUtils.isNotEmpty(tireData)) { |
| 654 | 651 | for (Map tireDatum : tireData) { |
| 655 | - fetalPosition = !tireDatum.containsKey("fetalPosition") ? "--" : fetalPosition.length() > 0 ? fetalPosition + "/" + tireDatum.get("fetalPosition") : tireDatum.get("fetalPosition") + ""; | |
| 656 | - heartRate = !tireDatum.containsKey("heartRate") ? "--" : heartRate.length() > 0 ? heartRate + "/" + tireDatum.get("heartRate") : tireDatum.get("heartRate") + ""; | |
| 657 | - fetalPresentation = !tireDatum.containsKey("fetalPosition") ? "--" : fetalPresentation.length() > 0 ? fetalPresentation + "/" + FetalEnums.getTitle2((String) tireDatum.get("fetalPosition")) : FetalEnums.getTitle2((String) tireDatum.get("fetalPosition")); | |
| 652 | + fetalPosition = !tireDatum.containsKey("fetalPosition") ? "--" : fetalPosition.length() > 0 ? fetalPosition + "/" + FetalPositionEnums.getTitle2((String) tireDatum.get("fetalPosition")) : FetalPositionEnums.getTitle2((String) tireDatum.get("fetalPosition")); | |
| 653 | + heartRate = !tireDatum.containsKey("heartRate") ? "--" : heartRate.length() > 0 ? heartRate + "/" + tireDatum.get("heartRate").toString().replaceAll("\\.0", "") : tireDatum.get("heartRate").toString().replaceAll("\\.0", ""); | |
| 654 | + fetalPresentation = !tireDatum.containsKey("fetalPresentation") ? "--" : fetalPresentation.length() > 0 ? fetalPresentation + "/" + FetalEnums.getTitle2((String) tireDatum.get("fetalPresentation")) : FetalEnums.getTitle2((String) tireDatum.get("fetalPresentation")); | |
| 658 | 655 | } |
| 659 | 656 | } else { |
| 660 | 657 | fetalPosition = "--"; |
| ... | ... | @@ -693,11 +690,17 @@ |
| 693 | 690 | String heartRate = ""; |
| 694 | 691 | String fetalPresentation = ""; |
| 695 | 692 | if(CollectionUtils.isNotEmpty(tireData)) { |
| 696 | - for (Map tireDatum : tireData) { | |
| 697 | - fetalPosition = !tireDatum.containsKey("fetalPosition") ? "--" : fetalPosition.length() > 0 ? fetalPosition + "/" + tireDatum.get("fetalPosition") : tireDatum.get("fetalPosition") + ""; | |
| 698 | - heartRate = !tireDatum.containsKey("heartRate") ? "--" : heartRate.length() > 0 ? heartRate + "/" + tireDatum.get("heartRate") : tireDatum.get("heartRate") + ""; | |
| 699 | - fetalPresentation = !tireDatum.containsKey("fetalPosition") ? "--" : fetalPresentation.length() > 0 ? fetalPresentation + "/" + FetalEnums.getTitle2((String) tireDatum.get("fetalPosition")) : FetalEnums.getTitle2((String) tireDatum.get("fetalPosition")); | |
| 700 | - } | |
| 693 | + try { // 有些数据前端传的有问题 存的class | |
| 694 | + for (Map tireDatum : tireData) { | |
| 695 | + fetalPosition = !tireDatum.containsKey("fetalPosition") ? "--" : fetalPosition.length() > 0 ? fetalPosition + "/" + FetalPositionEnums.getTitle2((String) tireDatum.get("fetalPosition")) : FetalPositionEnums.getTitle2((String) tireDatum.get("fetalPosition")); | |
| 696 | + heartRate = !tireDatum.containsKey("heartRate") ? "--" : heartRate.length() > 0 ? heartRate + "/" + tireDatum.get("heartRate").toString().replaceAll("\\.0", "") : tireDatum.get("heartRate").toString().replaceAll("\\.0", ""); | |
| 697 | + fetalPresentation = !tireDatum.containsKey("fetalPresentation") ? "--" : fetalPresentation.length() > 0 ? fetalPresentation + "/" + FetalEnums.getTitle2((String) tireDatum.get("fetalPresentation")) : FetalEnums.getTitle2((String) tireDatum.get("fetalPresentation")); | |
| 698 | + } | |
| 699 | + } catch (Exception e) { | |
| 700 | + fetalPosition = "--"; | |
| 701 | + heartRate = "--"; | |
| 702 | + fetalPresentation = "--"; | |
| 703 | + } | |
| 701 | 704 | } else { |
| 702 | 705 | fetalPosition = "--"; |
| 703 | 706 | heartRate = "--"; |