| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -26,6 +26,7 @@ import com.epmet.commons.tools.constant.NumConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.page.PageData; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.commons.tools.utils.ConvertUtils; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.constant.DataSourceConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.constant.PingYinConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.constant.ScreenConstant; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryGridDailyDao; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					import com.epmet.dao.evaluationindex.screen.ScreenProjectCategoryOrgDailyDao; | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -352,6 +353,7 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl<Sc | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    private void disposeMoreCustomerSub(String level,Boolean isGrid,String customerId, String dateId, List<CustomerRelationEntity> relationInfo,List<CustomerAgencyInfoResultDTO> agencyIdList){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<ScreenProjectCategoryOrgDailyEntity> result = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> orgIds = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (isGrid){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // community级别走这
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<CategoryProjectResultDTO> categoryInfos = gridDailyDao.selectCategoryInfo(customerId, dateId,null,null); | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -428,34 +430,18 @@ public class ScreenProjectCategoryOrgDailyServiceImpl extends BaseServiceImpl<Sc | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    List<ScreenProjectCategoryOrgDailyEntity> entities = ConvertUtils.sourceToTarget(sonResult, ScreenProjectCategoryOrgDailyEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    result.addAll(entities); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                /*if (!CollectionUtils.isEmpty(categoryProjectExists)){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    result.forEach(r -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        categoryProjectExists.forEach(c -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            if (r.getCategoryCode().equals(c.getCategoryCode())){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                r.setProjectTotal(r.getProjectTotal() + c.getProjectTotal()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                                c.setStatus(true); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    Map<Boolean, List<CategoryProjectResultDTO>> groupByStatus = categoryProjectExists.stream().collect(Collectors.groupingBy(CategoryProjectResultDTO::getStatus)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    List<CategoryProjectResultDTO> categoryProjectFalse = groupByStatus.get(false); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    if (!CollectionUtils.isEmpty(categoryProjectFalse)){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        List<ScreenProjectCategoryOrgDailyEntity> f = ConvertUtils.sourceToTarget(categoryProjectFalse, ScreenProjectCategoryOrgDailyEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                        result.addAll(f); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                if (!CollectionUtils.isEmpty(categoryProjectNotExists)){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    List<ScreenProjectCategoryOrgDailyEntity> notExists = ConvertUtils.sourceToTarget(categoryProjectNotExists, ScreenProjectCategoryOrgDailyEntity.class); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    result.addAll(notExists); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                }*/ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                // 添加此 锦水、孔村、榆山 orgId,删除时使用
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                orgIds.add(PingYinConstant.JIN_SHUI_AGENCY_ID); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                orgIds.add(PingYinConstant.KONG_CUN_AGENCY_ID); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                orgIds.add(PingYinConstant.YU_SHAN_AGENCY_ID); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 目前不考虑计算子客户组织直接创建的项目,只算内部客户
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> orgIds = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Map<String, List<CustomerAgencyInfoResultDTO>> groupByLevel = agencyIdList.stream().collect(Collectors.groupingBy(CustomerAgencyInfoResultDTO::getLevel)); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<CustomerAgencyInfoResultDTO> levelAgencyInfo = groupByLevel.get(level); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!CollectionUtils.isEmpty(levelAgencyInfo)) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            orgIds = levelAgencyInfo.stream().map(m -> m.getAgencyId()).collect(Collectors.toList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<String> orgIdss = levelAgencyInfo.stream().map(m -> m.getAgencyId()).collect(Collectors.toList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            orgIds.addAll(orgIdss); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            // 查询客户下,组织直接立项的,各项目分类下的项目数量【筛选组织创建的项目,fact_origin_project_main_daily表gridId为空】
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            List<ScreenProjectCategoryGridDailyDTO> screenProjectCategory = factOriginProjectCategoryDailyService.selectListProjectCategoryByOrg(orgIds, customerId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            if (!CollectionUtils.isEmpty(result)) { | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |