Browse Source

议事厅-已处理已关闭:/resi/hall/issue/closedlist

dev
yinzuomei 3 years ago
parent
commit
265f2d30b0
  1. 11
      epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java
  2. 31
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

11
epmet-module/resi-hall/resi-hall-client/src/main/java/com/epmet/dto/result/ClosedIssueListResultDTO.java

@ -1,5 +1,7 @@
package com.epmet.dto.result;
import com.epmet.commons.tools.dto.commondto.IcEventComDTO;
import com.epmet.commons.tools.dto.commondto.TopicInfoComDTO;
import lombok.Data;
import java.io.Serializable;
@ -65,4 +67,13 @@ public class ClosedIssueListResultDTO implements Serializable {
* 发布议题的图片
*/
private List<String> issueImgs;
/**
* 话题信息-2022.10.10
*/
private TopicInfoComDTO topicInfo;
/**
* 事件信息-2022.10.10
*/
private IcEventComDTO icEventInfo;
}

31
epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

@ -509,9 +509,7 @@ public class IssueServiceImpl implements IssueService {
TopicDetailBatchFormDTO form = new TopicDetailBatchFormDTO();
form.setTopicIdList(topicIds);
Result<List<ResiTopicDetailResultDTO>> topicDetailsResult = resiGroupOpenFeignClient.listTopicDetailsByIds(form);
if (!topicDetailsResult.success()) {
logger.error("调用resi-group批量查询详情失败");
} else {
if (topicDetailsResult.success() && !CollectionUtils.isEmpty(topicDetailsResult.getData())) {
List<ResiTopicDetailResultDTO> topicDetails = topicDetailsResult.getData();
HashMap<String, ResiTopicDetailResultDTO> rtm = convertTopicDetailList2Map(topicDetails);
issueList.forEach(vi -> {
@ -521,8 +519,35 @@ public class IssueServiceImpl implements IssueService {
vi.setTopicContent(rr == null ? "" :rr.getTopicContent());
vi.setLongitude(rr == null ? "" : rr.getLongitude());
vi.setLatitude(rr == null ? "" : rr.getLatitude());
// 赋值话题详情
if(null!=rr){
TopicInfoComDTO topicInfoDTO=new TopicInfoComDTO();
topicInfoDTO.setTopicId(rr.getTopicId());
topicInfoDTO.setTopicContent(rr.getTopicContent());
topicInfoDTO.setTopicImgs(rr.getTopicImgs());
topicInfoDTO.setTopicVoices(rr.getTopicVoices());
topicInfoDTO.setPublishedUser(rr.getReleaseUserName());
topicInfoDTO.setReleaseTime(rr.getReleaseTime());
vi.setTopicInfo(topicInfoDTO);
}
});
}
// 来源于事件的
List<String> icEventIds = issueList.stream().filter(t -> t.getSourceType().equals("ic_event")).map(i -> i.getSourceId()).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(icEventIds)) {
Result<List<IcEventDTO>> eventInfoRes = govProjectOpenFeignClient.batchSelectById(icEventIds);
if (eventInfoRes.success() && !CollectionUtils.isEmpty(eventInfoRes.getData())) {
Map<String, IcEventDTO> eventMap = eventInfoRes.getData().stream().collect(Collectors.toMap(IcEventDTO::getId, o -> o, (o1, o2) -> o1));
issueList.forEach(vi -> {
IcEventDTO event = eventMap.get(vi.getSourceId());
if (null != event) {
IcEventComDTO eventComDTO = ConvertUtils.sourceToTarget(event, IcEventComDTO.class);
eventComDTO.setIcEventId(event.getId());
vi.setIcEventInfo(eventComDTO);
}
});
}
}
}
return issueList;

Loading…
Cancel
Save