diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/BpeHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/BpeHibernateDAO.java index 76165be0e..4692b563b 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/BpeHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/BpeHibernateDAO.java @@ -163,12 +163,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO { String xml_bpe = rs.getNString("xml_bpe"); String xml_bpe_2 = rs.getNString("xml_bpe_2"); String xml_bpe_3 = rs.getNString("xml_bpe_3"); - String[] array = new String[3]; - array[0] = xml_bpe; - array[1] = xml_bpe_2; - array[2] = xml_bpe_3; - String xmlBpe = StringUtils.join(array); - registro.setXml(xmlBpe); + registro.setXml(StringUtils.join(new String[] { xml_bpe, xml_bpe_2, xml_bpe_3 })); if (exportacaoBPEVo.isBpeCanceladoENaoEmbarque(registro)) { String xmlAnterior = buscarXmlBPE(connection, (StringUtils.isBlank(registro.getChbpeSub()) ? registro.getChbpe() : registro.getChbpeSub())); @@ -241,16 +236,10 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO { ResultSet rs = ps.executeQuery(); while (rs.next()) { - String xml_bpe = rs.getNString("xml_bpe"); String xml_bpe_2 = rs.getNString("xml_bpe_2"); String xml_bpe_3 = rs.getNString("xml_bpe_3"); - String[] array = new String[3]; - array[0] = xml_bpe; - array[1] = xml_bpe_2; - array[2] = xml_bpe_3; - xmlBpe = StringUtils.join(array); - + xmlBpe = StringUtils.join(new String[] { xml_bpe, xml_bpe_2, xml_bpe_3 }); } rs.close(); @@ -495,11 +484,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO { String xml_bpe = rs.getNString("xml_bpe"); String xml_bpe_2 = rs.getNString("xml_bpe_2"); String xml_bpe_3 = rs.getNString("xml_bpe_3"); - String[] array = new String[3]; - array[0] = xml_bpe; - array[1] = xml_bpe_2; - array[2] = xml_bpe_3; - String xml = StringUtils.join(array); + String xml = StringUtils.join(new String[] { xml_bpe, xml_bpe_2, xml_bpe_3 }); TBPe tbpe = null; if (StringUtils.isNotBlank(xml)) @@ -513,13 +498,10 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO { String estadoDestino = (StringUtils.isNotBlank(xml) ? tbpe.getInfBPe().getIde().getUFFim().value() : rs.getString("estadoDestino")); boolean isInterEstadual = !estadoOrigem.equals(estadoDestino); - df.setEstadoOrigem(estadoOrigem); df.setEstadoDestino(estadoDestino); - df.setMunicipioOrigem(municipioOrigem); df.setInterEstadual(isInterEstadual); - df.setCajaId(rs.getLong("cajaId")); df.setTipoReceita(rs.getString("tipoReceita")); df.setNumoperacion(rs.getString("numoperacion")); @@ -527,7 +509,6 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO { df.setFechorVenta(rs.getDate("fechorVenta")); df.setIcmsInterestadual(rs.getBigDecimal("icmsInterestadual")); df.setIcmsIntermunicipal(rs.getBigDecimal("icmsIntermunicipal")); - df.setIcmsInterestadual(rs.getBigDecimal("icmsInterestadual")); df.setRedBaseCalcIcms(rs.getBigDecimal("redBaseCalcIcms")); df.setPorcRedMunicipal(rs.getBigDecimal("porcRedMunicipal")); @@ -541,17 +522,13 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO { df.setIndSeguroEstadual(rs.getBoolean("indseguroestadual")); df.setIndTxembarqueEstadual(rs.getBoolean("indtxembarqueestadual")); df.setIndPedagioEstdual(rs.getBoolean("indpedagioestdual")); - df.setIsenta(rs.getBoolean("isenta")); - df.setTarifa(rs.getBigDecimal("tarifa")); df.setTaxaEmbarque(rs.getBigDecimal("taxaEmbarque")); df.setPedagio(rs.getBigDecimal("pedagio")); df.setSeguro(rs.getBigDecimal("seguro")); df.setOutros(rs.getBigDecimal("outros")); - df.setDatamov(rs.getString("datamov")); - list.add(df); }