|
@@ -3,7 +3,6 @@ package com.persagy.apm.energy.report.saasweb.service.impl;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.persagy.apm.common.model.dto.PoemsFeignBaseDTO;
|
|
|
import com.persagy.apm.common.response.PoemsFeignResponse;
|
|
|
-import com.persagy.apm.energy.report.saasweb.client.SaasWebClient;
|
|
|
import com.persagy.apm.energy.report.saasweb.model.ConvertSaasWebTool;
|
|
|
import com.persagy.apm.energy.report.saasweb.model.dto.QueryByProjectIdDTO;
|
|
|
import com.persagy.apm.energy.report.saasweb.model.dto.QueryPartitionDTO;
|
|
@@ -29,7 +28,7 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class SaasWebServiceImpl implements ISaasWebService {
|
|
|
@Autowired
|
|
|
- SaasWebClient saasWebClient;
|
|
|
+ SaasWebClientWrapper saasWebClientWrapper;
|
|
|
|
|
|
@Override
|
|
|
public ReportProjectVO getReportProjectInfo(String projectId) {
|
|
@@ -39,7 +38,7 @@ public class SaasWebServiceImpl implements ISaasWebService {
|
|
|
queryByProjectIdDTO.setProjectId(projectId);
|
|
|
|
|
|
// 获取项目信息
|
|
|
- PoemsFeignResponse<SimpleProjectVO> projectInfoResponse = saasWebClient.getProjectById(queryByProjectIdDTO);
|
|
|
+ PoemsFeignResponse<SimpleProjectVO> projectInfoResponse = saasWebClientWrapper.getProjectById(queryByProjectIdDTO);
|
|
|
List<SimpleProjectVO> projectInfos = projectInfoResponse.getContent();
|
|
|
if (!CollectionUtils.isEmpty(projectInfos)) {
|
|
|
SimpleProjectVO simpleProjectVO = projectInfos.get(0);
|
|
@@ -70,7 +69,7 @@ public class SaasWebServiceImpl implements ISaasWebService {
|
|
|
queryByProjectIdDTO.setProjectId(projectId);
|
|
|
|
|
|
// 获取项目下的建筑信息
|
|
|
- PoemsFeignResponse<BuildingInfoVO> buildsResponse = saasWebClient.listBuildingsByProjectId(queryByProjectIdDTO);
|
|
|
+ PoemsFeignResponse<BuildingInfoVO> buildsResponse = saasWebClientWrapper.listBuildingsByProjectId(queryByProjectIdDTO);
|
|
|
List<BuildingInfoVO> buildingInfoVOList = buildsResponse.getContent();
|
|
|
// 统计项目下建筑总的商业面积,地下停车场面积
|
|
|
BigDecimal totalCommercialArea = new BigDecimal("0");
|
|
@@ -98,7 +97,7 @@ public class SaasWebServiceImpl implements ISaasWebService {
|
|
|
// 查询管理分区信息
|
|
|
QueryPartitionDTO queryPartitionDTO = new QueryPartitionDTO();
|
|
|
queryPartitionDTO.setManagePartitionIds(Lists.newArrayList(areaCode));
|
|
|
- PoemsFeignResponse<PoemsPartitionVO> partitionsResponse = saasWebClient.queryPartitionsByIds(queryPartitionDTO);
|
|
|
+ PoemsFeignResponse<PoemsPartitionVO> partitionsResponse = saasWebClientWrapper.queryPartitionsByIds(queryPartitionDTO);
|
|
|
List<PoemsPartitionVO> partitionVOList = partitionsResponse.getContent();
|
|
|
if (!CollectionUtils.isEmpty(partitionVOList)) {
|
|
|
PoemsPartitionVO poemsPartitionVO = partitionVOList.get(0);
|
|
@@ -140,7 +139,7 @@ public class SaasWebServiceImpl implements ISaasWebService {
|
|
|
// 获取管理分区下的项目
|
|
|
QueryProjectDTO queryProjectDTO = new QueryProjectDTO();
|
|
|
queryProjectDTO.setGroupManageZone(areaCode);
|
|
|
- PoemsFeignResponse<PoemsProjectVO> projectsResponse = saasWebClient.queryProjects(queryProjectDTO);
|
|
|
+ PoemsFeignResponse<PoemsProjectVO> projectsResponse = saasWebClientWrapper.queryProjects(queryProjectDTO);
|
|
|
return projectsResponse.getContent();
|
|
|
}
|
|
|
|
|
@@ -175,7 +174,7 @@ public class SaasWebServiceImpl implements ISaasWebService {
|
|
|
// 获取用户可选的所有项目
|
|
|
PoemsFeignBaseDTO poemsFeignBaseDTO = new PoemsFeignBaseDTO();
|
|
|
poemsFeignBaseDTO.setDefaultValue();
|
|
|
- PoemsFeignResponse<UserProjectsInfoVO> currentUserProjectsInfosResponse = saasWebClient.getCurrentUserProjectsInfo(poemsFeignBaseDTO);
|
|
|
+ PoemsFeignResponse<UserProjectsInfoVO> currentUserProjectsInfosResponse = saasWebClientWrapper.getCurrentUserProjectsInfo(poemsFeignBaseDTO);
|
|
|
List<UserProjectsInfoVO> currentUserProjectsInfos = currentUserProjectsInfosResponse.getContent();
|
|
|
if (!CollectionUtils.isEmpty(currentUserProjectsInfos)) {
|
|
|
UserProjectsInfoVO userProjectsInfoVO = currentUserProjectsInfos.get(0);
|
|
@@ -239,7 +238,7 @@ public class SaasWebServiceImpl implements ISaasWebService {
|
|
|
// 获取业态下所有的子业态
|
|
|
PoemsFeignBaseDTO poemsFeignBaseDTO = new PoemsFeignBaseDTO();
|
|
|
poemsFeignBaseDTO.setDefaultValue();
|
|
|
- PoemsFeignResponse<FunctionTypeVO> functionTypesResponse = saasWebClient.getAllProjectFunctionTypes(poemsFeignBaseDTO);
|
|
|
+ PoemsFeignResponse<FunctionTypeVO> functionTypesResponse = saasWebClientWrapper.getAllProjectFunctionTypes(poemsFeignBaseDTO);
|
|
|
List<FunctionTypeVO> functionTypeVOList = functionTypesResponse.getContent();
|
|
|
return recursiveFindSonBuildingTypes(buildingType, functionTypeVOList);
|
|
|
}
|
|
@@ -334,7 +333,7 @@ public class SaasWebServiceImpl implements ISaasWebService {
|
|
|
// 获取用户所有可选的分区信息
|
|
|
PoemsFeignBaseDTO poemsFeignBaseDTO = new PoemsFeignBaseDTO();
|
|
|
poemsFeignBaseDTO.setDefaultValue();
|
|
|
- PoemsFeignResponse<UserPartitionProjectsInfoVO> partitionsResponse = saasWebClient.getCurrentUserPartitionProjectsInfo(poemsFeignBaseDTO);
|
|
|
+ PoemsFeignResponse<UserPartitionProjectsInfoVO> partitionsResponse = saasWebClientWrapper.getCurrentUserPartitionProjectsInfo(poemsFeignBaseDTO);
|
|
|
List<UserPartitionProjectsInfoVO> userPartitionProjects = partitionsResponse.getContent();
|
|
|
if (CollectionUtils.isEmpty(userPartitionProjects)) {
|
|
|
return Lists.newArrayList();
|