|
|
@ -73,53 +73,41 @@ public class GroupIssueServiceImpl implements GroupIssueService { |
|
|
|
List<String> userIds = new ArrayList<>(); |
|
|
|
ApplicationDetailResultDTO data = result.getData(); |
|
|
|
userIds.add(data.getUserId()); |
|
|
|
TopicInfoResultDTO topicInfoResultDTO = resiGroupDao.selectTopicInfo(data.getTopicId()); |
|
|
|
userIds.add(topicInfoResultDTO.getTopicUserId()); |
|
|
|
// 查询小组类别
|
|
|
|
ResiGroupEntity resiGroupEntity = resiGroupDao.selectById(topicInfoResultDTO.getGroupId()); |
|
|
|
if (null == resiGroupEntity){ |
|
|
|
throw new RenException("此小组信息不存在"); |
|
|
|
} |
|
|
|
List<UserInfoResultDTO> userInfos = resiTopicService.disPoseUserInfo(resiGroupEntity.getGroupType(), userIds); |
|
|
|
if(CollectionUtils.isEmpty(userInfos)){ |
|
|
|
throw new RenException("未查询到用户信息"); |
|
|
|
} |
|
|
|
userInfos.forEach(u -> { |
|
|
|
if (u.getUserId().equals(data.getUserId())){ |
|
|
|
data.setIssuePublisher(u.getReleaseUserName()); |
|
|
|
data.setIssuePublisherMobile(u.getMobile()); |
|
|
|
if (!applicationDetailFormDTO.getTopicIdIsNull()){ |
|
|
|
TopicInfoResultDTO topicInfoResultDTO = resiGroupDao.selectTopicInfo(data.getTopicId()); |
|
|
|
userIds.add(topicInfoResultDTO.getTopicUserId()); |
|
|
|
// 查询小组类别
|
|
|
|
ResiGroupEntity resiGroupEntity = resiGroupDao.selectById(topicInfoResultDTO.getGroupId()); |
|
|
|
if (null == resiGroupEntity){ |
|
|
|
throw new RenException("此小组信息不存在"); |
|
|
|
} |
|
|
|
if (u.getUserId().equals(topicInfoResultDTO.getTopicUserId())){ |
|
|
|
topicInfoResultDTO.setPublishedUser(u.getReleaseUserName()); |
|
|
|
topicInfoResultDTO.setTopicPublishMobile(u.getMobile()); |
|
|
|
List<UserInfoResultDTO> userInfos = resiTopicService.disPoseUserInfo(resiGroupEntity.getGroupType(), userIds); |
|
|
|
if(CollectionUtils.isEmpty(userInfos)){ |
|
|
|
throw new RenException("未查询到用户信息"); |
|
|
|
} |
|
|
|
}); |
|
|
|
/*Result<List<UserBaseInfoResultDTO>> listResult = epmetUserOpenFeignClient.queryUserBaseInfo(userIds); |
|
|
|
if (!listResult.success()){ |
|
|
|
throw new RenException("查询话题创建者,议题创建者失败......"); |
|
|
|
} |
|
|
|
listResult.getData().forEach(user -> { |
|
|
|
if (user.getUserId().equals(data.getUserId())){ |
|
|
|
data.setIssuePublisher(user.getStreet().concat("-").concat(user.getSurname()).concat(getMrOrMs(user.getGender()))); |
|
|
|
data.setIssuePublisherMobile(user.getMobile()); |
|
|
|
userInfos.forEach(u -> { |
|
|
|
if (u.getUserId().equals(data.getUserId())){ |
|
|
|
data.setIssuePublisher(u.getReleaseUserName()); |
|
|
|
data.setIssuePublisherMobile(u.getMobile()); |
|
|
|
} |
|
|
|
if (u.getUserId().equals(topicInfoResultDTO.getTopicUserId())){ |
|
|
|
topicInfoResultDTO.setPublishedUser(u.getReleaseUserName()); |
|
|
|
topicInfoResultDTO.setTopicPublishMobile(u.getMobile()); |
|
|
|
} |
|
|
|
}); |
|
|
|
List<String> gridIds = new ArrayList<>(); |
|
|
|
gridIds.add(data.getGridId()); |
|
|
|
Result<List<AllGridsByUserIdResultDTO>> gridListByGridIds = govOrgOpenFeignClient.getGridListByGridIds(gridIds); |
|
|
|
if (!gridListByGridIds.success()){ |
|
|
|
throw new RenException("查询议题所属网格名称失败......"); |
|
|
|
} |
|
|
|
if (user.getUserId().equals(topicInfoResultDTO.getTopicUserId())){ |
|
|
|
topicInfoResultDTO.setPublishedUser(user.getStreet().concat("-").concat(user.getSurname()).concat(getMrOrMs(user.getGender()))); |
|
|
|
topicInfoResultDTO.setTopicPublishMobile(user.getMobile()); |
|
|
|
} |
|
|
|
});*/ |
|
|
|
List<String> gridIds = new ArrayList<>(); |
|
|
|
gridIds.add(data.getGridId()); |
|
|
|
Result<List<AllGridsByUserIdResultDTO>> gridListByGridIds = govOrgOpenFeignClient.getGridListByGridIds(gridIds); |
|
|
|
if (!gridListByGridIds.success()){ |
|
|
|
throw new RenException("查询议题所属网格名称失败......"); |
|
|
|
gridListByGridIds.getData().forEach(grid -> { |
|
|
|
if (grid.getGridId().equals(data.getGridId())){ |
|
|
|
data.setGridName(grid.getGridName()); |
|
|
|
} |
|
|
|
}); |
|
|
|
data.setTopicInfo(topicInfoResultDTO); |
|
|
|
} |
|
|
|
gridListByGridIds.getData().forEach(grid -> { |
|
|
|
if (grid.getGridId().equals(data.getGridId())){ |
|
|
|
data.setGridName(grid.getGridName()); |
|
|
|
} |
|
|
|
}); |
|
|
|
data.setTopicInfo(topicInfoResultDTO); |
|
|
|
return ConvertUtils.sourceToTarget(data,ApplicationDetailCopyResultDTO.class); |
|
|
|
} |
|
|
|
|
|
|
|