|
|
@ -62,7 +62,7 @@ public class StatsGroupServiceImpl implements StatsGroupService { |
|
|
|
DimIdGenerator.DimIdBean dimIdBean = this.getDimIdBean(date); |
|
|
|
List<DimGridEntity> gridsInfo = dimGridService.getGridListByCustomerId(customerId); |
|
|
|
List<GroupGridDailyResultDTO> resultDTOS = groupDataService.groupGridDaily(customerId,dimIdBean,gridsInfo); |
|
|
|
factGroupGridDailyService.statisticsGroupGridDaily(resultDTOS); |
|
|
|
factGroupGridDailyService.statisticsGroupGridDaily(resultDTOS,customerId); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
@ -84,7 +84,7 @@ public class StatsGroupServiceImpl implements StatsGroupService { |
|
|
|
|
|
|
|
List<DimAgencyDTO> customerAgencyInfos = dimAgencyService.getAgencyInfoByCustomerId(customerId); |
|
|
|
List<AgencyGroupDailyResultDTO> agencyGroupDaily = this.getAgencyGroupDaily(customerAgencyInfos, dimIdBean, customerId); |
|
|
|
factGroupAgencyDailyService.insertGroupAgencyDaily(agencyGroupDaily); |
|
|
|
factGroupAgencyDailyService.insertGroupAgencyDaily(agencyGroupDaily,customerId); |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
@ -125,6 +125,7 @@ public class StatsGroupServiceImpl implements StatsGroupService { |
|
|
|
AgencyGroupDailyResultDTO agencyResult = new AgencyGroupDailyResultDTO(); |
|
|
|
String agencyId = agency.getId(); |
|
|
|
agencyResult.setAgencyId(agencyId); |
|
|
|
agencyResult.setCustomerId(customerId); |
|
|
|
BeanUtils.copyProperties(timeDim,agencyResult); |
|
|
|
//机关下的所有网格(包括直属网格)
|
|
|
|
List<String> allGrid = this.getAllGrid(agencyId); |
|
|
@ -157,9 +158,9 @@ public class StatsGroupServiceImpl implements StatsGroupService { |
|
|
|
agencyResult.setGroupMemberMinCount(sorted.get(NumConstant.ZERO).getGroupCount()); |
|
|
|
agencyResult.setMinMemberGroupId(sorted.get(NumConstant.ZERO).getGroupId()); |
|
|
|
}else if (sorted.size() >= NumConstant.TWO){ |
|
|
|
groupPeopleMedian = sorted.size() % 2 == 0 ? |
|
|
|
(sorted.get(sorted.size() / 2 - 1).getGroupCount() + sorted.get(sorted.size() / 2).getGroupCount()) / 2 : |
|
|
|
sorted.get(sorted.size() / 2).getGroupCount(); |
|
|
|
groupPeopleMedian = sorted.size() % NumConstant.TWO == NumConstant.ZERO ? |
|
|
|
(sorted.get(sorted.size() / NumConstant.TWO - NumConstant.ONE).getGroupCount() + sorted.get(sorted.size() / 2).getGroupCount()) / 2 : |
|
|
|
sorted.get(sorted.size() / NumConstant.TWO).getGroupCount(); |
|
|
|
agencyResult.setGroupMedian(groupPeopleMedian); |
|
|
|
|
|
|
|
agencyResult.setGroupMemberMaxCount(sorted.get(NumConstant.ZERO).getGroupCount()); |
|
|
|