Search in sources :

Example 1 with CurriculoMinimoDTO

use of com.tomasio.projects.trainning.dto.CurriculoMinimoDTO in project trainning by fernandotomasio.

the class CurriculoMinimo method createDTOWithoutDependencies.

public CurriculoMinimoDTO createDTOWithoutDependencies() {
    CurriculoMinimoDTO dto = createDTOMinimal();
    dto.setCurso(curso.createDTOMinimal());
    dto.setConcepcaoEstrutural(concepcaoEstrutural);
    dto.setPadraoDesempenhoEspecializado(padraoDesempenhoEspecializado);
    dto.setPadraoDesempenhoGeral(padraoDesempenhoGeral);
    dto.setPadraoDesempenhoMilitar(padraoDesempenhoMilitar);
    dto.setDisposicoesFinais(disposicoesFinais);
    dto.setDisposicoesGerais(disposicoesGerais);
    dto.setConceituacoes(conceituacoes);
    dto.setAmbito(ambito);
    dto.setFinalidadeInstrucao(finalidadeInstrucao);
    dto.setFilosofia(filosofia);
    dto.setNecessidade(necessidade);
    dto.setPerfilAluno(perfilAluno);
    dto.setFinalidade(finalidade);
    dto.setObjetivosGerais(objetivosGerais);
    dto.setProcedimentosAvaliacao(procedimentosAvaliacao);
    dto.setPadraoDesempenhoEspecialidade(padraoDesempenhoEspecialidade);
    dto.setPrefacio2(prefacio2);
    dto.setDisposicoesFinais2(disposicoesFinais2);
    dto.setAmbito2(ambito2);
    dto.setFinalidade2(finalidade2);
    dto.setDefinicoes2(definicoes2);
    dto.setDataBCACM(dataBCACM);
    dto.setNumeroBCACM(numeroBCACM);
    dto.setAnoPublicacaoCM(anoPublicacaoCM);
    dto.setAnoPublicacaoPUD(anoPublicacaoPUD);
    dto.setDataBoletimPUD(dataBoletimPUD);
    dto.setNumeroBoletimPUD(numeroBoletimPUD);
    dto.setDataEncerramentoCM(dataEncerramentoCM);
    dto.setDataEncerramentoPUD(dataEncerramentoPUD);
    dto.setNumeroPublicacaoCM(numeroPublicacaoCM);
    dto.setPortariaDocumentUID(portariaDocumentUID);
    dto.setCurriculoMinimoDocumentUID(curriculoMinimoDocumentUID);
    dto.setPudDocumentUID(pudDocumentUID);
    if (dataBCACM != null) {
        dto.setCmApproved(true);
        dto.setCmEditable(false);
        dto.setStatusCM("PUBLICADO");
    } else if (dataEncerramentoCM != null) {
        dto.setCmEditable(false);
        dto.setStatusCM("AGUARDANDO PUBLICAÇÃO");
    } else if (revisado == true) {
        dto.setCmEditable(true);
        dto.setStatusCM("REVISADO");
    } else {
        dto.setStatusCM("EM ELABORAÇÃO");
    }
    if (dataBoletimPUD != null) {
        dto.setPudApproved(true);
        dto.setPudEditable(false);
        dto.setStatusPUD("PUBLICADO");
    } else if (dataEncerramentoPUD != null) {
        dto.setPudEditable(false);
        dto.setStatusPUD("AGUARDANDO PUBLICAÇÃO");
    } else {
        dto.setStatusPUD("EM ELABORAÇÃO");
    }
    return dto;
}
Also used : CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO)

Example 2 with CurriculoMinimoDTO

use of com.tomasio.projects.trainning.dto.CurriculoMinimoDTO in project trainning by fernandotomasio.

the class CurriculoMinimo method createDTO.

public CurriculoMinimoDTO createDTO() {
    CurriculoMinimoDTO dto = createDTOWithoutDependencies();
    dto.setCurso(curso.createDTOWithoutDependencies());
    if (this.disciplinas != null && this.disciplinas.size() > 0) {
        DisciplinaDTO[] disciplinaArray = new DisciplinaDTO[disciplinas.size()];
        for (int i = 0; i < disciplinas.size(); i++) {
            // System.out.println(disciplinas.get(i));
            disciplinaArray[i] = disciplinas.get(i).createDTOMinimal();
        }
        dto.setDisciplinas(disciplinaArray);
    }
    return dto;
}
Also used : DisciplinaDTO(com.tomasio.projects.trainning.dto.DisciplinaDTO) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO)

Example 3 with CurriculoMinimoDTO

use of com.tomasio.projects.trainning.dto.CurriculoMinimoDTO in project trainning by fernandotomasio.

the class PudsController method saveConclusao.

public void saveConclusao(ConclusaoPUDForm form) {
    CurriculoMinimoDTO curriculo = teachingDocumentsService.findCurriculoMinimo(form.getCurriculoMinimoId());
    Calendar dataEncerramento = Calendar.getInstance();
    dataEncerramento.setTime(form.getDataEncerramento());
    curriculo.setDataEncerramentoPUD(dataEncerramento);
    SimpleDateFormat dfYear = new SimpleDateFormat("yyyy");
    if (form.getAno() != null) {
        curriculo.setAnoPublicacaoPUD(dfYear.format(form.getAno()));
    }
    teachingDocumentsService.updateCurriculoMinimo(curriculo);
}
Also used : Calendar(java.util.Calendar) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO) SimpleDateFormat(java.text.SimpleDateFormat)

Example 4 with CurriculoMinimoDTO

use of com.tomasio.projects.trainning.dto.CurriculoMinimoDTO in project trainning by fernandotomasio.

the class PudsController method savePrefacio.

public void savePrefacio(PUDForm form) {
    PrefacioForm prefacioForm = form.getPrefacioForm();
    CurriculoMinimoDTO curriculoMinimo = teachingDocumentsService.findCurriculoMinimo(form.getCurriculoMinimoId());
    curriculoMinimo.setPrefacio2(prefacioForm.getDescricao());
    teachingDocumentsService.updateCurriculoMinimo(curriculoMinimo);
}
Also used : PrefacioForm(com.tomasio.projects.trainning.form.pud.PrefacioForm) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO)

Example 5 with CurriculoMinimoDTO

use of com.tomasio.projects.trainning.dto.CurriculoMinimoDTO in project trainning by fernandotomasio.

the class PudsController method savePublicacao.

public void savePublicacao(PublicacaoPUDForm form) {
    CurriculoMinimoDTO curriculo = teachingDocumentsService.findCurriculoMinimo(form.getCurriculoMinimoId());
    curriculo.setNumeroBoletimPUD(form.getNumeroBoletim());
    Calendar dataBoletim = Calendar.getInstance();
    curriculo.setDataBoletimPUD(dataBoletim);
    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()));
    DOC002PDF report = new DOC002PDF(params, services);
    DocumentDTO document = new DocumentDTO();
    document.setContentStream(report.build());
    document.setTitle("PUD do Curso " + curriculo.getCurso().getCodigo());
    document.setName(curriculo.getCurso().getCodigo() + "-" + df.format(curriculo.getDataBoletimPUD().getTime()) + ".pdf");
    document.setMimeType("application/pdf");
    String documentUID = ecmService.createDocumentWithUUIDParent(document, "045c40a2-f22e-4c96-9a30-0de7909ef736");
    if (documentUID != null) {
        curriculo.setPudDocumentUID(documentUID);
        teachingDocumentsService.updateCurriculoMinimo(curriculo);
    }
}
Also used : HashMap(java.util.HashMap) Calendar(java.util.Calendar) DOC002PDF(com.tomasio.projects.trainning.reports.DOC002PDF) DocumentDTO(com.tomasio.projects.trainning.dto.DocumentDTO) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO) SimpleDateFormat(java.text.SimpleDateFormat) Map(java.util.Map) HashMap(java.util.HashMap)

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