Browse Source

议事厅-已处理已结案:/resi/hall/issue/closedproject

dev
yinzuomei 3 years ago
parent
commit
6c8dbe4f88
  1. 11
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java
  2. 30
      epmet-module/resi-hall/resi-hall-server/src/main/java/com/epmet/service/impl/IssueServiceImpl.java

11
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResolvedResultDTO.java

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

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

@ -651,7 +651,7 @@ public class IssueServiceImpl implements IssueService {
Result<List<IssueProfileDTO>> issueRes = govIssueOpenFeignClient.getIssueProfile(issueIds); Result<List<IssueProfileDTO>> issueRes = govIssueOpenFeignClient.getIssueProfile(issueIds);
if (issueRes.success() && !CollectionUtils.isEmpty(issueRes.getData())) { if (issueRes.success() && !CollectionUtils.isEmpty(issueRes.getData())) {
// 3、如果存在议题来源于话题 // 3.1、如果存在议题来源于话题
List<String> topicIds = issueRes.getData().stream().filter(t -> t.getIssueSourceType().equals("resi_topic")).map(IssueProfileDTO::getSourceId).collect(Collectors.toList()); List<String> topicIds = issueRes.getData().stream().filter(t -> t.getIssueSourceType().equals("resi_topic")).map(IssueProfileDTO::getSourceId).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(topicIds)) { if (!CollectionUtils.isEmpty(topicIds)) {
// 3.1 查询话题详情 // 3.1 查询话题详情
@ -667,6 +667,23 @@ public class IssueServiceImpl implements IssueService {
}); });
} }
} }
//3.2 如果存在议题来源于事件
List<String> icEventIds = issueRes.getData().stream().filter(t -> t.getIssueSourceType().equals("ic_event")).map(IssueProfileDTO::getSourceId).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(icEventIds)) {
Result<List<IcEventDTO>> eventInfoRes = govProjectOpenFeignClient.batchSelectById(icEventIds);
if (eventInfoRes.success() && !CollectionUtils.isEmpty(eventInfoRes.getData())) {
//key:议题id;value:事件信息
Map<String, IcEventDTO> eventMap = eventInfoRes.getData().stream().collect(Collectors.toMap(IcEventDTO::getOperationId, o -> o, (o1, o2) -> o1));
resultList.forEach(vi -> {
IcEventDTO event = eventMap.get(vi.getIssueId());
if (null != event) {
IcEventComDTO eventComDTO = ConvertUtils.sourceToTarget(event,IcEventComDTO.class);
eventComDTO.setIcEventId(event.getId());
vi.setIcEventInfo(eventComDTO);
}
});
}
}
Map<String,IssueProfileDTO> issueMap=issueRes.getData().stream().collect(Collectors.toMap(IssueProfileDTO::getIssueId, o -> o, (o1, o2) -> o1)); Map<String,IssueProfileDTO> issueMap=issueRes.getData().stream().collect(Collectors.toMap(IssueProfileDTO::getIssueId, o -> o, (o1, o2) -> o1));
// 赋值话题信息、议题来源、议题图片 // 赋值话题信息、议题来源、议题图片
resultList.forEach(vi -> { resultList.forEach(vi -> {
@ -677,6 +694,17 @@ public class IssueServiceImpl implements IssueService {
vi.setLongitude(rr == null ? StrConstant.EPMETY_STR : rr.getLongitude()); vi.setLongitude(rr == null ? StrConstant.EPMETY_STR : rr.getLongitude());
vi.setLatitude(rr == null ? StrConstant.EPMETY_STR : rr.getLatitude()); vi.setLatitude(rr == null ? StrConstant.EPMETY_STR : rr.getLatitude());
vi.setTopicId(null == rr ? StrConstant.EPMETY_STR : rr.getTopicId()); vi.setTopicId(null == rr ? StrConstant.EPMETY_STR : rr.getTopicId());
// 赋值话题详情
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);
}
IssueProfileDTO issue = issueMap.get(vi.getIssueId()); IssueProfileDTO issue = issueMap.get(vi.getIssueId());
vi.setIssueSourceType(null != issue ? issue.getIssueSourceType() : StrConstant.EPMETY_STR); vi.setIssueSourceType(null != issue ? issue.getIssueSourceType() : StrConstant.EPMETY_STR);
vi.setIssueImgs(null != issue ? issue.getIssueImgs() : new ArrayList<>()); vi.setIssueImgs(null != issue ? issue.getIssueImgs() : new ArrayList<>());

Loading…
Cancel
Save