From b7713b5eab65a2886caca81110e67b0d9c445b90 Mon Sep 17 00:00:00 2001 From: alexmcdermid Date: Tue, 10 Dec 2024 16:43:44 -0800 Subject: [PATCH] remove graduated from dto --- .../messaging/jetstream/FetchGradStudentRecordSubscriber.java | 2 +- .../api/gradstudent/model/dto/messaging/GradStudentRecord.java | 1 - .../bc/gov/educ/api/gradstudent/service/GradStudentService.java | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/messaging/jetstream/FetchGradStudentRecordSubscriber.java b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/messaging/jetstream/FetchGradStudentRecordSubscriber.java index 529277ef..db1e354d 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/messaging/jetstream/FetchGradStudentRecordSubscriber.java +++ b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/messaging/jetstream/FetchGradStudentRecordSubscriber.java @@ -71,7 +71,7 @@ private String getResponse(GradStudentRecord studentRecord) throws JsonProcessin .programCompletionDate(studentRecord.getProgramCompletionDate() != null ? EducGradStudentApiUtils.formatDate(studentRecord.getProgramCompletionDate()) : null) .schoolOfRecord(studentRecord.getSchoolOfRecord()) .studentStatusCode(studentRecord.getStudentStatus()) - .graduated(studentRecord.getGraduated().toString()) + .graduated(gradStudentService.parseGraduationStatus(studentRecord.getStudentProjectedGradData()).toString()) .build(); return JsonUtil.getJsonStringFromObject(gradStudentRecordPayload); } diff --git a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/model/dto/messaging/GradStudentRecord.java b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/model/dto/messaging/GradStudentRecord.java index 868fdc95..33516001 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/model/dto/messaging/GradStudentRecord.java +++ b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/model/dto/messaging/GradStudentRecord.java @@ -18,6 +18,5 @@ public class GradStudentRecord { private String schoolOfRecord; private String studentStatus; private String studentProjectedGradData; - private Boolean graduated; } diff --git a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradStudentService.java b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradStudentService.java index a8f34386..9e77e1ca 100644 --- a/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradStudentService.java +++ b/api/src/main/java/ca/bc/gov/educ/api/gradstudent/service/GradStudentService.java @@ -434,7 +434,6 @@ public List getStudentIDsBySearchCriteriaOrAll(StudentSearchRequest search public GradStudentRecord getGraduationStudentRecord(UUID studentID) { GradStudentRecord response = graduationStatusRepository.findByStudentID(studentID, GradStudentRecord.class); if (response != null) { - response.setGraduated(parseGraduationStatus(response.getStudentProjectedGradData())); return response; } throw new EntityNotFoundException(String.format(STD_NOT_FOUND_MSG, studentID));