From 80391d5fe299515c27deee6572042ea64acb7e05 Mon Sep 17 00:00:00 2001 From: yangfei Date: Sat, 22 Jul 2017 11:16:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=8A=E5=9F=8E=E5=A6=87=E5=B9=BC=E4=BA=A7?= =?UTF-8?q?=E6=A3=80=E5=A2=9E=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platform/operate/web/facade/ViewFacade.java | 41 ++++++++++++++++------ 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java index bca996d..f2418e6 100644 --- a/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java +++ b/platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ViewFacade.java @@ -1377,16 +1377,37 @@ public class ViewFacade { if (CollectionUtils.isNotEmpty(data.getAntExcAddOthers())) { List antExcAddOthers = data.getAntExcAddOthers(); if (CollectionUtils.isNotEmpty(antExcAddOthers)) { - for (AntExcAddOther obj : antExcAddOthers) { - Map otherMap = new HashMap<>(); - otherMap.put("gestaMonth", obj.getGestaMonth()); - otherMap.put("gestaDate", obj.getGestaDate()); - otherMap.put("fmType", obj.getFmType()); - otherMap.put("fmTypeRemark", obj.getFmTypeRemark()); - otherMap.put("fitness", obj.getFitness()); - otherMap.put("fitnessRemark", obj.getFitnessRemark()); - otherMap.put("newborWeight", obj.getNewborWeight()); - antExcAddOthersList.add(otherMap); + for (Object obj : antExcAddOthers) { + if ("java.util.LinkedHashMap".equals(obj.getClass().getName())) { + Map otherMap = (Map) obj; + if (MapUtils.isNotEmpty(otherMap)) { + Map mapData = new HashMap<>(); + + if (otherMap.containsKey("gestaMonth")) { + String gestaMonth = GestaMonthEnums.getTitle(Integer.parseInt(otherMap.get("gestaMonth").toString())); + mapData.put("gestaMonth", gestaMonth); + } + if (otherMap.get("gestaDate") != null) { + mapData.put("gestaDate", otherMap.get("gestaDate")); + } + if (otherMap.containsKey("fmType")) { + String fmType = CZFmTypeEnums.getTitle(Integer.parseInt(otherMap.get("fmType").toString())); + mapData.put("fmType", fmType); + } + mapData.put("fmTypeRemark", otherMap.get("fmTypeRemark")); + if (otherMap.containsKey("fitness")) { + String fitness = FitnessEnums.getTitle(Integer.parseInt(otherMap.get("fitness").toString())); + mapData.put("fitness", fitness); + } + if (otherMap.get("fitnessRemark") != null) { + mapData.put("fitnessRemark", otherMap.get("fitnessRemark")); + } + if (otherMap.get("newborWeight") != null) { + mapData.put("newborWeight", otherMap.get("newborWeight")); + } + antExcAddOthersList.add(map); + } + } } } } -- 1.8.3.1