Subversion Repositories Integrator Subversion

Rev

Rev 106 | Rev 195 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 106 Rev 139
Line 41... Line 41...
41
import br.com.ec.domain.service.avaliacaoloja.AvaliacaoLojaService;
41
import br.com.ec.domain.service.avaliacaoloja.AvaliacaoLojaService;
42
import br.com.ec.domain.service.itemavaliacao.ItemAvaliacaoService;
42
import br.com.ec.domain.service.itemavaliacao.ItemAvaliacaoService;
43
import br.com.ec.domain.service.venda.VendaService;
43
import br.com.ec.domain.service.venda.VendaService;
44
import br.com.ec.domain.service.vendavivo.VendaVivoService;
44
import br.com.ec.domain.service.vendavivo.VendaVivoService;
45
import br.com.ec.domain.service.vendedor.VendedorService;
45
import br.com.ec.domain.service.vendedor.VendedorService;
-
 
46
import br.com.ec.domain.shared.ConstantesSEC;
46
import br.edu.cesmac.core.consulta.ParametrosConsulta;
47
import br.edu.cesmac.core.consulta.ParametrosConsulta;
47
import br.edu.cesmac.core.generic.GenericService;
48
import br.edu.cesmac.core.generic.GenericService;
48
import br.edu.cesmac.core.util.ArquivoUtil;
49
import br.edu.cesmac.core.util.ArquivoUtil;
49
import br.edu.cesmac.core.util.StringUtil;
50
import br.edu.cesmac.core.util.StringUtil;
50
import br.edu.cesmac.core.util.VerificadorUtil;
51
import br.edu.cesmac.core.util.VerificadorUtil;
Line 473... Line 474...
473
                                LancadorMensagem.lancarSucesso("REAVALIAÇÃO SOLICITADA COM SUCESSO");
474
                                LancadorMensagem.lancarSucesso("REAVALIAÇÃO SOLICITADA COM SUCESSO");
474
                        }
475
                        }
475
                });
476
                });
476
        }
477
        }
477
       
478
       
478
        public StreamedContent emitirRelatorioImportacaoFolhaPagamento() throws Exception {
-
 
-
 
479
        public StreamedContent emitirRelatorioImportacaoFolhaPagamento(String codigoEmpresa) throws Exception {
-
 
480
                String nomeArquivo = "";
-
 
481
                if (ConstantesSEC.Empresa.CODIGO_EMPRESA_ESPACO_CASE_1.equals(new Long(codigoEmpresa))) {
-
 
482
                        nomeArquivo = "Relatório de Importação - Folha de Pagamento Espaço Case.xls";
-
 
483
                } else if (ConstantesSEC.Empresa.CODIGO_EMPRESA_CASA_DAS_CAPAS_4.equals(new Long(codigoEmpresa))) {
-
 
484
                        nomeArquivo = "Relatório de Importação - Folha de Pagamento Casa das Capas.xls";
-
 
485
                }
479
                ByteArrayInputStream input = new ByteArrayInputStream(avaliacaoService.emitirRelatorioImportacaoFolhaPagamento((ServletContext)FacesContext.getCurrentInstance().getExternalContext().getContext(), getEntidade()));
486
                ByteArrayInputStream input = new ByteArrayInputStream(avaliacaoService.emitirRelatorioImportacaoFolhaPagamento((ServletContext)FacesContext.getCurrentInstance().getExternalContext().getContext(), getEntidade()));
480
                return new DefaultStreamedContent(input, ArquivoUtil.retornarContentTypeArquivo("xls"), "Relatório de Importação - Folha de Pagamento Espaço Case.xls");
-
 
-
 
487
                return new DefaultStreamedContent(input, ArquivoUtil.retornarContentTypeArquivo("xls"), nomeArquivo);
481
        }
488
        }
482
       
489
       
483
}
490
}