| 
						
						
						
					 | 
				
				 | 
				
					@ -1,17 +1,23 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					package com.epmet.service.impl; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.DateUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.constant.PingYinConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.constant.ProjectConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dto.ProjectDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dto.StatsFormDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dto.project.form.MonthProjectListFormDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dto.stats.DimAgencyDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dto.stats.DimGridDTO; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.entity.issue.IssueEntity; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.entity.org.CustomerAgencyEntity; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.entity.project.ProjectEntity; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.entity.project.ProjectProcessEntity; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.entity.stats.*; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.service.Issue.IssueService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.service.StatsProjectService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.service.org.CustomerAgencyService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.service.org.CustomerGridService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.service.project.ProjectProcessService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.service.project.ProjectService; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -63,6 +69,8 @@ public class StatsProjectServiceImpl implements StatsProjectService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private FactGridProjectMonthlyService factGridProjectMonthlyService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Autowired | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private CustomerGridService customerGridService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Autowired | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private CustomerAgencyService customerAgencyService; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    /** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Author sun | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -108,10 +116,18 @@ public class StatsProjectServiceImpl implements StatsProjectService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2:根据客户Id查询机关维度表数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        DimAgencyDTO dimAgencyDTO = new DimAgencyDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        dimAgencyDTO.setCustomerId(customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<DimAgencyDTO> dimAgencyList = dimAgencyService.getDimAgencyList(dimAgencyDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2022.3.3  平阴数据统计时只统计了五个街道的 其他三个街道是上报的,现在这三个街道在小程序也产生了项目(例行工作)数据,
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //但是dim维度表不能有这三个街道的组织,因此改查业务库组织列表数据   start  sun
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<DimAgencyDTO> dimAgencyList = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (customerId.equals(PingYinConstant.PROD_PING_YIN_CUSTOMER_ID)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<CustomerAgencyEntity> agencyList = customerAgencyService.queryAgencyListByCustomerId(customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dimAgencyList = ConvertUtils.sourceToTarget(agencyList, DimAgencyDTO.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            DimAgencyDTO dimAgencyDTO = new DimAgencyDTO(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dimAgencyDTO.setCustomerId(customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dimAgencyList = dimAgencyService.getDimAgencyList(dimAgencyDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2022.3.3  end  sun
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       /* | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					       //2022.1.12 客户数据量大 调整计算逻辑,一千条已查询,封装数据,将这部分业务数据查询拿到子方法分页查询处理  sun
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //3:根据客户Id查询项目业务表已结案数据(查询传入日期及之前的数据)
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -650,7 +666,16 @@ public class StatsProjectServiceImpl implements StatsProjectService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(date); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2:根据客户Id查询网格维度表数据
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<DimGridEntity> dimGridList = dimGridService.getGridListByCustomerId(customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2022.3.3  平阴数据统计时只统计了五个街道的 其他三个街道是上报的,现在这三个街道在小程序也产生了项目(例行工作)数据,
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //但是dim维度表不能有这三个街道的组织,因此改查业务库网格列表数据   start  sun
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<DimGridEntity> dimGridList = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (customerId.equals(PingYinConstant.PROD_PING_YIN_CUSTOMER_ID)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<DimGridDTO> gridList = customerGridService.gridListByCustomerId(customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dimGridList = ConvertUtils.sourceToTarget(gridList, DimGridEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } else { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            dimGridList = dimGridService.getGridListByCustomerId(customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //2022.3.3  end  sun
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        //3:根据客户Id查询项目业务表已结案数据(查询传入日期及之前的数据)
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ProjectEntity projectEntity = new ProjectEntity(); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |