|  |  | @ -81,30 +81,47 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic | 
			
		
	
		
			
				
					|  |  |  | 			List<ProjectEntity> info = projectService.getProjectInfo(metaData.stream().map(ScreenProjectDataDTO::getProjectId).collect(Collectors.toList())); | 
			
		
	
		
			
				
					|  |  |  | 			if(!CollectionUtils.isEmpty(info)){ | 
			
		
	
		
			
				
					|  |  |  | 				metaData = metaData.stream().flatMap(meta -> info.stream().filter(nature -> StringUtils.equals(meta.getProjectId(), | 
			
		
	
		
			
				
					|  |  |  | 						nature.getId())).map(projectInfo -> { | 
			
		
	
		
			
				
					|  |  |  | 							meta.setProjectCreateTime(projectInfo.getCreatedTime()); | 
			
		
	
		
			
				
					|  |  |  | 							meta.setProjectTitle(projectInfo.getTitle()); | 
			
		
	
		
			
				
					|  |  |  | 							meta.setOrigin(projectInfo.getOrigin()); | 
			
		
	
		
			
				
					|  |  |  | 							//直接立项的话 项目内容是项目背景 经纬度添加
 | 
			
		
	
		
			
				
					|  |  |  | 							if (ProjectConstant.PROJECT_ORIGIN_AGENCY.equals(projectInfo.getOrigin())){ | 
			
		
	
		
			
				
					|  |  |  | 								meta.setOrgType(OrgTypeConstant.AGENCY); | 
			
		
	
		
			
				
					|  |  |  | 								meta.setOrgId(projectInfo.getAgencyId()); | 
			
		
	
		
			
				
					|  |  |  | 								meta.setProjectContent(projectInfo.getBackGround()); | 
			
		
	
		
			
				
					|  |  |  | 								meta.setLinkUserId(projectInfo.getCreatedBy()); | 
			
		
	
		
			
				
					|  |  |  | 								meta.setLinkName(projectInfo.getCreatedBy()); | 
			
		
	
		
			
				
					|  |  |  | 								if (StringUtils.isNotBlank(projectInfo.getLocateDimension())){ | 
			
		
	
		
			
				
					|  |  |  | 									meta.setLatitude(new BigDecimal(projectInfo.getLocateDimension())); | 
			
		
	
		
			
				
					|  |  |  | 								} | 
			
		
	
		
			
				
					|  |  |  | 								if (StringUtils.isNotBlank(projectInfo.getLocateLongitude())){ | 
			
		
	
		
			
				
					|  |  |  | 									meta.setLongitude(new BigDecimal(projectInfo.getLocateLongitude())); | 
			
		
	
		
			
				
					|  |  |  | 								} | 
			
		
	
		
			
				
					|  |  |  | 								meta.setProjectAddress(projectInfo.getLocateAddress()); | 
			
		
	
		
			
				
					|  |  |  | 							} else { | 
			
		
	
		
			
				
					|  |  |  | 								meta.setLinkUserId(meta.getLinkName()); | 
			
		
	
		
			
				
					|  |  |  | 							} | 
			
		
	
		
			
				
					|  |  |  | 							//项目满意度得分
 | 
			
		
	
		
			
				
					|  |  |  | 							meta.setSatisfactionScore(projectService.calProjectSatisfactionScore(param.getCustomerId(),meta.getProjectId())); | 
			
		
	
		
			
				
					|  |  |  | 							return meta; | 
			
		
	
		
			
				
					|  |  |  | 					nature.getId())).map(projectInfo -> { | 
			
		
	
		
			
				
					|  |  |  | 					meta.setProjectCreateTime(projectInfo.getCreatedTime()); | 
			
		
	
		
			
				
					|  |  |  | 					meta.setProjectTitle(projectInfo.getTitle()); | 
			
		
	
		
			
				
					|  |  |  | 					meta.setOrigin(projectInfo.getOrigin()); | 
			
		
	
		
			
				
					|  |  |  | 					if (ProjectConstant.PROJECT_ORIGIN_ISSUE.equals(projectInfo.getOrigin())) { | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 						//来源于议题的,上面的initNewScreenProjectData,已经赋值orgType=grid, orgId:gridId
 | 
			
		
	
		
			
				
					|  |  |  | 						meta.setOrgName(meta.getTempGridName()); | 
			
		
	
		
			
				
					|  |  |  | 						//A:如果是来源于议题,linkUserId为话题的发布人id;
 | 
			
		
	
		
			
				
					|  |  |  | 						meta.setLinkUserId(meta.getLinkName()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 					}else if(ProjectConstant.PROJECT_ORIGIN_EVENT.equals(projectInfo.getOrigin())){ | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 						meta.setProjectContent(projectInfo.getBackGround()); | 
			
		
	
		
			
				
					|  |  |  | 						meta.setLatitude(new BigDecimal(projectInfo.getLocateDimension())); | 
			
		
	
		
			
				
					|  |  |  | 						meta.setLongitude(new BigDecimal(projectInfo.getLocateLongitude())); | 
			
		
	
		
			
				
					|  |  |  | 						meta.setProjectAddress(projectInfo.getLocateAddress()); | 
			
		
	
		
			
				
					|  |  |  | 						meta.setOrgType(OrgTypeConstant.AGENCY); | 
			
		
	
		
			
				
					|  |  |  | 						meta.setOrgId(projectInfo.getAgencyId()); | 
			
		
	
		
			
				
					|  |  |  | 						//B:如果是来源是居民端报事,此列实际为空;
 | 
			
		
	
		
			
				
					|  |  |  | 						meta.setLinkUserId(meta.getLinkName()); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 					}else if (ProjectConstant.PROJECT_ORIGIN_AGENCY.equals(projectInfo.getOrigin())) { | 
			
		
	
		
			
				
					|  |  |  | 						//直接立项的话 项目内容是项目背景 经纬度添加
 | 
			
		
	
		
			
				
					|  |  |  | 						meta.setOrgType(OrgTypeConstant.AGENCY); | 
			
		
	
		
			
				
					|  |  |  | 						meta.setOrgId(projectInfo.getAgencyId()); | 
			
		
	
		
			
				
					|  |  |  | 						//上面的initNewScreenProjectData已经赋值了orgName=组织名称
 | 
			
		
	
		
			
				
					|  |  |  | 						meta.setProjectContent(projectInfo.getBackGround()); | 
			
		
	
		
			
				
					|  |  |  | 						meta.setLinkUserId(projectInfo.getCreatedBy()); | 
			
		
	
		
			
				
					|  |  |  | 						meta.setLinkName(projectInfo.getCreatedBy()); | 
			
		
	
		
			
				
					|  |  |  | 						if (StringUtils.isNotBlank(projectInfo.getLocateDimension())) { | 
			
		
	
		
			
				
					|  |  |  | 							meta.setLatitude(new BigDecimal(projectInfo.getLocateDimension())); | 
			
		
	
		
			
				
					|  |  |  | 						} | 
			
		
	
		
			
				
					|  |  |  | 						if (StringUtils.isNotBlank(projectInfo.getLocateLongitude())) { | 
			
		
	
		
			
				
					|  |  |  | 							meta.setLongitude(new BigDecimal(projectInfo.getLocateLongitude())); | 
			
		
	
		
			
				
					|  |  |  | 						} | 
			
		
	
		
			
				
					|  |  |  | 						meta.setProjectAddress(projectInfo.getLocateAddress()); | 
			
		
	
		
			
				
					|  |  |  | 					} | 
			
		
	
		
			
				
					|  |  |  | 					//项目满意度得分
 | 
			
		
	
		
			
				
					|  |  |  | 					meta.setSatisfactionScore(projectService.calProjectSatisfactionScore(param.getCustomerId(),meta.getProjectId())); | 
			
		
	
		
			
				
					|  |  |  | 					return meta; | 
			
		
	
		
			
				
					|  |  |  | 				})).collect(Collectors.toList()); | 
			
		
	
		
			
				
					|  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  | 			//设置项目经纬度和项目内容
 | 
			
		
	
	
		
			
				
					|  |  | @ -129,13 +146,25 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 		Map<String, Set<String>> categoryMap = projectService.getProjectCategory(projectIds); | 
			
		
	
		
			
				
					|  |  |  | 		if(!CollectionUtils.isEmpty(categoryMap)){ | 
			
		
	
		
			
				
					|  |  |  | 			Map<String, String> integratedProjectCategoryMap = issueService.getIntegratedProjectCategory(categoryMap, param.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  | 			Map<String, List<String>> integratedProjectCategoryMap = issueService.getIntegratedProjectCategory(categoryMap, param.getCustomerId()); | 
			
		
	
		
			
				
					|  |  |  | 			if(!CollectionUtils.isEmpty(integratedProjectCategoryMap)){ | 
			
		
	
		
			
				
					|  |  |  | 				metaData.forEach(meta -> { | 
			
		
	
		
			
				
					|  |  |  | 					meta.setAllCategoryName(integratedProjectCategoryMap.get(meta.getProjectId())); | 
			
		
	
		
			
				
					|  |  |  | 					List<String> list1=integratedProjectCategoryMap.get(meta.getProjectId()); | 
			
		
	
		
			
				
					|  |  |  | 					if(!CollectionUtils.isEmpty(list1)){ | 
			
		
	
		
			
				
					|  |  |  | 						meta.setAllCategoryName(list1.get(0)); | 
			
		
	
		
			
				
					|  |  |  | 						meta.setCategoryCode(list1.get(1)); | 
			
		
	
		
			
				
					|  |  |  | 					}else{ | 
			
		
	
		
			
				
					|  |  |  | 						log.warn("1、projectId="+meta.getProjectId()+" category is null"); | 
			
		
	
		
			
				
					|  |  |  | 					} | 
			
		
	
		
			
				
					|  |  |  | 				}); | 
			
		
	
		
			
				
					|  |  |  | 				orientData.forEach(orient -> { | 
			
		
	
		
			
				
					|  |  |  | 					orient.setAllCategoryName(integratedProjectCategoryMap.get(orient.getProjectId())); | 
			
		
	
		
			
				
					|  |  |  | 					List<String> list2=integratedProjectCategoryMap.get(orient.getProjectId()); | 
			
		
	
		
			
				
					|  |  |  | 					if(!CollectionUtils.isEmpty(list2)){ | 
			
		
	
		
			
				
					|  |  |  | 						orient.setAllCategoryName(list2.get(0)); | 
			
		
	
		
			
				
					|  |  |  | 						orient.setCategoryCode(list2.get(1)); | 
			
		
	
		
			
				
					|  |  |  | 					}else{ | 
			
		
	
		
			
				
					|  |  |  | 						log.warn("2、projectId="+orient.getProjectId()+" category is null"); | 
			
		
	
		
			
				
					|  |  |  | 					} | 
			
		
	
		
			
				
					|  |  |  | 				}); | 
			
		
	
		
			
				
					|  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
	
		
			
				
					|  |  | @ -168,7 +197,7 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic | 
			
		
	
		
			
				
					|  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  | 		} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 		log.error(String.format("/data/stats/demo/project-test,screen_project_**表抽取完毕,customerId:%s", param.getCustomerId())); | 
			
		
	
		
			
				
					|  |  |  | 	} | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | 	/** | 
			
		
	
	
		
			
				
					|  |  | 
 |