|
|
@ -34,6 +34,10 @@ import com.epmet.entity.IssueProjectRelationEntity; |
|
|
|
import com.epmet.feign.*; |
|
|
|
import com.epmet.redis.GovIssueRedis; |
|
|
|
import com.epmet.redis.IssueVoteDetailRedis; |
|
|
|
import com.epmet.resi.group.dto.group.form.AllIssueFormDTO; |
|
|
|
import com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO; |
|
|
|
import com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO; |
|
|
|
import com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO; |
|
|
|
import com.epmet.resi.group.dto.topic.ResiTopicDTO; |
|
|
|
import com.epmet.resi.group.dto.topic.form.GovTopicIssueInfoFormDTO; |
|
|
|
import com.epmet.resi.group.dto.topic.form.TopicInfoFormDTO; |
|
|
@ -43,6 +47,7 @@ import com.epmet.service.IssueProjectRelationService; |
|
|
|
import com.epmet.service.IssueService; |
|
|
|
import com.epmet.service.IssueVoteStatisticalService; |
|
|
|
import com.epmet.utils.ModuleConstants; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
@ -841,4 +846,72 @@ public class IssueServiceImpl extends BaseServiceImpl<IssueDao, IssueEntity> imp |
|
|
|
return baseDao.checkTopicShiftIssue(formDTO); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 小组表决中议题 |
|
|
|
* |
|
|
|
* @param formDTO |
|
|
|
* @return java.util.List<com.epmet.resi.group.dto.group.result.GroupVotingListResultDTO> |
|
|
|
* @author zhaoqifeng |
|
|
|
* @date 2020/11/17 14:59 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<GroupVotingListResultDTO> getVotingListByGroup(AllIssueFormDTO formDTO) { |
|
|
|
//查询条件
|
|
|
|
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); |
|
|
|
formDTO.setPageNo(pageIndex); |
|
|
|
return baseDao.selectVotingListByTopic(formDTO); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 小组已转项目议题 |
|
|
|
* |
|
|
|
* @param formDTO |
|
|
|
* @return java.util.List<com.epmet.resi.group.dto.group.result.GroupShiftProjectListResultDTO> |
|
|
|
* @author zhaoqifeng |
|
|
|
* @date 2020/11/17 14:59 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<GroupShiftProjectListResultDTO> getShiftProjectListByGroup(AllIssueFormDTO formDTO) { |
|
|
|
List<GroupShiftProjectListResultDTO> resultList = new ArrayList<>(); |
|
|
|
//查询条件
|
|
|
|
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); |
|
|
|
formDTO.setPageNo(pageIndex); |
|
|
|
List<IssueEntity> issueList = baseDao.selectShiftIssueByTopic(formDTO); |
|
|
|
if (CollectionUtils.isEmpty(issueList)) { |
|
|
|
return resultList; |
|
|
|
} |
|
|
|
//遍历获取所有的议题Id
|
|
|
|
List<String> issueIds = issueList.stream().map(IssueEntity::getId).collect(Collectors.toList()); |
|
|
|
ShiftProjectsFromDTO shiftProjectsFromDTO = new ShiftProjectsFromDTO(); |
|
|
|
shiftProjectsFromDTO.setIssueIds(issueIds); |
|
|
|
List<ShiftProjectResultDTO> projectList = govProjectFeignClient.getProjectByIssue(shiftProjectsFromDTO).getData(); |
|
|
|
resultList = issueList.stream().flatMap(issue -> projectList.stream().filter(p -> issue.getId().equals(p.getOriginId())).map(project ->{ |
|
|
|
GroupShiftProjectListResultDTO shiftProject = new GroupShiftProjectListResultDTO(); |
|
|
|
shiftProject.setIssueId(issue.getId()); |
|
|
|
shiftProject.setIssueTitle(issue.getIssueTitle()); |
|
|
|
shiftProject.setCurrentHandleDepartMent(project.getDepartmentNameList()); |
|
|
|
shiftProject.setPublicReply(project.getPublicReply()); |
|
|
|
shiftProject.setIssueShiftedTime(project.getCreatedTime().getTime()/NumConstant.ONE_THOUSAND); |
|
|
|
shiftProject.setProjectStatus(project.getStatus()); |
|
|
|
return shiftProject; |
|
|
|
})).collect(Collectors.toList()); |
|
|
|
return resultList; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 小组已关闭议题 |
|
|
|
* |
|
|
|
* @param formDTO |
|
|
|
* @return java.util.List<com.epmet.resi.group.dto.group.result.GroupClosedListResultDTO> |
|
|
|
* @author zhaoqifeng |
|
|
|
* @date 2020/11/17 14:59 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<GroupClosedListResultDTO> getClosedListByGroup(AllIssueFormDTO formDTO) { |
|
|
|
//查询条件
|
|
|
|
int pageIndex = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); |
|
|
|
formDTO.setPageNo(pageIndex); |
|
|
|
return baseDao.selectClosedListByTopic(formDTO); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|