diff --git a/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java b/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java index 5fd553254..cd8db5c6f 100644 --- a/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java +++ b/src/com/rjconsultores/integracaoreceitadespesa/dao/Totalbus.java @@ -210,8 +210,8 @@ public class Totalbus { return despesas; } - public List getDespesaCartaoDebCredComporte(final Integer puntoVentaId, final Integer empresaId, Date fechaParam, boolean incluiTipoPagamentoTurismoBGM) throws IntegracaoReceitaDespesaException{ - List despesas = new ArrayList(); + public List getDespesaCartaoDebCredComporte(final Integer puntoVentaId, final Integer empresaId, Date fechaParam, boolean incluiTipoPagamentoTurismoBGM) throws IntegracaoReceitaDespesaException{ + List despesas = new ArrayList(); StringBuilder sb = new StringBuilder(); sb.append(" select "); sb.append(" cd.feccorte AS fechorvta, "); diff --git a/src/com/rjconsultores/integracaoreceitadespesa/entidades/DespesaReceita.java b/src/com/rjconsultores/integracaoreceitadespesa/entidades/DespesaReceita.java index 1a6b704ae..5be49beab 100644 --- a/src/com/rjconsultores/integracaoreceitadespesa/entidades/DespesaReceita.java +++ b/src/com/rjconsultores/integracaoreceitadespesa/entidades/DespesaReceita.java @@ -22,11 +22,11 @@ public class DespesaReceita { protected final String numeroReciboTurismo = " ";// 108 010 Alfanumérico protected final String formaPagamentoTurismo = "00";// 118 002 Numérico protected String tipoPagamentoTurismo = "00";// 120 002 Numérico - protected String descricaoDetalhada = " ";// 122 100 Alfanumérico - protected final String documentoVenda = "000000";// 222 6 Numérico - protected final String tipoDocumentoVenda = " ";// 228 1 Alfanumérico - protected final String numerodocumentoCPG = "000000000";// 229 10 Numérico - protected String formaPagamentoId = "";// 238 Numérico + protected String descricaoDetalhada = "";// 122 80 Alfanumérico + protected final String documentoVenda = "000000";// 202 6 Numérico + protected final String tipoDocumentoVenda = " ";// 208 1 Alfanumérico + protected final String numerodocumentoCPG = "000000000";// 209 10 Numérico + protected String formaPagamentoId = "";// 218 Numérico protected final String finalLinha = "*";// 239 1 Alfanumérico @@ -72,11 +72,11 @@ public class DespesaReceita { } public void setLocalArrecadacao(Integer localArrecadacao) { - this.localArrecadação = StringUtils.rightPad(localArrecadacao.toString(), 5, " "); + this.localArrecadação = StringUtils.rightPad(localArrecadacao != null ? truncStr(localArrecadacao.toString(), 5) : "", 5, " "); } public void setLocalArrecadacao(String localArrecadacao) { - this.localArrecadação = StringUtils.rightPad(localArrecadacao, 5, " "); + this.localArrecadação = StringUtils.rightPad(localArrecadacao != null ? truncStr(localArrecadacao, 6) : "", 5, ""); } public void setDataMovimento(Date dataMovimento) { @@ -96,7 +96,7 @@ public class DespesaReceita { } public void setDescricaoDetalhada(String desc) { - this.descricaoDetalhada = StringUtils.rightPad(desc != null ? truncStr(desc, 100) : "", 100, " "); + this.descricaoDetalhada = StringUtils.rightPad(desc != null ? truncStr(desc, 80) : "", 80, " "); } public String getFormaPagamentoTurismo() {