-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* GRAD2-2934: task is completed. GRAD2-2934: task is completed. * Merging changes from hotfix 1.23.3 (#687) * Update update-configmap.sh * Update pom.xml * GRAD2-2971 Student Archive for one school needs to be able to handle > 1000 students --------- Co-authored-by: githubmamatha <106563495+githubmamatha@users.noreply.github.com> Co-authored-by: arybakov <alex.rybakov@cgi.com> Co-authored-by: Jinil Sung <infstar@gmail.com> * Enhancement is done after code review. Enhancement is done after code review. * GRAD2-2950: missing requirements are implemented. GRAD2-2950: missing requirements are implemented. --------- Co-authored-by: Jinil Sung <infstar@gmail.com> Co-authored-by: githubmamatha <106563495+githubmamatha@users.noreply.github.com> Co-authored-by: arybakov <alex.rybakov@cgi.com>
- Loading branch information
1 parent
464776c
commit ea85462
Showing
4 changed files
with
106 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradBaseService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package ca.bc.gov.educ.api.gradstudent.service; | ||
|
||
import ca.bc.gov.educ.api.gradstudent.model.entity.GraduationStudentRecordEntity; | ||
|
||
public abstract class GradBaseService { | ||
// Student Status | ||
public static final String STUDENT_STATUS_ARCHIVED = "ARC"; | ||
public static final String STUDENT_STATUS_MERGED = "MER"; | ||
public static final String STUDENT_STATUS_TERMINATED = "TER"; | ||
|
||
protected void validateStudentStatusAndResetBatchFlags(GraduationStudentRecordEntity gradEntity) { | ||
String currentStudentStatus = gradEntity.getStudentStatus(); | ||
// GRAD2-2934 | ||
// 1. If a student in GRAD is ARC/TER then do not set TVR flag when their other data changes | ||
// 2. If a student in GRAD is changed to ARC/TER then set TVR flag to NULL | ||
if (STUDENT_STATUS_ARCHIVED.equalsIgnoreCase(currentStudentStatus) || STUDENT_STATUS_TERMINATED.equalsIgnoreCase(currentStudentStatus)) { | ||
gradEntity.setRecalculateProjectedGrad(null); | ||
} | ||
// GRAD2-2922 & GRAD2-2950 | ||
// 1. If a student in GRAD is MER then do not set Transcript & TVR flags when their other data changes | ||
// 2. If a student in GRAD is changed to MER then set Transcript & TVR flags to NULL | ||
if (STUDENT_STATUS_MERGED.equalsIgnoreCase(currentStudentStatus)) { | ||
gradEntity.setRecalculateGradStatus(null); | ||
gradEntity.setRecalculateProjectedGrad(null); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters