Skip to content

Commit

Permalink
Merge pull request #513 from bcgov/feature/GRAD2-2525
Browse files Browse the repository at this point in the history
GRAD2-2525: expiryDate is added in GradProgram DTO to determine it is…
  • Loading branch information
infstar authored Mar 8, 2024
2 parents c1862f9 + d08f7b8 commit 39e71a1
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,22 @@ 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 @@ -723,14 +723,15 @@ private GradProgram getGradProgram(ca.bc.gov.educ.api.graduation.model.dto.Gradu
GradProgram gPgm = new GradProgram();
Code code = new Code();
if (graduationDataStatus.getGradStatus().getProgram() != null) {
ca.bc.gov.educ.api.graduation.model.dto.GradProgram gradProgram = webClient.get().uri(String.format(educGraduationApiConstants.getProgramNameEndpoint(), graduationDataStatus.getGradStatus().getProgram()))
GraduationProgramCode gradProgram = webClient.get().uri(String.format(educGraduationApiConstants.getProgramNameEndpoint(), graduationDataStatus.getGradStatus().getProgram()))
.headers(h -> {
h.setBearerAuth(accessToken);
h.set(EducGraduationApiConstants.CORRELATION_ID, ThreadLocalStateUtil.getCorrelationID());
}).retrieve().bodyToMono(ca.bc.gov.educ.api.graduation.model.dto.GradProgram.class).block();
}).retrieve().bodyToMono(GraduationProgramCode.class).block();
if (gradProgram != null) {
code.setDescription(gradProgram.getProgramName());
code.setName(gradProgram.getProgramName());
gPgm.setExpiryDate(EducGraduationApiUtils.formatDate(gradProgram.getExpiryDate()));
}
}
code.setCode(graduationDataStatus.getGradStatus().getProgram());
Expand Down
Loading

0 comments on commit 39e71a1

Please sign in to comment.