Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop/alex grad2 2817 #520

Merged
merged 2 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

import static ca.bc.gov.educ.api.batchgraduation.util.EducGradBatchGraduationApiConstants.SEARCH_REQUEST;

Expand Down Expand Up @@ -56,7 +55,6 @@ public void afterJob(JobExecution jobExecution) {
processBatchJobHistory(summaryDTO, jobExecutionId, status, jobTrigger, jobType, startTime, endTime, jobParametersDTO);
LOGGER.info(" --------------------------------------------------------------------------------------");
summaryDTO.getSchools().forEach((value) -> LOGGER.info("School {} number of archived Students : {}", value.getMincode(), value.getNumberOfStudents()));
restUtils.updateStudentGradRecordHistory(List.of(), jobExecutionId, userName, "USERSTUDARC");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,15 @@ public Map<String, ExecutionContext> partition(int gridSize) {
} else {
List<UUID> studentGuidsBySearch = restUtils.getStudentIDsBySearchCriteriaOrAll(searchRequest, distributionSummaryDTO);
List<String> studentGuidsBySearchString = studentGuidsBySearch.stream().map(UUID::toString).toList();
for(String reportType: searchRequest.getReportTypes()) {
Long studentReportsCount = restUtils.getTotalReportsForProcessing(studentGuidsBySearchString, reportType, distributionSummaryDTO);
Integer guidsRowCount = Integer.min(studentReportsCount.intValue(), quantity);
totalStudentReportsCount += guidsRowCount;
updateBatchJobHistory(algorithmJobHistory, totalStudentReportsCount);
List<UUID> reportTypeGuids = restUtils.getReportStudentIDsByStudentIDsAndReportType(studentGuidsBySearchString, reportType, guidsRowCount, distributionSummaryDTO);
finalStudentGuids.addAll(reportTypeGuids);
if(!studentGuidsBySearch.isEmpty()) {
for (String reportType : searchRequest.getReportTypes()) {
Long studentReportsCount = restUtils.getTotalReportsForProcessing(studentGuidsBySearchString, reportType, distributionSummaryDTO);
Integer guidsRowCount = Integer.min(studentReportsCount.intValue(), quantity);
totalStudentReportsCount += guidsRowCount;
updateBatchJobHistory(algorithmJobHistory, totalStudentReportsCount);
List<UUID> reportTypeGuids = restUtils.getReportStudentIDsByStudentIDsAndReportType(studentGuidsBySearchString, reportType, guidsRowCount, distributionSummaryDTO);
finalStudentGuids.addAll(reportTypeGuids);
}
}
}

Expand Down
Loading