Commit e3a241572309e54f49a6936b5a9bb00026ff5b70

Authored by wtt
1 parent 6fa4f9cea3

update

Showing 1 changed file with 9 additions and 6 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/PatientFacade.java View file @ e3a2415
... ... @@ -1110,13 +1110,16 @@
1110 1110 m.put("bmi", map.get("bmi"));
1111 1111 m.put("beforeHeight", map.get("beforeHeight"));
1112 1112 m.put("beforeWeight", map.get("beforeWeight"));
1113   - Map <String, String> dayWeights = (Map <String, String>) map.get("dayWeights");
1114 1113 List <String> stringList = new ArrayList <>();
1115   - for (Map.Entry <String, String> entry : dayWeights.entrySet()) {
1116   - if (StringUtils.isNotEmpty(entry.getKey()) && StringUtils.isNotEmpty(entry.getValue())) {
1117   - String mapKey = entry.getKey();
1118   - String mapValue = entry.getValue();
1119   - stringList.add(mapKey + " / " + mapValue);
  1114 +
  1115 + if(map.containsKey("dayWeights") && map.get("dayWeights") != null){
  1116 + Map <String, String> dayWeights = (Map <String, String>) map.get("dayWeights");
  1117 + for (Map.Entry <String, String> entry : dayWeights.entrySet()) {
  1118 + if (StringUtils.isNotEmpty(entry.getKey()) && StringUtils.isNotEmpty(entry.getValue())) {
  1119 + String mapKey = entry.getKey();
  1120 + String mapValue = entry.getValue();
  1121 + stringList.add(mapKey + " / " + mapValue);
  1122 + }
1120 1123 }
1121 1124 }
1122 1125 for (int i = 0; i <= 20; i++) {