Search in sources :

Example 31 with CurriculoMinimoDTO

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

the class PudsController method saveInformacaoGeral.

public void saveInformacaoGeral(PUDForm form) {
    InformacaoGeralForm informacaoGeralForm = form.getInformacaoGeralForm();
    CurriculoMinimoDTO curriculoMinimo = teachingDocumentsService.findCurriculoMinimo(form.getCurriculoMinimoId());
    curriculoMinimo.setAmbito2(informacaoGeralForm.getAmbito());
    curriculoMinimo.setFinalidade2(informacaoGeralForm.getFinalidade());
    curriculoMinimo.setDefinicoes2(informacaoGeralForm.getDefinicoes());
    teachingDocumentsService.updateCurriculoMinimo(curriculoMinimo);
}
Also used : InformacaoGeralForm(com.tomasio.projects.trainning.form.pud.InformacaoGeralForm) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO)

Example 32 with CurriculoMinimoDTO

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

the class PudsController method saveAbreviatura.

public void saveAbreviatura(AbreviaturaForm form) {
    RequestContext requestContext = RequestContextHolder.getRequestContext();
    PUDForm PUDForm = requestContext.getFlowScope().get("PUDForm", PUDForm.class);
    CurriculoMinimoDTO curriculoMinimo = teachingDocumentsService.findCurriculoMinimo(PUDForm.getCurriculoMinimoId());
    AbreviaturaDTO abreviatura = new AbreviaturaDTO();
    abreviatura.setId(form.getId());
    abreviatura.setDescricao(form.getDescricao());
    abreviatura.setCurriculoMinimo(curriculoMinimo);
    abreviatura.setSigla(form.getSigla());
    if (abreviatura.getId() == null) {
        Long id = teachingDocumentsService.createAbreviatura(abreviatura);
        form.setId(id);
        List<AbreviaturaForm> abreviaturasDataList = PUDForm.getAbreviaturasDataList();
        abreviaturasDataList.add(form);
    } else {
        teachingDocumentsService.updateAbreviatura(abreviatura);
    }
}
Also used : AbreviaturaForm(com.tomasio.projects.trainning.form.pud.AbreviaturaForm) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO) RequestContext(org.springframework.webflow.execution.RequestContext) AbreviaturaDTO(com.tomasio.projects.trainning.dto.AbreviaturaDTO) PublicacaoPUDForm(com.tomasio.projects.trainning.form.pud.PublicacaoPUDForm) PUDForm(com.tomasio.projects.trainning.form.pud.PUDForm) DisciplinaPUDForm(com.tomasio.projects.trainning.form.pud.DisciplinaPUDForm) ConclusaoPUDForm(com.tomasio.projects.trainning.form.pud.ConclusaoPUDForm)

Example 33 with CurriculoMinimoDTO

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

the class PudsController method saveConceituacao.

public void saveConceituacao(ConceituacaoForm form) {
    RequestContext requestContext = RequestContextHolder.getRequestContext();
    PUDForm PUDForm = requestContext.getFlowScope().get("PUDForm", PUDForm.class);
    CurriculoMinimoDTO curriculoMinimo = teachingDocumentsService.findCurriculoMinimo(PUDForm.getCurriculoMinimoId());
    ConceituacaoDTO conceituacao = new ConceituacaoDTO();
    conceituacao.setId(form.getId());
    conceituacao.setDescricao(form.getDescricao());
    conceituacao.setCurriculoMinimo(curriculoMinimo);
    conceituacao.setTermo(form.getTermo());
    if (conceituacao.getId() == null) {
        Long id = teachingDocumentsService.createConceituacao(conceituacao);
        form.setId(id);
        List<ConceituacaoForm> conceituacoesDataList = PUDForm.getConceituacoesDataList();
        conceituacoesDataList.add(form);
    } else {
        teachingDocumentsService.updateConceituacao(conceituacao);
    }
}
Also used : ConceituacaoForm(com.tomasio.projects.trainning.form.pud.ConceituacaoForm) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO) ConceituacaoDTO(com.tomasio.projects.trainning.dto.ConceituacaoDTO) RequestContext(org.springframework.webflow.execution.RequestContext) PublicacaoPUDForm(com.tomasio.projects.trainning.form.pud.PublicacaoPUDForm) PUDForm(com.tomasio.projects.trainning.form.pud.PUDForm) DisciplinaPUDForm(com.tomasio.projects.trainning.form.pud.DisciplinaPUDForm) ConclusaoPUDForm(com.tomasio.projects.trainning.form.pud.ConclusaoPUDForm)

Example 34 with CurriculoMinimoDTO

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

the class PudsController method index.

@RequestMapping({ "/", "/index", "" })
public String index(Model model, WebRequest request) {
    String search = request.getParameter("search");
    CurriculoMinimoDTO[] curriculos = teachingDocumentsService.findAllCurriculosMinimos();
    List dataList = new ArrayList();
    for (CurriculoMinimoDTO curriculo : curriculos) {
        Map item = new HashMap();
        item.put("id", curriculo.getId());
        item.put("codigo", curriculo.getCurso().getCodigo());
        item.put("descricao", curriculo.getCurso().getDescricao());
        item.put("statusPUD", curriculo.getStatusPUD());
        item.put("statusCM", curriculo.getStatusCM());
        item.put("pudDocumentUID", curriculo.getPudDocumentUID());
        if ("PUBLICADO".equals(curriculo.getStatusPUD())) {
            item.put("statusPUDCSSClass", "badge badge-success");
        }
        if ("EM ELABORAÇÃO".equals(curriculo.getStatusPUD())) {
            item.put("statusPUDCSSClass", "badge badge-warning");
        }
        if ("AGUARDANDO PUBLICAÇÃO".equals(curriculo.getStatusPUD())) {
            item.put("statusPUDCSSClass", "badge badge-danger");
        }
        if ("PUBLICADO".equals(curriculo.getStatusCM())) {
            item.put("statusCMCSSClass", "badge badge-success");
        }
        if ("EM ELABORAÇÃO".equals(curriculo.getStatusCM())) {
            item.put("statusCMCSSClass", "badge badge-warning");
        }
        if ("AGUARDANDO PUBLICAÇÃO".equals(curriculo.getStatusCM())) {
            item.put("statusCMCSSClass", "badge badge-danger");
        }
        item.put("editable", curriculo.isPudEditable());
        item.put("publicado", curriculo.isPudApproved());
        dataList.add(item);
    }
    model.addAttribute("dataList", dataList);
    model.addAttribute("total", dataList.size());
    return "puds";
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO) List(java.util.List) ArrayList(java.util.ArrayList) Map(java.util.Map) HashMap(java.util.HashMap) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 35 with CurriculoMinimoDTO

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

the class PudsController method saveAtividadeAvaliativa.

public void saveAtividadeAvaliativa(AtividadeAvaliativaForm form) {
    RequestContext requestContext = RequestContextHolder.getRequestContext();
    PUDForm PUDForm = requestContext.getFlowScope().get("PUDForm", PUDForm.class);
    CurriculoMinimoDTO curriculoMinimo = teachingDocumentsService.findCurriculoMinimo(PUDForm.getCurriculoMinimoId());
    AtividadeAvaliativaDTO flexibilidade = new AtividadeAvaliativaDTO();
    flexibilidade.setId(form.getId());
    flexibilidade.setDescricao(form.getDescricao());
    flexibilidade.setCurriculoMinimo(curriculoMinimo);
    flexibilidade.setQuantidadeTemposAula(form.getQuantidadeTemposAula());
    TecnicaEnsinoDTO tecnicaEnsino = teachingDocumentsService.findTecnicaEnsino(form.getTecnicaInstrucaoId());
    flexibilidade.setTecnicaEnsino(tecnicaEnsino);
    if (tecnicaEnsino != null) {
        form.setTecnicaInstrucaoLabel(tecnicaEnsino.getSigla());
    }
    if (flexibilidade.getId() == null) {
        Long id = teachingDocumentsService.createAtividadeAvaliativa(flexibilidade);
        form.setId(id);
        List<AtividadeAvaliativaForm> flexibilidadesDataList = PUDForm.getAtividadesAvaliativasDataList();
        flexibilidadesDataList.add(form);
    } else {
        teachingDocumentsService.updateAtividadeAvaliativa(flexibilidade);
    }
}
Also used : AtividadeAvaliativaDTO(com.tomasio.projects.trainning.dto.AtividadeAvaliativaDTO) AtividadeAvaliativaForm(com.tomasio.projects.trainning.form.pud.AtividadeAvaliativaForm) CurriculoMinimoDTO(com.tomasio.projects.trainning.dto.CurriculoMinimoDTO) RequestContext(org.springframework.webflow.execution.RequestContext) TecnicaEnsinoDTO(com.tomasio.projects.trainning.dto.TecnicaEnsinoDTO) PublicacaoPUDForm(com.tomasio.projects.trainning.form.pud.PublicacaoPUDForm) PUDForm(com.tomasio.projects.trainning.form.pud.PUDForm) DisciplinaPUDForm(com.tomasio.projects.trainning.form.pud.DisciplinaPUDForm) ConclusaoPUDForm(com.tomasio.projects.trainning.form.pud.ConclusaoPUDForm)

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