fixes bug#15748
dev: julio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@97499 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
6f6bc1e639
commit
569b04fbc7
|
@ -63,13 +63,13 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
* Bilhetes emitidos dentro do mes for cancelados apenas informar o cancelamento; Bilhetes emitidos em um mês e cancelados em outro mês, este deve ir apenas no relatório de devolução;
|
||||
*/
|
||||
LinkedHashMap<String, ExportacaoBPEBase> mapAux = new LinkedHashMap<String, ExportacaoBPEBase>();
|
||||
for (ExportacaoBPEBase e1 : registros) {
|
||||
if (mapAux.containsKey(e1.getChbpe())) {
|
||||
if (ExportacaoBPEVo.isBpeCancelado(e1.getCodstatus()))
|
||||
mapAux.put(e1.getChbpe(), e1);
|
||||
for (ExportacaoBPEBase expBPe : registros) {
|
||||
if (mapAux.containsKey(expBPe.getChbpe())) {
|
||||
if (ExportacaoBPEVo.isBpeCancelado(expBPe.getCodstatus()) && !ExportacaoBPEVo.validaBPeCorridaAgrupada(expBPe))
|
||||
mapAux.put(expBPe.getChbpe(), expBPe);
|
||||
} else {
|
||||
if (!ExportacaoBPEVo.isBpeCancelado(e1.getCodstatus()))
|
||||
mapAux.put(e1.getChbpe(), e1);
|
||||
if (!ExportacaoBPEVo.isBpeCancelado(expBPe.getCodstatus()) && !ExportacaoBPEVo.validaBPeCorridaAgrupada(expBPe))
|
||||
mapAux.put(expBPe.getChbpe(), expBPe);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,6 +158,9 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
registro.setIndSeguroEstadual(rs.getInt("indseguroestadual") == 1);
|
||||
registro.setIndTarifaEstadual(rs.getInt("indtarifaestadual") == 1);
|
||||
registro.setIndTxEmbarqueEstadual(rs.getInt("indtxembarqueestadual") == 1);
|
||||
registro.setDhrecbtoBPe(rs.getString("dhrecbto_bpe"));
|
||||
registro.setActivoBPe(rs.getInt("activo_bpe") == 1);
|
||||
registro.setMotivoCancelacionId(rs.getInt("motivocancelacion_id"));
|
||||
registro.setValortributado(valortributado);
|
||||
registro.setValortotal(valortotal);
|
||||
|
||||
|
@ -251,7 +254,8 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" bpe.desconto as v_desconto, ");
|
||||
sql.append(" bpe.chbpe, ");
|
||||
sql.append(" coalesce(bpe.chbpe_substituicao, ' ') as chbpe_sub, ");
|
||||
sql.append(" to_char(c.fechorventa, 'yyyymmdd') as dh_emisao, ");
|
||||
sql.append(" to_char(to_date(substr(bpe.dhrecbto,0,10), 'YYYY-MM-DD'), 'yyyymmdd') as dhrecbto_bpe, ");
|
||||
sql.append(" to_char(c.feccreacion, 'yyyymmdd') as dh_emisao, ");
|
||||
sql.append(" to_char(c.fechorviaje, 'yyyymmdd') as dhrecbto, ");
|
||||
sql.append(" coalesce(bpe.tiposubstituicao, '0') as tp_bpe, ");
|
||||
sql.append(" bpe.retorno_id as retorno, ");
|
||||
|
@ -311,9 +315,11 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" bpe.vcomp05, ");
|
||||
sql.append(" bpe.vcomp06, ");
|
||||
sql.append(" bpe.vcomp99, ");
|
||||
sql.append(" bpe.pRedBC ");
|
||||
sql.append(" bpe.pRedBC, ");
|
||||
sql.append(" bpe.activo as activo_bpe, ");
|
||||
sql.append(" c.motivocancelacion_id ");
|
||||
sql.append("from boleto c ");
|
||||
sql.append(" join bpe bpe on c.boleto_id = bpe.boleto_id and bpe.activo = 1 ");
|
||||
sql.append(" join bpe bpe on c.boleto_id = bpe.boleto_id ");
|
||||
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 ");
|
||||
|
@ -323,11 +329,11 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" and bpe.tipoamb = 1 and ep.activo = 1 ");
|
||||
sql.append(" and bpe.codstat in ('-1','100','101','102','135','150') ");
|
||||
sql.append(" and (bpe.tipoevento not in ('110115','110116') or bpe.tipoevento is null) ");
|
||||
sql.append(" and c.fechorventa >= to_date(?,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and c.fechorventa <= to_date(?,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and c.feccreacion >= to_date(?,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and c.feccreacion <= to_date(?,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and ep.empresa_id = ? ");
|
||||
sql.append(" and e.cveestado = ? ");
|
||||
sql.append(" and (bpe.xmlregular is not null or bpe.xmlcontingencia is not null) ");
|
||||
// sql.append(" and (bpe.xmlregular is not null or bpe.xmlcontingencia is not null) ");
|
||||
sql.append("order by to_number(c.numfoliosistema), to_number(num_bpe), dh_emisao, tipoevento desc ");
|
||||
return sql.toString();
|
||||
}
|
||||
|
@ -355,7 +361,8 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" bpe.desconto as v_desconto, ");
|
||||
sql.append(" bpe.chbpe, ");
|
||||
sql.append(" coalesce(bpe.chbpe_substituicao, ' ') as chbpe_sub, ");
|
||||
sql.append(" to_char(c.fechorventa, 'yyyymmdd') as dh_emisao, ");
|
||||
sql.append(" to_char(to_date(substr(bpe.dhrecbto,0,10), 'YYYY-MM-DD'), 'yyyymmdd') as dhrecbto_bpe, ");
|
||||
sql.append(" to_char(c.feccreacion, 'yyyymmdd') as dh_emisao, ");
|
||||
sql.append(" to_char(c.fechorviaje, 'yyyymmdd') as dhrecbto, ");
|
||||
sql.append(" coalesce(bpe.tiposubstituicao, '0') as tp_bpe, ");
|
||||
sql.append(" bpe.retorno_id as retorno, ");
|
||||
|
@ -379,9 +386,11 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" coalesce(ei.indtarifaestadual,0) as indtarifaestadual,");
|
||||
sql.append(" coalesce(ei.indseguroestadual,0) as indseguroestadual, ");
|
||||
sql.append(" coalesce(ei.indtxembarqueestadual,0) as indtxembarqueestadual, ");
|
||||
sql.append(" coalesce(ei.indpedagioestdual,0) as indpedagioestdual ");
|
||||
sql.append(" coalesce(ei.indpedagioestdual,0) as indpedagioestdual, ");
|
||||
sql.append(" bpe.activo as activo_bpe, ");
|
||||
sql.append(" c.motivocancelacion_id ");
|
||||
sql.append("from boleto c ");
|
||||
sql.append(" join bpe bpe on c.boleto_id = bpe.boleto_id and bpe.activo = 1 ");
|
||||
sql.append(" join bpe bpe on c.boleto_id = bpe.boleto_id ");
|
||||
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 ");
|
||||
|
@ -391,8 +400,8 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" and bpe.tipoamb = 1 and ep.activo = 1 ");
|
||||
sql.append(" and bpe.codstat in ('-1','100','101','102','135','150') ");
|
||||
sql.append(" and (bpe.tipoevento not in ('110115','110116') or bpe.tipoevento is null) ");
|
||||
sql.append(" and c.fechorventa >= to_date(?,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and c.fechorventa <= to_date(?,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and c.feccreacion >= to_date(?,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and c.feccreacion <= to_date(?,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and ep.empresa_id = ? ");
|
||||
sql.append(" and e.cveestado = ? ");
|
||||
sql.append(" and (bpe.xmlregular is not null or bpe.xmlcontingencia is not null) ");
|
||||
|
@ -816,7 +825,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" to_number(c.num_bpe) as num_bpe, ");
|
||||
sql.append(" to_number(c.numfoliosistema) as numfoliosistema, ");
|
||||
sql.append(" c.numoperacion as numoperacion, ");
|
||||
sql.append(" trunc(c.fechorventa) as fechorVenta, ");
|
||||
sql.append(" trunc(c.feccreacion) as fechorVenta, ");
|
||||
sql.append(" e.estado_id as estadoId, ");
|
||||
sql.append(" e.cveestado as estadoOrigem, ");
|
||||
sql.append(" ei.icms as icmsInterestadual, ");
|
||||
|
@ -839,7 +848,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" coalesce(c.importepedagio, 0) as pedagio, ");
|
||||
sql.append(" coalesce(c.importeseguro, 0) as seguro, ");
|
||||
sql.append(" coalesce(c.importeoutros, 0) as outros, ");
|
||||
sql.append(" to_char(trunc(c.fechorventa), 'yyyymmdd') as datamov, ");
|
||||
sql.append(" to_char(trunc(c.feccreacion), 'yyyymmdd') as datamov, ");
|
||||
sql.append(" bpe.chbpe, ");
|
||||
sql.append(" bpe.codstat as codstatus, ");
|
||||
sql.append(" bpe.tipoevento, ");
|
||||
|
@ -880,7 +889,9 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" bpe.vcomp99, ");
|
||||
sql.append(" bpe.pRedBC ");
|
||||
sql.append("from boleto c ");
|
||||
sql.append(" join bpe bpe on c.boleto_id = bpe.boleto_id and bpe.activo = 1 ");
|
||||
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_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 ");
|
||||
|
@ -890,8 +901,8 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" and bpe.tipoamb = 1 and ep.activo = 1 ");
|
||||
sql.append(" and bpe.codstat in ('-1','100','101','102','135','150') ");
|
||||
sql.append(" and (bpe.tipoevento not in ('110115','110116') or bpe.tipoevento is null) ");
|
||||
sql.append(" and c.fechorventa >= to_date(:DATE_INICIO,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and c.fechorventa <= to_date(:DATE_FIM,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and c.feccreacion >= to_date(:DATE_INICIO,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and c.feccreacion <= to_date(:DATE_FIM,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and ep.empresa_id = :EMPRESA_ID ");
|
||||
sql.append(" and e.cveestado in ( ").append(ufs).append(" ) ");
|
||||
sql.append(" and (bpe.xmlregular is not null or bpe.xmlcontingencia is not null) ");
|
||||
|
@ -904,12 +915,12 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("select /*+INDEX(BPE IDX__BPE_BOLETO)*/ ");
|
||||
sql.append(" b.boleto_id as cajaId, ");
|
||||
sql.append(" bori.boleto_id as cajaId, ");
|
||||
sql.append(" 'DEV' as tipoReceita, ");
|
||||
sql.append(" to_number(bori.num_bpe) as num_bpe, ");
|
||||
sql.append(" to_number(bori.numfoliosistema) as numfoliosistema, ");
|
||||
sql.append(" bori.numoperacion as numoperacion, ");
|
||||
sql.append(" trunc(bori.fechorventa) as fechorVenta, ");
|
||||
sql.append(" trunc(bori.feccreacion) as fechorVenta, ");
|
||||
sql.append(" est_bpe.estado_id as estadoId, ");
|
||||
sql.append(" est_bpe.cveestado as estadoOrigem, ");
|
||||
sql.append(" ei.icms as icmsInterestadual, ");
|
||||
|
@ -927,54 +938,56 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" ei.indtxembarqueestadual as indtxembarqueestadual, ");
|
||||
sql.append(" ei.indpedagioestdual as indpedagioestdual, ");
|
||||
sql.append(" ei.tributacaoImportacao as tributacaoImportacao, ");
|
||||
sql.append(" coalesce(b.preciopagado, 0) as tarifa, ");
|
||||
sql.append(" coalesce(b.importetaxaembarque, 0) as taxaEmbarque, ");
|
||||
sql.append(" coalesce(b.importepedagio, 0) as pedagio, ");
|
||||
sql.append(" coalesce(b.importeseguro, 0) as seguro, ");
|
||||
sql.append(" coalesce(b.importeoutros, 0) as outros, ");
|
||||
sql.append(" to_char(trunc(bori.fechorventa), 'yyyymmdd') as datamov, ");
|
||||
sql.append(" coalesce(bori.preciopagado, 0) as tarifa, ");
|
||||
sql.append(" coalesce(bori.importetaxaembarque, 0) as taxaEmbarque, ");
|
||||
sql.append(" coalesce(bori.importepedagio, 0) as pedagio, ");
|
||||
sql.append(" coalesce(bori.importeseguro, 0) as seguro, ");
|
||||
sql.append(" coalesce(bori.importeoutros, 0) as outros, ");
|
||||
sql.append(" to_char(trunc(bori.feccreacion), 'yyyymmdd') as datamov, ");
|
||||
sql.append(" bpeori.chbpe, ");
|
||||
sql.append(" bpe.codstat as codstatus, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.cmunini else bpe.cmunini end as cmunini, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.cmunfim else bpe.cmunfim end as cmunfim, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.ufini else bpe.ufini end as ufini, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.uffim else bpe.uffim end as uffim, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.nbp else bpe.nbp end as nbp, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.dhemb else bpe.dhemb end as dhemb, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.cst00 else bpe.cst00 end as cst00, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.cst20 else bpe.cst20 end as cst20, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.cst45 else bpe.cst45 end as cst45, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.cst90 else bpe.cst90 end as cst90, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.cstoutrauf else bpe.cstoutrauf end as cstoutrauf, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.cstsn else bpe.cstsn end as cstsn, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vbc00 else bpe.vbc00 end as vbc00, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.picms00 else bpe.picms00 end as picms00, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vicms00 else bpe.vicms00 end as vicms00, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vbc20 else bpe.vbc20 end as vbc20, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.picms20 else bpe.picms20 end as picms20, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vicms20 else bpe.vicms20 end as vicms20, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vbp else bpe.vbp end as vbp, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vdesconto else bpe.vdesconto end as vdesconto, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vpgto else bpe.vpgto end as vpgto, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.tpcomp01 else bpe.tpcomp01 end as tpcomp01, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.tpcomp02 else bpe.tpcomp02 end as tpcomp02, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.tpcomp03 else bpe.tpcomp03 end as tpcomp03, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.tpcomp04 else bpe.tpcomp04 end as tpcomp04, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.tpcomp05 else bpe.tpcomp05 end as tpcomp05, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.tpcomp06 else bpe.tpcomp06 end as tpcomp06, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.tpcomp99 else bpe.tpcomp99 end as tpcomp99, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vcomp01 else bpe.vcomp01 end as vcomp01, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vcomp02 else bpe.vcomp02 end as vcomp02, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vcomp03 else bpe.vcomp03 end as vcomp03, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vcomp04 else bpe.vcomp04 end as vcomp04, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vcomp05 else bpe.vcomp05 end as vcomp05, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vcomp06 else bpe.vcomp06 end as vcomp06, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.vcomp99 else bpe.vcomp99 end as vcomp99, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.predbc else bpe.predbc end as predbc ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.cmunini else bpeori.cmunini end as cmunini, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.cmunfim else bpeori.cmunfim end as cmunfim, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.ufini else bpeori.ufini end as ufini, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.uffim else bpeori.uffim end as uffim, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.nbp else bpeori.nbp end as nbp, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.dhemb else bpeori.dhemb end as dhemb, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.cst00 else bpeori.cst00 end as cst00, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.cst20 else bpeori.cst20 end as cst20, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.cst45 else bpeori.cst45 end as cst45, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.cst90 else bpeori.cst90 end as cst90, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.cstoutrauf else bpeori.cstoutrauf end as cstoutrauf, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.cstsn else bpeori.cstsn end as cstsn, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vbc00 else bpeori.vbc00 end as vbc00, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.picms00 else bpeori.picms00 end as picms00, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vicms00 else bpeori.vicms00 end as vicms00, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vbc20 else bpeori.vbc20 end as vbc20, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.picms20 else bpeori.picms20 end as picms20, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vicms20 else bpeori.vicms20 end as vicms20, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vbp else bpeori.vbp end as vbp, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vdesconto else bpeori.vdesconto end as vdesconto, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vpgto else bpeori.vpgto end as vpgto, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.tpcomp01 else bpeori.tpcomp01 end as tpcomp01, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.tpcomp02 else bpeori.tpcomp02 end as tpcomp02, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.tpcomp03 else bpeori.tpcomp03 end as tpcomp03, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.tpcomp04 else bpeori.tpcomp04 end as tpcomp04, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.tpcomp05 else bpeori.tpcomp05 end as tpcomp05, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.tpcomp06 else bpeori.tpcomp06 end as tpcomp06, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.tpcomp99 else bpeori.tpcomp99 end as tpcomp99, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vcomp01 else bpeori.vcomp01 end as vcomp01, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vcomp02 else bpeori.vcomp02 end as vcomp02, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vcomp03 else bpeori.vcomp03 end as vcomp03, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vcomp04 else bpeori.vcomp04 end as vcomp04, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vcomp05 else bpeori.vcomp05 end as vcomp05, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vcomp06 else bpeori.vcomp06 end as vcomp06, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.vcomp99 else bpeori.vcomp99 end as vcomp99, ");
|
||||
sql.append(" case when bpe.ufini is not null then bpe.predbc else bpeori.predbc end as predbc ");
|
||||
sql.append("from boleto bori ");
|
||||
sql.append(" inner join marca m on m.marca_id = bori.marca_id and m.activo = 1 ");
|
||||
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 and bpe.activo = 1 ");
|
||||
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_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 ");
|
||||
|
@ -987,11 +1000,11 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" left join bpe bpeant on bpeant.boleto_id = bant.boleto_id and bpeant.activo = 1 ");
|
||||
sql.append(" left join punto_venta ptvo on ptvo.puntoventa_id = coalesce(bant.puntoventa_id, bori.puntoventa_id,b.ptovtaventa_id) ");
|
||||
sql.append("where ( (bpe.codstat in ('-1','100','101','102','135','150') and bpe.chbpe_substituicao is not null) ");
|
||||
sql.append(" or (bpe.codstat in ('101','135') and to_char(b.fechorventa, 'mm/yyyy') < to_char(bori.fechorventa, 'mm/yyyy')) ) ");
|
||||
sql.append(" or (bpe.codstat in ('101','135') and to_char(b.feccreacion, 'mm/yyyy') < to_char(bori.feccreacion, 'mm/yyyy')) ) ");
|
||||
sql.append(" and (bpe.codstat in ('-1','100','101','102','135','150') and bpe.tipoevento not in ('110115','110116') or bpe.tipoevento is null) ");
|
||||
sql.append(" and (bpeori.codstat in ('-1','100','101','102','135','150') and bpeori.tipoevento not in ('110115','110116') or bpeori.tipoevento is null) ");
|
||||
sql.append(" and bori.fechorventa >= to_date(:DATE_INICIO,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and bori.fechorventa <= to_date(:DATE_FIM,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and bori.feccreacion >= to_date(:DATE_INICIO,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and bori.feccreacion <= to_date(:DATE_FIM,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and est_bpe.cveestado in ( ").append(ufs).append(" ) ");
|
||||
sql.append(" and e.empresa_id = :EMPRESA_ID ");
|
||||
sql.append(" and (bpe.xmlregular is not null or bpe.xmlcontingencia is not null) ");
|
||||
|
@ -1008,7 +1021,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" to_number(b.num_bpe) as num_bpe, ");
|
||||
sql.append(" to_number(b.numfoliosistema) as numfoliosistema, ");
|
||||
sql.append(" b.numoperacion as numoperacion, ");
|
||||
sql.append(" trunc(bori.fechorventa) as fechorVenta, ");
|
||||
sql.append(" trunc(bori.feccreacion) as fechorVenta, ");
|
||||
sql.append(" est_bpe.estado_id as estadoId, ");
|
||||
sql.append(" est_bpe.cveestado as estadoOrigem, ");
|
||||
sql.append(" ei.icms as icmsInterestadual, ");
|
||||
|
@ -1031,7 +1044,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" coalesce(b.importepedagio, 0) as pedagio, ");
|
||||
sql.append(" coalesce(b.importeseguro, 0) as seguro, ");
|
||||
sql.append(" coalesce(b.importeoutros, 0) as outros, ");
|
||||
sql.append(" to_char(trunc(bori.fechorventa), 'yyyymmdd') as datamov, ");
|
||||
sql.append(" to_char(trunc(bori.feccreacion), 'yyyymmdd') as datamov, ");
|
||||
sql.append(" bpe.chbpe, ");
|
||||
sql.append(" bpe.codstat as codstatus, ");
|
||||
sql.append(" case when bpeori.ufini is not null then bpeori.cmunini else bpe.cmunini end as cmunini, ");
|
||||
|
@ -1073,7 +1086,9 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append("from boleto bori ");
|
||||
sql.append(" inner join marca m on m.marca_id = bori.marca_id and m.activo = 1 ");
|
||||
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 and bpe.activo = 1 ");
|
||||
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_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 = coalesce(bori.boletoanterior_id, bori.boletooriginal_id) ");
|
||||
sql.append(" left join bpe bpeori on b.boleto_id = bpeori.boleto_id and bpeori.activo = 1 ");
|
||||
|
@ -1084,11 +1099,11 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append("left join estado esaidf on esaidf.estado_id = aidf.estado_id ");
|
||||
sql.append("left join punto_venta ptvo on ptvo.puntoventa_id = coalesce(b.ptovtaventa_id, bori.puntoventa_id) ");
|
||||
sql.append("where ");
|
||||
sql.append(" (bpe.codstat in ('101','135') and to_char(b.fechorventa, 'mm/yyyy') < to_char(bori.fechorventa, 'mm/yyyy')) ");
|
||||
sql.append(" (bpe.codstat in ('101','135') and to_char(b.feccreacion, 'mm/yyyy') < to_char(bori.feccreacion, 'mm/yyyy')) ");
|
||||
sql.append(" and (bpe.codstat in ('-1','100','101','102','135','150') and bpe.tipoevento not in ('110115','110116') or bpe.tipoevento is null) ");
|
||||
sql.append(" and (bpeori.codstat in ('-1','100','101','102','135','150') and bpeori.tipoevento not in ('110115','110116') or bpeori.tipoevento is null) ");
|
||||
sql.append(" and bori.fechorventa >= to_date(:DATE_INICIO,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and bori.fechorventa <= to_date(:DATE_FIM,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and bori.feccreacion >= to_date(:DATE_INICIO,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and bori.feccreacion <= to_date(:DATE_FIM,'DD/MM/YYYY HH24:MI:SS') ");
|
||||
sql.append(" and est_bpe.cveestado in ( ").append(ufs).append(" ) ");
|
||||
sql.append(" and e.empresa_id = :EMPRESA_ID ");
|
||||
sql.append(" and (bpe.xmlregular is not null or bpe.xmlcontingencia is not null) ");
|
||||
|
@ -1300,7 +1315,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" c.boleto_id as cajaId, ");
|
||||
sql.append(" 'REC' as tipoReceita, ");
|
||||
sql.append(" c.numoperacion as numoperacion, ");
|
||||
sql.append(" trunc(c.fechorventa) as fechorVenta, ");
|
||||
sql.append(" trunc(c.feccreacion) as fechorVenta, ");
|
||||
sql.append(" e.estado_id as estadoId, ");
|
||||
sql.append(" ei.icms as icmsInterestadual, ");
|
||||
sql.append(" ei.icmsim as icmsIntermunicipal, ");
|
||||
|
@ -1326,12 +1341,13 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" coalesce(c.importepedagio, 0) as pedagio, ");
|
||||
sql.append(" coalesce(c.importeseguro, 0) as seguro, ");
|
||||
sql.append(" coalesce(c.importeoutros, 0) as outros, ");
|
||||
sql.append(" to_char(trunc(c.fechorventa), 'yyyymmdd') as datamov, ");
|
||||
sql.append(" to_char(trunc(c.feccreacion), 'yyyymmdd') as datamov, ");
|
||||
sql.append(" DBMS_LOB.substr(coalesce(bpe.xmlregular, bpe.xmlcontingencia), 3000) as xml_bpe, ");
|
||||
sql.append(" DBMS_LOB.substr(coalesce(bpe.xmlregular, bpe.xmlcontingencia), 3000, 3001) as xml_bpe_2, ");
|
||||
sql.append(" DBMS_LOB.substr(coalesce(bpe.xmlregular, bpe.xmlcontingencia), 3000, 6001) as xml_bpe_3 ");
|
||||
sql.append("from boleto c ");
|
||||
sql.append(" join bpe bpe on c.boleto_id = bpe.boleto_id and bpe.activo = 1 ");
|
||||
sql.append(" join bpe bpe on c.boleto_id = bpe.boleto_id ");
|
||||
sql.append(" and bpe.activo = (case when c.motivocancelacion_id = 17 and c.boletooriginal_id is null then 0 else 1 end) ");
|
||||
sql.append(" left join bpe bpecan on bpecan.chbpe = bpe.chbpe and bpecan.codstat in ('101','135') and bpe.codstat = '100' ");
|
||||
sql.append(" and (bpecan.tipoevento = '110111' or bpecan.tipoevento is null) and bpecan.activo = 1 ");
|
||||
sql.append(" join estado e on e.codibge = bpe.uf ");
|
||||
|
@ -1350,8 +1366,8 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append("where c.activo = 1 and bpe.tipoamb = 1 and bpe.codstat in ('-1','100','102','150') ");
|
||||
sql.append(" and (bpe.fecmodif < (case when (to_char(bpe.fecmodif, 'mm/yyyy') <> to_char(bpecan.fecmodif, 'mm/yyyy') ) ");
|
||||
sql.append(" then bpecan.fecmodif else bpe.fecmodif end) or bpecan.fecmodif is null) ");
|
||||
sql.append(" and c.fechorventa >= :DATE_INICIO ");
|
||||
sql.append(" and c.fechorventa <= :DATE_FIM ");
|
||||
sql.append(" and c.feccreacion >= :DATE_INICIO ");
|
||||
sql.append(" and c.feccreacion <= :DATE_FIM ");
|
||||
sql.append(" and ep.empresa_id = :EMPRESA_ID ");
|
||||
sql.append(" and (bpe.xmlregular is not null or bpe.xmlcontingencia is not null) ");
|
||||
sql.append(" and e.cveestado in ( ").append(ufs).append(" ) ");
|
||||
|
@ -1367,7 +1383,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" b.boleto_id as cajaId, ");
|
||||
sql.append(" 'DEV' as tipoReceita, ");
|
||||
sql.append(" b.numoperacion as numoperacion, ");
|
||||
sql.append(" trunc(bori.fechorventa) as fechorVenta, ");
|
||||
sql.append(" trunc(bori.feccreacion) as fechorVenta, ");
|
||||
sql.append(" est_bpe.estado_id as estadoId, ");
|
||||
sql.append(" ei.icms as icmsInterestadual, ");
|
||||
sql.append(" ei.icmsim as icmsIntermunicipal, ");
|
||||
|
@ -1393,14 +1409,15 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" coalesce(b.importepedagio, 0) as pedagio, ");
|
||||
sql.append(" coalesce(b.importeseguro, 0) as seguro, ");
|
||||
sql.append(" coalesce(b.importeoutros, 0) as outros, ");
|
||||
sql.append(" to_char(trunc(bori.fechorventa), 'yyyymmdd') as datamov, ");
|
||||
sql.append(" to_char(trunc(bori.feccreacion), 'yyyymmdd') as datamov, ");
|
||||
sql.append(" dbms_lob.substr((case when bpeori.tipoevento is not null then bpeant.xmlregular else bpeori.xmlregular end), 3000) as xml_bpe, ");
|
||||
sql.append(" dbms_lob.substr((case when bpeori.tipoevento is not null then bpeant.xmlregular else bpeori.xmlregular end), 3000, 3001) as xml_bpe_2, ");
|
||||
sql.append(" dbms_lob.substr((case when bpeori.tipoevento is not null then bpeant.xmlregular else bpeori.xmlregular end), 3000, 6001) as xml_bpe_3 ");
|
||||
sql.append("from boleto bori ");
|
||||
sql.append(" inner join marca m on m.marca_id = bori.marca_id and m.activo = 1 ");
|
||||
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 and bpe.activo = 1 ");
|
||||
sql.append(" inner join bpe bpe on bpe.boleto_id = bori.boleto_id ");
|
||||
sql.append(" and bpe.activo = (case when bori.motivocancelacion_id = 17 and bori.boletooriginal_id is null 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 ");
|
||||
sql.append(" and bpeori.activo = (case when bori.motivocancelacion_id = 17 and bori.boletooriginal_id is null then 0 else 1 end) ");
|
||||
|
@ -1430,11 +1447,11 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" left join bpe bpeant on bpeant.boleto_id = bant.boleto_id ");
|
||||
sql.append(" left join punto_venta ptvo on ptvo.puntoventa_id = coalesce(bant.puntoventa_id, bori.puntoventa_id,b.ptovtaventa_id) ");
|
||||
sql.append("where ( (bpe.codstat in ('-1','100','101','102','135','150') and bpe.chbpe_substituicao is not null) ");
|
||||
sql.append(" or (bpe.codstat in ('101','135') and to_char(b.fechorventa, 'mm/yyyy') < to_char(bori.fechorventa, 'mm/yyyy')) ) ");
|
||||
sql.append(" or (bpe.codstat in ('101','135') and to_char(b.feccreacion, 'mm/yyyy') < to_char(bori.feccreacion, 'mm/yyyy')) ) ");
|
||||
sql.append(" and (bpe.codstat in ('-1','100','101','102','135','150') and bpe.tipoevento <> '110115' or bpe.tipoevento is null) ");
|
||||
sql.append(" and (bpeori.codstat in ('-1','100','101','102','135','150') and bpeori.tipoevento <> '110115' or bpeori.tipoevento is null) ");
|
||||
sql.append(" and bori.fechorventa >= :DATE_INICIO ");
|
||||
sql.append(" and bori.fechorventa <= :DATE_FIM ");
|
||||
sql.append(" and bori.feccreacion >= :DATE_INICIO ");
|
||||
sql.append(" and bori.feccreacion <= :DATE_FIM ");
|
||||
sql.append(" and est_bpe.cveestado in ( ").append(ufs).append(" ) ");
|
||||
sql.append(" and e.empresa_id = :EMPRESA_ID ");
|
||||
sql.append(" ");
|
||||
|
@ -1444,7 +1461,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" b.boleto_id as cajaId, ");
|
||||
sql.append(" 'DEV' as tipoReceita, ");
|
||||
sql.append(" b.numoperacion as numoperacion, ");
|
||||
sql.append(" trunc(bori.fechorventa) as fechorVenta, ");
|
||||
sql.append(" trunc(bori.feccreacion) as fechorVenta, ");
|
||||
sql.append(" est_bpe.estado_id as estadoId, ");
|
||||
sql.append(" ei.icms as icmsInterestadual, ");
|
||||
sql.append(" ei.icmsim as icmsIntermunicipal, ");
|
||||
|
@ -1470,14 +1487,15 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" coalesce(b.importepedagio, 0) as pedagio, ");
|
||||
sql.append(" coalesce(b.importeseguro, 0) as seguro, ");
|
||||
sql.append(" coalesce(b.importeoutros, 0) as outros, ");
|
||||
sql.append(" to_char(trunc(bori.fechorventa), 'yyyymmdd') as datamov, ");
|
||||
sql.append(" to_char(trunc(bori.feccreacion), 'yyyymmdd') as datamov, ");
|
||||
sql.append(" dbms_lob.substr((case when bpeori.tipoevento is not null then bpeant.xmlregular else bpeori.xmlregular end), 3000) as xml_bpe, ");
|
||||
sql.append(" dbms_lob.substr((case when bpeori.tipoevento is not null then bpeant.xmlregular else bpeori.xmlregular end), 3000, 3001) as xml_bpe_2, ");
|
||||
sql.append(" dbms_lob.substr((case when bpeori.tipoevento is not null then bpeant.xmlregular else bpeori.xmlregular end), 3000, 6001) as xml_bpe_3 ");
|
||||
sql.append("from boleto bori ");
|
||||
sql.append(" inner join marca m on m.marca_id = bori.marca_id and m.activo = 1 ");
|
||||
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 and bpe.activo = 1 ");
|
||||
sql.append(" inner join bpe bpe on bpe.boleto_id = bori.boleto_id ");
|
||||
sql.append(" and bpe.activo = (case when bori.motivocancelacion_id = 17 and bori.boletooriginal_id is null 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 ");
|
||||
|
@ -1508,11 +1526,11 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
|
|||
sql.append(" and bpeant.activo = (case when bori.motivocancelacion_id = 17 and bori.boletooriginal_id is null then 0 else 1 end) ");
|
||||
sql.append("left join punto_venta ptvo on ptvo.puntoventa_id = coalesce(bant.puntoventa_id, bori.puntoventa_id,b.ptovtaventa_id) ");
|
||||
sql.append("where ");
|
||||
sql.append(" (bpe.codstat in ('101','135') and to_char(b.fechorventa, 'mm/yyyy') < to_char(bori.fechorventa, 'mm/yyyy')) ");
|
||||
sql.append(" (bpe.codstat in ('101','135') and to_char(b.feccreacion, 'mm/yyyy') < to_char(bori.feccreacion, 'mm/yyyy')) ");
|
||||
sql.append(" and (bpe.codstat in ('-1','100','101','102','135','150') and bpe.tipoevento <> '110115' or bpe.tipoevento is null) ");
|
||||
sql.append(" and (bpeori.codstat in ('-1','100','101','102','135','150') and bpeori.tipoevento <> '110115' or bpeori.tipoevento is null) ");
|
||||
sql.append(" and bori.fechorventa >= :DATE_INICIO ");
|
||||
sql.append(" and bori.fechorventa <= :DATE_FIM ");
|
||||
sql.append(" and bori.feccreacion >= :DATE_INICIO ");
|
||||
sql.append(" and bori.feccreacion <= :DATE_FIM ");
|
||||
sql.append(" and est_bpe.cveestado in ( ").append(ufs).append(" ) ");
|
||||
sql.append(" and e.empresa_id = :EMPRESA_ID ");
|
||||
|
||||
|
|
|
@ -84,6 +84,10 @@ public class ExportacaoBPEBase {
|
|||
private String vcomp99;
|
||||
private String pRedBC;
|
||||
|
||||
private String dhrecbtoBPe;
|
||||
private boolean activoBPe;
|
||||
private int motivoCancelacionId;
|
||||
|
||||
private List<ExportacaoBPETipoBPE> listaRegistroBPE;
|
||||
private List<ExportacaoBPETipoDPE> listaRegistroDPE;
|
||||
private List<ExportacaoBPETipoOBE> listaRegistroOBE;
|
||||
|
@ -736,4 +740,28 @@ public class ExportacaoBPEBase {
|
|||
this.pRedBC = pRedBC;
|
||||
}
|
||||
|
||||
public String getDhrecbtoBPe() {
|
||||
return dhrecbtoBPe;
|
||||
}
|
||||
|
||||
public void setDhrecbtoBPe(String dhrecbtoBPe) {
|
||||
this.dhrecbtoBPe = dhrecbtoBPe;
|
||||
}
|
||||
|
||||
public boolean isActivoBPe() {
|
||||
return activoBPe;
|
||||
}
|
||||
|
||||
public void setActivoBPe(boolean activoBPe) {
|
||||
this.activoBPe = activoBPe;
|
||||
}
|
||||
|
||||
public int getMotivoCancelacionId() {
|
||||
return motivoCancelacionId;
|
||||
}
|
||||
|
||||
public void setMotivoCancelacionId(int motivoCancelacionId) {
|
||||
this.motivoCancelacionId = motivoCancelacionId;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ public class ExportacaoBPEVo {
|
|||
|
||||
static String VAZIO = "";
|
||||
static final BigDecimal ZERO = BigDecimal.ZERO;
|
||||
static int MOTIVO_CANCELACION_AGRUPACION_CORRIDA = 17;
|
||||
|
||||
public class StatusBpe {
|
||||
static final String CONTIGENCIA_ENVIADA = "-1";
|
||||
|
@ -67,6 +68,19 @@ public class ExportacaoBPEVo {
|
|||
return (codstatus == null ? false : (codstatus.equals(StatusBpe.EVENTOS) || codstatus.equals(StatusBpe.CANCELAMENTO_BPE_HOMOLOGADO)));
|
||||
}
|
||||
|
||||
public static boolean validaBPeCorridaAgrupada(ExportacaoBPEBase registro) {
|
||||
if (registro.getMotivoCancelacionId() == MOTIVO_CANCELACION_AGRUPACION_CORRIDA) {
|
||||
return true;
|
||||
} else {
|
||||
if (!StringUtils.equals(registro.getDhEmisao(), registro.getDhrecbtoBPe())
|
||||
&& registro.isActivoBPe() && StringUtils.equals(registro.getCodstatus(), StatusBpe.VENDA)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ExportacaoBPEBase gerarListas(ExportacaoBPEBase registro) {
|
||||
|
||||
String indContribuicaoPrevidenciaria = "00000060";
|
||||
|
|
Loading…
Reference in New Issue