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