use of com.tomasio.projects.trainning.dto.CurriculoMinimoDTO in project trainning by fernandotomasio.
the class CurriculosMinimosController method saveConclusao.
public void saveConclusao(ConclusaoCMForm form) {
CurriculoMinimoDTO curriculo = teachingDocumentsService.findCurriculoMinimo(form.getCurriculoMinimoId());
curriculo.setNumeroPublicacaoCM(form.getPublicacao());
SimpleDateFormat dfYear = new SimpleDateFormat("yyyy");
if (form.getAno() != null) {
curriculo.setAnoPublicacaoCM(dfYear.format(form.getAno()));
}
Calendar dataEncerramento = Calendar.getInstance();
dataEncerramento.setTime(form.getDataEncerramento());
curriculo.setDataEncerramentoCM(dataEncerramento);
curriculo.setPortariaDocumentUID(form.getPortariaDocumentUID());
if (form.getPortariaDocumentUID() != null) {
teachingDocumentsService.updateCurriculoMinimo(curriculo);
}
}
use of com.tomasio.projects.trainning.dto.CurriculoMinimoDTO in project trainning by fernandotomasio.
the class CurriculosMinimosController method saveStep3.
public void saveStep3(CurriculoMinimoForm form) {
CMFormStep3 cMFormStep3 = form.getcMFormStep3();
CurriculoMinimoDTO curriculoMinimo = teachingDocumentsService.findCurriculoMinimo(form.getId());
curriculoMinimo.setPerfilAluno(cMFormStep3.getPerfilAluno());
curriculoMinimo.setPadraoDesempenhoEspecializado(cMFormStep3.getPadraoDesempenhoEspecializado());
curriculoMinimo.setPadraoDesempenhoGeral(cMFormStep3.getPadraoDesempenhoGeral());
curriculoMinimo.setPadraoDesempenhoMilitar(cMFormStep3.getPadraoDesempenhoMilitar());
teachingDocumentsService.updateCurriculoMinimo(curriculoMinimo);
}
use of com.tomasio.projects.trainning.dto.CurriculoMinimoDTO in project trainning by fernandotomasio.
the class CurriculosMinimosController method saveRevisao.
public void saveRevisao(RevisaoCMForm form) {
CurriculoMinimoDTO curriculo = teachingDocumentsService.findCurriculoMinimo(form.getCurriculoMinimoId());
curriculo.setRevisado(true);
teachingDocumentsService.updateCurriculoMinimo(curriculo);
}
use of com.tomasio.projects.trainning.dto.CurriculoMinimoDTO in project trainning by fernandotomasio.
the class CurriculosMinimosController method saveStep2.
public void saveStep2(CurriculoMinimoForm form) {
CMFormStep2 cMFormStep2 = form.getcMFormStep2();
CurriculoMinimoDTO curriculoMinimo = teachingDocumentsService.findCurriculoMinimo(form.getId());
curriculoMinimo.setConcepcaoEstrutural(cMFormStep2.getConcepcaoEstrutural());
// curriculoMinimo.setFilosofia(cMFormStep2.getFilosofia());
// curriculoMinimo.setFinalidade(cMFormStep2.getFinalidade());
// curriculoMinimo.setObjetivosGerais(cMFormStep2.getObjetivosGerais());
teachingDocumentsService.updateCurriculoMinimo(curriculoMinimo);
}
use of com.tomasio.projects.trainning.dto.CurriculoMinimoDTO in project trainning by fernandotomasio.
the class CurriculosMinimosController method savePublicacao.
public void savePublicacao(PublicacaoCMForm form) {
CurriculoMinimoDTO curriculo = teachingDocumentsService.findCurriculoMinimo(form.getCurriculoMinimoId());
curriculo.setNumeroBCACM(form.getNumeroBCA());
Calendar dataBCA = Calendar.getInstance();
dataBCA.setTime(form.getDataBCA());
curriculo.setDataBCACM(dataBCA);
SimpleDateFormat df = new SimpleDateFormat("ddMMyy");
Map services = new HashMap<>();
services.put("teachingDocumentsService", teachingDocumentsService);
services.put("ecmService", ecmService);
Map params = new HashMap<>();
params.put("curriculoMinimoId", String.valueOf(curriculo.getId()));
DOC001PDF report = new DOC001PDF(params, services);
DocumentDTO document = new DocumentDTO();
document.setContentStream(report.build());
document.setTitle("Currículo Mínimo do Curso " + curriculo.getCurso().getCodigo());
document.setName(curriculo.getCurso().getCodigo() + "-" + df.format(curriculo.getDataBCACM().getTime()) + ".pdf");
document.setMimeType("application/pdf");
String documentUID = ecmService.createDocumentWithUUIDParent(document, "cc325a72-77d9-4737-964d-e65e0eb0c32a");
if (documentUID != null) {
curriculo.setCurriculoMinimoDocumentUID(documentUID);
teachingDocumentsService.updateCurriculoMinimo(curriculo);
}
}
Aggregations