Skip to content

Commit 9833750

Browse files
committed
findStudentInCurrentCollectionInAllDistrict to use assigned student id
1 parent 8f76610 commit 9833750

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

api/src/main/java/ca/bc/gov/educ/studentdatacollection/api/calculator/FteCalculatorUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public boolean reportedInOnlineSchoolInAnyPreviousCollectionThisSchoolYear(Stude
328328
}
329329

330330
public boolean reportedInOnlineSchoolInCurrentCollection(StudentRuleData studentRuleData) {
331-
List<SdcSchoolCollectionStudentEntity> currentCollections = sdcSchoolCollectionStudentRepository.findStudentInCurrentCollectionInAllDistrict(studentRuleData.getSdcSchoolCollectionStudentEntity().getStudentPen(),
331+
List<SdcSchoolCollectionStudentEntity> currentCollections = sdcSchoolCollectionStudentRepository.findStudentInCurrentCollectionInAllDistrict(studentRuleData.getSdcSchoolCollectionStudentEntity().getAssignedStudentId(),
332332
studentRuleData.getSdcSchoolCollectionStudentEntity().getSdcSchoolCollection().getCollectionEntity().getCollectionID(),
333333
studentRuleData.getSdcSchoolCollectionStudentEntity().getSdcSchoolCollection().getSdcSchoolCollectionID());
334334

api/src/main/java/ca/bc/gov/educ/studentdatacollection/api/repository/v1/SdcSchoolCollectionStudentRepository.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,10 +1142,10 @@ NOT IN (SELECT saga.sdcSchoolCollectionStudentID FROM SdcSagaEntity saga WHERE s
11421142
WHERE C.collectionID = :collectionID
11431143
AND SSC.sdcSchoolCollectionID = SSCS.sdcSchoolCollection.sdcSchoolCollectionID
11441144
AND SSC.sdcSchoolCollectionID != :sdcSchoolCollectionIDToExclude
1145-
AND SSCS.studentPen = :studentPEN
1145+
AND SSCS.assignedStudentId = :assignedStudentID
11461146
AND SSCS.sdcSchoolCollectionStudentStatusCode NOT IN ('DELETED', 'ERROR')
11471147
""")
1148-
List<SdcSchoolCollectionStudentEntity> findStudentInCurrentCollectionInAllDistrict(String studentPEN, UUID collectionID, UUID sdcSchoolCollectionIDToExclude);
1148+
List<SdcSchoolCollectionStudentEntity> findStudentInCurrentCollectionInAllDistrict(UUID assignedStudentID, UUID collectionID, UUID sdcSchoolCollectionIDToExclude);
11491149

11501150
@Query(value="""
11511151
SELECT SSCS FROM SdcSchoolCollectionEntity SSC, CollectionEntity C, SdcSchoolCollectionStudentEntity SSCS, SdcDistrictCollectionEntity SDC

api/src/main/java/ca/bc/gov/educ/studentdatacollection/api/rules/validationrules/impl/SummerStudentOnlineLearningRule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public List<SdcSchoolCollectionStudentValidationIssue> executeValidation(Student
6969
var historicalStudentCollection = validationRulesService.getStudentInHistoricalCollectionInAllDistrict(studentRuleData);
7070
historicalStudentCollection.add(studentRuleData.getSdcSchoolCollectionStudentEntity());
7171

72-
var otherRecordsForStudentInCurrentCollection = validationRulesService.getStudentInCurrentCollectionInAllDistrict(studentRuleData.getSdcSchoolCollectionStudentEntity().getStudentPen(),
72+
var otherRecordsForStudentInCurrentCollection = validationRulesService.getStudentInCurrentCollectionInAllDistrict(studentRuleData.getSdcSchoolCollectionStudentEntity().getAssignedStudentId(),
7373
studentRuleData.getSdcSchoolCollectionStudentEntity().getSdcSchoolCollection().getCollectionEntity().getCollectionID(),
7474
studentRuleData.getSdcSchoolCollectionStudentEntity().getSdcSchoolCollection().getSdcSchoolCollectionID());
7575

api/src/main/java/ca/bc/gov/educ/studentdatacollection/api/service/v1/ValidationRulesService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ public List<SdcSchoolCollectionStudentEntity> getStudentInHistoricalCollectionIn
239239
return sdcSchoolStudentRepository.findStudentInCurrentFiscalInAllDistrict(studentRuleData.getHistoricStudentIds(), noOfCollectionsForLookup);
240240
}
241241

242-
public List<SdcSchoolCollectionStudentEntity> getStudentInCurrentCollectionInAllDistrict(String studentPEN, UUID collectionID, UUID sdcSchoolCollectionIDToExclude) {
243-
return sdcSchoolStudentRepository.findStudentInCurrentCollectionInAllDistrict(studentPEN, collectionID, sdcSchoolCollectionIDToExclude);
242+
public List<SdcSchoolCollectionStudentEntity> getStudentInCurrentCollectionInAllDistrict(UUID assignedStudentID, UUID collectionID, UUID sdcSchoolCollectionIDToExclude) {
243+
return sdcSchoolStudentRepository.findStudentInCurrentCollectionInAllDistrict(assignedStudentID, collectionID, sdcSchoolCollectionIDToExclude);
244244
}
245245

246246
public boolean studentExistsInCurrentFiscalInGrade8Or9(StudentRuleData studentRuleData) {

0 commit comments

Comments
 (0)