spreadsheet.setHeader("Data de Apresentação Pública da CAT");
}
private void reportRaidesGraduate(Spreadsheet spreadsheet, PhdIndividualProgramProcess process, ExecutionYear executionYear) {
final Row row = spreadsheet.addRow();
final Person graduate = process.getPerson();
final PersonalInformationBean personalInformationBean = process.getPersonalInformationBean(executionYear);
final Registration registration = process.getRegistration();
final boolean concluded = process.isConcluded();
final LocalDate conclusionDate = process.getConclusionDate();
if (registration != null && !registration.isBolonha()) {
return;
}
YearMonthDay registrationConclusionDate =
registration != null ? registration.getLastStudentCurricularPlan().getCycle(CycleType.THIRD_CYCLE)
.getConclusionDate() : null;
if (registration != null && registrationConclusionDate == null) {
registrationConclusionDate =
registration.getLastStudentCurricularPlan().calculateConclusionDate(CycleType.THIRD_CYCLE);
}
row.setCell(String.valueOf(registration != null && !registration.isCanceled()));
// Ciclo
row.setCell(CycleType.THIRD_CYCLE.getDescription());
// Concluído
row.setCell(String.valueOf(process.isConcluded()));
// Média do Ciclo
String grade = concluded ? process.getFinalGrade().getLocalizedName() : "n/a";
if (concluded && registration != null && registration.isConcluded()) {
grade +=
" "
+ registration.getLastStudentCurricularPlan().getCycle(CycleType.THIRD_CYCLE)
.getCurriculum(registrationConclusionDate.toDateTimeAtMidnight()).getAverage()
.toPlainString();
}
row.setCell(grade);
// Data de conclusão
row.setCell(conclusionDate != null ? conclusionDate.toString("dd-MM-yyyy") : "");
// Data de Início
row.setCell(process.getCandidacyDate().toString("dd-MM-yyyy"));
// Nº de aluno
row.setCell(process.getStudent().getNumber());
// Tipo Identificação
row.setCell(graduate.getIdDocumentType().getLocalizedName());
// Nº de Identificação
row.setCell(graduate.getDocumentIdNumber());
// Dígitos de Controlo
row.setCell(graduate.getIdentificationDocumentExtraDigitValue());
// Versão Doc. Identificação
row.setCell(graduate.getIdentificationDocumentSeriesNumberValue());
// Nome
row.setCell(registration != null ? registration.getName() : process.getPerson() != null ? process.getPerson().getName() : "n/a");
// Sexo
row.setCell(graduate.getGender().toString());
// Data de Nascimento
row.setCell(graduate.getDateOfBirthYearMonthDay() != null ? graduate.getDateOfBirthYearMonthDay().toString("dd-MM-yyyy") : "n/a");
// País de Nascimento
row.setCell(graduate.getCountryOfBirth() != null ? graduate.getCountryOfBirth().getName() : "n/a");
// País de Nacionalidade
row.setCell(graduate.getCountry() != null ? graduate.getCountry().getName() : "n/a");
// Sigla programa doutoral
row.setCell(process.getPhdProgram().getAcronym());
// Programa doutoral