diff --git a/api/pom.xml b/api/pom.xml
index 3c46b71d..a70f2dd8 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -6,7 +6,7 @@
ca.bc.gov.educ
educ-grad-batch-graduation-api
- 1.8.64
+ 1.8.65
educ-grad-batch-graduation-api
Ministry of Education GRAD BATCH GRADUATION API
diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/processor/DistributionRunStatusUpdateProcessor.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/processor/DistributionRunStatusUpdateProcessor.java
index 251fc968..d68f541b 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/processor/DistributionRunStatusUpdateProcessor.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/processor/DistributionRunStatusUpdateProcessor.java
@@ -82,6 +82,7 @@ private Map updateBackStudentRecords(List {
try {
if(!StringUtils.equalsAnyIgnoreCase(jobType, "REGALG", "TVRRUN")) {
diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/BasePartitioner.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/BasePartitioner.java
index 13c98a3f..4b10cfd0 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/BasePartitioner.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/BasePartitioner.java
@@ -227,23 +227,23 @@ void filterByStudentSearchRequest(List eligibleSt
}
}
eligibleStudentSchoolDistricts.removeIf(scr->StringUtils.isNotBlank(scr.getSchoolOfRecord()) && !useFilterSchoolDistricts.contains(scr.getSchoolOfRecord()));
- LOGGER.debug("Student Credential Distribution filtered by schoolCategory code {}: ", searchRequest.getSchoolCategoryCodes());
+ LOGGER.debug("Student Credential Distribution filtered by schoolCategory code {}: {}", searchRequest.getSchoolCategoryCodes(), eligibleStudentSchoolDistricts.size());
}
if(searchRequest != null && searchRequest.getDistricts() != null && !searchRequest.getDistricts().isEmpty()) {
eligibleStudentSchoolDistricts.removeIf(scr->StringUtils.isNotBlank(scr.getSchoolOfRecord()) && !searchRequest.getDistricts().contains(StringUtils.substring(scr.getSchoolOfRecord(), 0, 3)));
- LOGGER.debug("Student Credential Distribution filtered by district code {}: ", searchRequest.getDistricts());
+ LOGGER.debug("Student Credential Distribution filtered by district code {}: {}", searchRequest.getDistricts(), eligibleStudentSchoolDistricts.size());
}
if(searchRequest != null && searchRequest.getSchoolOfRecords() != null && !searchRequest.getSchoolOfRecords().isEmpty()) {
eligibleStudentSchoolDistricts.removeIf(scr->StringUtils.isNotBlank(scr.getSchoolOfRecord()) && !searchRequest.getSchoolOfRecords().contains(scr.getSchoolOfRecord()));
- LOGGER.debug("Student Credential Distribution filtered by schoolOfRecord code {}: ", searchRequest.getSchoolOfRecords());
+ LOGGER.debug("Student Credential Distribution filtered by schoolOfRecord code {}: {}", searchRequest.getSchoolOfRecords(), eligibleStudentSchoolDistricts.size());
}
if(searchRequest != null && searchRequest.getStudentIDs() != null && !searchRequest.getStudentIDs().isEmpty()) {
eligibleStudentSchoolDistricts.removeIf(scr->scr.getStudentID() != null && !searchRequest.getStudentIDs().contains(scr.getStudentID()));
- LOGGER.debug("Student Credential Distribution filtered by student ID {}: ", searchRequest.getStudentIDs());
+ LOGGER.debug("Student Credential Distribution filtered by student ID {}: {}", searchRequest.getStudentIDs(), eligibleStudentSchoolDistricts.size());
}
if(searchRequest != null && searchRequest.getPens() != null && !searchRequest.getPens().isEmpty()) {
eligibleStudentSchoolDistricts.removeIf(scr->StringUtils.isNotBlank(scr.getPen()) && !searchRequest.getPens().contains(scr.getPen()));
- LOGGER.debug("Student Credential Distribution filtered by pen {}: ", searchRequest.getPens());
+ LOGGER.debug("Student Credential Distribution filtered by pen {}: {}", searchRequest.getPens(), eligibleStudentSchoolDistricts.size());
}
}
diff --git a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/DistributionRunYearlyPartitioner.java b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/DistributionRunYearlyPartitioner.java
index 523537d6..21e776c0 100644
--- a/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/DistributionRunYearlyPartitioner.java
+++ b/api/src/main/java/ca/bc/gov/educ/api/batchgraduation/reader/DistributionRunYearlyPartitioner.java
@@ -31,8 +31,6 @@ public Map partition(int gridSize) {
long startTime = System.currentTimeMillis();
restUtils.deleteSchoolReportRecord("", "ADDRESS_LABEL_SCHL");
restUtils.deleteSchoolReportRecord("", "ADDRESS_LABEL_YE");
- restUtils.deleteSchoolReportRecord("", "DISTREP_YE_SC");
- restUtils.deleteSchoolReportRecord("", "DISTREP_YE_SD");
long endTime = System.currentTimeMillis();
long diff = (endTime - startTime)/1000;
logger.debug("Old School Reports deleted in {} sec", diff);
@@ -46,6 +44,11 @@ public Map partition(int gridSize) {
filterByStudentSearchRequest(eligibleStudentSchoolDistricts);
if(!eligibleStudentSchoolDistricts.isEmpty()) {
updateBatchJobHistory(createBatchJobHistory(), (long) eligibleStudentSchoolDistricts.size());
+ List schoolOfRecords = eligibleStudentSchoolDistricts.stream().map(StudentCredentialDistribution::getSchoolOfRecord).distinct().toList();
+ for(String mincode: schoolOfRecords) {
+ restUtils.deleteSchoolReportRecord(mincode, "DISTREP_YE_SC");
+ restUtils.deleteSchoolReportRecord(mincode, "DISTREP_YE_SD");
+ }
return getStringExecutionContextMap(gridSize, eligibleStudentSchoolDistricts, null);
}
logger.info("No Credentials Found for Processing");