Skip to content

Commit

Permalink
GRAD2-2479: task is complete.
Browse files Browse the repository at this point in the history
GRAD2-2479: task is complete.
  • Loading branch information
infstar committed Jan 30, 2024
1 parent e5720e3 commit 468cd62
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,8 @@ public boolean isGraduated() {
public boolean isSCCP() {
return "SCCP".equalsIgnoreCase(program);
}

public boolean isArchived() {
return "ARC".equalsIgnoreCase(studentStatus);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ protected String getGradProgramForGraduatedStudent(String graduationRequirementY
}

protected void populateNewBatchFlags(StudentGradDTO currentStudent) {
if ("ARC".equalsIgnoreCase(currentStudent.getStudentStatus())) {
if (STUDENT_STATUS_ARCHIVED.equalsIgnoreCase(currentStudent.getStudentStatus())) {
// Transcript
currentStudent.setNewRecalculateGradStatus("Y");
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,19 @@ public void processStudent(TraxGraduationUpdateDTO updateGrad, StudentGradDTO cu
boolean isChanged = false;

log.info(" Process Student : studentID = {}, pen = {}", currentStudent.getStudentID(), updateGrad.getPen());
if ("ARC".equalsIgnoreCase(currentStudent.getStudentStatus())) {
if (currentStudent.isArchived() && currentStudent.isGraduated()) {
return;
}
// Order is important for first 3 items below!!!
// 1. School of record
if (!StringUtils.equals(updateGrad.getSchoolOfRecord(), currentStudent.getSchoolOfRecord())) {
currentStudent.setNewSchoolOfRecord(updateGrad.getSchoolOfRecord());
// Transcript
currentStudent.setNewRecalculateGradStatus("Y");
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
if (!currentStudent.isArchived()) {
// Transcript
currentStudent.setNewRecalculateGradStatus("Y");
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
}
log.info(" => school of record : current = {}, request = {}", currentStudent.getSchoolOfRecord(), currentStudent.getNewSchoolOfRecord());
isChanged = true;
}
Expand All @@ -92,10 +94,12 @@ public void processStudent(TraxGraduationUpdateDTO updateGrad, StudentGradDTO cu
if (!StringUtils.equals(gradProgram, currentStudent.getProgram())) {
handleProgramChange(gradProgram, currentStudent, updateGrad.getPen(), accessToken);
handleAdultStartDate(currentStudent);
// Transcript
currentStudent.setNewRecalculateGradStatus("Y");
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
if (!currentStudent.isArchived()) {
// Transcript
currentStudent.setNewRecalculateGradStatus("Y");
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
}
log.info(" => grad program : current = {}, request = {}", currentStudent.getProgram(), currentStudent.getNewProgram());
isChanged = true;
}
Expand All @@ -104,39 +108,45 @@ public void processStudent(TraxGraduationUpdateDTO updateGrad, StudentGradDTO cu
if (slpDate != null && "SCCP".equalsIgnoreCase(currentStudent.getUpToDateGradProgram())
&& !StringUtils.equals(slpDate, currentStudent.getGradDate())) {
currentStudent.setNewGradDate(slpDate);
// Transcript
currentStudent.setNewRecalculateGradStatus("Y");
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
if (!currentStudent.isArchived()) {
// Transcript
currentStudent.setNewRecalculateGradStatus("Y");
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
}
log.info(" => student slp date : current = {}, request = {}", currentStudent.getGradDate(), slpDate);
isChanged = true;
}
// Student Grade
if (!StringUtils.equals(updateGrad.getStudentGrade(), currentStudent.getStudentGrade())) {
currentStudent.setNewStudentGrade(updateGrad.getStudentGrade());
if (!currentStudent.isGraduated() ) { // non grad
// Transcript
currentStudent.setNewRecalculateGradStatus("Y");
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
} else {
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
if (!currentStudent.isArchived()) {
if (!currentStudent.isGraduated()) { // non grad
// Transcript
currentStudent.setNewRecalculateGradStatus("Y");
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
} else {
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
}
}
log.info(" => student grade : current = {}, request = {}", currentStudent.getStudentGrade(), currentStudent.getNewStudentGrade());
isChanged = true;
}
// Citizenship
if (!StringUtils.equals(updateGrad.getCitizenship(), currentStudent.getCitizenship())) {
currentStudent.setNewCitizenship(updateGrad.getCitizenship());
if (!currentStudent.isGraduated() ) { // non grad
// Transcript
currentStudent.setNewRecalculateGradStatus("Y");
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
} else {
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
if (!currentStudent.isArchived()) {
if (!currentStudent.isGraduated()) { // non grad
// Transcript
currentStudent.setNewRecalculateGradStatus("Y");
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
} else {
// TVR
currentStudent.setNewRecalculateProjectedGrad("Y");
}
}
log.info(" => student citizenship : current = {}, request = {}", currentStudent.getCitizenship(), currentStudent.getNewCitizenship());
isChanged = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ public void processStudent(TraxStudentStatusUpdateDTO studentStatusUpdate, Stude
// Student Status
if (!StringUtils.equals(newStudentStatus, currentStudent.getStudentStatus())) {
currentStudent.setNewStudentStatus(newStudentStatus);
if (StringUtils.equalsIgnoreCase(currentStudent.getNewStudentStatus(), "CUR")
|| StringUtils.equalsIgnoreCase(currentStudent.getNewStudentStatus(), "TER")
|| StringUtils.equalsIgnoreCase(currentStudent.getNewStudentStatus(), "DEC")) {
if (StringUtils.equalsIgnoreCase(currentStudent.getNewStudentStatus(), STUDENT_STATUS_CURRENT)
|| StringUtils.equalsIgnoreCase(currentStudent.getNewStudentStatus(), STUDENT_STATUS_TERMINATED)
|| StringUtils.equalsIgnoreCase(currentStudent.getNewStudentStatus(), STUDENT_STATUS_DECEASED)) {
// Transcript
currentStudent.setNewRecalculateGradStatus("Y");
// TVR
Expand Down

0 comments on commit 468cd62

Please sign in to comment.