fixes bug#AL-4682

master
Gleison da Cruz 2024-07-31 10:50:05 -03:00
parent dd519cf4fa
commit f5fb9891e1
3 changed files with 12 additions and 5 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId> <groupId>br.com.rjconsultores</groupId>
<artifactId>IntegracaoReceitaDespesa</artifactId> <artifactId>IntegracaoReceitaDespesa</artifactId>
<version>1.6.0</version> <version>1.6.1</version>
<distributionManagement> <distributionManagement>
<repository> <repository>

View File

@ -81,6 +81,7 @@ public class BGMApplication {
public String executaExportacao(Date dataInicio, Date dataFinal, String diretorio, Integer empresaId, Integer puntoVentaId, Connection con,String pathGravacaoExternaArquivos, boolean incluiTipoPagamentoTurismoBGM, boolean isReceitasDespesasComporte,boolean isCodReceitaFixoBgm, boolean isReceitasDespesasOuroPrata, boolean layoutNovo) throws IllegalArgumentException, IntegracaoReceitaDespesaException{ public String executaExportacao(Date dataInicio, Date dataFinal, String diretorio, Integer empresaId, Integer puntoVentaId, Connection con,String pathGravacaoExternaArquivos, boolean incluiTipoPagamentoTurismoBGM, boolean isReceitasDespesasComporte,boolean isCodReceitaFixoBgm, boolean isReceitasDespesasOuroPrata, boolean layoutNovo) throws IllegalArgumentException, IntegracaoReceitaDespesaException{
this.isCodReceitaFixoBgm = isCodReceitaFixoBgm; this.isCodReceitaFixoBgm = isCodReceitaFixoBgm;
this.isReceitasDespesasComporte = isReceitasDespesasComporte;
this.isReceitasDespesasOuroPrata = isReceitasDespesasOuroPrata; this.isReceitasDespesasOuroPrata = isReceitasDespesasOuroPrata;
return executaExportacao(dataInicio, dataFinal, diretorio, empresaId, puntoVentaId, con, pathGravacaoExternaArquivos, incluiTipoPagamentoTurismoBGM, layoutNovo); return executaExportacao(dataInicio, dataFinal, diretorio, empresaId, puntoVentaId, con, pathGravacaoExternaArquivos, incluiTipoPagamentoTurismoBGM, layoutNovo);
} }

View File

@ -22,6 +22,8 @@ import com.rjconsultores.integracaoreceitadespesa.entidades.DespesaReceita;
import com.rjconsultores.integracaoreceitadespesa.entidades.DespesaReceitaComporte; import com.rjconsultores.integracaoreceitadespesa.entidades.DespesaReceitaComporte;
import com.rjconsultores.integracaoreceitadespesa.entidades.Empresa; import com.rjconsultores.integracaoreceitadespesa.entidades.Empresa;
import com.rjconsultores.integracaoreceitadespesa.entidades.PuntoVenta; import com.rjconsultores.integracaoreceitadespesa.entidades.PuntoVenta;
import java.math.MathContext;
import java.math.RoundingMode;
public class Totalbus { public class Totalbus {
@ -604,6 +606,7 @@ public class Totalbus {
PreparedStatement stmt = null; PreparedStatement stmt = null;
ResultSet rs = null; ResultSet rs = null;
String formaPagoCieloLinkStr = Integer.toString(formaPagoCieloLink);
Date fecha = fechaParam; Date fecha = fechaParam;
if (fechaParam == null) { if (fechaParam == null) {
@ -639,7 +642,7 @@ public class Totalbus {
} }
despesa.setFormaPagamentoId(rs.getString("formapagoId")); despesa.setFormaPagamentoId(rs.getString("formapagoId"));
if( despesa.getFormaPagamentoId().equals("2") || despesa.getFormaPagamentoId().equals("3") || despesa.getFormaPagamentoId().equals(formaPagoCieloLink)) { if( despesa.getFormaPagamentoId().equals("2") || despesa.getFormaPagamentoId().equals("3") || despesa.getFormaPagamentoId().equals(formaPagoCieloLinkStr)) {
despesa.setCodigoAutorizacao(rs.getString("numautorizacion")); despesa.setCodigoAutorizacao(rs.getString("numautorizacion"));
despesa.setNumeroEstabelecimento(rs.getString("numeroEstabelecimento")); despesa.setNumeroEstabelecimento(rs.getString("numeroEstabelecimento"));
}else { }else {
@ -817,8 +820,9 @@ public class Totalbus {
PreparedStatement stmt = null; PreparedStatement stmt = null;
ResultSet rs = null; ResultSet rs = null;
String formaPagoCieloLinkStr = Integer.toString(formaPagoCieloLink);
Date fecha = fechaParam; Date fecha = fechaParam;
if (fechaParam == null) { if (fechaParam == null) {
fecha = getData(); fecha = getData();
} }
@ -855,9 +859,9 @@ public class Totalbus {
} }
receita.setFormaPagamentoId(rs.getString("formapagoId")); receita.setFormaPagamentoId(rs.getString("formapagoId"));
if( receita.getFormaPagamentoId().equals("2") || receita.getFormaPagamentoId().equals("3")) { if( receita.getFormaPagamentoId().equals("2") || receita.getFormaPagamentoId().equals("3") || receita.getFormaPagamentoId().equals(formaPagoCieloLinkStr)) {
receita.setCodigoAutorizacao(rs.getString("numautorizacion")); receita.setCodigoAutorizacao(rs.getString("numautorizacion"));
receita.setNumeroEstabelecimento(rs.getString("numeroEstabelecimento")); receita.setNumeroEstabelecimento(rs.getString("numeroestabelecimento"));
}else { }else {
receita.setCodigoAutorizacao(""); receita.setCodigoAutorizacao("");
receita.setNumeroEstabelecimento(""); receita.setNumeroEstabelecimento("");
@ -1446,5 +1450,7 @@ public class Totalbus {
} }
} }
} }
} }