| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.hutool.core.util.IdcardUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | |
| | | //志愿者组织数据 |
| | | List<VolunteerOrgRelationVO> volunteerOrgRelationList = new ArrayList<>(); |
| | | List<ComMngVolunteerMngVO> volunteerData = comMngVolunteerMngDAO.selectVolunteerByCommunityId(communityId); |
| | | |
| | | if(volunteerData!=null && volunteerData.size()>0) |
| | | { |
| | | for (ComMngVolunteerMngVO ent:volunteerData) |
| | | { |
| | | if(!StringUtils.isEmpty(ent.getIdCard())) |
| | | { |
| | | try { |
| | | Integer age = IdcardUtil.getAgeByIdCard(ent.getIdCard()); |
| | | ent.setAge(age); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | log.error("身份证号码转换年龄失败,人员id:" + ent.getId()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (!volunteerData.isEmpty()) { |
| | | Map<String, List<ComMngVolunteerMngVO>> collect = volunteerData.stream().collect(Collectors.groupingBy(ComMngVolunteerMngVO::getOrgName)); |
| | | for (Map.Entry<String, List<ComMngVolunteerMngVO>> entry : collect.entrySet()) { |