public function generate(ClientSurvey $client_survey, string $locale): EmployeeSatisfactionDataObject 	{ 		$exportPdfService = new ExportPdfService; 		$benchmarkReportService = new BenchmarkReportService; 		$employeeSatisfactionDataObject = new EmployeeSatisfactionDataObject;  		$survey = $exportPdfService->getClientSurveyData($client_survey);  		$categories_data = $benchmarkReportService->calculateClientSurveyFinalGrade($client_survey);  		$employeeSatisfactionDataObject->setEmployeeSatisfactionScore(round(array_sum(array_column($categories_data, 'score')) / $survey->categories->count(), 3));  		// get all client surveys with data(categoris,questions,answers) for survey_id(same year) & company size 		$client_surveys = $this->getClientSurveysWithData($client_survey);  		// returns total avg categories score for specific number of client surveys(categoris avg scores), survey_id(year) & company size 		$categories_avg_score_by_company_size = $this->getAverageCategoriesScoreByCompanySize($client_surveys, $locale); 		$employeeSatisfactionDataObject->setCategoriesAvgScoreByCompanySize($categories_avg_score_by_company_size);  		// get number of companies by category 		$employeeSatisfactionDataObject->setCompaniesNumberInCategory($client_surveys->count());  		// get all client surveys with data(categoris,questions,answers) for survey_id(same year) & for all company sizes 		$client_surveys = $this->getClientSurveysWithData($client_survey, true);  		// returns total avg categories score for specific number of client surveys(categoris avg scores), survey_id(year) & for all company sizes 		$categories_avg_score_all_company_sizes = $this->getAverageCategoriesScoreByCompanySize($client_surveys, $locale); 		$employeeSatisfactionDataObject->setCategoriesAvgScoreAllCompanySizes($categories_avg_score_all_company_sizes); 		// get client_survey_id,client_id, child_industry_id & parent_industry_id 		$client_industries = $this->getClientsWithIndustryIds($client_survey);  		// get client survey parent & child industry IDs 		$client_surveys_with_scores = collect($this->getCategoriesAvgScoreByIndustryId($client_surveys, $client_industries, $locale));  		$client_survey_parent_id = $client_surveys_with_scores->where('client_survey_id', $client_survey->getKey())->pluck('parent_industry_id'); 		$client_survey_child_id = $client_surveys_with_scores->where('client_survey_id', $client_survey->getKey())->pluck('child_industry_id');  		// get total avg categories scores by child & parent industry 		$avg_score_by_basic_industry = $client_surveys_with_scores->where('parent_industry_id', $client_survey_parent_id[0])->avg('score') ?? 0;// aka parent industry 		$employeeSatisfactionDataObject->setNumberOfBasicIndustries($client_surveys_with_scores->where('parent_industry_id', $client_survey_parent_id[0])->count()); 		$avg_score_by_specific_industry = $client_surveys_with_scores->where('child_industry_id', $client_survey_child_id[0])->avg('score') ?? 0;// aka child industry 		$employeeSatisfactionDataObject->setNumberOfSpecificIndustries($client_surveys_with_scores->where('child_industry_id', $client_survey_child_id[0])->count());  		$employeeSatisfactionDataObject->setAvgScoreByBasicIndustry($avg_score_by_basic_industry); 		$employeeSatisfactionDataObject->setAvgScoreBySpecificIndustry($avg_score_by_specific_industry);  		return $employeeSatisfactionDataObject; 	}