Commit 927389db854c65c8af1a41901853b5b353642f24
1 parent
b4cae9d005
Exists in
master
and in
6 other branches
bbbbbb
Showing 2 changed files with 28 additions and 2 deletions
platform-common/src/main/java/com/lyms/platform/common/enums/GongJingEnums.java
View file @
927389d
... | ... | @@ -20,6 +20,16 @@ |
20 | 20 | this.value = value; |
21 | 21 | } |
22 | 22 | |
23 | + public static String getName(String v) { | |
24 | + HengZhi[] values = HengZhi.values(); | |
25 | + for (HengZhi value : values) { | |
26 | + if(value.getValue().equals(v)) { | |
27 | + return value.getName(); | |
28 | + } | |
29 | + } | |
30 | + return "--"; | |
31 | + } | |
32 | + | |
23 | 33 | private String name; |
24 | 34 | private String value; |
25 | 35 | |
... | ... | @@ -64,6 +74,16 @@ |
64 | 74 | GongGao(String name, String value) { |
65 | 75 | this.name = name; |
66 | 76 | this.value = value; |
77 | + } | |
78 | + | |
79 | + public static String getName(String v) { | |
80 | + GongGao[] values = GongGao.values(); | |
81 | + for (GongGao value : values) { | |
82 | + if(value.getValue().equals(v)) { | |
83 | + return value.getName(); | |
84 | + } | |
85 | + } | |
86 | + return "--"; | |
67 | 87 | } |
68 | 88 | |
69 | 89 | private String name; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/ReportServiceImpl.java
View file @
927389d
... | ... | @@ -581,7 +581,10 @@ |
581 | 581 | temp.put("week", DateUtil.getWeekDesc(p.get(0).getLastMenses(), antexModel.getCheckDate())); |
582 | 582 | temp.put("weight", antexModel.getWeight()); |
583 | 583 | temp.put("bp", parseNull(JSONObject.parseObject(antexModel.getBp()).getString("ssy"), "--") + "/" + parseNull(JSONObject.parseObject(antexModel.getBp()).getString("szy"), "--")); |
584 | - temp.put("gonggao", antexModel.getGongGao()); | |
584 | + temp.put("gonggao", StringUtils.isEmpty(antexModel.getGongGao()) ? GongJingEnums.GongGao.getName(antexModel.getGongGaoSelect()) + "/" + GongJingEnums.HengZhi.getName(antexModel.getGongGaoType()) : antexModel.getGongGao()); | |
585 | + if(temp.get("gonggao").toString().equals("--/--")) { | |
586 | + temp.put("gonggao", "--"); | |
587 | + } | |
585 | 588 | temp.put("abdominalCircumference", antexModel.getAbdominalCircumference());// 腹围 |
586 | 589 | |
587 | 590 | List<Map> tireData = antexModel.getTireData(); |
... | ... | @@ -627,7 +630,10 @@ |
627 | 630 | temp.put("week", DateUtil.getWeekDesc(p.get(0).getLastMenses(), antExChuModel.getCheckTime())); |
628 | 631 | temp.put("weight", antExChuModel.getWeight()); |
629 | 632 | temp.put("bp", parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("ssy"), "--") + "/" + parseNull(JSONObject.parseObject(antExChuModel.getBp()).getString("szy"), "--")); |
630 | - temp.put("gonggao", antExChuModel.getGonggao()); | |
633 | + temp.put("gonggao", StringUtils.isEmpty(antExChuModel.getGonggao()) ? GongJingEnums.GongGao.getName(antExChuModel.getGonggaoSelect()) + "/" + GongJingEnums.HengZhi.getName(antExChuModel.getGonggaoType()) : antExChuModel.getGonggao()); | |
634 | + if(temp.get("gonggao").toString().equals("--/--")) { | |
635 | + temp.put("gonggao", "--"); | |
636 | + } | |
631 | 637 | temp.put("abdominalCircumference", antExChuModel.getFuwei());// 腹围 |
632 | 638 | |
633 | 639 | List<Map> tireData = antExChuModel.getPlacentas(); |