diff --git a/api/src/main/java/ca/bc/gov/educ/api/graduation/service/GraduationService.java b/api/src/main/java/ca/bc/gov/educ/api/graduation/service/GraduationService.java index eee950dd..9130c090 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/graduation/service/GraduationService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/graduation/service/GraduationService.java @@ -400,7 +400,7 @@ private List processStudentList(List gradStudL } private List getNonGradReasons(String gradProgramCode, List nonGradReasons) { - nonGradReasons.removeIf(a -> "506".equalsIgnoreCase(a.getTranscriptRule()) && (StringUtils.isNotBlank(gradProgramCode) && gradProgramCode.contains("1950"))); + nonGradReasons.removeIf(a -> ("506".equalsIgnoreCase(a.getTranscriptRule()) || "506".equalsIgnoreCase(a.getRule())) && (StringUtils.isNotBlank(gradProgramCode) && gradProgramCode.contains("1950"))); List nList = new ArrayList<>(); if (nonGradReasons != null) { for (GradRequirement gR : nonGradReasons) { @@ -469,16 +469,12 @@ private byte[] getSchoolReportNonGradRegReport(ReportData data, String mincode, } + @Generated private void createAndSaveSchoolReportNonGradRegReport(ReportData data, String mincode, String accessToken) { - byte[] bytesSAR = getSchoolReportNonGradRegReport(data, mincode, accessToken); - String encodedPdf = getEncodedPdfFromBytes(bytesSAR); - SchoolReports requestObj = getSchoolReports(mincode, encodedPdf, NONGRADREG); - updateSchoolReport(accessToken, requestObj); - } private byte[] getSchoolReportStudentNonGradPrjReport(ReportData data, String mincode, String accessToken) { diff --git a/api/src/main/java/ca/bc/gov/educ/api/graduation/service/ReportService.java b/api/src/main/java/ca/bc/gov/educ/api/graduation/service/ReportService.java index 4fa141e1..e38fae23 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/graduation/service/ReportService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/graduation/service/ReportService.java @@ -278,7 +278,7 @@ private List getNonGradReasons(String gradProgramCode, List applyFilters && "505".equalsIgnoreCase(a.getTranscriptRule()) && (StringUtils.isNotBlank(gradProgramCode) && gradProgramCode.contains("1950"))); - nonGradReasons.removeIf(a -> "506".equalsIgnoreCase(a.getTranscriptRule()) && (StringUtils.isNotBlank(gradProgramCode) && gradProgramCode.contains("1950"))); + nonGradReasons.removeIf(a -> ("506".equalsIgnoreCase(a.getTranscriptRule()) || "506".equalsIgnoreCase(a.getRule())) && (StringUtils.isNotBlank(gradProgramCode) && gradProgramCode.contains("1950"))); for (ca.bc.gov.educ.api.graduation.model.dto.GradRequirement gR : nonGradReasons) { String code = xml ? traxReqCodes.get(gR.getRule()) : gR.getTranscriptRule(); NonGradReason obj = new NonGradReason();