|
@ -19,9 +19,7 @@ package com.epmet.service.impl; |
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.alibaba.fastjson.JSON; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
@ -49,9 +47,7 @@ import com.epmet.entity.*; |
|
|
import com.epmet.feign.EpmetAdminOpenFeignClient; |
|
|
import com.epmet.feign.EpmetAdminOpenFeignClient; |
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
import com.epmet.service.IcResiDemandDictService; |
|
|
import com.epmet.service.*; |
|
|
import com.epmet.service.IcUserDemandRecService; |
|
|
|
|
|
import com.epmet.service.VolunteerInfoService; |
|
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageHelper; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import com.github.pagehelper.PageInfo; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
@ -91,31 +87,12 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD |
|
|
private EpmetAdminOpenFeignClient adminOpenFeignClient; |
|
|
private EpmetAdminOpenFeignClient adminOpenFeignClient; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private VolunteerInfoService volunteerInfoService; |
|
|
private VolunteerInfoService volunteerInfoService; |
|
|
|
|
|
@Autowired |
|
|
@Override |
|
|
private IcPartyUnitService partyUnitService; |
|
|
public PageData<IcUserDemandRecDTO> page(Map<String, Object> params) { |
|
|
@Autowired |
|
|
IPage<IcUserDemandRecEntity> page = baseDao.selectPage( |
|
|
private IcSocietyOrgService societyOrgService; |
|
|
getPage(params, FieldConstant.CREATED_TIME, false), |
|
|
@Autowired |
|
|
getWrapper(params) |
|
|
private IcCommunitySelfOrganizationService communitySelfOrganizationService; |
|
|
); |
|
|
|
|
|
return getPageData(page, IcUserDemandRecDTO.class); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public List<IcUserDemandRecDTO> list(Map<String, Object> params) { |
|
|
|
|
|
List<IcUserDemandRecEntity> entityList = baseDao.selectList(getWrapper(params)); |
|
|
|
|
|
|
|
|
|
|
|
return ConvertUtils.sourceToTarget(entityList, IcUserDemandRecDTO.class); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private QueryWrapper<IcUserDemandRecEntity> getWrapper(Map<String, Object> params){ |
|
|
|
|
|
String id = (String)params.get(FieldConstant.ID_HUMP); |
|
|
|
|
|
|
|
|
|
|
|
QueryWrapper<IcUserDemandRecEntity> wrapper = new QueryWrapper<>(); |
|
|
|
|
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|
|
|
|
|
|
|
|
|
|
|
return wrapper; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public IcUserDemandRecDTO get(String id) { |
|
|
public IcUserDemandRecDTO get(String id) { |
|
@ -123,13 +100,6 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD |
|
|
return ConvertUtils.sourceToTarget(entity, IcUserDemandRecDTO.class); |
|
|
return ConvertUtils.sourceToTarget(entity, IcUserDemandRecDTO.class); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
|
|
public void save(IcUserDemandRecDTO dto) { |
|
|
|
|
|
IcUserDemandRecEntity entity = ConvertUtils.sourceToTarget(dto, IcUserDemandRecEntity.class); |
|
|
|
|
|
insert(entity); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public DemandRecId update(DemandAddFromDTO dto) { |
|
|
public DemandRecId update(DemandAddFromDTO dto) { |
|
@ -326,55 +296,10 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD |
|
|
} |
|
|
} |
|
|
//社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help
|
|
|
//社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help
|
|
|
res.setReportTypeName(reportTypeMap.containsKey(res.getReportType())?reportTypeMap.get(res.getReportType()):StrConstant.EPMETY_STR); |
|
|
res.setReportTypeName(reportTypeMap.containsKey(res.getReportType())?reportTypeMap.get(res.getReportType()):StrConstant.EPMETY_STR); |
|
|
/*switch(res.getReportType()){ |
|
|
|
|
|
case UserDemandConstant.COMMUNITY_REPORT : |
|
|
|
|
|
res.setReportTypeName("社区帮办"); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.BUILDING_CAPTION_REPORT : |
|
|
|
|
|
res.setReportTypeName("楼长帮办"); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.PARTY_REPORT : |
|
|
|
|
|
res.setReportTypeName("党员帮办"); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.SELF_HELP_REPORT : |
|
|
|
|
|
res.setReportTypeName("自身上报"); |
|
|
|
|
|
break; |
|
|
|
|
|
}*/ |
|
|
|
|
|
//待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished
|
|
|
//待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished
|
|
|
res.setStatusName(statusMap.containsKey(res.getStatus())?statusMap.get(res.getStatus()):StrConstant.EPMETY_STR); |
|
|
res.setStatusName(statusMap.containsKey(res.getStatus())?statusMap.get(res.getStatus()):StrConstant.EPMETY_STR); |
|
|
/*switch(res.getStatus()){ |
|
|
|
|
|
case UserDemandConstant.PENDING : |
|
|
|
|
|
res.setStatusName("待处理"); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.CANCELED : |
|
|
|
|
|
res.setStatusName("已取消"); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.ASSIGNED : |
|
|
|
|
|
res.setStatusName("已指派"); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.HAVE_ORDER : |
|
|
|
|
|
res.setStatusName("已接单"); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.FINISHED : |
|
|
|
|
|
res.setStatusName("已完成"); |
|
|
|
|
|
break; |
|
|
|
|
|
}*/ |
|
|
|
|
|
//服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
|
|
|
//服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
|
|
|
res.setServiceShowName(serviceTypeMap.containsKey(res.getServiceType())?res.getServiceName().concat("(").concat(serviceTypeMap.get(res.getServiceType())).concat(")"):StrConstant.EPMETY_STR); |
|
|
res.setServiceShowName(serviceTypeMap.containsKey(res.getServiceType())?res.getServiceName().concat("(").concat(serviceTypeMap.get(res.getServiceType())).concat(")"):StrConstant.EPMETY_STR); |
|
|
/*switch(res.getServiceType()){ |
|
|
|
|
|
case UserDemandConstant.VOLUNTEER : |
|
|
|
|
|
res.setServiceShowName(res.getServiceName().concat("(志愿者)")); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.SOCIAL_ORG : |
|
|
|
|
|
res.setServiceShowName(res.getServiceName().concat("(社会组织)")); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.COMMUNITY_ORG : |
|
|
|
|
|
res.setServiceShowName(res.getServiceName().concat("(社区自组织")); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.PARTY_UNIT : |
|
|
|
|
|
res.setServiceShowName(res.getServiceName().concat("(区域化党建单位)")); |
|
|
|
|
|
break; |
|
|
|
|
|
}*/ |
|
|
|
|
|
res.setServiceShowFlag(StringUtils.isNotBlank(res.getServerId()) ? true : false); |
|
|
res.setServiceShowFlag(StringUtils.isNotBlank(res.getServerId()) ? true : false); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -393,7 +318,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD |
|
|
if (null == entity) { |
|
|
if (null == entity) { |
|
|
throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg()); |
|
|
throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg()); |
|
|
} |
|
|
} |
|
|
if (UserDemandConstant.FINISH.equals(entity.getStatus())) { |
|
|
if (UserDemandConstant.FINISH.equals(entity.getStatus())||UserDemandConstant.CANCELED.equals(entity.getStatus())) { |
|
|
//需求已完成,不可取消
|
|
|
//需求已完成,不可取消
|
|
|
throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_CANCEL.getCode(),EpmetErrorCode.DEMAND_CAN_NOT_CANCEL.getMsg()); |
|
|
throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_CANCEL.getCode(),EpmetErrorCode.DEMAND_CAN_NOT_CANCEL.getMsg()); |
|
|
} |
|
|
} |
|
@ -478,7 +403,6 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD |
|
|
} |
|
|
} |
|
|
serviceEntity.setServiceStartTime(formDTO.getServiceStartTime()); |
|
|
serviceEntity.setServiceStartTime(formDTO.getServiceStartTime()); |
|
|
serviceEntity.setServiceEndTime(formDTO.getServiceEndTime()); |
|
|
serviceEntity.setServiceEndTime(formDTO.getServiceEndTime()); |
|
|
serviceEntity.setFinishDesc(StringUtils.isNotBlank(formDTO.getFinishDesc())?formDTO.getFinishDesc():StrConstant.EPMETY_STR); |
|
|
|
|
|
demandServiceDao.updateById(serviceEntity); |
|
|
demandServiceDao.updateById(serviceEntity); |
|
|
|
|
|
|
|
|
// 3、pc完成情况:完成+评价
|
|
|
// 3、pc完成情况:完成+评价
|
|
@ -486,6 +410,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD |
|
|
//3.1、插入评价得分记录
|
|
|
//3.1、插入评价得分记录
|
|
|
IcUserDemandSatisfactionEntity satisfactionEntity=ConvertUtils.sourceToTarget(formDTO,IcUserDemandSatisfactionEntity.class); |
|
|
IcUserDemandSatisfactionEntity satisfactionEntity=ConvertUtils.sourceToTarget(formDTO,IcUserDemandSatisfactionEntity.class); |
|
|
satisfactionEntity.setEvaluateTime(logEntity.getOperateTime()); |
|
|
satisfactionEntity.setEvaluateTime(logEntity.getOperateTime()); |
|
|
|
|
|
satisfactionEntity.setRemark(StringUtils.isNotBlank(formDTO.getFinishDesc())?formDTO.getFinishDesc():StrConstant.EPMETY_STR); |
|
|
demandSatisfactionDao.insert(satisfactionEntity); |
|
|
demandSatisfactionDao.insert(satisfactionEntity); |
|
|
|
|
|
|
|
|
// 3.2插入评价操作日志
|
|
|
// 3.2插入评价操作日志
|
|
@ -520,14 +445,14 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD |
|
|
if (null == entity) { |
|
|
if (null == entity) { |
|
|
throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg()); |
|
|
throw new RenException(EpmetErrorCode.DEMAND_NOT_EXITS.getCode(), EpmetErrorCode.DEMAND_NOT_EXITS.getMsg()); |
|
|
} |
|
|
} |
|
|
if (UserDemandConstant.PENDING.equals(entity.getStatus()) ||UserDemandConstant.CANCELED.equals(entity.getStatus())) { |
|
|
|
|
|
//待处理或者已取消的不能评价
|
|
|
|
|
|
throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_FINISH.getCode(), EpmetErrorCode.DEMAND_CAN_NOT_FINISH.getMsg()); |
|
|
|
|
|
} |
|
|
|
|
|
if(UserDemandConstant.FINISHED.equals(entity.getStatus()) ){ |
|
|
if(UserDemandConstant.FINISHED.equals(entity.getStatus()) ){ |
|
|
//已经完成
|
|
|
//已经完成
|
|
|
throw new RenException(EpmetErrorCode.DEMAND_FINISHED.getCode(), EpmetErrorCode.DEMAND_FINISHED.getMsg()); |
|
|
throw new RenException(EpmetErrorCode.DEMAND_FINISHED.getCode(), EpmetErrorCode.DEMAND_FINISHED.getMsg()); |
|
|
} |
|
|
} |
|
|
|
|
|
if (!UserDemandConstant.ASSIGNED.equals(entity.getStatus()) && !UserDemandConstant.HAVE_ORDER.equals(entity.getStatus())) { |
|
|
|
|
|
//已指派、已抢单的才可以完成
|
|
|
|
|
|
throw new RenException(EpmetErrorCode.DEMAND_CAN_NOT_FINISH.getCode(), EpmetErrorCode.DEMAND_CAN_NOT_FINISH.getMsg()); |
|
|
|
|
|
} |
|
|
return entity; |
|
|
return entity; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -1120,5 +1045,135 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD |
|
|
return finishResultDTO; |
|
|
return finishResultDTO; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 居民端,我有需求,最近预约,显示最近预约过的五个需求,按照预约时间倒 |
|
|
|
|
|
* 查询最近预约的5个编码 |
|
|
|
|
|
* |
|
|
|
|
|
* @param userId |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public List<String> getLatestRegCode(String userId) { |
|
|
|
|
|
QueryWrapper<IcUserDemandRecEntity> queryWrapper=new QueryWrapper<>(); |
|
|
|
|
|
queryWrapper.eq("DEMAND_USER_ID",userId); |
|
|
|
|
|
queryWrapper.orderByDesc("WANT_SERVICE_TIME"); |
|
|
|
|
|
queryWrapper.last("limit 5"); |
|
|
|
|
|
queryWrapper.select("DISTINCT CATEGORY_CODE"); |
|
|
|
|
|
return baseDao.selectList(queryWrapper).stream().map(o->o.toString()).collect(Collectors.toList()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 居民端-我的需求(待处理,处理中,已完成,已取消) |
|
|
|
|
|
* 待处理:unprocessed;处理中:processing;已完成:finished;已取消:canceled |
|
|
|
|
|
* |
|
|
|
|
|
* @param formDTO |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
@Override |
|
|
|
|
|
public List<ResiClientMyDemandResDTO> queryMyDemandForResiClient(ResiClientMyDemandFormDTO formDTO) { |
|
|
|
|
|
PageInfo<ResiClientMyDemandResDTO> result = PageHelper.startPage(formDTO.getPageNo(), |
|
|
|
|
|
formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.queryMyDemandForResiClient(formDTO.getGridId(), |
|
|
|
|
|
formDTO.getType(), formDTO.getUserId())); |
|
|
|
|
|
List<ResiClientMyDemandResDTO> list=result.getList(); |
|
|
|
|
|
if (CollectionUtils.isNotEmpty(list)) { |
|
|
|
|
|
//1、服务方(社会组织、社区自组织、区域化党建单位)单位名称,负责人姓名,负责人手机号
|
|
|
|
|
|
List<String> partyUnitIds = result.getList().stream().filter(l -> l.getServiceType().equals(UserDemandConstant.PARTY_UNIT)).map(ResiClientMyDemandResDTO::getServerId).collect(Collectors.toList()); |
|
|
|
|
|
Map<String, IcPartyUnitEntity> partyUnitMap =getPartyUnitMap(partyUnitIds); |
|
|
|
|
|
|
|
|
|
|
|
List<String> socialOrgIds = result.getList().stream().filter(l -> l.getServiceType().equals(UserDemandConstant.SOCIAL_ORG)).map(ResiClientMyDemandResDTO::getServerId).collect(Collectors.toList()); |
|
|
|
|
|
Map<String, IcSocietyOrgEntity> socialOrgMap=getSocialOrgMap(socialOrgIds); |
|
|
|
|
|
|
|
|
|
|
|
List<String> communityOrgIds = result.getList().stream().filter(l -> l.getServiceType().equals(UserDemandConstant.COMMUNITY_ORG)).map(ResiClientMyDemandResDTO::getServerId).collect(Collectors.toList()); |
|
|
|
|
|
Map<String, IcCommunitySelfOrganizationEntity> communityOrgMap=getCommunityOrgMap(communityOrgIds); |
|
|
|
|
|
|
|
|
|
|
|
//2、志愿者姓名、手机号
|
|
|
|
|
|
Set<String> userIdList=list.stream().filter(item->item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(ResiClientMyDemandResDTO::getServerId).collect(Collectors.toSet()); |
|
|
|
|
|
Map<String,UserBaseInfoResultDTO> userInfoMap=getVolunteerMap(userIdList); |
|
|
|
|
|
|
|
|
|
|
|
for (ResiClientMyDemandResDTO resDto : list) { |
|
|
|
|
|
//3、查询分类名称
|
|
|
|
|
|
IcResiDemandDictEntity demandDict = demandDictService.getByCode(formDTO.getCustomerId(), resDto.getCategoryCode()); |
|
|
|
|
|
resDto.setCategoryName(null != demandDict ? demandDict.getCategoryName() : StrConstant.EPMETY_STR); |
|
|
|
|
|
switch (resDto.getServiceType()) |
|
|
|
|
|
{ |
|
|
|
|
|
case UserDemandConstant.PARTY_UNIT: |
|
|
|
|
|
resDto.setServiceUnitName(partyUnitMap.get(resDto.getServerId()).getUnitName()); |
|
|
|
|
|
resDto.setServiceUserName(partyUnitMap.get(resDto.getServerId()).getContact()); |
|
|
|
|
|
resDto.setServiceUserMobile(partyUnitMap.get(resDto.getServerId()).getContactMobile()); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.SOCIAL_ORG: |
|
|
|
|
|
resDto.setServiceUnitName(socialOrgMap.get(resDto.getServerId()).getSocietyName()); |
|
|
|
|
|
resDto.setServiceUserName(socialOrgMap.get(resDto.getServerId()).getPersonInCharge()); |
|
|
|
|
|
resDto.setServiceUserMobile(socialOrgMap.get(resDto.getServerId()).getMobile()); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.COMMUNITY_ORG: |
|
|
|
|
|
resDto.setServiceUnitName(communityOrgMap.get(resDto.getServerId()).getOrganizationName()); |
|
|
|
|
|
resDto.setServiceUserName(communityOrgMap.get(resDto.getServerId()).getPrincipalName()); |
|
|
|
|
|
resDto.setServiceUserMobile(communityOrgMap.get(resDto.getServerId()).getPrincipalPhone()); |
|
|
|
|
|
break; |
|
|
|
|
|
case UserDemandConstant.VOLUNTEER: |
|
|
|
|
|
resDto.setServiceUnitName(StrConstant.EPMETY_STR); |
|
|
|
|
|
resDto.setServiceUserName(userInfoMap.get(resDto.getServerId()).getRealName()); |
|
|
|
|
|
resDto.setServiceUserMobile(userInfoMap.get(resDto.getServerId()).getMobile()); |
|
|
|
|
|
break; |
|
|
|
|
|
default: |
|
|
|
|
|
log.warn("serviceType 错误"); |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return list; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取党建单位基本信息 |
|
|
|
|
|
* @param partyUnitIds |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
private Map<String, IcPartyUnitEntity> getPartyUnitMap(List<String> partyUnitIds) { |
|
|
|
|
|
List<IcPartyUnitEntity> partyUnitList=partyUnitService.queryListById(partyUnitIds); |
|
|
|
|
|
Map<String, IcPartyUnitEntity> partyUnitMap = partyUnitList.stream().collect(Collectors.toMap(IcPartyUnitEntity::getId, o -> o, (o1, o2) -> o1)); |
|
|
|
|
|
return partyUnitMap; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取社会组织基本信息 |
|
|
|
|
|
* @param socialOrgIds |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
private Map<String, IcSocietyOrgEntity> getSocialOrgMap(List<String> socialOrgIds) { |
|
|
|
|
|
List<IcSocietyOrgEntity> socialOrgList=societyOrgService.queryListById(socialOrgIds); |
|
|
|
|
|
Map<String, IcSocietyOrgEntity> socialOrgMap = socialOrgList.stream().collect(Collectors.toMap(IcSocietyOrgEntity::getId, o -> o, (o1, o2) -> o1)); |
|
|
|
|
|
return socialOrgMap; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取社区自组织基本信息 |
|
|
|
|
|
* @param communityOrgIds |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
private Map<String, IcCommunitySelfOrganizationEntity> getCommunityOrgMap(List<String> communityOrgIds) { |
|
|
|
|
|
List<IcCommunitySelfOrganizationEntity> communityOrgList=communitySelfOrganizationService.queryListById(communityOrgIds); |
|
|
|
|
|
Map<String, IcCommunitySelfOrganizationEntity> communityOrgMap = communityOrgList.stream().collect(Collectors.toMap(IcCommunitySelfOrganizationEntity::getId, o -> o, (o1, o2) -> o1)); |
|
|
|
|
|
return communityOrgMap; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* 获取志愿者基本信息 |
|
|
|
|
|
* @param userIdList |
|
|
|
|
|
* @return |
|
|
|
|
|
*/ |
|
|
|
|
|
private Map<String, UserBaseInfoResultDTO> getVolunteerMap(Set<String> userIdList) { |
|
|
|
|
|
Map<String,UserBaseInfoResultDTO> userInfoMap=new HashMap<>(); |
|
|
|
|
|
if(CollectionUtils.isNotEmpty(userIdList)){ |
|
|
|
|
|
Result<List<UserBaseInfoResultDTO>> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(new ArrayList<>(userIdList)); |
|
|
|
|
|
if(!userInfoRes.success()||CollectionUtils.isEmpty(userInfoRes.getData())){ |
|
|
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"查询志愿者信息异常","服务方查询异常"); |
|
|
|
|
|
} |
|
|
|
|
|
userInfoMap=userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, o -> o, (o1, o2) -> o1)); |
|
|
|
|
|
} |
|
|
|
|
|
return userInfoMap; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |