|  | @ -25,8 +25,8 @@ import com.epmet.commons.rocketmq.messages.ProjectChangedMQMsg; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.constant.*; |  |  | import com.epmet.commons.tools.constant.*; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |  |  | import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; |  |  | import com.epmet.commons.tools.exception.EpmetErrorCode; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.ExceptionUtils; |  |  |  | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.EpmetException; |  |  | import com.epmet.commons.tools.exception.EpmetException; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.epmet.commons.tools.exception.ExceptionUtils; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.exception.RenException; |  |  | import com.epmet.commons.tools.exception.RenException; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.page.PageData; |  |  | import com.epmet.commons.tools.page.PageData; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |  |  | import com.epmet.commons.tools.redis.common.CustomerOrgRedis; | 
			
		
	
	
		
		
			
				
					|  | @ -58,11 +58,12 @@ import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.send.SendMqMsgUtil; |  |  | import com.epmet.send.SendMqMsgUtil; | 
			
		
	
		
		
			
				
					|  |  | import com.epmet.service.*; |  |  | import com.epmet.service.*; | 
			
		
	
		
		
			
				
					|  |  | import com.github.pagehelper.PageHelper; |  |  | import com.github.pagehelper.PageHelper; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import com.github.pagehelper.PageInfo; | 
			
		
	
		
		
			
				
					|  |  | import com.google.common.base.Joiner; |  |  | import com.google.common.base.Joiner; | 
			
		
	
		
		
			
				
					|  |  | import com.google.gson.Gson; |  |  | import com.google.gson.Gson; | 
			
		
	
		
		
			
				
					|  |  | import com.google.gson.GsonBuilder; |  |  | import com.google.gson.GsonBuilder; | 
			
		
	
		
		
			
				
					|  |  | import org.apache.commons.collections4.CollectionUtils; |  |  |  | 
			
		
	
		
		
			
				
					|  |  | import lombok.extern.slf4j.Slf4j; |  |  | import lombok.extern.slf4j.Slf4j; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | import org.apache.commons.collections4.CollectionUtils; | 
			
		
	
		
		
			
				
					|  |  | import org.apache.commons.collections4.ListUtils; |  |  | import org.apache.commons.collections4.ListUtils; | 
			
		
	
		
		
			
				
					|  |  | import org.apache.commons.io.FilenameUtils; |  |  | import org.apache.commons.io.FilenameUtils; | 
			
		
	
		
		
			
				
					|  |  | import org.apache.commons.lang3.StringUtils; |  |  | import org.apache.commons.lang3.StringUtils; | 
			
		
	
	
		
		
			
				
					|  | @ -76,7 +77,6 @@ import org.springframework.web.context.request.RequestContextHolder; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.web.context.request.ServletRequestAttributes; |  |  | import org.springframework.web.context.request.ServletRequestAttributes; | 
			
		
	
		
		
			
				
					|  |  | import org.springframework.web.multipart.MultipartFile; |  |  | import org.springframework.web.multipart.MultipartFile; | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  |  | 
			
		
	
		
		
			
				
					|  |  | import javax.servlet.http.HttpServletRequest; |  |  | import javax.servlet.http.HttpServletRequest; | 
			
		
	
		
		
			
				
					|  |  | import java.text.ParseException; |  |  | import java.text.ParseException; | 
			
		
	
		
		
			
				
					|  |  | import java.text.SimpleDateFormat; |  |  | import java.text.SimpleDateFormat; | 
			
		
	
	
		
		
			
				
					|  | @ -2916,26 +2916,31 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit | 
			
		
	
		
		
			
				
					|  |  | 		ProjectDistributionAnalysisRightResultDTO result = new ProjectDistributionAnalysisRightResultDTO(); |  |  | 		ProjectDistributionAnalysisRightResultDTO result = new ProjectDistributionAnalysisRightResultDTO(); | 
			
		
	
		
		
			
				
					|  |  | 		List<ProjectDistributionAnalysisRightDTO> orgList = new ArrayList<>(); |  |  | 		List<ProjectDistributionAnalysisRightDTO> orgList = new ArrayList<>(); | 
			
		
	
		
		
			
				
					|  |  | 		Result<List<SonOrgResultDTO>> sonOrgList = govOrgOpenFeignClient.getSonAgencyId(formDTO.getOrgId(), agencyInfo.getLevel()); |  |  | 		Result<List<SonOrgResultDTO>> sonOrgList = govOrgOpenFeignClient.getSonAgencyId(formDTO.getOrgId(), agencyInfo.getLevel()); | 
			
		
	
		
		
			
				
					
					|  |  | 		if (!sonOrgList.success() || CollectionUtils.isEmpty(sonOrgList.getData())){ |  |  | 		if (!sonOrgList.success()){ | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 			throw new EpmetException(String.format("查询组织{%s}的下级组织失败或为空...",formDTO.getOrgId())); |  |  | 			throw new EpmetException(String.format("查询组织{%s}的下级组织失败...",formDTO.getOrgId())); | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  | 		} | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 		if (CollectionUtils.isEmpty(sonOrgList.getData())){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 			return result; | 
			
		
	
		
		
			
				
					|  |  | 		} |  |  | 		} | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 		// 所有子级orgId,并构建全部数据
 | 
			
		
	
		
		
			
				
					|  |  | 		List<SonOrgResultDTO> orgIds = sonOrgList.getData(); |  |  | 		List<SonOrgResultDTO> orgIds = sonOrgList.getData(); | 
			
		
	
		
		
			
				
					|  |  | 		if (!agencyInfo.getLevel().equals(ProjectConstant.ORG_LEVEL_COMMUNITY)){ |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 			orgList = baseDao.selectProjectCountByOrg(orgIds, formDTO.getStartDate(),formDTO.getEndDate()); |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 		}else { |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 		for (SonOrgResultDTO o : orgIds) { |  |  | 		for (SonOrgResultDTO o : orgIds) { | 
			
		
	
		
		
			
				
					|  |  | 			ProjectDistributionAnalysisRightDTO dto = new ProjectDistributionAnalysisRightDTO(); |  |  | 			ProjectDistributionAnalysisRightDTO dto = new ProjectDistributionAnalysisRightDTO(); | 
			
		
	
		
		
			
				
					|  |  | 			dto.setOrgId(o.getOrgId()); |  |  | 			dto.setOrgId(o.getOrgId()); | 
			
		
	
		
		
			
				
					|  |  | 			orgList.add(dto); |  |  | 			orgList.add(dto); | 
			
		
	
		
		
			
				
					|  |  | 		} |  |  | 		} | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 		List<ProjectDistributionAnalysisRightDTO> dtos; | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 		if (!agencyInfo.getLevel().equals(ProjectConstant.ORG_LEVEL_COMMUNITY)){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 			dtos = baseDao.selectProjectCountByOrg(orgIds, formDTO.getStartDate(),formDTO.getEndDate()); | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 		}else { | 
			
		
	
		
		
			
				
					|  |  | 			Result<List<ProjectDistributionAnalysisRightDTO>> projectCountByGrid = govIssueOpenFeignClient.getProjectCountByGrid(formDTO); |  |  | 			Result<List<ProjectDistributionAnalysisRightDTO>> projectCountByGrid = govIssueOpenFeignClient.getProjectCountByGrid(formDTO); | 
			
		
	
		
		
			
				
					|  |  | 			if (!projectCountByGrid.success()){ |  |  | 			if (!projectCountByGrid.success()){ | 
			
		
	
		
		
			
				
					|  |  | 				throw new EpmetException("查询网格项目数失败..."); |  |  | 				throw new EpmetException("查询网格项目数失败..."); | 
			
		
	
		
		
			
				
					|  |  | 			} |  |  | 			} | 
			
		
	
		
		
			
				
					
					|  |  | 			if (CollectionUtils.isNotEmpty(projectCountByGrid.getData())){ |  |  | 			dtos = projectCountByGrid.getData(); | 
			
				
				
			
		
	
		
		
			
				
					|  |  | 				orgList.stream().forEach(o -> projectCountByGrid.getData().stream().filter(p -> p.getOrgId().equals(o.getOrgId())).forEach(p -> o.setCount(p.getCount()))); |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					|  |  | 		} |  |  | 		} | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 		if (CollectionUtils.isNotEmpty(dtos)){ | 
			
		
	
		
		
			
				
					|  |  |  |  |  | 			orgList.stream().forEach(o -> dtos.stream().filter(p -> p.getOrgId().equals(o.getOrgId())).forEach(p -> o.setCount(p.getCount()))); | 
			
		
	
		
		
			
				
					|  |  | 		} |  |  | 		} | 
			
		
	
		
		
			
				
					|  |  | 		if (CollectionUtils.isEmpty(orgList)){ |  |  | 		if (CollectionUtils.isEmpty(orgList)){ | 
			
		
	
		
		
			
				
					|  |  | 			return result; |  |  | 			return result; | 
			
		
	
	
		
		
			
				
					|  | 
 |