| | |
| | | map.put("name", ""); |
| | | map.put("sectons", null); |
| | | if (list.size() > 0) { |
| | | Area areaName = iAreaService.getById(list.get(0).getAreaId()); |
| | | List<String> temp = new ArrayList<>(); |
| | | List<String> tempIds = new ArrayList<>(); |
| | | List<AreaSection> areaSections = new ArrayList<>(); |
| | | for(int i=0;i<list.size();i++){ |
| | | if(!temp.contains(list.get(i).getAreaSectionId())){ |
| | | if(!tempIds.contains(list.get(i).getAreaSectionId())){ |
| | | tempIds.add(list.get(i).getAreaSectionId()); |
| | | AreaSection a = iAreaSectionService.getById(list.get(i).getAreaSectionId()); |
| | | temp.add(a.getName()); |
| | | areaSections.add(a); |
| | | } |
| | | } |
| | | map.put("name", areaName + StringUtils.join(temp,"-")); |
| | | map.put("name", area.getName() + StringUtils.join(temp,"-")); |
| | | map.put("sectons",areaSections); |
| | | temp.clear(); |
| | | areaSections.clear(); |
| | | tempIds.clear(); |
| | | //areaSections.clear(); |
| | | list.clear(); |
| | | } |
| | | return new ResultUtil<Object>().setData(map); |