diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java index e383f91664..2d5e776c8f 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java @@ -16,6 +16,8 @@ import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient; import com.epmet.service.VolunteerService; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -96,7 +98,7 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve // 1.分页查询出所有志愿者列表 int pageNo = 1; - int pageSize = 100; + int pageSize = 200; // 志愿者epmet user id List volunteerEpmetUserIds = new ArrayList<>(); @@ -142,11 +144,17 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve for (VolunteerDistributionResultDTO.Distribution icResiInfo : icResiInfos) { // 将志愿者类型列表字符串,切割放到set中 Set volunteerTypes = new HashSet(); - String[] vTypes = icResiInfo.getVolunteerCategoriesStr().split(","); - if (vTypes != null && vTypes.length > 0) { - volunteerTypes.addAll(Arrays.asList(vTypes)); + String volunteerCategoriesStr = icResiInfo.getVolunteerCategoriesStr(); + + if (StringUtils.isNotEmpty(volunteerCategoriesStr)) { + String[] vTypes = volunteerCategoriesStr.split(","); + if (vTypes != null && vTypes.length > 0) { + volunteerTypes.addAll(Arrays.asList(vTypes)); + } + icResiInfo.setVolunteerCategories(volunteerTypes); + } else { + icResiInfo.setVolunteerCategories(new HashSet<>()); } - icResiInfo.setVolunteerCategories(volunteerTypes); // 填充建筑坐标 String msg = "【志愿者分布】查询楼栋信息失败"; diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 6b07136f1c..784a2b1427 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -498,7 +498,7 @@ icvol.VOLUNTEER_CATEGORY as volunteerCategoriesStr from user_base_info userbaseinfo inner join ic_resi_user icuser on (userbaseinfo.ID_NUM = icuser.ID_CARD and icuser.DEL_FLAG = '0') - inner join ic_volunteer icvol on (icuser.ID = icvol.IC_RESI_USER and icvol.DEL_FLAG = '0') + left join ic_volunteer icvol on (icuser.ID = icvol.IC_RESI_USER and icvol.DEL_FLAG = '0') where userbaseinfo.DEL_FLAG = '0' and userbaseinfo.ID_NUM is not null and userbaseinfo.USER_ID in