|
|
@ -34,8 +34,6 @@ import java.util.stream.Collectors; |
|
|
|
@Slf4j |
|
|
|
public class StatsGroupServiceImpl implements StatsGroupService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private DimGridService dimGridService; |
|
|
|
@Autowired |
|
|
|
private DimAgencyService dimAgencyService; |
|
|
|
@Autowired |
|
|
@ -63,15 +61,15 @@ public class StatsGroupServiceImpl implements StatsGroupService { |
|
|
|
List<String> customerIds; |
|
|
|
do { |
|
|
|
customerIds = dimCustomerService.selectCustomerIdPage(pageNo,pageSize); |
|
|
|
DimIdGenerator.DimIdBean dimIdBean = this.getDimIdBean(date); |
|
|
|
if (customerIds.size() != NumConstant.ZERO){ |
|
|
|
customerIds.forEach(customerId -> { |
|
|
|
try { |
|
|
|
DimIdGenerator.DimIdBean dimIdBean = this.getDimIdBean(date); |
|
|
|
List<GridIdListByCustomerResultDTO> gridsInfo = customerGridService.getCustomerGridIdList(customerId, dimIdBean.getDateId()); |
|
|
|
List<GroupGridDailyResultDTO> resultDTOS = groupDataService.groupGridDaily(customerId,dimIdBean,gridsInfo); |
|
|
|
factGroupGridDailyService.statisticsGroupGridDaily(resultDTOS,customerId); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error(GroupConstant.STATS_FAILED_GRID_DAILY+customerId,e); |
|
|
|
log.error(String.format(GroupConstant.STATS_FAILED_GRID_DAILY,customerId,LocalDate.now(),e.getMessage())); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
@ -98,7 +96,7 @@ public class StatsGroupServiceImpl implements StatsGroupService { |
|
|
|
List<AgencyGroupDailyResultDTO> agencyGroupDaily = this.getAgencyGroupDaily(customerAgencyInfos, dimIdBean, customerId); |
|
|
|
factGroupAgencyDailyService.insertGroupAgencyDaily(agencyGroupDaily,customerId); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error(GroupConstant.STATS_FAILED_AGENCY_DAILY+customerId,e); |
|
|
|
log.error(String.format(GroupConstant.STATS_FAILED_AGENCY_DAILY,customerId,LocalDate.now(),e.getMessage())); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|