|
|
@ -13,6 +13,7 @@ import com.epmet.enums.OrgLevelEnums; |
|
|
|
import com.epmet.feign.EpmetUserOpenFeignClient; |
|
|
|
import com.epmet.feign.GovOrgOpenFeignClient; |
|
|
|
import com.epmet.service.ResiEventService; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@ -44,6 +45,8 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve |
|
|
|
//String parentAgencyId = gridInfoData.getParentAgencyId();
|
|
|
|
//String pids = gridInfoData.getPids();
|
|
|
|
|
|
|
|
List<ResiEventNpcResultDTO> npcResultList = new ArrayList<>(); |
|
|
|
|
|
|
|
//查询人大代表列表
|
|
|
|
ListUserByBadgeFormDTO npcForm = new ListUserByBadgeFormDTO(customerId, BadgeConstant.BADGE_KEY_NPC); |
|
|
|
Result<List<ListUserByBadgeResultDTO>> npcResult = epmetUserOpenFeignClient.listUsersByBadge(npcForm); |
|
|
@ -55,9 +58,13 @@ public class ResiEventServiceImpl implements ResiEventService, ResultDataResolve |
|
|
|
Result<List<OrgInfoResultDTO>> npcGridInfoResult = govOrgOpenFeignClient.selectOrgInfo(form); |
|
|
|
List<OrgInfoResultDTO> npcGridInfos = getResultDataOrThrowsException(npcGridInfoResult, ServiceConstant.GOV_ORG_SERVER, null, null); |
|
|
|
|
|
|
|
if(CollectionUtils.isEmpty(npcGridInfos)) { |
|
|
|
// 没有人大代表,直接返回空列表即可
|
|
|
|
return npcResultList; |
|
|
|
} |
|
|
|
|
|
|
|
Map<String, OrgInfoResultDTO> npcGridInfoMap = convertNpcGridInfos2Map(npcGridInfos); |
|
|
|
|
|
|
|
List<ResiEventNpcResultDTO> npcResultList = new ArrayList<>(); |
|
|
|
npcData.stream().forEach(npc -> { |
|
|
|
if (StringUtils.isBlank(excludeUserId) || !npc.getUserId().equals(excludeUserId)) { |
|
|
|
OrgInfoResultDTO gridInfo = npcGridInfoMap.get(npc.getGridId()); |
|
|
|