| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -60,8 +60,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public Boolean issueExtractMain(String customerId, String dateId) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 议题信息查询
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 1. 议题信息查询
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<IssueInfoResultDTO> listResult = issueService.selectIssueInfo(customerId, dateId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<IssueMainDailyFormDTO> result = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (CollectionUtils.isEmpty(listResult)){ | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -73,7 +72,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            result.add(issueMainDailyFormDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 创建议题人ID
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 2. 创建议题人ID
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> userIds = listResult.stream().map(issue -> issue.getUserId()).distinct().collect(Collectors.toList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Map<String,Integer> map = userService.selectUserIsParty(userIds); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (null != map){ | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -85,8 +84,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 创建话题用户身份信息查询
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 3. 创建话题用户身份信息查询
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> topicIds = listResult.stream().map(issue -> issue.getTopicId()).collect(Collectors.toList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<TopicInfoResultDTO> topicInfoList = topicService.selectTopicInfo(topicIds); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (CollectionUtils.isEmpty(topicInfoList)){ | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -101,7 +99,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 根据dateId赋值
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 4. 根据dateId赋值
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        TimeListResultDTO timeList = DateUtils.getTimeList(dateId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        result.forEach(r -> { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            r.setDateId(dateId); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -116,8 +114,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 查询pid
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 5. 查询pid
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> agencyIds = result.stream().map(r -> r.getAgencyId()).distinct().collect(Collectors.toList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<AgencyInfoResultDTO> agencyInfoList = dimAgencyDao.selectAgencyInfo(agencyIds); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (CollectionUtils.isEmpty(agencyInfoList)){ | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -148,10 +145,17 @@ public class IssueExtractServiceImpl implements IssueExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        issueMainDailyDao.insertIssueMainList(result); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    /** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @Description  议题抽取(log) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @param customerId | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @param dateId | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @author zxc | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     * @date 2020/9/16 9:41 上午 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     */ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    @Override | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    public Boolean issueExtractLog(String customerId, String dateId) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<IssueLogDailyFormDTO> result = new ArrayList<>(); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 查询议题process
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 1. 查询议题process
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<IssueProcessInfoResultDTO> listResult = issueService.selectIssueProcessInfo(customerId, dateId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (CollectionUtils.isEmpty(listResult)){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            throw new RenException(ExtractConstant.ISSUE_PROCESS); | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -162,7 +166,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            result.add(issueLogDailyFormDTO); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 查询议题满意度
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 2. 查询议题满意度
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<SatisfactionInfoResultDTO> satisfactionInfoList = issueService.selectIssueSatisfactionInfo(customerId, dateId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!CollectionUtils.isEmpty(satisfactionInfoList)){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            satisfactionInfoList.forEach(s -> { | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -172,7 +176,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 查询议题支持反对
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 3. 查询议题支持反对
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<SatisfactionInfoResultDTO> voteInfoList = issueService.selectIssueVoteInfo(customerId, dateId); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (!CollectionUtils.isEmpty(voteInfoList)){ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            voteInfoList.forEach(v -> { | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -182,7 +186,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 动作操作人的身份标识是否是党员
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 4. 动作操作人的身份标识是否是党员
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> userIds = listResult.stream().map(issue -> issue.getUserId()).distinct().collect(Collectors.toList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        Map<String,Integer> map = userService.selectUserIsParty(userIds); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (null != map){ | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -195,7 +199,7 @@ public class IssueExtractServiceImpl implements IssueExtractService { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            }); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        } | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 上级ID
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        // 5. 上级ID
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<String> agencyIds = listResult.stream().map(process -> process.getAgencyId()).distinct().collect(Collectors.toList()); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        List<AgencyInfoResultDTO> agencyInfoList = dimAgencyDao.selectAgencyInfo(agencyIds); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if (CollectionUtils.isEmpty(agencyInfoList)){ | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |