From f2f4237be58787cf3f584826b8ae21be5355ae23 Mon Sep 17 00:00:00 2001 From: arybakov Date: Fri, 19 Apr 2024 17:27:26 -0600 Subject: [PATCH] GRAD2-2377 HD-22859 (GRAD) YE Distribution run should direct Certificates to School at Graduation, not School of Record --- .../gov/educ/api/grad/report/service/CommonService.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/grad/report/service/CommonService.java b/api/src/main/java/ca/bc/gov/educ/api/grad/report/service/CommonService.java index c7d87d13..8f95c688 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/grad/report/service/CommonService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/grad/report/service/CommonService.java @@ -745,7 +745,7 @@ private synchronized List getNextPageStudentsFromGradStud String paperType = e.getPaperType(); String certificateTypeCode = e.getCertificateTypeCode(); //either transcript or certificate codes ReportGradStudentData s = getReportGradStudentDataByGraduationStudentRecordIdFromList(e.getGraduationStudentRecordId(), studentsInBatch); - if(s != null && "CUR".equalsIgnoreCase(s.getStudentStatus())) { + if(s != null) { ReportGradStudentData dataResult = SerializationUtils.clone(s); dataResult.setPaperType(paperType); if ("YED4".equalsIgnoreCase(paperType)) { @@ -753,7 +753,12 @@ private synchronized List getNextPageStudentsFromGradStud } else { dataResult.setCertificateTypeCode(certificateTypeCode); } - result.add(dataResult); + if("YED4".equalsIgnoreCase(paperType) && "CUR".equalsIgnoreCase(s.getStudentStatus())) { + result.add(dataResult); + } + if (!"YED4".equalsIgnoreCase(paperType)) { + result.add(dataResult); + } } } return result;