fixes bug #10395
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@77538 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
dee05cc57d
commit
8747f13b9d
|
@ -89,20 +89,26 @@ public class RelatorioArquivoBGMController extends MyGenericForwardComposer {
|
||||||
String fileZip = BGMApplication.getInstance().executaExportacao(datInicial.getValue(), datFinal.getValue(),
|
String fileZip = BGMApplication.getInstance().executaExportacao(datInicial.getValue(), datFinal.getValue(),
|
||||||
System.getProperty("jboss.server.log.dir") , empresaId, puntoVentaId, con,this.getPathExternoGravacaoArquivo());
|
System.getProperty("jboss.server.log.dir") , empresaId, puntoVentaId, con,this.getPathExternoGravacaoArquivo());
|
||||||
|
|
||||||
try{
|
if(this.getPathExternoGravacaoArquivo() != null){
|
||||||
FileInputStream inputStream;
|
Messagebox.show(Labels.getLabel("relatorioArquivoBGMController.arquivoGeradoNoServidor.value"),
|
||||||
File filez = new File(fileZip);
|
Labels.getLabel("relatorioArquivoBGMController.window.title"),
|
||||||
log.info(filez.exists());
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
if (filez.exists()) {
|
}else{
|
||||||
log.debug("download dos arquivos");
|
try{
|
||||||
inputStream = new FileInputStream(filez);
|
FileInputStream inputStream;
|
||||||
Filedownload.save(inputStream, new MimetypesFileTypeMap().getContentType(filez), filez.getName());
|
File filez = new File(fileZip);
|
||||||
}
|
log.info(filez.exists());
|
||||||
filez.delete();
|
if (filez.exists()) {
|
||||||
|
log.debug("download dos arquivos");
|
||||||
|
inputStream = new FileInputStream(filez);
|
||||||
|
Filedownload.save(inputStream, new MimetypesFileTypeMap().getContentType(filez), filez.getName());
|
||||||
|
}
|
||||||
|
filez.delete();
|
||||||
|
|
||||||
} finally {
|
} finally {
|
||||||
con.close();
|
con.close();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getPathExternoGravacaoArquivo(){
|
private String getPathExternoGravacaoArquivo(){
|
||||||
|
|
Loading…
Reference in New Issue