Commit b12dceae3f23dd9ffcee723c0dab6d11bf5dceb0
1 parent
2cfa16776d
Exists in
master
and in
6 other branches
bbbbbb
Showing 1 changed file with 40 additions and 31 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
b12dcea
... | ... | @@ -647,23 +647,26 @@ |
647 | 647 | String fetalPosition = ""; // 胎位 |
648 | 648 | String heartRate = ""; // 胎心 |
649 | 649 | String fetalPresentation = ""; // 先露 |
650 | + StringBuffer fetalPosition2 = new StringBuffer(); // 胎位 | |
651 | + StringBuffer heartRate2 = new StringBuffer(); // 胎心 | |
652 | + StringBuffer fetalPresentation2 = new StringBuffer(); // 先露 | |
650 | 653 | if(CollectionUtils.isNotEmpty(tireData)) { |
651 | 654 | for (Map tireDatum : tireData) { |
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"));*/ | |
655 | - fetalPosition += fetalPosition.length() > 0 ? "/" : "" + (tireDatum.containsKey("fetalPosition") ? FetalPositionEnums.getTitle2((String) tireDatum.get("fetalPosition")) : "--"); | |
656 | - heartRate += heartRate.length() > 0 ? "/" : "" + (tireDatum.containsKey("heartRate") ? tireDatum.get("heartRate").toString().replaceAll("\\.0", "") : "--"); | |
657 | - fetalPresentation += fetalPresentation.length() > 0 ? "/" : "" + (tireDatum.containsKey("heartRate") ? FetalEnums.getTitle2((String) tireDatum.get("fetalPresentation")) : "--"); | |
655 | + if(fetalPosition2.length() > 0) fetalPosition2.append("/"); | |
656 | + if(heartRate2.length() > 0) heartRate2.append("/"); | |
657 | + if(fetalPresentation2.length() > 0) fetalPresentation2.append("/"); | |
658 | + fetalPosition2.append(tireDatum.containsKey("fetalPosition") ? FetalPositionEnums.getTitle2((String) tireDatum.get("fetalPosition")) : "--"); | |
659 | + heartRate2.append(tireDatum.containsKey("heartRate") ? tireDatum.get("heartRate").toString().replaceAll("\\.0", "") : "--"); | |
660 | + fetalPresentation2.append(tireDatum.containsKey("fetalPresentation") ? FetalEnums.getTitle2((String) tireDatum.get("fetalPresentation")) : "--"); | |
658 | 661 | } |
659 | 662 | } else { |
660 | - fetalPosition = "--"; | |
661 | - heartRate = "--"; | |
662 | - fetalPresentation = "--"; | |
663 | + fetalPosition2.append("--"); | |
664 | + heartRate2.append("--"); | |
665 | + fetalPresentation2.append("--"); | |
663 | 666 | } |
664 | - temp.put("fetalPosition", fetalPosition); // 胎位 | |
665 | - temp.put("heartRate", heartRate); // 胎心 | |
666 | - temp.put("fetalPresentation", fetalPresentation); // 先露 | |
667 | + temp.put("fetalPosition", fetalPosition2.toString()); // 胎位 | |
668 | + temp.put("heartRate", heartRate2.toString()); // 胎心 | |
669 | + temp.put("fetalPresentation", fetalPresentation2.toString()); // 先露 | |
667 | 670 | temp.put("edema",FuZhongEnums.getName(antexModel.getEdema())); // 水肿 |
668 | 671 | temp.put("urineProtein", antexModel.getUrineProtein()); // 尿蛋白 |
669 | 672 | temp.put("hemoglobin", antexModel.getHemoglobin()); // 血红素 |
670 | 673 | |
... | ... | @@ -692,27 +695,33 @@ |
692 | 695 | String fetalPosition = ""; |
693 | 696 | String heartRate = ""; |
694 | 697 | String fetalPresentation = ""; |
695 | - if(CollectionUtils.isNotEmpty(tireData)) { | |
696 | - try { // 有些数据前端传的有问题 存的class | |
697 | - for (Map tireDatum : tireData) { | |
698 | - fetalPosition += fetalPosition.length() > 0 ? "/" : "" + (tireDatum.containsKey("fetalPosition") ? FetalPositionEnums.getTitle2((String) tireDatum.get("fetalPosition")) : "--"); | |
699 | - heartRate += heartRate.length() > 0 ? "/" : "" + (tireDatum.containsKey("heartRate") ? tireDatum.get("heartRate").toString().replaceAll("\\.0", "") : "--"); | |
700 | - fetalPresentation += fetalPresentation.length() > 0 ? "/" : "" + (tireDatum.containsKey("heartRate") ? FetalEnums.getTitle2((String) tireDatum.get("fetalPresentation")) : "--"); | |
701 | - } | |
702 | - } catch (Exception e) { | |
703 | - fetalPosition = "--"; | |
704 | - heartRate = "--"; | |
705 | - fetalPresentation = "--"; | |
706 | - } | |
707 | - } else { | |
708 | - fetalPosition = "--"; | |
709 | - heartRate = "--"; | |
710 | - fetalPresentation = "--"; | |
698 | + StringBuffer fetalPosition2 = new StringBuffer(); // 胎位 | |
699 | + StringBuffer heartRate2 = new StringBuffer(); // 胎心 | |
700 | + StringBuffer fetalPresentation2 = new StringBuffer(); // 先露 | |
701 | + try { // 有些数据前端传的有问题 存的class | |
702 | + if(CollectionUtils.isNotEmpty(tireData)) { | |
703 | + for (Map tireDatum : tireData) { | |
704 | + if(fetalPosition2.length() > 0) fetalPosition2.append("/"); | |
705 | + if(heartRate2.length() > 0) heartRate2.append("/"); | |
706 | + if(fetalPresentation2.length() > 0) fetalPresentation2.append("/"); | |
707 | + fetalPosition2.append(tireDatum.containsKey("fetalPosition") ? FetalPositionEnums.getTitle2((String) tireDatum.get("fetalPosition")) : "--"); | |
708 | + heartRate2.append(tireDatum.containsKey("heartRate") ? tireDatum.get("heartRate").toString().replaceAll("\\.0", "") : "--"); | |
709 | + fetalPresentation2.append(tireDatum.containsKey("fetalPresentation") ? FetalEnums.getTitle2((String) tireDatum.get("fetalPresentation")) : "--"); | |
710 | + } | |
711 | + } else { | |
712 | + fetalPosition2.append("--"); | |
713 | + heartRate2.append("--"); | |
714 | + fetalPresentation2.append("--"); | |
715 | + } | |
716 | + } catch (Exception e) { | |
717 | + fetalPosition2.append("--"); | |
718 | + heartRate2.append("--"); | |
719 | + fetalPresentation2.append("--"); | |
711 | 720 | } |
712 | 721 | |
713 | - temp.put("fetalPosition", fetalPosition); // 胎位 | |
714 | - temp.put("heartRate", heartRate); // 胎心 | |
715 | - temp.put("fetalPresentation", fetalPresentation); // 先露 | |
722 | + temp.put("fetalPosition", fetalPosition2.toString()); // 胎位 | |
723 | + temp.put("heartRate", heartRate2.toString()); // 胎心 | |
724 | + temp.put("fetalPresentation", fetalPresentation2.toString()); // 先露 | |
716 | 725 | temp.put("edema",FuZhongEnums.getName(antExChuModel.getEdema())); // 水肿 |
717 | 726 | temp.put("urineProtein", antExChuModel.getNdb()); // 尿蛋白 |
718 | 727 | temp.put("hemoglobin", antExChuModel.getXhdb()); // 血红素 |