From 4791bf1acbd8a292814267bb91b4750ade5bb2d9 Mon Sep 17 00:00:00 2001 From: Jinil Sung Date: Fri, 27 Oct 2023 13:01:44 -0700 Subject: [PATCH 1/2] GRAD2-2193: task is complete. GRAD2-2193: task is complete. --- .../service/GradAlgorithmService.java | 57 +++++++++---------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/gradalgorithm/service/GradAlgorithmService.java b/api/src/main/java/ca/bc/gov/educ/api/gradalgorithm/service/GradAlgorithmService.java index 992a4d5..fed82c2 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/gradalgorithm/service/GradAlgorithmService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/gradalgorithm/service/GradAlgorithmService.java @@ -645,54 +645,51 @@ private Pair checkHonoursExemptRule(String program,List { StudentCourse sCCheck = studentCourseList.stream().filter(sc -> sc.isUsed() && (sc.getCourseCode().equalsIgnoreCase("GT") || sc.getCourseCode().equalsIgnoreCase("GTF") || sc.getCourseCode().equalsIgnoreCase("PORT") || sc.getCourseCode().equalsIgnoreCase("PORTF"))) .findAny() .orElse(null); - if(sCCheck == null) { - if(totalCreditsTSSGRM > 32) { - isExempted=true; - honourValue="N"; + if (sCCheck == null) { + if (totalCreditsTSSGRM > 32) { + isExempted = true; + honourValue = "N"; } } else { - if(totalCreditsTSSGRM > 36) { - isExempted=true; - honourValue="N"; + if (totalCreditsTSSGRM > 36) { + isExempted = true; + honourValue = "N"; } } - break; - case "1950": - if(totalCoursesTSSG > 3) { + } + case "1950" -> { + if (totalCoursesTSSG > 3) { isExempted = true; honourValue = "N"; } - break; - case "2004-EN": - case "2004-PF": - if(totalCreditsTSSGRM > 36) { - isExempted=true; - honourValue="N"; + } + case "2004-EN", "2004-PF" -> { + if (totalCreditsTSSGRM > 36) { + isExempted = true; + honourValue = "N"; } - break; - case "1996-EN": - case "1996-PF": - if(totalCreditsTSSGRM > 24) { - isExempted=true; - honourValue="N"; + } + case "1996-EN", "1996-PF" -> { + if (totalCreditsTSSGRM > 24) { + isExempted = true; + honourValue = "N"; } - break; - case "1986-EN": - case "1986-PF": - if(totalCoursesTSSG > 6) { + } + case "1986-EN", "1986-PF" -> { + if (totalCoursesTSSG > 6) { isExempted = true; honourValue = "N"; } - break; - default: + } + default -> { + } } return Pair.of(isExempted,honourValue); } From f4df44e4c247fd5d3e2ecaeeb46a3edca1e09cc6 Mon Sep 17 00:00:00 2001 From: Kamal Mohammed Date: Fri, 17 Nov 2023 00:46:31 +0530 Subject: [PATCH 2/2] Update pom.xml --- api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/pom.xml b/api/pom.xml index 32a45b8..99b1fc3 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -10,7 +10,7 @@ ca.bc.gov.educ educ-grad-algorithm-api - 1.8.30 + 1.8.32 educ-grad-algorithm-api Graduation Algorithm API for GRAD team