Skip to content

Commit

Permalink
Merge pull request #703 from bcgov/feature/GRAD2-2761
Browse files Browse the repository at this point in the history
GRAD2-2761: replaced minCode with schoolId for School v2 endpoint & s…
  • Loading branch information
infstar authored Nov 21, 2024
2 parents 698092f + 4e692a7 commit 38d8cf4
Show file tree
Hide file tree
Showing 16 changed files with 79 additions and 331 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public class GradSearchStudent {
private String trueStudentID;
private String program;
private String schoolOfRecord;
private String schoolOfRecordId;
private String schoolOfRecordName;
private String schoolOfRecordindependentAffiliation;
private String studentGrade;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class GraduationStudentRecord extends BaseModel {
private String studentStatusName;
private UUID studentID;
private String schoolAtGrad;
private UUID schoolAtGradId;
private String schoolAtGradName;
private String recalculateProjectedGrad;
private Long batchId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,12 @@ public class GraduationStudentRecordHistory extends BaseModel{
private String honoursStanding;
private String recalculateGradStatus;
private String schoolOfRecord;
private UUID schoolOfRecordId;
private String studentGrade;
private String studentStatus;
private UUID studentID;
private String schoolAtGrad;
private UUID schoolAtGradId;
private String recalculateProjectedGrad;
private Long batchId;
private String consumerEducationRequirementMet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class ReportGradStudentData implements Serializable {
private UUID graduationStudentRecordId;
private String mincode;
private String mincodeAtGrad;
private String schoolOfRecordId;
private String schoolAtGradId;
private String distcode;
private String distcodeAtGrad;
private String pen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class School {
private String postal;
private String openFlag;
private String schoolCategoryCode;
private String schoolCategoryCodeInstitute;
private String schoolCategoryLegacyCode;

public String getSchoolName() {
return schoolName != null ? schoolName.trim(): null;
Expand Down Expand Up @@ -49,7 +49,7 @@ public String getPostal() {

@Override
public String toString() {
return "School [minCode=" + minCode + ", schoolId=" + schoolId + ", schoolCategoryCode=" + schoolCategoryCode + ", schoolCategoryCodeInstitute=" + schoolCategoryCodeInstitute
return "School [minCode=" + minCode + ", schoolId=" + schoolId + ", schoolCategoryCode=" + schoolCategoryCode + ", schoolCategoryLegacyCode=" + schoolCategoryLegacyCode
+ ", schoolName=" + schoolName + ", districtName=" + districtName + ", transcriptEligibility=" + transcriptEligibility + ", certificateEligibility=" + certificateEligibility
+ ", address1=" + address1 + ", address2=" + address2 + ", city=" + city + ", provCode=" + provCode + ", countryCode=" + countryCode + ", postal=" + postal + ", openFlag=" + openFlag
+ "]";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public GraduationStudentRecordEntity() {
private UUID schoolOfRecordId;

@Column(name = "SCHOOL_AT_GRADUATION_ID", nullable = true)
private UUID schoolAtGraduationId;
private UUID schoolAtGradId;

@Transient
private String legalFirstName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class GraduationStudentRecordHistoryEntity extends BaseEntity {
private UUID schoolOfRecordId;

@Column(name = "SCHOOL_AT_GRADUATION_ID", nullable = true)
private UUID schoolAtGraduationId;
private UUID schoolAtGradId;

//@Lob
//@Column(name = "STUDENT_PROJECTED_GRAD_DATA", columnDefinition="CLOB")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public interface GraduationStudentRecordView {
public Date getAdultStartDate();
public String getStudentProjectedGradData() ;
public UUID getSchoolOfRecordId();
public UUID getSchoolAtGraduationId();
public UUID getSchoolAtGradId();
public LocalDateTime getCreateDate();
public LocalDateTime getUpdateDate();
}
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ private GradSearchStudent populateGradStudent(GraduationStudentRecordView gradRe
GradSearchStudent gradStu = new GradSearchStudent();
BeanUtils.copyProperties(gradRecord, gradStu);
gradStu.setStudentID(gradRecord.getStudentID().toString());
gradStu.setSchoolOfRecordId(gradRecord.getSchoolOfRecordId() != null? gradRecord.getSchoolOfRecordId().toString() : null);
return populateGradStudent(gradStu, accessToken);
}

Expand All @@ -314,7 +315,7 @@ private GradSearchStudent populateGradStudent(GradSearchStudent gradStu, String
if(studentPen != null) {
BeanUtils.copyProperties(studentPen, gradStu);
}
School school = webClient.get().uri(String.format(constants.getSchoolByMincodeUrl(), gradStu.getSchoolOfRecord()))
School school = webClient.get().uri(String.format(constants.getSchoolClobBySchoolIdUrl(), gradStu.getSchoolOfRecordId()))
.headers(h -> {
h.setBearerAuth(accessToken);
h.set(EducGradStudentApiConstants.CORRELATION_ID, ThreadLocalStateUtil.getCorrelationID());
Expand All @@ -336,9 +337,10 @@ private GradSearchStudent populateGradSearchStudent(Student student, String acce
gradStu.setStudentGrade(gradObj.getStudentGrade());
gradStu.setStudentStatus(gradObj.getStudentStatus());
gradStu.setSchoolOfRecord(gradObj.getSchoolOfRecord());
gradStu.setSchoolOfRecordId(gradObj.getSchoolOfRecordId() != null? gradObj.getSchoolOfRecordId().toString() : null);
gradStu.setStudentCitizenship(gradObj.getStudentCitizenship());

School school = webClient.get().uri(String.format(constants.getSchoolByMincodeUrl(), gradStu.getSchoolOfRecord()))
School school = webClient.get().uri(String.format(constants.getSchoolClobBySchoolIdUrl(), gradStu.getSchoolOfRecordId()))
.headers(h -> {
h.setBearerAuth(accessToken);
h.set(EducGradStudentApiConstants.CORRELATION_ID, ThreadLocalStateUtil.getCorrelationID());
Expand Down
Loading

0 comments on commit 38d8cf4

Please sign in to comment.