Skip to content

Commit

Permalink
Grad release 1.16.0 (#253)
Browse files Browse the repository at this point in the history
* GRAD2-2525: DTO update to sync.

GRAD2-2525: DTO update to sync.

* Develop/alex grad2 2403

* GRAD2-2403
Fix packing slip jasper file to accommodate address line 2

* GRAD2-2403
Fix packing slip jasper file to accommodate address line 2

* Update pom.xml

---------

Co-authored-by: Jinil Sung <infstar@gmail.com>
Co-authored-by: Kamal Mohammed <kamal.mohammed@outlook.com>
Co-authored-by: Alexander Rybakov <83988488+arybakov-cgi@users.noreply.github.com>
  • Loading branch information
4 people authored Mar 26, 2024
1 parent daa2bd3 commit bfcd1e2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
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

0 comments on commit bfcd1e2

Please sign in to comment.