-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GRAD2-3164: task is complete. #364
Changes from 4 commits
1b38a7a
6288dea
0d6f1b8
224683d
ca27a84
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package ca.bc.gov.educ.api.dataconversion.model.institute; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Data | ||
@EqualsAndHashCode | ||
@Component("instituteSchool") | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class School { | ||
|
||
private String schoolId; | ||
private String districtId; | ||
private String mincode; | ||
private String independentAuthorityId; | ||
private String schoolNumber; | ||
private String faxNumber; | ||
private String phoneNumber; | ||
private String email; | ||
private String website; | ||
private String displayName; | ||
private String displayNameNoSpecialChars; | ||
private String schoolReportingRequirementCode; | ||
private String schoolOrganizationCode; | ||
private String schoolCategoryCode; | ||
private String facilityTypeCode; | ||
private String openedDate; | ||
private String closedDate; | ||
private boolean canIssueTranscripts; | ||
private boolean canIssueCertificates; | ||
|
||
} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
package ca.bc.gov.educ.api.dataconversion.model.tsw; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import lombok.Data; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Data | ||
@Component | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class SchoolClob implements Comparable<SchoolClob> { | ||
|
||
private String minCode; | ||
private String schoolId; | ||
private String schoolName; | ||
private String districtName; | ||
private String transcriptEligibility; | ||
private String certificateEligibility; | ||
private String address1; | ||
private String address2; | ||
private String city; | ||
private String provCode; | ||
private String countryCode; | ||
private String postal; | ||
private String openFlag; | ||
private String schoolCategoryCode; | ||
private String schoolCategoryLegacyCode; | ||
|
||
public String getSchoolName() { | ||
return schoolName != null ? schoolName.trim(): null; | ||
} | ||
|
||
public String getDistrictName() { | ||
return districtName != null ? districtName.trim(): null; | ||
} | ||
|
||
public String getAddress1() { | ||
return address1 != null ? address1.trim(): null; | ||
} | ||
|
||
public String getAddress2() { | ||
return address2 != null ? address2.trim(): null; | ||
} | ||
|
||
public String getCity() { | ||
return city != null ? city.trim(): null; | ||
} | ||
|
||
public String getPostal() { | ||
return postal != null ? postal.trim(): null; | ||
} | ||
|
||
public String getOpenFlag() { | ||
return openFlag != null ? openFlag.trim(): null; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "SchoolClob [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 | ||
+ "]"; | ||
} | ||
|
||
@Override | ||
public int compareTo(SchoolClob o) { | ||
int result = 0; | ||
{ | ||
if (result == 0) { | ||
result = getMinCode().compareToIgnoreCase(o.getMinCode()); | ||
} | ||
if (result == 0) { | ||
result = getSchoolName().compareToIgnoreCase(o.getSchoolName()); | ||
} | ||
} | ||
return result; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ public class StudentProcess extends StudentBaseService { | |
public StudentProcess(RestUtils restUtils, | ||
AssessmentProcess assessmentProcess, | ||
CourseProcess courseProcess) { | ||
super(restUtils); | ||
this.restUtils = restUtils; | ||
this.assessmentProcess = assessmentProcess; | ||
this.courseProcess = courseProcess; | ||
|
@@ -282,9 +283,7 @@ private Pair<ConversionResultType, Boolean> handleProgramCode(String programCode | |
|
||
private ConversionResultType processSccpFrenchCertificates(GraduationStudentRecord student, ConversionStudentSummaryDTO summary) { | ||
if (StringUtils.equals(student.getProgram(), "SCCP") | ||
&& ( StringUtils.isNotBlank(student.getSchoolOfRecord()) | ||
&& student.getSchoolOfRecord().startsWith("093") ) | ||
) { | ||
&& isSchoolForProgramFrancophone(student.getSchoolOfRecordId())) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need the null check still? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not supposed to have null schoolOfRecordId in GraduationStudentRecord. If so, that is critical, and intentionally good to have NPE instead of moving forward with the wrong grad program. Anyway, I will add the null check here, and monitor in PROD that schoolOfRecordId is null to have the wrong grad program in student load & ongoing updates. |
||
return createStudentOptionalProgram("FR", student, summary); | ||
} | ||
return ConversionResultType.SUCCESS; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can get rid of these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed all unnecessary methods.