Search in sources :

Example 21 with CurriculoMinimoDTO

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);
    }
}
Also used : Calendar(java.util.Calendar) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO) SimpleDateFormat(java.text.SimpleDateFormat)

Example 22 with CurriculoMinimoDTO

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);
}
Also used : CMFormStep3(com.tomasio.projects.trainning.form.cm.CMFormStep3) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO)

Example 23 with CurriculoMinimoDTO

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);
}
Also used : CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO)

Example 24 with CurriculoMinimoDTO

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);
}
Also used : CMFormStep2(com.tomasio.projects.trainning.form.cm.CMFormStep2) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO)

Example 25 with CurriculoMinimoDTO

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);
    }
}
Also used : HashMap(java.util.HashMap) Calendar(java.util.Calendar) DocumentDTO(com.tomasio.projects.trainning.dto.DocumentDTO) DOC001PDF(com.tomasio.projects.trainning.reports.DOC001PDF) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO) SimpleDateFormat(java.text.SimpleDateFormat) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

CurriculoMinimoDTO (com.tomasio.projects.trainning.dto.CurriculoMinimoDTO)36 ConclusaoPUDForm (com.tomasio.projects.trainning.form.pud.ConclusaoPUDForm)7 DisciplinaPUDForm (com.tomasio.projects.trainning.form.pud.DisciplinaPUDForm)7 PUDForm (com.tomasio.projects.trainning.form.pud.PUDForm)7 PublicacaoPUDForm (com.tomasio.projects.trainning.form.pud.PublicacaoPUDForm)7 RequestContext (org.springframework.webflow.execution.RequestContext)7 DisciplinaDTO (com.tomasio.projects.trainning.dto.DisciplinaDTO)5 ArrayList (java.util.ArrayList)5 HashMap (java.util.HashMap)5 Map (java.util.Map)5 ObjetivoDisciplinaDTO (com.tomasio.projects.trainning.dto.ObjetivoDisciplinaDTO)4 TecnicaEnsinoDTO (com.tomasio.projects.trainning.dto.TecnicaEnsinoDTO)4 CoreException (com.tomasio.projects.trainning.exeption.CoreException)4 SimpleDateFormat (java.text.SimpleDateFormat)4 Calendar (java.util.Calendar)4 DocumentException (com.itextpdf.text.DocumentException)3 UnidadeDidaticaDTO (com.tomasio.projects.trainning.dto.UnidadeDidaticaDTO)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)3 IOException (java.io.IOException)3 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)3