Search in sources :

Example 1 with ConviteInstrutorIndividualForm

use of com.tomasio.projects.trainning.form.convites.ConviteInstrutorIndividualForm in project trainning by fernandotomasio.

the class ConvitesInstrutoresController method initializeConviteInstrutorIndividualForm.

public ConviteInstrutorIndividualForm initializeConviteInstrutorIndividualForm(Long turmaId) {
    ConviteInstrutorIndividualForm form = new ConviteInstrutorIndividualForm();
    form.setTurmaId(turmaId);
    return form;
}
Also used : ConviteInstrutorIndividualForm(com.tomasio.projects.trainning.form.convites.ConviteInstrutorIndividualForm)

Example 2 with ConviteInstrutorIndividualForm

use of com.tomasio.projects.trainning.form.convites.ConviteInstrutorIndividualForm in project trainning by fernandotomasio.

the class ConvitesInstrutoresController method editConviteInstrutorIndividualForm.

public ConviteInstrutorIndividualForm editConviteInstrutorIndividualForm(Long conviteId) {
    SimpleDateFormat df = new SimpleDateFormat("dd-MM-yyyy");
    ConviteInstrutorIndividualForm form = new ConviteInstrutorIndividualForm();
    ConviteInstrutorIndividualDTO convite = (ConviteInstrutorIndividualDTO) atividadesEnsinoService.findConviteInstrutor(conviteId);
    form.setId(convite.getId());
    form.setObservacao(convite.getObservacao());
    form.setPrazo(df.format(convite.getPrazo()));
    form.setTurmaId(convite.getTurma().getId());
    form.setDocumento(convite.getDocumento());
    ItemConviteInstrutorIndividualDTO[] itens = atividadesEnsinoService.findAllItensConviteInstrutorIndividualByConviteInstrutorIndividualId(conviteId);
    List<ItemConviteIndividualForm> formItens = new ArrayList<>();
    for (ItemConviteInstrutorIndividualDTO item : itens) {
        ItemConviteIndividualForm formItem = new ItemConviteIndividualForm();
        formItem.setDataInicio(item.getPeriodo().getDataInicioFormated());
        formItem.setDataTermino(item.getPeriodo().getDataTerminoFormated());
        formItem.setId(item.getId());
        PessoaDTO pessoa = organizationalService.findPessoa(item.getPessoa().getId());
        formItem.setOMSigla(pessoa.getOrganizacao().getSigla());
        formItem.setObservacao(item.getObservacao());
        formItem.setPessoaId(pessoa.getId());
        formItem.setTargetaCompleta(pessoa.getTargetaCompleta());
        formItens.add(formItem);
    }
    form.setItensDataList(formItens);
    return form;
}
Also used : ConviteInstrutorIndividualForm(com.tomasio.projects.trainning.form.convites.ConviteInstrutorIndividualForm) ItemConviteInstrutorIndividualDTO(com.tomasio.projects.trainning.dto.ItemConviteInstrutorIndividualDTO) PessoaDTO(com.tomasio.projects.trainning.dto.PessoaDTO) ItemConviteInstrutorIndividualDTO(com.tomasio.projects.trainning.dto.ItemConviteInstrutorIndividualDTO) ConviteInstrutorIndividualDTO(com.tomasio.projects.trainning.dto.ConviteInstrutorIndividualDTO) ArrayList(java.util.ArrayList) ItemConviteIndividualForm(com.tomasio.projects.trainning.form.convites.ItemConviteIndividualForm) SimpleDateFormat(java.text.SimpleDateFormat)

Aggregations

ConviteInstrutorIndividualForm (com.tomasio.projects.trainning.form.convites.ConviteInstrutorIndividualForm)2 ConviteInstrutorIndividualDTO (com.tomasio.projects.trainning.dto.ConviteInstrutorIndividualDTO)1 ItemConviteInstrutorIndividualDTO (com.tomasio.projects.trainning.dto.ItemConviteInstrutorIndividualDTO)1 PessoaDTO (com.tomasio.projects.trainning.dto.PessoaDTO)1 ItemConviteIndividualForm (com.tomasio.projects.trainning.form.convites.ItemConviteIndividualForm)1 SimpleDateFormat (java.text.SimpleDateFormat)1 ArrayList (java.util.ArrayList)1