-
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.
Merge pull request #689 from bcgov/feature/GRAD2-2950
GRAD2-2950: missing requirements are implemented.
- Loading branch information
Showing
4 changed files
with
100 additions
and
7 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