|
@ -44,6 +44,7 @@ import com.epmet.commons.tools.utils.ScanContentUtils; |
|
|
import com.epmet.constant.ReadFlagConstant; |
|
|
import com.epmet.constant.ReadFlagConstant; |
|
|
import com.epmet.constant.UserMessageTypeConstant; |
|
|
import com.epmet.constant.UserMessageTypeConstant; |
|
|
import com.epmet.dto.form.*; |
|
|
import com.epmet.dto.form.*; |
|
|
|
|
|
import com.epmet.dto.result.UserBaseInfoResultDTO; |
|
|
import com.epmet.dto.result.UserInfoResultDTO; |
|
|
import com.epmet.dto.result.UserInfoResultDTO; |
|
|
import com.epmet.dto.result.UserResiInfoResultDTO; |
|
|
import com.epmet.dto.result.UserResiInfoResultDTO; |
|
|
import com.epmet.dto.result.UserRoleResultDTO; |
|
|
import com.epmet.dto.result.UserRoleResultDTO; |
|
@ -1946,6 +1947,16 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
if (CollectionUtils.isEmpty(entityList)) { |
|
|
if (CollectionUtils.isEmpty(entityList)) { |
|
|
return Collections.emptyMap(); |
|
|
return Collections.emptyMap(); |
|
|
} |
|
|
} |
|
|
|
|
|
List<String> groupIds = entityList.stream().map(m -> m.getId()).collect(Collectors.toList()); |
|
|
|
|
|
List<ResiGroupMemberDTO> membersByGroup = baseDao.getMembersByGroup(groupIds); |
|
|
|
|
|
Result<List<UserBaseInfoResultDTO>> listResult = epmetUserOpenFeignClient.queryUserBaseInfo(membersByGroup.stream().map(m -> m.getCustomerUserId()).collect(Collectors.toList())); |
|
|
|
|
|
if (!listResult.success()){ |
|
|
|
|
|
throw new EpmetException("查询居民信息失败..."); |
|
|
|
|
|
} |
|
|
|
|
|
membersByGroup.stream().forEach(m -> listResult.getData().stream().filter(u -> u.getUserId().equals(m.getCustomerUserId())).forEach(u -> { |
|
|
|
|
|
m.setCustomerUserMobile(u.getMobile()); |
|
|
|
|
|
m.setCustomerUserName(u.getRealName()); |
|
|
|
|
|
})); |
|
|
List<IcPartyOrgTreeDTO> list = entityList.stream().filter(i -> StringUtils.isNotBlank(i.getPartyOrgId())).map(item -> { |
|
|
List<IcPartyOrgTreeDTO> list = entityList.stream().filter(i -> StringUtils.isNotBlank(i.getPartyOrgId())).map(item -> { |
|
|
IcPartyOrgTreeDTO dto = new IcPartyOrgTreeDTO(); |
|
|
IcPartyOrgTreeDTO dto = new IcPartyOrgTreeDTO(); |
|
|
dto.setId(item.getId()); |
|
|
dto.setId(item.getId()); |
|
@ -1955,6 +1966,10 @@ public class ResiGroupServiceImpl extends BaseServiceImpl<ResiGroupDao, ResiGrou |
|
|
dto.setPartyOrgName(item.getGroupName()); |
|
|
dto.setPartyOrgName(item.getGroupName()); |
|
|
return dto; |
|
|
return dto; |
|
|
}).collect(Collectors.toList()); |
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
list.stream().forEach(l -> membersByGroup.stream().filter(m -> m.getResiGroupId().equals(l.getId())).forEach(m -> { |
|
|
|
|
|
l.setPrincipal(m.getCustomerUserName()); |
|
|
|
|
|
l.setPrincipalMobile(m.getCustomerUserMobile()); |
|
|
|
|
|
})); |
|
|
if (CollectionUtils.isEmpty(list)) { |
|
|
if (CollectionUtils.isEmpty(list)) { |
|
|
return Collections.emptyMap(); |
|
|
return Collections.emptyMap(); |
|
|
} |
|
|
} |
|
|