|
|
@ -8,17 +8,21 @@ import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.dataaggre.constant.DataSourceConstant; |
|
|
|
import com.epmet.dataaggre.constant.ProjectConstant; |
|
|
|
import com.epmet.dataaggre.dao.govorg.CustomerStaffAgencyDao; |
|
|
|
import com.epmet.dataaggre.dao.govproject.ProjectDao; |
|
|
|
import com.epmet.dataaggre.dto.govissue.result.IssueInfoDTO; |
|
|
|
import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.govorg.CustomerStaffAgencyDTO; |
|
|
|
import com.epmet.dataaggre.dto.govproject.ProjectDTO; |
|
|
|
import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO; |
|
|
|
import com.epmet.dataaggre.dto.govproject.form.ProjectDistributionFormDTO; |
|
|
|
import com.epmet.dataaggre.dto.govproject.result.AllProjectResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.govproject.result.ProjectDistributionResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.govproject.result.ProjectInfoDTO; |
|
|
|
import com.epmet.dataaggre.dto.govproject.result.ShiftProjectResultDTO; |
|
|
|
import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO; |
|
|
|
import com.epmet.dataaggre.service.govissue.GovIssueService; |
|
|
|
import com.epmet.dataaggre.service.govorg.GovOrgService; |
|
|
|
import com.epmet.dataaggre.service.govproject.GovProjectService; |
|
|
|
import com.epmet.dataaggre.service.resigroup.ResiGroupService; |
|
|
|
import com.epmet.dto.form.TimestampIntervalFormDTO; |
|
|
|
import com.epmet.dto.form.WorkMinuteFormDTO; |
|
|
|
import com.epmet.feign.EpmetCommonServiceOpenFeignClient; |
|
|
@ -46,6 +50,10 @@ public class GovProjectServiceImpl implements GovProjectService { |
|
|
|
private GovOrgService govOrgService; |
|
|
|
@Autowired |
|
|
|
private EpmetCommonServiceOpenFeignClient epmetCommonServiceOpenFeignClient; |
|
|
|
@Autowired |
|
|
|
private GovIssueService govIssueService; |
|
|
|
@Autowired |
|
|
|
private ResiGroupService resiGroupService; |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 查询项目信息 |
|
|
@ -103,6 +111,33 @@ public class GovProjectServiceImpl implements GovProjectService { |
|
|
|
return resultList; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<ProjectDistributionResultDTO> queryProjectDistribution(ProjectDistributionFormDTO formDTO) { |
|
|
|
List<ProjectDistributionResultDTO> resultDTOList = new ArrayList<>(); |
|
|
|
List<IssueInfoDTO> issueInfoDTOList = govIssueService.selectShiftProjectIssueList(formDTO.getCustomerId(), formDTO.getGridId()); |
|
|
|
if (CollectionUtils.isNotEmpty(issueInfoDTOList)) { |
|
|
|
List<String> topicIds = issueInfoDTOList.stream().map(data -> data.getTopicId()).collect(Collectors.toList()); |
|
|
|
// log.info("话题id集合:" + JSON.toJSONString(topicIds, true));
|
|
|
|
List<ResiTopicDTO> topicInfoDTOList = resiGroupService.selectTopicInfoByIds(topicIds); |
|
|
|
List<String> issueIds = issueInfoDTOList.stream().map(data -> data.getIssueId()).collect(Collectors.toList()); |
|
|
|
// log.info("议题id集合:" + JSON.toJSONString(issueIds, true));
|
|
|
|
resultDTOList = projectDao.selectList(formDTO.getCustomerId(),issueIds); |
|
|
|
for (ProjectDistributionResultDTO project : resultDTOList) { |
|
|
|
for (ResiTopicDTO topicInfoDTO : topicInfoDTOList) { |
|
|
|
if (project.getIssueId().equals(topicInfoDTO.getIssueId())) { |
|
|
|
//维度
|
|
|
|
project.setLatitude(topicInfoDTO.getDimension()); |
|
|
|
//经度
|
|
|
|
project.setLongitude(topicInfoDTO.getLongitude()); |
|
|
|
project.setGridId(topicInfoDTO.getGridId()); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return resultDTOList; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
* 全部项目 |
|
|
|