From ca08576c4918785d4abaf531230eabab5939fe73 Mon Sep 17 00:00:00 2001 From: arybakov Date: Tue, 27 Aug 2024 16:26:10 -0600 Subject: [PATCH] GRAD2-2817 TVR Delete Process - Backend Changes Endpoints --- ...leteStudentReportsCompletionNotificationListener.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/DeleteStudentReportsCompletionNotificationListener.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/DeleteStudentReportsCompletionNotificationListener.java index e6823428..bcb4156b 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/DeleteStudentReportsCompletionNotificationListener.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/DeleteStudentReportsCompletionNotificationListener.java @@ -52,10 +52,6 @@ public void afterJob(JobExecution jobExecution) { StudentSearchRequest searchRequest = summaryDTO.getStudentSearchRequest(); String userName = extractUserName(summaryDTO, jobParameters, searchRequest); - String jobParametersDTO = buildJobParametersDTO(jobType, studentSearchRequest, null, null); - // save batch job & error history - processBatchJobHistory(summaryDTO, jobExecutionId, status, jobTrigger, jobType, startTime, endTime, jobParametersDTO); - LOGGER.info(" --------------------------------------------------------------------------------------"); summaryDTO.getSchools().forEach((value) -> LOGGER.info("School {} number of Deleted Student Reports : {}", value.getMincode(), value.getNumberOfStudents())); if(summaryDTO.getProcessedCount() > 0) { List finalStudentGuids = searchRequest.getStudentIDs(); @@ -66,6 +62,11 @@ public void afterJob(JobExecution jobExecution) { restUtils.updateStudentGradRecordHistory(studentGuidsSubList, jobExecutionId, userName, "TVRDELETED"); } } + String jobParametersDTO = buildJobParametersDTO(jobType, studentSearchRequest, null, null); + // save batch job & error history + processBatchJobHistory(summaryDTO, jobExecutionId, status, jobTrigger, jobType, startTime, endTime, jobParametersDTO); + LOGGER.info(" --------------------------------------------------------------------------------------"); + } } }