From e00ffa6555115eea731715d6922396c617a90942 Mon Sep 17 00:00:00 2001 From: Jinil Sung Date: Fri, 20 Dec 2024 15:37:01 -0800 Subject: [PATCH] Missing codes in listener are committed to use schoolId. Missing codes in listener are committed to use schoolId. --- ...rchiveSchoolReportsCompletionNotificationListener.java | 2 +- .../ArchiveStudentsCompletionNotificationListener.java | 2 +- ...eleteStudentReportsCompletionNotificationListener.java | 2 +- .../RegenSchoolReportsCompletionNotificationListener.java | 2 +- .../api/batchgraduation/model/ReportGradStudentData.java | 8 ++++---- .../model/StudentCredentialDistribution.java | 4 ++-- .../batchgraduation/service/GraduationReportService.java | 8 ++++---- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/ArchiveSchoolReportsCompletionNotificationListener.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/ArchiveSchoolReportsCompletionNotificationListener.java index 0b2fa419..7af2d747 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/ArchiveSchoolReportsCompletionNotificationListener.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/ArchiveSchoolReportsCompletionNotificationListener.java @@ -50,7 +50,7 @@ public void afterJob(JobExecution jobExecution) { // 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 archived School Reports : {}", value.getMincode(), value.getNumberOfSchoolReports())); + summaryDTO.getSchools().forEach((value) -> LOGGER.info("School {} number of archived School Reports : {}", value.getSchoolId(), value.getNumberOfSchoolReports())); } } diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/ArchiveStudentsCompletionNotificationListener.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/ArchiveStudentsCompletionNotificationListener.java index 073290eb..f8c78b04 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/ArchiveStudentsCompletionNotificationListener.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/ArchiveStudentsCompletionNotificationListener.java @@ -54,7 +54,7 @@ public void afterJob(JobExecution jobExecution) { // 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 archived Students : {}", value.getMincode(), value.getNumberOfStudents())); + summaryDTO.getSchools().forEach((value) -> LOGGER.info("School {} number of archived Students : {}", value.getSchoolId(), value.getNumberOfStudents())); } } } 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 bcb4156b..3380ce31 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,7 +52,7 @@ public void afterJob(JobExecution jobExecution) { StudentSearchRequest searchRequest = summaryDTO.getStudentSearchRequest(); String userName = extractUserName(summaryDTO, jobParameters, searchRequest); - summaryDTO.getSchools().forEach((value) -> LOGGER.info("School {} number of Deleted Student Reports : {}", value.getMincode(), value.getNumberOfStudents())); + summaryDTO.getSchools().forEach((value) -> LOGGER.info("School {} number of Deleted Student Reports : {}", value.getSchoolId(), value.getNumberOfStudents())); if(summaryDTO.getProcessedCount() > 0) { List finalStudentGuids = searchRequest.getStudentIDs(); int partitionSize = finalStudentGuids.size()/200; diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/RegenSchoolReportsCompletionNotificationListener.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/RegenSchoolReportsCompletionNotificationListener.java index bcd2f39f..a3080969 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/RegenSchoolReportsCompletionNotificationListener.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/listener/RegenSchoolReportsCompletionNotificationListener.java @@ -37,7 +37,7 @@ public void afterJob(JobExecution jobExecution) { log.info(" --------------------------------------------------------------------------------------"); log.info("Errors:{}", summaryDTO.getErrors().size()); log.info(" --------------------------------------------------------------------------------------"); - summaryDTO.getSchools().forEach(value -> log.debug("School Report regenerated for {}", value.getMincode())); + summaryDTO.getSchools().forEach(value -> log.debug("School Report regenerated for {}", value.getSchoolId())); // save batch job & error history saveBatchJobHistory(summaryDTO, jobExecutionId, status, endTime); diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/ReportGradStudentData.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/ReportGradStudentData.java index 583e61a0..6c6414b8 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/ReportGradStudentData.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/ReportGradStudentData.java @@ -14,10 +14,10 @@ public class ReportGradStudentData implements Serializable { private static final long serialVersionUID = 1L; private UUID graduationStudentRecordId; - private String mincode; - private String mincodeAtGrad; - private String distcode; - private String distcodeAtGrad; + private UUID schoolOfRecordId; + private UUID schoolAtGradId; + private UUID districtId; + private UUID districtAtGradId; private String pen; private String firstName; private String middleName; diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/StudentCredentialDistribution.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/StudentCredentialDistribution.java index 1718cb38..f74c80da 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/StudentCredentialDistribution.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/model/StudentCredentialDistribution.java @@ -32,9 +32,9 @@ public class StudentCredentialDistribution implements Serializable { private List nonGradReasons; @JsonIgnore - private String schoolAtGrad; + private UUID schoolAtGradId; @JsonIgnore - private String schoolOfRecordOrigin; + private UUID schoolOfRecordOriginId; @JsonIgnore private UUID districtId; diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/service/GraduationReportService.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/service/GraduationReportService.java index 720fbeea..3ce07bc6 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/service/GraduationReportService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/service/GraduationReportService.java @@ -131,10 +131,10 @@ private StudentCredentialDistribution populateStudentCredentialDistribution(Repo dist.setPaperType(paperType); //--> Revert code back to school of record GRAD2-2758 /** dist.setSchoolId(StringUtils.isBlank(data.getMincodeAtGrad()) ? data.getMincode() : data.getMincodeAtGrad()); **/ - dist.setSchoolOfRecord(data.getMincode()); + dist.setSchoolId(data.getSchoolOfRecordId()); //<-- - dist.setSchoolAtGrad(data.getMincodeAtGrad()); - dist.setSchoolOfRecordOrigin(data.getMincode()); + dist.setSchoolAtGradId(data.getSchoolAtGradId()); + dist.setSchoolOfRecordOriginId(data.getSchoolOfRecordId()); dist.setDocumentStatusCode("COMPL"); dist.setPen(data.getPen()); dist.setLegalFirstName(data.getFirstName()); @@ -146,7 +146,7 @@ private StudentCredentialDistribution populateStudentCredentialDistribution(Repo dist.setStudentGrade(data.getStudentGrade()); dist.setNonGradReasons(data.getNonGradReasons()); dist.setLastUpdateDate(data.lastUpdateDateAsString()); - LOGGER.info("Populate Student Credential Distribution for pen {}: SchoolOfRecordOrigin->{}, SchoolAtGrad->{}, SchoolOfRecord->{}", dist.getPen(), dist.getSchoolOfRecordOrigin(), dist.getSchoolAtGrad(), dist.getSchoolOfRecord()); + LOGGER.info("Populate Student Credential Distribution for pen {}: SchoolOfRecordOrigin->{}, SchoolAtGrad->{}, SchoolOfRecord->{}", dist.getPen(), dist.getSchoolOfRecordOriginId(), dist.getSchoolAtGradId(), dist.getSchoolOfRecord()); return dist; } }