lidongdong
2024-11-12 3ee62e76c51a78e0cd1854c8b35c6b02e6f7369a
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/BigScreenStatisticsServiceImpl.java
@@ -1,5 +1,6 @@
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;
@@ -1100,6 +1101,25 @@
        //志愿者组织数据
        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()) {