bug #5252
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@35216 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
7b8c8b795d
commit
23b3194370
|
@ -1,5 +1,6 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -84,15 +85,19 @@ public class ConfigLayoutImpressaoBoletoController extends MyGenericForwardCompo
|
|||
}
|
||||
}
|
||||
|
||||
String nomeArquivo = "coordenadas.properties";
|
||||
String nomeArquivo = "coordenadas";
|
||||
|
||||
FileOutputStream stream = new FileOutputStream(nomeArquivo);
|
||||
File fNomeArquivo = File.createTempFile(nomeArquivo, ".tmp");
|
||||
|
||||
FileOutputStream stream = new FileOutputStream(fNomeArquivo);
|
||||
stream.flush();
|
||||
stream.write(txt.toString().getBytes());
|
||||
stream.close();
|
||||
|
||||
InputStream is = new FileInputStream(nomeArquivo);
|
||||
Filedownload.save(is, "application/properties", nomeArquivo);
|
||||
|
||||
InputStream is = new FileInputStream(fNomeArquivo);
|
||||
Filedownload.save(is, "application/properties", "coordenadas.properties");
|
||||
fNomeArquivo.delete();
|
||||
}
|
||||
|
||||
public void onClick$btnAddCampoCoordenadas(Event ev) {
|
||||
|
|
|
@ -274,11 +274,11 @@ public class ModificacionMasivaTarifasUploadController extends MyGenericForwardC
|
|||
String nomeArquivo =
|
||||
UsuarioLogado.getUsuarioLogado().getNombusuario()
|
||||
+ "_" + Calendar.getInstance().getTime().getTime()
|
||||
+ "_" + "retorno.txt";
|
||||
+ "_" + "retorno";
|
||||
|
||||
// Gravando no arquivo de retorno
|
||||
File arquivo = new File(nomeArquivo);
|
||||
FileOutputStream fos = new FileOutputStream(arquivo);
|
||||
File fNomeArquivo = File.createTempFile(nomeArquivo, ".tmp");
|
||||
FileOutputStream fos = new FileOutputStream(fNomeArquivo);
|
||||
|
||||
String texto = "" + contador + " "
|
||||
+ Labels.getLabel("modificacionMasivaTarifasController.MSG.RegistroSalvos") + "\n";
|
||||
|
@ -315,10 +315,10 @@ public class ModificacionMasivaTarifasUploadController extends MyGenericForwardC
|
|||
fos.close();
|
||||
|
||||
InputStream is = null;
|
||||
is = new FileInputStream(nomeArquivo);
|
||||
is = new FileInputStream(fNomeArquivo);
|
||||
Filedownload.save(is, "application/txt", "RetornoModMasivaTarifa.txt");
|
||||
|
||||
boolean success = (new File(nomeArquivo)).delete();
|
||||
fNomeArquivo.delete();
|
||||
|
||||
closeWindow();
|
||||
}
|
||||
|
|
|
@ -882,18 +882,20 @@ public class TarifaEscalaContorller extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
String nomeArquivo = UsuarioLogado.getUsuarioLogado().getNombusuario() + "_" + Calendar.getInstance().getTime().getTime() + "_"
|
||||
+ "escala.xls";
|
||||
+ "escala";
|
||||
|
||||
FileOutputStream stream = new FileOutputStream(nomeArquivo);
|
||||
File fNomeArquivo = File.createTempFile(nomeArquivo, ".tmp");
|
||||
|
||||
FileOutputStream stream = new FileOutputStream(fNomeArquivo);
|
||||
stream.flush();
|
||||
wb.write(stream);
|
||||
stream.close();
|
||||
|
||||
InputStream is = null;
|
||||
is = new FileInputStream(nomeArquivo);
|
||||
is = new FileInputStream(fNomeArquivo);
|
||||
Filedownload.save(is, "application/xls", "escala.xls");
|
||||
|
||||
boolean success = (new File(nomeArquivo)).delete();
|
||||
fNomeArquivo.delete();
|
||||
} catch (Exception ex) {
|
||||
|
||||
log.info("** Erro ao exportar escala de tarifa: " + ex);
|
||||
|
|
|
@ -472,18 +472,21 @@ public class TarifaOficialExcelController extends MyGenericForwardComposer {
|
|||
String nomeArquivo =
|
||||
UsuarioLogado.getUsuarioLogado().getNombusuario()
|
||||
+ "_" + Calendar.getInstance().getTime().getTime()
|
||||
+ "_" + "modMassivaT.xls";
|
||||
+ "_" + "modMassivaT";
|
||||
|
||||
FileOutputStream stream = new FileOutputStream(nomeArquivo);
|
||||
File fNomeArquivo = File.createTempFile(nomeArquivo, ".tmp");
|
||||
|
||||
FileOutputStream stream = new FileOutputStream(fNomeArquivo);
|
||||
stream.flush();
|
||||
wb.write(stream);
|
||||
stream.close();
|
||||
|
||||
|
||||
InputStream is = null;
|
||||
is = new FileInputStream(nomeArquivo);
|
||||
is = new FileInputStream(fNomeArquivo);
|
||||
Filedownload.save(is, "application/xls", "modificacionMasivaTarifa.xls");
|
||||
|
||||
boolean success = (new File(nomeArquivo)).delete();
|
||||
fNomeArquivo.delete();
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
@ -503,18 +506,20 @@ public class TarifaOficialExcelController extends MyGenericForwardComposer {
|
|||
String nomeArquivo =
|
||||
UsuarioLogado.getUsuarioLogado().getNombusuario()
|
||||
+ "_" + Calendar.getInstance().getTime().getTime()
|
||||
+ "_" + "tarOficialEscala.xls";
|
||||
+ "_" + "tarOficialEscala";
|
||||
|
||||
FileOutputStream stream = new FileOutputStream(nomeArquivo);
|
||||
File fNomeArquivo = File.createTempFile(nomeArquivo, ".tmp");
|
||||
|
||||
FileOutputStream stream = new FileOutputStream(fNomeArquivo);
|
||||
stream.flush();
|
||||
wb.write(stream);
|
||||
stream.close();
|
||||
|
||||
InputStream is = null;
|
||||
is = new FileInputStream(nomeArquivo);
|
||||
is = new FileInputStream(fNomeArquivo);
|
||||
Filedownload.save(is, "application/xls", "modificacionMasivaTarifa.xls");
|
||||
|
||||
boolean success = (new File(nomeArquivo)).delete();
|
||||
fNomeArquivo.delete();
|
||||
} catch (Exception ex) {
|
||||
log.error(ex);
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
ADM_20140430_1RC352
|
||||
ADM_20140501_1RC353
|
Loading…
Reference in New Issue