|
@ -135,10 +135,15 @@ public class StatsGroupServiceImpl implements StatsGroupService { |
|
|
if (customerIds.size() != NumConstant.ZERO) { |
|
|
if (customerIds.size() != NumConstant.ZERO) { |
|
|
DimIdGenerator.DimIdBean dimIdBean = this.getDimIdBean(formDTO); |
|
|
DimIdGenerator.DimIdBean dimIdBean = this.getDimIdBean(formDTO); |
|
|
customerIds.forEach(customerId -> { |
|
|
customerIds.forEach(customerId -> { |
|
|
|
|
|
Boolean status = true; |
|
|
try { |
|
|
try { |
|
|
List<DimAgencyDTO> customerAgencyInfos = dimAgencyService.getAgencyInfoByCustomerId(customerId); |
|
|
List<DimAgencyDTO> customerAgencyInfos = dimAgencyService.getAgencyInfoByCustomerId(customerId); |
|
|
List<AgencyGroupDailyResultDTO> agencyGroupDaily = this.getAgencyGroupDaily(customerAgencyInfos, dimIdBean, customerId); |
|
|
List<List<DimAgencyDTO>> partition = ListUtils.partition(customerAgencyInfos, NumConstant.ONE_HUNDRED); |
|
|
factGroupAgencyDailyService.insertGroupAgencyDaily(agencyGroupDaily, customerId); |
|
|
for (List<DimAgencyDTO> p : partition) { |
|
|
|
|
|
List<AgencyGroupDailyResultDTO> agencyGroupDaily = this.getAgencyGroupDaily(p, dimIdBean, customerId); |
|
|
|
|
|
factGroupAgencyDailyService.insertGroupAgencyDaily(agencyGroupDaily, customerId,status); |
|
|
|
|
|
status = false; |
|
|
|
|
|
} |
|
|
} catch (Exception e) { |
|
|
} catch (Exception e) { |
|
|
log.error(String.format(GroupConstant.STATS_FAILED_AGENCY_DAILY, customerId, LocalDate.now(), e)); |
|
|
log.error(String.format(GroupConstant.STATS_FAILED_AGENCY_DAILY, customerId, LocalDate.now(), e)); |
|
|
} |
|
|
} |
|
|