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); + } + } } } }