Browse Source

我发起的议题-已转项目,新增返参issueId

master
yinzuomei 5 years ago
parent
commit
ce64aba21f
  1. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/MyPubIssuesShiftProjectResultDTO.java
  2. 15
      epmet-module/resi-mine/resi-mine-server/src/main/java/com/epmet/modules/person/service/impl/IssueServiceImpl.java

2
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;
}

15
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<String> topicIds=new ArrayList<>();
List<String> projectIds=new ArrayList<>();
List<String> 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<List<OrgInfoResultDTO>> gridNameList = govOrgOpenFeignClient.selectOrgInfo(new OrgInfoFormDTO(OrgInfoConstant.GRID, issueResult.getData().stream().map(m -> m.getGridId()).collect(Collectors.toList())));
Result<List<AllGridsByUserIdResultDTO>> gridNameList = govOrgOpenFeignClient.getGridListByGridIds(gridIds);
if (!gridNameList.success()){
logger.error("查询议题来源网格名称失败......");
}
@ -190,8 +190,9 @@ public class IssueServiceImpl implements IssueService {
List<MyPubIssuesShiftProjectResultDTO> 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<String> topicIds=new ArrayList<>();
List<String> 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<List<OrgInfoResultDTO>> gridNameList = govOrgOpenFeignClient.selectOrgInfo(new OrgInfoFormDTO(OrgInfoConstant.GRID, issueResult.getData().stream().map(m -> m.getGridId()).collect(Collectors.toList())));
Result<List<AllGridsByUserIdResultDTO>> 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);
}

Loading…
Cancel
Save