bug#11600
dev: julio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@84346 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
ee037eb2a0
commit
d9cea9b6ba
|
@ -377,6 +377,12 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
||||||
|
|
||||||
for (DetalhadoFiscal det : list) {
|
for (DetalhadoFiscal det : list) {
|
||||||
|
|
||||||
|
String xml = det.getXml();
|
||||||
|
|
||||||
|
TBPe tbpe = null;
|
||||||
|
if (StringUtils.isNotBlank(xml))
|
||||||
|
tbpe = new ExportacaoBPEVo().convertXmlToBpe(xml);
|
||||||
|
|
||||||
BigDecimal passagem = BigDecimal.ZERO;
|
BigDecimal passagem = BigDecimal.ZERO;
|
||||||
BigDecimal isentos = BigDecimal.ZERO;
|
BigDecimal isentos = BigDecimal.ZERO;
|
||||||
BigDecimal outros = BigDecimal.ZERO;
|
BigDecimal outros = BigDecimal.ZERO;
|
||||||
|
@ -480,21 +486,20 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
||||||
array[2] = xml_bpe_3;
|
array[2] = xml_bpe_3;
|
||||||
String xml = StringUtils.join(array);
|
String xml = StringUtils.join(array);
|
||||||
|
|
||||||
ExportacaoBPEVo exportacaoBPEVo = new ExportacaoBPEVo();
|
|
||||||
TBPe tbpe = null;
|
TBPe tbpe = null;
|
||||||
if (StringUtils.isNotBlank(xml))
|
if (StringUtils.isNotBlank(xml))
|
||||||
tbpe = exportacaoBPEVo.convertXmlToBpe(xml);
|
tbpe = new ExportacaoBPEVo().convertXmlToBpe(xml);
|
||||||
|
|
||||||
DetalhadoFiscal df = new DetalhadoFiscal();
|
DetalhadoFiscal df = new DetalhadoFiscal();
|
||||||
|
df.setXml(xml);
|
||||||
|
|
||||||
String municipioOrigem = StringUtils.isNotBlank(xml) ? tbpe.getInfBPe().getIde().getCMunIni() : rs.getString("municipioOrigem");
|
String municipioOrigem = StringUtils.isNotBlank(xml) ? tbpe.getInfBPe().getIde().getCMunIni() : rs.getString("municipioOrigem");
|
||||||
// String municipioDestino = StringUtils.isNotBlank(xml) ? tbpe.getInfBPe().getIde().getCMunFim() : null;
|
|
||||||
String estadoOrigem = (StringUtils.isNotBlank(xml) ? tbpe.getInfBPe().getIde().getUFIni().value() : rs.getString("estadoOrigem"));
|
String estadoOrigem = (StringUtils.isNotBlank(xml) ? tbpe.getInfBPe().getIde().getUFIni().value() : rs.getString("estadoOrigem"));
|
||||||
String estadoDestino = (StringUtils.isNotBlank(xml) ? tbpe.getInfBPe().getIde().getUFFim().value() : rs.getString("estadoDestino"));
|
String estadoDestino = (StringUtils.isNotBlank(xml) ? tbpe.getInfBPe().getIde().getUFFim().value() : rs.getString("estadoDestino"));
|
||||||
|
|
||||||
boolean isInterEstadual = !estadoOrigem.equals(estadoDestino);
|
boolean isInterEstadual = !estadoOrigem.equals(estadoDestino);
|
||||||
|
|
||||||
df.setEstadoOrigem(estadoOrigem );
|
df.setEstadoOrigem(estadoOrigem);
|
||||||
df.setEstadoDestino(estadoDestino);
|
df.setEstadoDestino(estadoDestino);
|
||||||
|
|
||||||
df.setMunicipioOrigem(municipioOrigem);
|
df.setMunicipioOrigem(municipioOrigem);
|
||||||
|
@ -586,7 +591,8 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
||||||
|
|
||||||
sql.append("from boleto c ");
|
sql.append("from boleto c ");
|
||||||
sql.append(" join bpe bpe on c.boleto_id = bpe.boleto_id ");
|
sql.append(" join bpe bpe on c.boleto_id = bpe.boleto_id ");
|
||||||
sql.append(" left join bpe bpecan on bpecan.chbpe = bpe.chbpe and bpecan.codstat = 100 and bpe.codstat = 135 and bpe.tipoevento = 110111 ");
|
// sql.append(" left join bpe bpecan on bpecan.chbpe = bpe.chbpe and bpecan.codstat = 100 and bpe.codstat = 135 and bpe.tipoevento = 110111 ");
|
||||||
|
sql.append(" left join bpe bpecan on bpecan.chbpe = bpe.chbpe and bpecan.codstat = 135 and bpe.codstat = 100 and bpecan.tipoevento = 110111 ");
|
||||||
sql.append(" join estado e on e.codibge = bpe.uf ");
|
sql.append(" join estado e on e.codibge = bpe.uf ");
|
||||||
sql.append(" join marca ma on c.marca_id = ma.marca_id ");
|
sql.append(" join marca ma on c.marca_id = ma.marca_id ");
|
||||||
sql.append(" join empresa ep on ma.empresa_id = ep.empresa_id ");
|
sql.append(" join empresa ep on ma.empresa_id = ep.empresa_id ");
|
||||||
|
|
Loading…
Reference in New Issue