diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java index 200a09e24e..8397d64b69 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java @@ -43,4 +43,6 @@ public class MyPubIssuesShiftProjectResultDTO implements Serializable { * 话题发表于哪个组 */ private String topicReleaseGroupName; + + private String issueId; } diff --git a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java index 8f321cceb9..8ad4c79d59 100644 --- a/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java +++ b/epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java @@ -5,12 +5,10 @@ import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.constant.IssueOpenConstant; -import com.epmet.constant.OrgInfoConstant; import com.epmet.dto.IssueDTO; import com.epmet.dto.ProjectDTO; import com.epmet.dto.form.MyPartIssuesFormDTO; import com.epmet.dto.form.MyPubIssuesAuditingFormDTO; -import com.epmet.dto.form.OrgInfoFormDTO; import com.epmet.dto.result.*; import com.epmet.feign.GovIssueOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; @@ -166,14 +164,16 @@ public class IssueServiceImpl implements IssueService { //议题来源话题id集合 List topicIds=new ArrayList<>(); List projectIds=new ArrayList<>(); + List gridIds=new ArrayList<>(); issueResult.getData().forEach(issueDTO ->{ if(IssueOpenConstant.SOURCE_TYPE_RT.equals(issueDTO.getSourceType())&& StringUtils.isNotBlank(issueDTO.getSourceId())){ topicIds.add(issueDTO.getSourceId()); projectIds.add(issueDTO.getProjectId()); + gridIds.add(issueDTO.getGridId()); } } ); //查询网格名称 - Result> gridNameList = govOrgOpenFeignClient.selectOrgInfo(new OrgInfoFormDTO(OrgInfoConstant.GRID, issueResult.getData().stream().map(m -> m.getGridId()).collect(Collectors.toList()))); + Result> gridNameList = govOrgOpenFeignClient.getGridListByGridIds(gridIds); if (!gridNameList.success()){ logger.error("查询议题来源网格名称失败......"); } @@ -190,8 +190,9 @@ public class IssueServiceImpl implements IssueService { List list=new ArrayList<>(); for(IssueDTO issueDTO:issueResult.getData()){ MyPubIssuesShiftProjectResultDTO resultDTO=new MyPubIssuesShiftProjectResultDTO(); + resultDTO.setIssueId(issueDTO.getId()); resultDTO.setProjectId(issueDTO.getProjectId()); - gridNameList.getData().stream().filter(o -> issueDTO.getGridId().equals(o.getOrgId())).forEach(o -> resultDTO.setTopicReleaseGridName(o.getOrgName())); + gridNameList.getData().stream().filter(o -> issueDTO.getGridId().equals(o.getGridId())).forEach(o -> resultDTO.setTopicReleaseGridName(o.getGridName())); groupNameList.getData().stream().filter(g -> issueDTO.getSourceId().equals(g.getTopicId())).forEach(g -> resultDTO.setTopicReleaseGroupName(g.getTopicGroupName())); resultDTO.setShiftProjectTime(issueDTO.getShiftedTimeStamp()); @@ -220,13 +221,15 @@ public class IssueServiceImpl implements IssueService { } //议题来源话题id集合 List topicIds=new ArrayList<>(); + List gridIds=new ArrayList<>(); issueResult.getData().forEach(issueDTO ->{ if(IssueOpenConstant.SOURCE_TYPE_RT.equals(issueDTO.getSourceType())&& StringUtils.isNotBlank(issueDTO.getSourceId())){ topicIds.add(issueDTO.getSourceId()); + gridIds.add(issueDTO.getGridId()); } } ); //查询网格名称 - Result> gridNameList = govOrgOpenFeignClient.selectOrgInfo(new OrgInfoFormDTO(OrgInfoConstant.GRID, issueResult.getData().stream().map(m -> m.getGridId()).collect(Collectors.toList()))); + Result> gridNameList = govOrgOpenFeignClient.getGridListByGridIds(gridIds); if (!gridNameList.success()){ logger.error("查询议题来源网格名称失败......"); } @@ -242,7 +245,7 @@ public class IssueServiceImpl implements IssueService { resultDTO.setIssueTitle(issueDTO.getIssueTitle()); resultDTO.setSuggestion(issueDTO.getSuggestion()); resultDTO.setClosedTime(issueDTO.getClosedTimeStamp()); - gridNameList.getData().stream().filter(o -> issueDTO.getGridId().equals(o.getOrgId())).forEach(o -> resultDTO.setTopicReleaseGridName(o.getOrgName())); + gridNameList.getData().stream().filter(o -> issueDTO.getGridId().equals(o.getGridId())).forEach(o -> resultDTO.setTopicReleaseGridName(o.getGridName())); groupNameList.getData().stream().filter(g -> issueDTO.getSourceId().equals(g.getTopicId())).forEach(g -> resultDTO.setTopicReleaseGroupName(g.getTopicGroupName())); resultDTOList.add(resultDTO); }