fixes bug #6817
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@51397 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
494fbbb6d7
commit
4f42fa8c19
|
@ -38,5 +38,7 @@ public class Constantes {
|
|||
public static String CLAVE_EDITAR_COMISSAO = "COM.RJCONSULTORES.ADMINISTRACION.PUNTOVENTA.EDITARCOMISSAO";
|
||||
public static String CLAVE_REABRIR_MOVIMENTODIARIO = "COM.RJCONSULTORES.ADMINISTRACION.GUI.COMISSAO.MENU.CONFERENCIACOMISSAO.REABRIRMOVIMENTODIARIO";
|
||||
public static String CLAVE_ENCERRAR_MOVIMENTODIARIO = "COM.RJCONSULTORES.ADMINISTRACION.GUI.COMISSAO.MENU.CONFERENCIACOMISSAO.ENCERRARMOVIMENTODIARIO";
|
||||
|
||||
public static final String UTF_8 = "UTF-8";
|
||||
|
||||
}
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Connection;
|
||||
|
@ -21,6 +22,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||
import com.rjconsultores.ventaboletos.dao.FiscalDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.EsquemaCorrida;
|
||||
|
@ -59,8 +61,7 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
String nomeArquivo = UsuarioLogado.getUsuarioLogado().getNombusuario() + "_" + Calendar.getInstance().getTime().getTime() + "_" + "fiscal";
|
||||
File arquivo = File.createTempFile(nomeArquivo, ".tmp");
|
||||
|
||||
FileWriter arq = new FileWriter(arquivo);
|
||||
PrintWriter gravarArq = new PrintWriter(arq);
|
||||
PrintWriter gravarArq = new PrintWriter(new OutputStreamWriter(new FileOutputStream(arquivo), Constantes.UTF_8));
|
||||
|
||||
Integer seq = 1;
|
||||
|
||||
|
@ -158,7 +159,7 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
String fechamento = fechamentoDeArquivo("3", qtdeDocGerados, qtdeItensDocGerados, brancos381, sequencial);
|
||||
gravarArq.println(fechamento);
|
||||
|
||||
arq.close();
|
||||
gravarArq.close();
|
||||
return arquivo;
|
||||
|
||||
} catch (IOException e) {
|
||||
|
@ -284,8 +285,7 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
String nomeArquivo = UsuarioLogado.getUsuarioLogado().getNombusuario() + "_" + Calendar.getInstance().getTime().getTime() + "_" + "fiscal";
|
||||
File arquivo = File.createTempFile(nomeArquivo, ".tmp");
|
||||
|
||||
FileWriter arq = new FileWriter(arquivo);
|
||||
PrintWriter gravarArq = new PrintWriter(arq);
|
||||
PrintWriter gravarArq = new PrintWriter(new OutputStreamWriter(new FileOutputStream(arquivo), Constantes.UTF_8));
|
||||
|
||||
Integer seq = 1;
|
||||
|
||||
|
@ -377,7 +377,7 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
String fechamento = fechamentoDeArquivo("3", qtdeDocGerados, null, brancos387, sequencial);
|
||||
gravarArq.println(fechamento);
|
||||
|
||||
arq.close();
|
||||
gravarArq.close();
|
||||
return arquivo;
|
||||
|
||||
} catch (IOException e) {
|
||||
|
@ -411,8 +411,7 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
String nomeArquivo = UsuarioLogado.getUsuarioLogado().getNombusuario() + "_" + Calendar.getInstance().getTime().getTime() + "_" + "fiscal";
|
||||
File arquivo = File.createTempFile(nomeArquivo, ".tmp");
|
||||
|
||||
FileWriter arq = new FileWriter(arquivo);
|
||||
PrintWriter gravarArq = new PrintWriter(arq);
|
||||
PrintWriter gravarArq = new PrintWriter(new OutputStreamWriter(new FileOutputStream(arquivo), Constantes.UTF_8));
|
||||
|
||||
Integer seq = 1;
|
||||
|
||||
|
@ -574,8 +573,8 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
|
||||
String fechamento = fechamentoDeArquivo("3", qtdeDocGerados, qtdeItensDocGerados, brancos381, seqFechamento);
|
||||
gravarArq.println(fechamento);
|
||||
|
||||
arq.close();
|
||||
|
||||
gravarArq.close();
|
||||
return arquivo;
|
||||
|
||||
} catch (IOException e) {
|
||||
|
|
Loading…
Reference in New Issue