From 6ad9f4ca1ca3e40c4427738c246fe5ed8197823c Mon Sep 17 00:00:00 2001 From: julio Date: Thu, 1 Aug 2019 19:02:46 +0000 Subject: [PATCH] fixes bug#15167 dev: wallace qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@96321 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../ventaboletos/dao/hibernate/BpeHibernateDAO.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/BpeHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/BpeHibernateDAO.java index eb55ca085..fb3a5b428 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/BpeHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/BpeHibernateDAO.java @@ -883,7 +883,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO { sql.append("from boleto c "); sql.append(" join bpe bpe on c.boleto_id = bpe.boleto_id "); sql.append(" and bpe.activo = (case when TO_CHAR(c.feccreacion, 'yyyymmdd') <> "); - sql.append(" to_char(to_timestamp_tz(bpe.dhrecbto, 'YYYY-MM-DD\"T\"HH24:MI:SSTZH:TZM'), 'yyyymmdd') then 0 else 1 end) "); + sql.append(" to_char(to_date(substr(bpe.dhrecbto,0,10), 'YYYY-MM-DD'), 'yyyymmdd') then 0 else 1 end) "); 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 empresa ep on ma.empresa_id = ep.empresa_id "); @@ -978,7 +978,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO { sql.append(" inner join empresa e on e.empresa_id = m.empresa_id "); sql.append(" inner join bpe bpe on bpe.boleto_id = bori.boleto_id "); sql.append(" and bpe.activo = (case when TO_CHAR(bori.feccreacion, 'yyyymmdd') <> "); - sql.append(" to_char(to_timestamp_tz(bpe.dhrecbto, 'YYYY-MM-DD\"T\"HH24:MI:SSTZH:TZM'), 'yyyymmdd') then 0 else 1 end) "); + sql.append(" to_char(to_date(substr(bpe.dhrecbto,0,10), 'YYYY-MM-DD'), 'yyyymmdd') then 0 else 1 end) "); sql.append(" inner join estado est_bpe on bpe.uf = est_bpe.codibge "); sql.append(" left join bpe bpeori on bpeori.chbpe = bpe.chbpe_substituicao and bpeori.activo = 1 "); sql.append(" left join boleto b on b.boleto_id = bpeori.boleto_id "); @@ -1078,7 +1078,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO { sql.append(" inner join empresa e on e.empresa_id = m.empresa_id "); sql.append(" inner join bpe bpe on bpe.boleto_id = bori.boleto_id "); sql.append(" and bpe.activo = (case when TO_CHAR(bori.feccreacion, 'yyyymmdd') <> "); - sql.append(" to_char(to_timestamp_tz(bpe.dhrecbto, 'YYYY-MM-DD\"T\"HH24:MI:SSTZH:TZM'), 'yyyymmdd') then 0 else 1 end) "); + sql.append(" to_char(to_date(substr(bpe.dhrecbto,0,10), 'YYYY-MM-DD'), 'yyyymmdd') then 0 else 1 end) "); sql.append(" inner join estado est_bpe on bpe.uf = est_bpe.codibge "); sql.append(" left join boleto b on b.boleto_id = (case when bori.motivocancelacion_id = 99 then bori.boletoanterior_id else bori.boletooriginal_id end) "); sql.append(" left join bpe bpeori on b.boleto_id = bpeori.boleto_id and bpeori.activo = 1 ");