Skip to content
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

Grad release 1.16.0 #253

Merged
merged 5 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ca.bc.gov.educ</groupId>
<artifactId>educ-grad-distribution-api</artifactId>
<version>1.8.56</version>
<version>1.8.57</version>
<name>educ-grad-distribution-api</name>
<description>Ministry of Education GRAD DISTRIBUTION API</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,21 @@ public class GradProgram implements Serializable {

private Code code;

private String expiryDate;

public Code getCode() {
return code;
}

public void setCode(Code value) {
this.code = value;
}

public String getExpiryDate() {
return expiryDate;
}

public void setExpiryDate(String value) {
this.expiryDate = value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ public class ReportService {

final RestService restService;

final SchoolService schoolService;

@Autowired
public ReportService(WebClient webClient, RestUtils restUtils, EducDistributionApiConstants educDistributionApiConstants, RestService restService, JsonTransformer jsonTransformer) {
public ReportService(WebClient webClient, RestUtils restUtils, EducDistributionApiConstants educDistributionApiConstants, RestService restService, SchoolService schoolService, JsonTransformer jsonTransformer) {
this.webClient = webClient;
this.restUtils = restUtils;
this.educDistributionApiConstants = educDistributionApiConstants;
this.restService = restService;
this.schoolService = schoolService;
this.jsonTransformer = jsonTransformer;
}

Expand All @@ -57,12 +60,22 @@ public ReportRequest preparePackingSlipData(StudentSearchRequest searchRequest,
boolean useSchoolAddress = (searchRequest == null || searchRequest.getAddress() == null);
Address addr = useSchoolAddress ? new Address() : searchRequest.getAddress();
if(useSchoolAddress) {
addr.setStreetLine1(schoolDetails.getScAddressLine1());
addr.setStreetLine2(schoolDetails.getScAddressLine2());
addr.setCity(schoolDetails.getScCity());
addr.setCode(schoolDetails.getScPostalCode());
addr.setCountry(schoolDetails.getScCountryCode());
addr.setRegion(schoolDetails.getScProvinceCode());
TraxSchool traxSchool = schoolService.getTraxSchool(schoolDetails.getDistNo()+schoolDetails.getSchlNo(), new ExceptionMessage());
if(traxSchool != null) {
addr.setStreetLine1(traxSchool.getAddress1());
addr.setStreetLine2(traxSchool.getAddress2());
addr.setCity(traxSchool.getCity());
addr.setCode(traxSchool.getPostal());
addr.setCountry(traxSchool.getCountryName());
addr.setRegion(traxSchool.getProvinceName());
} else {
addr.setStreetLine1(schoolDetails.getScAddressLine1());
addr.setStreetLine2(schoolDetails.getScAddressLine2());
addr.setCity(schoolDetails.getScCity());
addr.setCode(schoolDetails.getScPostalCode());
addr.setCountry(schoolDetails.getScCountryCode());
addr.setRegion(schoolDetails.getScProvinceCode());
}
}
schObj.setAddress(addr);
schObj.setDistno(schoolDetails.getDistNo());
Expand Down
Loading