diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentBaseService.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentBaseService.java index 7d4d6bf..87654c5 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentBaseService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentBaseService.java @@ -130,29 +130,6 @@ protected void populateNewBatchFlags(StudentGradDTO currentStudent) { } } - protected void validateAndAdjustNewBatchFlags(StudentGradDTO currentStudent) { - String currentStudentStatus = currentStudent.getStudentStatus(); - String newStudentStatus = currentStudent.getNewStudentStatus(); - // 1. If a student in GRAD is ARC/TER then do not set TVR flag - if (STUDENT_STATUS_ARCHIVED.equalsIgnoreCase(currentStudentStatus) || STUDENT_STATUS_TERMINATED.equalsIgnoreCase(currentStudentStatus)) { - currentStudent.setNewRecalculateProjectedGrad(null); - } - // 2. If a student in GRAD is MER then do not set Transcript & TVR flags - if (STUDENT_STATUS_MERGED.equalsIgnoreCase(currentStudentStatus)) { - currentStudent.setNewRecalculateGradStatus(null); - currentStudent.setNewRecalculateProjectedGrad(null); - } - // 3. If a student in GRAD is changed to ARC/TER then set TVR flag to NULL - if (STUDENT_STATUS_ARCHIVED.equalsIgnoreCase(newStudentStatus) || STUDENT_STATUS_TERMINATED.equalsIgnoreCase(newStudentStatus)) { - currentStudent.setNewRecalculateProjectedGrad(NULL_VALUE); - } - // 4. If a student in GRAD is changed to MER then set Transcript & TVR flags to NULL - if (STUDENT_STATUS_MERGED.equalsIgnoreCase(newStudentStatus)) { - currentStudent.setNewRecalculateGradStatus(NULL_VALUE); - currentStudent.setNewRecalculateProjectedGrad(NULL_VALUE); - } - } - private void updateProgramCountsInSummary(ConversionStudentSummaryDTO summary, String programCode, boolean isGraduated) { if (summary != null) { summary.increment(programCode, isGraduated); diff --git a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentGraduationUpdateEventService.java b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentGraduationUpdateEventService.java index 011901e..310c6b2 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentGraduationUpdateEventService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/dataconversion/service/student/StudentGraduationUpdateEventService.java @@ -68,7 +68,6 @@ public void processEvent(T request, Event event) { public void processStudent(TraxGraduationUpdateDTO updateGrad, StudentGradDTO currentStudent, String accessToken) { boolean isChanged = false; - boolean isStudentStatusChanged = false; log.info(" Process Student : studentID = {}, pen = {}", currentStudent.getStudentID(), updateGrad.getPen()); // Processing order is important for the first 3 fields below. @@ -114,13 +113,9 @@ public void processStudent(TraxGraduationUpdateDTO updateGrad, StudentGradDTO cu processStudentStatus(currentStudent, newStudentStatus); log.info(" => student status : current = {}, request = {}", currentStudent.getStudentStatus(), currentStudent.getNewStudentStatus()); isChanged = true; - isStudentStatusChanged = true; } if (isChanged) { - if (isStudentStatusChanged) { - validateAndAdjustNewBatchFlags(currentStudent); - } log.info(" Save Student : studentID = {}, pen = {}", currentStudent.getStudentID(), updateGrad.getPen()); studentProcess.saveGraduationStudent(updateGrad.getPen(), currentStudent, UPD_GRAD, accessToken); }