|
|
@ -1513,6 +1513,7 @@ public class DataStatsServiceImpl implements DataStatsService { |
|
|
|
log.warn("==========="); |
|
|
|
} |
|
|
|
formDTO.setStartDateId(startDate); |
|
|
|
String breforeStartDate = DateUtils.getBeforeNDay(formDTO.getStartDateId(),1); |
|
|
|
formDTO.setEndDateId(endDate); |
|
|
|
log.info("getSubWorkFact do select param:{}", JSON.toJSONString(formDTO)); |
|
|
|
List<WorkFactResultDTO> result = new ArrayList<>(); |
|
|
@ -1525,17 +1526,17 @@ public class DataStatsServiceImpl implements DataStatsService { |
|
|
|
} |
|
|
|
List<String> gridIdList = subAgencyList.stream().map(ScreenCustomerGridDTO::getGridId).collect(Collectors.toList()); |
|
|
|
//查询组织的话题转议题数据
|
|
|
|
List<SubGridFormDTO.Topic> toIssueStart = dataStatsDao.getSubGridTopicShiftIssue(gridIdList, formDTO.getStartDateId()); |
|
|
|
List<SubGridFormDTO.Topic> toIssueStart = dataStatsDao.getSubGridTopicShiftIssue(gridIdList, breforeStartDate); |
|
|
|
List<SubGridFormDTO.Topic> toIssueEnd = dataStatsDao.getSubGridTopicShiftIssue(gridIdList, formDTO.getEndDateId()); |
|
|
|
Map<String, Integer> toIssueStartMap = toIssueStart.stream().collect(Collectors.toMap(SubGridFormDTO.Topic::getGridId, SubGridFormDTO.Topic::getShiftedIssueTotal, (o1, o2) -> o1)); |
|
|
|
Map<String, Integer> toIssueEndMap = toIssueEnd.stream().collect(Collectors.toMap(SubGridFormDTO.Topic::getGridId, SubGridFormDTO.Topic::getShiftedIssueTotal, (o1, o2) -> o1)); |
|
|
|
//查询组织的议题转项目数据
|
|
|
|
List<SubGridIssueResultDTO> toProjectStart = dataStatsDao.getSubGridIssue(gridIdList, formDTO.getStartDateId()); |
|
|
|
List<SubGridIssueResultDTO> toProjectStart = dataStatsDao.getSubGridIssue(gridIdList, breforeStartDate); |
|
|
|
List<SubGridIssueResultDTO> toProjectEnd = dataStatsDao.getSubGridIssue(gridIdList, formDTO.getEndDateId()); |
|
|
|
Map<String, Integer> toProjectStartMap = toProjectStart.stream().collect(Collectors.toMap(SubGridIssueResultDTO::getGridId, SubGridIssueResultDTO::getShiftProjectTotal, (o1, o2) -> o1)); |
|
|
|
Map<String, Integer> toProjectEndMap = toProjectEnd.stream().collect(Collectors.toMap(SubGridIssueResultDTO::getGridId, SubGridIssueResultDTO::getShiftProjectTotal, (o1, o2) -> o1)); |
|
|
|
//查询组织已关闭的项目数据
|
|
|
|
List<SubGridProjectResultDTO> closeProjectStart = dataStatsDao.getSubGridProject(gridIdList, formDTO.getStartDateId()); |
|
|
|
List<SubGridProjectResultDTO> closeProjectStart = dataStatsDao.getSubGridProject(gridIdList, breforeStartDate); |
|
|
|
List<SubGridProjectResultDTO> closeProjectEnd = dataStatsDao.getSubGridProject(gridIdList, formDTO.getEndDateId()); |
|
|
|
Map<String, Integer> closeProjectStartMap = closeProjectStart.stream().collect(Collectors.toMap(SubGridProjectResultDTO::getGridId, SubGridProjectResultDTO::getClosedProjectTotal, (o1, o2) -> o1)); |
|
|
|
Map<String, Integer> closeProjectEndMap = closeProjectEnd.stream().collect(Collectors.toMap(SubGridProjectResultDTO::getGridId, SubGridProjectResultDTO::getClosedProjectTotal, (o1, o2) -> o1)); |
|
|
@ -1565,23 +1566,23 @@ public class DataStatsServiceImpl implements DataStatsService { |
|
|
|
|
|
|
|
List<String> agencyList = subAgencyList.stream().map(ScreenCustomerAgencyDTO::getAgencyId).collect(Collectors.toList()); |
|
|
|
//查询组织的话题转议题数据
|
|
|
|
List<SubAgencyFormDTO.Topic> toIssueStart = dataStatsDao.getSubAgencyTopicShiftIssue(agencyList, formDTO.getStartDateId()); |
|
|
|
List<SubAgencyFormDTO.Topic> toIssueStart = dataStatsDao.getSubAgencyTopicShiftIssue(agencyList, breforeStartDate); |
|
|
|
List<SubAgencyFormDTO.Topic> toIssueEnd = dataStatsDao.getSubAgencyTopicShiftIssue(agencyList, formDTO.getEndDateId()); |
|
|
|
Map<String, Integer> toIssueStartMap = toIssueStart.stream().collect(Collectors.toMap(SubAgencyFormDTO.Topic::getAgencyId, SubAgencyFormDTO.Topic::getShiftedIssueTotal, (o1, o2) -> o1)); |
|
|
|
Map<String, Integer> toIssueEndMap = toIssueEnd.stream().collect(Collectors.toMap(SubAgencyFormDTO.Topic::getAgencyId, SubAgencyFormDTO.Topic::getShiftedIssueTotal, (o1, o2) -> o1)); |
|
|
|
//查询组织的议题转项目数据
|
|
|
|
List<SubAgencyIssueResultDTO> toProjectStart = dataStatsDao.getSubAgencyIssue(agencyList, formDTO.getStartDateId()); |
|
|
|
List<SubAgencyIssueResultDTO> toProjectStart = dataStatsDao.getSubAgencyIssue(agencyList, breforeStartDate); |
|
|
|
List<SubAgencyIssueResultDTO> toProjectEnd = dataStatsDao.getSubAgencyIssue(agencyList, formDTO.getEndDateId()); |
|
|
|
Map<String, Integer> toProjectStartMap = toProjectStart.stream().collect(Collectors.toMap(SubAgencyIssueResultDTO::getAgencyId, SubAgencyIssueResultDTO::getShiftProjectTotal, (o1, o2) -> o1)); |
|
|
|
Map<String, Integer> toProjectEndMap = toProjectEnd.stream().collect(Collectors.toMap(SubAgencyIssueResultDTO::getAgencyId, SubAgencyIssueResultDTO::getShiftProjectTotal, (o1, o2) -> o1)); |
|
|
|
//查询组织已关闭的项目数据
|
|
|
|
List<SubAgencyProjectResultDTO> closeProjectStart = dataStatsDao.getSubAgencyProject(agencyList, formDTO.getStartDateId()); |
|
|
|
List<SubAgencyProjectResultDTO> closeProjectStart = dataStatsDao.getSubAgencyProject(agencyList, breforeStartDate); |
|
|
|
List<SubAgencyProjectResultDTO> closeProjectEnd = dataStatsDao.getSubAgencyProject(agencyList, formDTO.getEndDateId()); |
|
|
|
Map<String, Integer> closeProjectStartMap = closeProjectStart.stream().collect(Collectors.toMap(SubAgencyProjectResultDTO::getAgencyId, SubAgencyProjectResultDTO::getClosedProjectTotal, (o1, o2) -> o1)); |
|
|
|
Map<String, Integer> closeProjectEndMap = closeProjectEnd.stream().collect(Collectors.toMap(SubAgencyProjectResultDTO::getAgencyId, SubAgencyProjectResultDTO::getClosedProjectTotal, (o1, o2) -> o1)); |
|
|
|
//巡查次数和时间
|
|
|
|
List<String> agencyFullIds = subAgencyList.stream().map(o -> o.getPids().concat(StrConstant.COLON).concat(o.getAgencyId())).collect(Collectors.toList()); |
|
|
|
List<PatrolDailySumResult> patrolList = statsStaffPatrolRecordDailyService.getPatrolSumList(agencyFullIds,formDTO.getStartDateId(),formDTO.getEndDateId()); |
|
|
|
List<PatrolDailySumResult> patrolList = statsStaffPatrolRecordDailyService.getPatrolSumList(agencyFullIds,breforeStartDate,formDTO.getEndDateId()); |
|
|
|
Map<String, PatrolDailySumResult> patrolListMap = patrolList.stream().collect(Collectors.toMap(PatrolDailySumResult::getFullAgencyId, o -> o, (o1, o2) -> o1)); |
|
|
|
|
|
|
|
subAgencyList.forEach(agency->{ |
|
|
|