Exportação Fiscal : ECF e RMD (issue 8120)

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@68418 d1611594-4594-4d17-8e1d-87c2c4800839
master
alberto 2017-05-02 14:29:44 +00:00
parent b64810573b
commit c3c6dcfd09
1 changed files with 6 additions and 4 deletions

View File

@ -102,7 +102,7 @@ public class BusquedaExportacaoFiscalController extends MyGenericForwardComposer
}
if (empresa != null && estado != null) {
String nomeArquivo = getNomeArquivoExportacaoECF(datInicial.getValue(), estado);
String nomeArquivo = getNomeArquivoExportacaoECF(datInicial.getValue(), estado, "ECF");
File arquivo = fiscalService.buscarArquivoExportacaoECF(datInicial.getValue(), datFinal.getValue(), empresa, estado, nomeArquivo);
@ -115,7 +115,7 @@ public class BusquedaExportacaoFiscalController extends MyGenericForwardComposer
}
}
private String getNomeArquivoExportacaoECF(Date dataInicial, Estado estado) {
private String getNomeArquivoExportacaoECF(Date dataInicial, Estado estado, String tipo) {
String[] mesano = new SimpleDateFormat("MM/yyyy").format(dataInicial).split("/");
String mes = mesano[0].toString();
@ -139,7 +139,7 @@ public class BusquedaExportacaoFiscalController extends MyGenericForwardComposer
default: break;
}
String nomeArquivo = "TotalBus " + estado.getCveestado() + " ECF " + nome + ano;
String nomeArquivo = "TotalBus " + estado.getCveestado() + " " + tipo + " " + nome + ano;
return nomeArquivo;
}
@ -160,7 +160,9 @@ public class BusquedaExportacaoFiscalController extends MyGenericForwardComposer
}
if (empresa != null && estado != null) {
File arquivo = fiscalService.buscarArquivoExportacaoRMD(datInicial.getValue(), datFinal.getValue(), empresa, estado);
String nomeArquivo = getNomeArquivoExportacaoECF(datInicial.getValue(), estado, "BPR");
File arquivo = fiscalService.buscarArquivoExportacaoRMD(datInicial.getValue(), datFinal.getValue(), empresa, estado, nomeArquivo);
try {
downloadArquivo(arquivo, null);