leonardo 2016-03-01 20:22:52 +00:00
parent 2783e63a5b
commit c1dafa9182
1 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,7 @@ public class RelatorioArquivoBGMController extends MyGenericForwardComposer {
Totalbus totalbus = new Totalbus(dataSource.getConnection());
log.debug("gerando arquivo...");
Arquivo.GravaArquivo(file.getAbsolutePath(), totalbus.getDespesasReceitas(
cmbPuntoVenta.getSelectedItem() == null ? null : ((PuntoVenta)cmbPuntoVenta.getSelectedItem().getValue()).getPuntoventaId(),
cmbEmpresa.getSelectedItem() == null ? null : ((Empresa)cmbEmpresa.getSelectedItem().getValue()).getEmpresaId(),
@ -95,6 +96,7 @@ public class RelatorioArquivoBGMController extends MyGenericForwardComposer {
compactarArquivos(files, fileZip);
File filez = new File(fileZip);
if (filez.exists()) {
log.debug("download dos arquivos");
inputStream = new FileInputStream(filez);
Filedownload.save(inputStream, new MimetypesFileTypeMap().getContentType(filez), filez.getName());
}