Exportação Fiscal : ECF e RMD (issue 8120)
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@73095 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
8aa53ca764
commit
394f989eb3
|
@ -13,7 +13,7 @@ import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoEC
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCFC;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCFC;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoICF;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoICF;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoPRC;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoPRC;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMD;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoBPR;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoBPS;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoBPS;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoDBP;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoDBP;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoPAR;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoPAR;
|
||||||
|
@ -48,7 +48,7 @@ public interface FiscalDAO {
|
||||||
|
|
||||||
public List<ExportacaoECFTipoPRC> buscarRegistroECFTipoPRC(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
public List<ExportacaoECFTipoPRC> buscarRegistroECFTipoPRC(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
||||||
|
|
||||||
public ExportacaoRMD buscarRegistroRMD(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
public ExportacaoBPR buscarRegistroBPR(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
||||||
|
|
||||||
public List<ExportacaoRMDTipoPAR> buscarRegistroRMDTipoPAR(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
public List<ExportacaoRMDTipoPAR> buscarRegistroRMDTipoPAR(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
||||||
|
|
||||||
|
|
|
@ -36,14 +36,14 @@ import com.rjconsultores.ventaboletos.utilerias.MoneyHelper;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.StringHelper;
|
import com.rjconsultores.ventaboletos.utilerias.StringHelper;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UtiliteriasFiscal;
|
import com.rjconsultores.ventaboletos.utilerias.UtiliteriasFiscal;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoBPR;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoBPRBase;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECF;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECF;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFBase;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFBase;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCCF;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCCF;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCFC;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCFC;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoICF;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoICF;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoPRC;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoPRC;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMD;
|
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDBase;
|
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoBPS;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoBPS;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoDBP;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoDBP;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoPAR;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoPAR;
|
||||||
|
@ -2376,52 +2376,57 @@ public class FiscalHibernateDAO extends HibernateDaoSupport implements FiscalDAO
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ExportacaoRMD buscarRegistroRMD(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado) {
|
public ExportacaoBPR buscarRegistroBPR(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado) {
|
||||||
ExportacaoRMD exportacaoRMD = new ExportacaoRMD();
|
ExportacaoBPR exportacaoRMD = new ExportacaoBPR();
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
sb.append(" select");
|
sb.append(" select");
|
||||||
sb.append(" e.nombempresa as nome_empresa,");
|
|
||||||
sb.append(" c.estado_id as cod_participante_empresa,");
|
sb.append(" c.estado_id as codigoParticipantePar,");
|
||||||
sb.append(" eif.codestabelecimento as cod_estabelecimento_empresa,");
|
sb.append(" eif.codestabelecimento as codigoEstabelecimentoPar,");
|
||||||
sb.append(" eof.cveestado as cveestado,");
|
sb.append(" e.nombempresa as nomeParticipante,");
|
||||||
sb.append(" ie.cnpj as cnpj,");
|
sb.append(" eof.cveestado as ufParticipante,");
|
||||||
sb.append(" ie.numinscricaoestadual as numinscricaoestadual,");
|
sb.append(" ie.cnpj as cnpjParticipante,");
|
||||||
|
sb.append(" ie.numinscricaoestadual as ieParticipante,");
|
||||||
sb.append(" ie.logradouro as logradouro,");
|
sb.append(" ie.logradouro as logradouro,");
|
||||||
sb.append(" ie.numero as numero,");
|
sb.append(" ie.numero as numero,");
|
||||||
sb.append(" ie.complemento as complemento,");
|
sb.append(" ie.complemento as complemento,");
|
||||||
sb.append(" ie.bairro as bairro,");
|
sb.append(" ie.bairro as bairro,");
|
||||||
sb.append(" ie.cep as cep,");
|
sb.append(" ie.cep as cep,");
|
||||||
sb.append(" f.folio as num_formulario_bilhete,");
|
|
||||||
sb.append(" cast(f.fechorfolio as date) as data_emissao,");
|
sb.append(" cast(f.fechorfolio as date) as dataEmissaoRMD,");
|
||||||
sb.append(" (case when coalesce(f.indcancelacion, 0) = 1 then 'S' else 'N' end) as doc_cancelado,");
|
sb.append(" eo.estado_id codigoParticipante,");
|
||||||
sb.append(" eo.estado_id cod_participante,");
|
sb.append(" ei.codestabelecimento as codigoEstabelecimento,");
|
||||||
sb.append(" ei.codestabelecimento as cod_estabelecimento,");
|
sb.append(" a.acfiscal as numeroAIDF,");
|
||||||
sb.append(" b.aidf_id,");
|
sb.append(" a.serie as serieAIDF,");
|
||||||
sb.append(" a.acfiscal as num_aidf,");
|
sb.append(" a.subserie as subSerieAIDF,");
|
||||||
sb.append(" a.serie as serie,");
|
sb.append(" f.folio as numeroFormularioBilheteAIDF,");
|
||||||
sb.append(" a.subserie as subserie,");
|
sb.append(" (case when coalesce(f.indcancelacion, 0) = 1 then 'S' else 'N' end) as documentoCancelado,");
|
||||||
sb.append(" b.boleto_id,");
|
sb.append(" (case when co.estado_id = cd.estado_id then ei.codigocontabilmunicipal else ei.codigocontabilestadual end) as codigoContabil,");
|
||||||
sb.append(" (case when b.indstatusboleto like 'C' then 1 else 0 end) as boleto_cancelado,");
|
|
||||||
sb.append(" b.feccreacion as data_emissao,");
|
sb.append(" b.feccreacion as dataEmissao,");
|
||||||
sb.append(" b.numfoliopreimpreso as num_formulario,");
|
sb.append(" b.numfoliopreimpreso as numeroFormulario,");
|
||||||
sb.append(" b.preciopagado as valor_total,");
|
sb.append(" r.acfiscal as numeroAIDFRMD,");
|
||||||
|
sb.append(" r.serie as serieAIDFRMD,");
|
||||||
|
sb.append(" r.subserie as subSerieAIDFRMD,");
|
||||||
|
sb.append(" b.foliormd as numeroRMD,");
|
||||||
|
sb.append(" (case when coalesce(po.regionmetropolitana_id, -1) = coalesce(pd.regionmetropolitana_id ,-2) then 1 else 0 end) as boletoIsento,");
|
||||||
|
sb.append(" (case when b.indstatusboleto like 'C' then 1 else 0 end) as boletoCancelado,");
|
||||||
|
sb.append(" b.preciopagado as valorPago,");
|
||||||
|
|
||||||
|
sb.append(" ed.cveestado as ufDestino,");
|
||||||
|
sb.append(" eo.cveestado as ufOrigem,");
|
||||||
|
sb.append(" co.codibge as municipioOrigem,");
|
||||||
|
sb.append(" (case when eo.cveestado = ed.cveestado then 5357 else 6357 end) as cfop,");
|
||||||
|
sb.append(" ei.porcredbaseicms as reducaoBaseCalcICMS,");
|
||||||
|
sb.append(" ei.porcredmunicipal as porcReducaoMunicipal,");
|
||||||
|
sb.append(" ei.porcredestadual as porcReducaoEstadual,");
|
||||||
|
sb.append(" ei.tributacaoimportacao as tributacaoImportacao,");
|
||||||
|
|
||||||
sb.append(" b.rmd_id,");
|
sb.append(" b.rmd_id,");
|
||||||
sb.append(" r.acfiscal as num_aidf_rmd,");
|
sb.append(" b.aidf_id,");
|
||||||
sb.append(" r.serie as serie_rmd,");
|
sb.append(" b.boleto_id");
|
||||||
sb.append(" r.subserie as subserie_rmd,");
|
|
||||||
sb.append(" b.foliormd as num_rmd,");
|
|
||||||
sb.append(" eo.cveestado as estado_origem,");
|
|
||||||
sb.append(" ed.cveestado as estado_destino,");
|
|
||||||
sb.append(" co.codibge as municipio_origem,");
|
|
||||||
sb.append(" (case when eo.cveestado = ed.cveestado then 5357 else 6357 end) as cod_operacao,");
|
|
||||||
sb.append(" ei.porcredbaseicms as red_base_calc_icms,");
|
|
||||||
sb.append(" ei.porcredmunicipal as porc_red_municipal,");
|
|
||||||
sb.append(" ei.porcredestadual as porc_red_estadual,");
|
|
||||||
sb.append(" ei.tributacaoimportacao as tributacao_importacao,");
|
|
||||||
sb.append(" (case when coalesce(po.regionmetropolitana_id, -1) = coalesce(pd.regionmetropolitana_id ,-2) then 1 else 0 end) as reg_metropolitana_isenta,");
|
|
||||||
sb.append(" (coalesce(b.preciopagado,0) - coalesce(b.importetaxaembarque,0) - coalesce(b.importepedagio,0) - coalesce(b.importeseguro,0) - coalesce(b.importeoutros,0)) as valor_tarifa,");
|
|
||||||
sb.append(" b.preciopagado as valor_total");
|
|
||||||
sb.append(" from folio_consumo_rmd f");
|
sb.append(" from folio_consumo_rmd f");
|
||||||
sb.append(" join estado eof on eof.estado_id = f.estado_id");
|
sb.append(" join estado eof on eof.estado_id = f.estado_id");
|
||||||
sb.append(" join aidf r on r.aidf_id = f.rmd_id");
|
sb.append(" join aidf r on r.aidf_id = f.rmd_id");
|
||||||
|
@ -2429,8 +2434,7 @@ public class FiscalHibernateDAO extends HibernateDaoSupport implements FiscalDAO
|
||||||
sb.append(" join ciudad c on c.ciudad_id = e.ciudad_id");
|
sb.append(" join ciudad c on c.ciudad_id = e.ciudad_id");
|
||||||
sb.append(" left join empresa_imposto eif on eif.activo = 1 and eif.empresa_id = f.empresa_id and eif.estado_id = eof.estado_id");
|
sb.append(" left join empresa_imposto eif on eif.activo = 1 and eif.empresa_id = f.empresa_id and eif.estado_id = eof.estado_id");
|
||||||
sb.append(" left join inscricao_estadual ie on ie.empresa_id = f.empresa_id and ie.estado_id = eof.estado_id and ie.activo = 1");
|
sb.append(" left join inscricao_estadual ie on ie.empresa_id = f.empresa_id and ie.estado_id = eof.estado_id and ie.activo = 1");
|
||||||
|
sb.append(" left join boleto b on b.activo = 1 and (b.indstatusboleto like 'V' or b.indstatusboleto like 'C') and b.rmd_id = (case when coalesce(f.indcancelacion, 0) = 1 then -1 else f.rmd_id end) and b.empresacorrida_id = f.empresa_id and to_char(b.fechorventa, 'ddmmyyyy') = to_char(f.fechorfolio, 'ddmmyyyy')");
|
||||||
sb.append(" left join boleto b on b.activo = 1 and b.rmd_id = (case when coalesce(f.indcancelacion, 0) = 1 then -1 else f.rmd_id end) and b.empresacorrida_id = f.empresa_id and cast(b.fechorventa as date) = cast(f.fechorfolio as date) and (b.indstatusboleto like 'V' or b.indstatusboleto like 'C')");
|
|
||||||
sb.append(" left join parada po on po.parada_id = b.origen_id");
|
sb.append(" left join parada po on po.parada_id = b.origen_id");
|
||||||
sb.append(" left join ciudad co on co.ciudad_id = po.ciudad_id");
|
sb.append(" left join ciudad co on co.ciudad_id = po.ciudad_id");
|
||||||
sb.append(" left join estado eo on eo.estado_id = co.estado_id");
|
sb.append(" left join estado eo on eo.estado_id = co.estado_id");
|
||||||
|
@ -2439,23 +2443,12 @@ public class FiscalHibernateDAO extends HibernateDaoSupport implements FiscalDAO
|
||||||
sb.append(" left join estado ed on ed.estado_id = cd.estado_id");
|
sb.append(" left join estado ed on ed.estado_id = cd.estado_id");
|
||||||
sb.append(" left join empresa_imposto ei on ei.activo = 1 and ei.empresa_id = b.empresacorrida_id and ei.estado_id = eo.estado_id");
|
sb.append(" left join empresa_imposto ei on ei.activo = 1 and ei.empresa_id = b.empresacorrida_id and ei.estado_id = eo.estado_id");
|
||||||
sb.append(" left join aidf a on a.aidf_id = b.aidf_id");
|
sb.append(" left join aidf a on a.aidf_id = b.aidf_id");
|
||||||
|
|
||||||
sb.append(" where");
|
sb.append(" where");
|
||||||
sb.append(" f.activo = 1");
|
sb.append(" f.activo = 1");
|
||||||
sb.append(" and f.indbpr = 1");
|
sb.append(" and f.indbpr = 1");
|
||||||
sb.append(" and f.fechorfolio >= to_date(?,'DD/MM/YYYY HH24:MI:SS') and f.fechorfolio <= to_date(?,'DD/MM/YYYY HH24:MI:SS')");
|
sb.append(" and f.fechorfolio >= to_date(?,'DD/MM/YYYY HH24:MI:SS') and f.fechorfolio <= to_date(?,'DD/MM/YYYY HH24:MI:SS')");
|
||||||
sb.append(" and f.empresa_id = ?");
|
sb.append(" and f.empresa_id = ?");
|
||||||
sb.append(" and eof.cveestado like ?");
|
sb.append(" and eof.cveestado like ?");
|
||||||
sb.append(" order by");
|
|
||||||
sb.append(" e.nombempresa,");
|
|
||||||
sb.append(" c.estado_id,");
|
|
||||||
sb.append(" eof.cveestado,");
|
|
||||||
sb.append(" f.fechorfolio,");
|
|
||||||
sb.append(" f.folio,");
|
|
||||||
sb.append(" b.fechorventa,");
|
|
||||||
sb.append(" b.numfoliopreimpreso,");
|
|
||||||
sb.append(" (case when eo.cveestado = ed.cveestado then 5357 else 6357 end),");
|
|
||||||
sb.append(" ed.cveestado");
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
PreparedStatement ps = connection.prepareStatement(sb.toString());
|
PreparedStatement ps = connection.prepareStatement(sb.toString());
|
||||||
|
@ -2466,12 +2459,59 @@ public class FiscalHibernateDAO extends HibernateDaoSupport implements FiscalDAO
|
||||||
|
|
||||||
ResultSet rs = ps.executeQuery();
|
ResultSet rs = ps.executeQuery();
|
||||||
|
|
||||||
ExportacaoRMDBase registro = null;
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
|
||||||
|
ExportacaoBPRBase registro = null;
|
||||||
|
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
registro = new ExportacaoRMDBase();
|
registro = new ExportacaoBPRBase();
|
||||||
|
|
||||||
exportacaoRMD.getListaRegistroRMD().add(registro);
|
// PAR
|
||||||
|
registro.setCodigoParticipantePar(rs.getInt("codigoParticipantePar"));
|
||||||
|
registro.setCodigoEstabelecimentoPar(rs.getInt("codigoEstabelecimentoPar"));
|
||||||
|
registro.setNomeParticipante(rs.getString("nomeParticipante"));
|
||||||
|
registro.setUfParticipante(rs.getString("ufParticipante"));
|
||||||
|
registro.setCpfParticipante(rs.getString("cnpjParticipante"));
|
||||||
|
registro.setIeParticipante(rs.getString("ieParticipante"));
|
||||||
|
registro.setLogradouro(rs.getString("logradouro"));
|
||||||
|
registro.setNumero(rs.getString("numero"));
|
||||||
|
registro.setComplemento(rs.getString("complemento"));
|
||||||
|
registro.setBairro(rs.getString("bairro"));
|
||||||
|
registro.setCep(rs.getString("cep") == null ? null : Integer.parseInt(rs.getString("cep").replace("-", "").replace(".", "")));
|
||||||
|
|
||||||
|
// RMD
|
||||||
|
registro.setDataEmissao(sdf.format(rs.getDate("dataEmissaoRMD")));
|
||||||
|
registro.setCodigoParticipante(rs.getInt("codigoParticipante"));
|
||||||
|
registro.setCodigoEstabelecimento(rs.getInt("codigoEstabelecimento"));
|
||||||
|
registro.setNumeroAIDF(String.valueOf(rs.getLong("numeroAIDF")));
|
||||||
|
registro.setSerieAIDF(rs.getString("serieAIDF"));
|
||||||
|
registro.setSubSerieAIDF(rs.getString("subSerieAIDF"));
|
||||||
|
registro.setNumeroFormularioBilheteAIDF(rs.getLong("numeroFormularioBilheteAIDF"));
|
||||||
|
registro.setDocumentoCancelado(rs.getString("documentoCancelado").equals("S") ? Boolean.TRUE : Boolean.FALSE);
|
||||||
|
registro.setCodigoContabil(rs.getString("codigoContabil"));
|
||||||
|
|
||||||
|
// BPS
|
||||||
|
registro.setDataEmissao(sdf.format(rs.getDate("dataEmissao")));
|
||||||
|
registro.setNumeroFormulario(rs.getLong("numeroFormulario"));
|
||||||
|
registro.setNumeroAIDFRMD(String.valueOf(rs.getLong("numeroAIDFRMD")));
|
||||||
|
registro.setSerieAIDFRMD(rs.getString("serieAIDFRMD"));
|
||||||
|
registro.setSubSerieAIDFRMD(rs.getString("subSerieAIDFRMD"));
|
||||||
|
registro.setNumeroRMD(rs.getInt("numeroRMD"));
|
||||||
|
registro.setBoletoIsento(rs.getInt("boletoIsento"));
|
||||||
|
registro.setBoletoCancelado(rs.getInt("boletoCancelado"));
|
||||||
|
registro.setValorPago(rs.getBigDecimal("valorPago"));
|
||||||
|
|
||||||
|
// DBP
|
||||||
|
registro.setUfDestino(rs.getString("ufDestino"));
|
||||||
|
registro.setUfOrigem(rs.getString("ufOrigem"));
|
||||||
|
registro.setMunicipioOrigem(rs.getInt("municipioOrigem"));
|
||||||
|
registro.setCfop(rs.getInt("cfop"));
|
||||||
|
registro.setReducaoBaseCalcICMS(rs.getBigDecimal("reducaoBaseCalcICMS"));
|
||||||
|
registro.setPorcReducaoMunicipal(rs.getBigDecimal("porcReducaoMunicipal"));
|
||||||
|
registro.setPorcReducaoEstadual(rs.getBigDecimal("porcReducaoEstadual"));
|
||||||
|
registro.setTributacaoImportacao(rs.getBigDecimal("tributacaoImportacao"));
|
||||||
|
|
||||||
|
exportacaoRMD.getListaRegistroBPR().add(registro);
|
||||||
}
|
}
|
||||||
|
|
||||||
rs.close();
|
rs.close();
|
||||||
|
@ -2641,8 +2681,8 @@ public class FiscalHibernateDAO extends HibernateDaoSupport implements FiscalDAO
|
||||||
registro.setNumeroAIDF(rs.getString("num_aidf"));
|
registro.setNumeroAIDF(rs.getString("num_aidf"));
|
||||||
registro.setSerieAIDF(rs.getString("serie"));
|
registro.setSerieAIDF(rs.getString("serie"));
|
||||||
registro.setSubSerieAIDF(rs.getString("subserie"));
|
registro.setSubSerieAIDF(rs.getString("subserie"));
|
||||||
registro.setNumeroBilheteAIDF(rs.getInt("num_bilhete"));
|
registro.setNumeroBilheteAIDF(rs.getLong("num_bilhete"));
|
||||||
registro.setNumeroFormularioAIDF(rs.getInt("num_formulario"));
|
registro.setNumeroFormularioAIDF(rs.getLong("num_formulario"));
|
||||||
registro.setDataEmissao(sdf.format(rs.getDate("data_emissao")));
|
registro.setDataEmissao(sdf.format(rs.getDate("data_emissao")));
|
||||||
registro.setCancelado(rs.getString("doc_cancelado").equals("S") ? Boolean.TRUE : Boolean.FALSE);
|
registro.setCancelado(rs.getString("doc_cancelado").equals("S") ? Boolean.TRUE : Boolean.FALSE);
|
||||||
registro.setCodigoParticipante(rs.getInt("cod_participante"));
|
registro.setCodigoParticipante(rs.getInt("cod_participante"));
|
||||||
|
@ -3058,10 +3098,10 @@ public class FiscalHibernateDAO extends HibernateDaoSupport implements FiscalDAO
|
||||||
|
|
||||||
while (rs.next()) {
|
while (rs.next()) {
|
||||||
Integer codigoEstabelecimento = rs.getInt("cod_estabelecimento");
|
Integer codigoEstabelecimento = rs.getInt("cod_estabelecimento");
|
||||||
Long numeroAIDF = rs.getLong("num_aidf");
|
String numeroAIDF = rs.getString("num_aidf");
|
||||||
String serieAIDF = rs.getString("serie");
|
String serieAIDF = rs.getString("serie");
|
||||||
String subSerieAIDF = rs.getString("subserie");
|
String subSerieAIDF = rs.getString("subserie");
|
||||||
Long numeroAIDFRMD = rs.getLong("num_aidf_rmd");
|
String numeroAIDFRMD = rs.getString("num_aidf_rmd");
|
||||||
String serieAIDFRMD = rs.getString("serie_rmd");
|
String serieAIDFRMD = rs.getString("serie_rmd");
|
||||||
String subSerieAIDFRMD = rs.getString("subserie_rmd");
|
String subSerieAIDFRMD = rs.getString("subserie_rmd");
|
||||||
Integer numeroRMD = rs.getInt("num_rmd");
|
Integer numeroRMD = rs.getInt("num_rmd");
|
||||||
|
|
|
@ -49,6 +49,7 @@ import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoEC
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCFC;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCFC;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoICF;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoICF;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoPRC;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoPRC;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoBPR;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoBPS;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoBPS;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoDBP;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoDBP;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoPAR;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoPAR;
|
||||||
|
@ -1000,37 +1001,49 @@ public class FiscalServiceImpl implements FiscalService {
|
||||||
String tempo = null;
|
String tempo = null;
|
||||||
Long begin = 0L;
|
Long begin = 0L;
|
||||||
|
|
||||||
|
begin = Calendar.getInstance().getTimeInMillis();
|
||||||
|
log.info("Buscando os registros BPR");
|
||||||
|
ExportacaoBPR exportacaoBPR = fiscalDAO.buscarRegistroBPR(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||||
|
log.info("Total de registros: " + exportacaoBPR.getListaRegistroBPR().size());
|
||||||
|
tempo = infoTempo("BPR", begin);
|
||||||
|
log.info("Tempo na busca dos registros " + tempo);
|
||||||
|
|
||||||
begin = Calendar.getInstance().getTimeInMillis();
|
begin = Calendar.getInstance().getTimeInMillis();
|
||||||
log.info("Buscando os registros PAR");
|
log.info("Buscando os registros PAR");
|
||||||
List<ExportacaoRMDTipoPAR> listaRegistroRMDTipoPAR = fiscalDAO.buscarRegistroRMDTipoPAR(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
// List<ExportacaoRMDTipoPAR> listaRegistroRMDTipoPAR = fiscalDAO.buscarRegistroRMDTipoPAR(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||||
|
List<ExportacaoRMDTipoPAR> listaRegistroRMDTipoPAR = exportacaoBPR.getListaRegistroBPRTipoPAR();
|
||||||
log.info("Total de registros: " + listaRegistroRMDTipoPAR.size());
|
log.info("Total de registros: " + listaRegistroRMDTipoPAR.size());
|
||||||
tempo = infoTempo("PAR", begin);
|
tempo = infoTempo("PAR", begin);
|
||||||
log.info("Tempo na busca dos registros " + tempo);
|
log.info("Tempo na busca dos registros " + tempo);
|
||||||
|
|
||||||
begin = Calendar.getInstance().getTimeInMillis();
|
begin = Calendar.getInstance().getTimeInMillis();
|
||||||
log.info("Buscando os registros RMD");
|
log.info("Buscando os registros RMD");
|
||||||
List<ExportacaoRMDTipoRMD> listaRegistroRMDTipoRMD = fiscalDAO.buscarRegistroRMDTipoRMD(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
// List<ExportacaoRMDTipoRMD> listaRegistroRMDTipoRMD = fiscalDAO.buscarRegistroRMDTipoRMD(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||||
|
List<ExportacaoRMDTipoRMD> listaRegistroRMDTipoRMD = exportacaoBPR.getListaRegistroBPRTipoRMD();
|
||||||
log.info("Total de registros: " + listaRegistroRMDTipoPAR.size());
|
log.info("Total de registros: " + listaRegistroRMDTipoPAR.size());
|
||||||
tempo = infoTempo("RMD", begin);
|
tempo = infoTempo("RMD", begin);
|
||||||
log.info("Tempo na busca dos registros " + tempo);
|
log.info("Tempo na busca dos registros " + tempo);
|
||||||
|
|
||||||
begin = Calendar.getInstance().getTimeInMillis();
|
// begin = Calendar.getInstance().getTimeInMillis();
|
||||||
log.info("Buscando os registros BPS");
|
// log.info("Buscando os registros BPS");
|
||||||
List<ExportacaoRMDTipoBPS> listaRegistroRMDTipoBPS = fiscalDAO.buscarRegistroRMDTipoBPS(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
// List<ExportacaoRMDTipoBPS> listaRegistroRMDTipoBPS = fiscalDAO.buscarRegistroRMDTipoBPS(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||||
log.info("Total de registros: " + listaRegistroRMDTipoPAR.size());
|
List<ExportacaoRMDTipoBPS> listaRegistroRMDTipoBPS = null;
|
||||||
tempo = infoTempo("BPS", begin);
|
// log.info("Total de registros: " + listaRegistroRMDTipoPAR.size());
|
||||||
log.info("Tempo na busca dos registros " + tempo);
|
// tempo = infoTempo("BPS", begin);
|
||||||
|
// log.info("Tempo na busca dos registros " + tempo);
|
||||||
|
|
||||||
begin = Calendar.getInstance().getTimeInMillis();
|
// begin = Calendar.getInstance().getTimeInMillis();
|
||||||
log.info("Buscando os registros DBP");
|
// log.info("Buscando os registros DBP");
|
||||||
List<ExportacaoRMDTipoDBP> listaRegistroRMDTipoDBP = fiscalDAO.buscarRegistroRMDTipoDBP(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
// List<ExportacaoRMDTipoDBP> listaRegistroRMDTipoDBP = fiscalDAO.buscarRegistroRMDTipoDBP(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||||
log.info("Total de registros: " + listaRegistroRMDTipoPAR.size());
|
List<ExportacaoRMDTipoDBP> listaRegistroRMDTipoDBP = null;
|
||||||
tempo = infoTempo("DBP", begin);
|
// log.info("Total de registros: " + listaRegistroRMDTipoPAR.size());
|
||||||
log.info("Tempo na busca dos registros " + tempo);
|
// tempo = infoTempo("DBP", begin);
|
||||||
|
// log.info("Tempo na busca dos registros " + tempo);
|
||||||
|
|
||||||
begin = Calendar.getInstance().getTimeInMillis();
|
begin = Calendar.getInstance().getTimeInMillis();
|
||||||
log.info("Buscando os registros BPS");
|
log.info("Buscando os registros BPS");
|
||||||
List<ExportacaoRMDTipoSeqBPS> listaRegistroRMDTipoSeqBPS = fiscalDAO.buscarRegistroRMDSeqTipoBPS(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
// List<ExportacaoRMDTipoSeqBPS> listaRegistroRMDTipoSeqBPS = fiscalDAO.buscarRegistroRMDSeqTipoBPS(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||||
|
List<ExportacaoRMDTipoSeqBPS> listaRegistroRMDTipoSeqBPS = exportacaoBPR.getListaRegistroBPRTipoSeqBPS();
|
||||||
log.info("Total de registros: " + listaRegistroRMDTipoPAR.size());
|
log.info("Total de registros: " + listaRegistroRMDTipoPAR.size());
|
||||||
tempo = infoTempo("BPS", begin);
|
tempo = infoTempo("BPS", begin);
|
||||||
log.info("Tempo na busca dos registros " + tempo);
|
log.info("Tempo na busca dos registros " + tempo);
|
||||||
|
|
|
@ -8,19 +8,16 @@ import java.io.PrintWriter;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
|
||||||
import com.rjconsultores.ventaboletos.utilerias.MoneyHelper;
|
import com.rjconsultores.ventaboletos.utilerias.MoneyHelper;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UtiliteriasFiscal;
|
import com.rjconsultores.ventaboletos.utilerias.UtiliteriasFiscal;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCCF;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCCF;
|
||||||
|
@ -552,8 +549,8 @@ public class ExportacaoFiscal {
|
||||||
String numeroAIDF = registro.getNumeroAIDF();
|
String numeroAIDF = registro.getNumeroAIDF();
|
||||||
String serieAIDF = registro.getSerieAIDF();
|
String serieAIDF = registro.getSerieAIDF();
|
||||||
String subSerieAIDF = registro.getSubSerieAIDF();
|
String subSerieAIDF = registro.getSubSerieAIDF();
|
||||||
Integer numeroBilheteAIDF = registro.getNumeroBilheteAIDF();
|
Long numeroBilheteAIDF = registro.getNumeroBilheteAIDF();
|
||||||
Integer numeroFormularioAIDF = registro.getNumeroFormularioAIDF();
|
Long numeroFormularioAIDF = registro.getNumeroFormularioAIDF();
|
||||||
String dataEmissao = registro.getDataEmissao();
|
String dataEmissao = registro.getDataEmissao();
|
||||||
Boolean cancelado = registro.getCancelado();
|
Boolean cancelado = registro.getCancelado();
|
||||||
Integer codigoParticipante = registro.getCodigoEstabelecimento(); // registro.getCodigoParticipante(); Allan/Flávio pediram esta modificação
|
Integer codigoParticipante = registro.getCodigoEstabelecimento(); // registro.getCodigoParticipante(); Allan/Flávio pediram esta modificação
|
||||||
|
@ -702,7 +699,7 @@ public class ExportacaoFiscal {
|
||||||
for (ExportacaoRMDTipoSeqBPS registro : listaRegistroRMDTipoBPS) {
|
for (ExportacaoRMDTipoSeqBPS registro : listaRegistroRMDTipoBPS) {
|
||||||
Integer codigoEstabelecimento = registro.getCodigoEstabelecimento();
|
Integer codigoEstabelecimento = registro.getCodigoEstabelecimento();
|
||||||
String especie = registro.getEspecie();
|
String especie = registro.getEspecie();
|
||||||
Long numeroAIDF = registro.getNumeroAIDF();
|
String numeroAIDF = registro.getNumeroAIDF();
|
||||||
String serieAIDF = registro.getSerieAIDF();
|
String serieAIDF = registro.getSerieAIDF();
|
||||||
String subSerieAIDF = registro.getSubSerieAIDF();
|
String subSerieAIDF = registro.getSubSerieAIDF();
|
||||||
Long numeroInicial = registro.getNumeroInicial();
|
Long numeroInicial = registro.getNumeroInicial();
|
||||||
|
@ -711,7 +708,7 @@ public class ExportacaoFiscal {
|
||||||
String dataEmissao = registro.getDataEmissao();
|
String dataEmissao = registro.getDataEmissao();
|
||||||
BigDecimal valorTotal = registro.getValorTotal();
|
BigDecimal valorTotal = registro.getValorTotal();
|
||||||
Boolean resumoMovimentoDiario = registro.getResumoMovimentoDiario();
|
Boolean resumoMovimentoDiario = registro.getResumoMovimentoDiario();
|
||||||
Long numeroAIDFRMD = registro.getNumeroAIDFRMD();
|
String numeroAIDFRMD = registro.getNumeroAIDFRMD();
|
||||||
String serieAIDFRMD = registro.getSerieAIDFRMD();
|
String serieAIDFRMD = registro.getSerieAIDFRMD();
|
||||||
String subSerieAIDFRMD = registro.getSubSerieAIDFRMD();
|
String subSerieAIDFRMD = registro.getSubSerieAIDFRMD();
|
||||||
Integer numeroRMD = registro.getNumeroRMD();
|
Integer numeroRMD = registro.getNumeroRMD();
|
||||||
|
|
|
@ -0,0 +1,332 @@
|
||||||
|
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.MoneyHelper;
|
||||||
|
|
||||||
|
public class ExportacaoBPR {
|
||||||
|
private static final String CODIGO_INDICADOR_CONTR_PREVIDENCIARIA = "00000060";
|
||||||
|
|
||||||
|
private List<ExportacaoBPRBase> listaRegistroBPR;
|
||||||
|
|
||||||
|
private List<ExportacaoRMDTipoPAR> listaRegistroBPRTipoPAR;
|
||||||
|
private List<ExportacaoRMDTipoRMD> listaRegistroBPRTipoRMD;
|
||||||
|
private List<ExportacaoRMDTipoSeqBPS> listaRegistroBPRTipoSeqBPS;
|
||||||
|
|
||||||
|
public ExportacaoBPR() {
|
||||||
|
listaRegistroBPR = new ArrayList<ExportacaoBPRBase>(0);
|
||||||
|
|
||||||
|
listaRegistroBPRTipoPAR = new ArrayList<ExportacaoRMDTipoPAR>(0);
|
||||||
|
listaRegistroBPRTipoRMD = new ArrayList<ExportacaoRMDTipoRMD>(0);
|
||||||
|
listaRegistroBPRTipoSeqBPS = new ArrayList<ExportacaoRMDTipoSeqBPS>(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ExportacaoBPRBase> getListaRegistroBPR() {
|
||||||
|
return listaRegistroBPR;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ExportacaoRMDTipoPAR> getListaRegistroBPRTipoPAR() {
|
||||||
|
return listaRegistroBPRTipoPAR;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ExportacaoRMDTipoRMD> getListaRegistroBPRTipoRMD() {
|
||||||
|
return listaRegistroBPRTipoRMD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ExportacaoRMDTipoSeqBPS> getListaRegistroBPRTipoSeqBPS() {
|
||||||
|
return listaRegistroBPRTipoSeqBPS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void gerarListas() {
|
||||||
|
ordenarLista();
|
||||||
|
|
||||||
|
gerarPAR();
|
||||||
|
gerarRMD();
|
||||||
|
gerarBPS_DBP();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ordenarLista() {
|
||||||
|
Collections.sort(listaRegistroBPR, new Comparator<ExportacaoBPRBase>(){
|
||||||
|
public int compare(ExportacaoBPRBase e1, ExportacaoBPRBase e2) {
|
||||||
|
String c1 = e1.getDataEmissao() + "-" + e1.getNumeroFormulario() + "-" + e1.getCfop() + "-" + e1.getUfDestino();
|
||||||
|
String c2 = e2.getDataEmissao() + "-" + e2.getNumeroFormulario() + "-" + e2.getCfop() + "-" + e2.getUfDestino();
|
||||||
|
|
||||||
|
return c1.compareToIgnoreCase(c2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void gerarPAR() {
|
||||||
|
listaRegistroBPRTipoPAR.clear();
|
||||||
|
|
||||||
|
ExportacaoRMDTipoPAR registro = null;
|
||||||
|
|
||||||
|
Map<String, ExportacaoRMDTipoPAR> group = new HashMap<String, ExportacaoRMDTipoPAR>(0);
|
||||||
|
|
||||||
|
for (ExportacaoBPRBase base : listaRegistroBPR) {
|
||||||
|
String key = base.getCodigoEstabelecimentoPar() + "-" + base.getCodigoEstabelecimentoPar() + "-" + base.getNomeParticipante();
|
||||||
|
|
||||||
|
if (group.containsKey(key)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
registro = new ExportacaoRMDTipoPAR();
|
||||||
|
registro.setCodigoParticipante(base.getCodigoParticipantePar());
|
||||||
|
registro.setCodigoEstabelecimento(base.getCodigoEstabelecimentoPar());
|
||||||
|
registro.setNomeParticipante(base.getNomeParticipante());
|
||||||
|
registro.setUfParticipante(base.getUfParticipante());
|
||||||
|
registro.setCpfParticipante(base.getCpfParticipante());
|
||||||
|
registro.setIeParticipante(base.getIeParticipante());
|
||||||
|
registro.setLogradouro(base.getLogradouro());
|
||||||
|
registro.setNumero(base.getNumero());
|
||||||
|
registro.setComplemento(base.getComplemento());
|
||||||
|
registro.setBairro(base.getBairro());
|
||||||
|
registro.setCep(base.getCep());
|
||||||
|
|
||||||
|
group.put(key, registro);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Map.Entry<String, ExportacaoRMDTipoPAR> entry : group.entrySet()) {
|
||||||
|
listaRegistroBPRTipoPAR.add(entry.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
Collections.sort(listaRegistroBPRTipoPAR, new Comparator<ExportacaoRMDTipoPAR>(){
|
||||||
|
public int compare(ExportacaoRMDTipoPAR e1, ExportacaoRMDTipoPAR e2) {
|
||||||
|
String c1 = e1.getCodigoParticipante() + "-" + e1.getCodigoEstabelecimento() + "-" + e1.getNomeParticipante();
|
||||||
|
String c2 = e2.getCodigoParticipante() + "-" + e2.getCodigoEstabelecimento() + "-" + e2.getNomeParticipante();
|
||||||
|
|
||||||
|
return c1.compareToIgnoreCase(c2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void gerarRMD() {
|
||||||
|
listaRegistroBPRTipoRMD.clear();
|
||||||
|
|
||||||
|
ExportacaoRMDTipoRMD registro = null;
|
||||||
|
|
||||||
|
Map<String, ExportacaoRMDTipoRMD> group = new HashMap<String, ExportacaoRMDTipoRMD>(0);
|
||||||
|
|
||||||
|
for (ExportacaoBPRBase base : listaRegistroBPR) {
|
||||||
|
String key = base.getCodigoEstabelecimento() + "-" + base.getNumeroAIDFRMD();
|
||||||
|
|
||||||
|
if (group.containsKey(key)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
registro = new ExportacaoRMDTipoRMD();
|
||||||
|
registro.setDataEmissao(base.getDataEmissaoRMD());
|
||||||
|
registro.setCodigoParticipante(base.getCodigoParticipante());
|
||||||
|
registro.setCodigoEstabelecimento(base.getCodigoEstabelecimento());
|
||||||
|
registro.setNumeroAIDF(base.getNumeroAIDFRMD());
|
||||||
|
registro.setSerieAIDF(base.getSubSerieAIDFRMD());
|
||||||
|
registro.setSubSerieAIDF(base.getSubSerieAIDFRMD());
|
||||||
|
registro.setNumeroBilheteAIDF(base.getNumeroFormularioBilheteAIDF());
|
||||||
|
registro.setNumeroFormularioAIDF(base.getNumeroFormularioBilheteAIDF());
|
||||||
|
registro.setCancelado(base.getDocumentoCancelado());
|
||||||
|
registro.setCodigoContabil(base.getCodigoContabil());
|
||||||
|
|
||||||
|
group.put(key, registro);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (Map.Entry<String, ExportacaoRMDTipoRMD> entry : group.entrySet()) {
|
||||||
|
listaRegistroBPRTipoRMD.add(entry.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
Collections.sort(listaRegistroBPRTipoRMD, new Comparator<ExportacaoRMDTipoRMD>(){
|
||||||
|
public int compare(ExportacaoRMDTipoRMD e1, ExportacaoRMDTipoRMD e2) {
|
||||||
|
String c1 = e1.getCodigoEstabelecimento() + "-" + e1.getNumeroAIDF();
|
||||||
|
String c2 = e2.getCodigoEstabelecimento() + "-" + e2.getNumeroAIDF();
|
||||||
|
|
||||||
|
return c1.compareToIgnoreCase(c2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void gerarBPS_DBP() {
|
||||||
|
listaRegistroBPRTipoSeqBPS.clear();
|
||||||
|
|
||||||
|
ExportacaoRMDTipoSeqBPS registroBPS = null;
|
||||||
|
ExportacaoRMDTipoSeqDBP registroDBP = null;
|
||||||
|
|
||||||
|
Long numeroInicial = 0l;
|
||||||
|
Long numeroFinal = 0l;
|
||||||
|
|
||||||
|
String dataEmissaoControle = "";
|
||||||
|
Integer cfopControle = 0;
|
||||||
|
|
||||||
|
Integer quantidadeTotal = 0;
|
||||||
|
Integer quantidadeCancelado = 0;
|
||||||
|
|
||||||
|
BigDecimal totalizador = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
for (ExportacaoBPRBase base : listaRegistroBPR) {
|
||||||
|
Integer codigoEstabelecimento = base.getCodigoEstabelecimento();
|
||||||
|
String numeroAIDF = base.getNumeroAIDF();
|
||||||
|
String serieAIDF = base.getSerieAIDF();
|
||||||
|
String subSerieAIDF = base.getSubSerieAIDF();
|
||||||
|
String numeroAIDFRMD = base.getNumeroAIDFRMD();
|
||||||
|
String serieAIDFRMD = base.getSerieAIDFRMD();
|
||||||
|
String subSerieAIDFRMD = base.getSubSerieAIDFRMD();
|
||||||
|
Integer numeroRMD = base.getNumeroRMD();
|
||||||
|
String dataEmissao = base.getDataEmissao();
|
||||||
|
Long numeroFormulario = base.getNumeroFormulario();
|
||||||
|
String ufDestino = base.getUfDestino();
|
||||||
|
Integer cfop = base.getCfop();
|
||||||
|
String ufOrigem = base.getUfOrigem();
|
||||||
|
Integer municipioOrigem = base.getMunicipioOrigem();
|
||||||
|
Boolean isenta = (base.getBoletoIsento() == 1);
|
||||||
|
Boolean cancelado = (base.getBoletoCancelado() == 1);
|
||||||
|
BigDecimal valorTotal = base.getValorPago();
|
||||||
|
BigDecimal red_base_calc_icms = base.getReducaoBaseCalcICMS();
|
||||||
|
BigDecimal porc_red_municipal = base.getPorcReducaoMunicipal();
|
||||||
|
BigDecimal porc_red_estadual = base.getPorcReducaoEstadual();
|
||||||
|
BigDecimal tributacao_importacao = base.getTributacaoImportacao();
|
||||||
|
|
||||||
|
if (numeroAIDF == null || numeroAIDF.trim().isEmpty() || numeroAIDF.trim().equals("0")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// BPR
|
||||||
|
if ((numeroFinal + 1) != numeroFormulario || !dataEmissaoControle.equals(dataEmissao) || !cfopControle.equals(cfop)) {
|
||||||
|
numeroInicial = numeroFormulario;
|
||||||
|
dataEmissaoControle = dataEmissao;
|
||||||
|
cfopControle = cfop;
|
||||||
|
|
||||||
|
registroBPS = new ExportacaoRMDTipoSeqBPS();
|
||||||
|
registroBPS.setEspecie("BPR");
|
||||||
|
registroBPS.setNumeroInicial(numeroInicial);
|
||||||
|
registroBPS.setCodigoEstabelecimento(codigoEstabelecimento);
|
||||||
|
registroBPS.setNumeroAIDF(numeroAIDF);
|
||||||
|
registroBPS.setSerieAIDF(serieAIDF);
|
||||||
|
registroBPS.setSubSerieAIDF(subSerieAIDF);
|
||||||
|
registroBPS.setNumeroAIDFRMD(numeroAIDFRMD);
|
||||||
|
registroBPS.setSerieAIDFRMD(serieAIDFRMD);
|
||||||
|
registroBPS.setSubSerieAIDFRMD(subSerieAIDFRMD);
|
||||||
|
registroBPS.setNumeroRMD(numeroRMD);
|
||||||
|
registroBPS.setDataEmissao(dataEmissao);
|
||||||
|
registroBPS.setInfoPadraoBilhetePassagem(CODIGO_INDICADOR_CONTR_PREVIDENCIARIA);
|
||||||
|
|
||||||
|
listaRegistroBPRTipoSeqBPS.add(registroBPS);
|
||||||
|
|
||||||
|
quantidadeTotal = 0;
|
||||||
|
quantidadeCancelado = 0;
|
||||||
|
|
||||||
|
totalizador = BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
|
||||||
|
quantidadeTotal++;
|
||||||
|
|
||||||
|
if (cancelado) {
|
||||||
|
quantidadeCancelado++;
|
||||||
|
} else {
|
||||||
|
totalizador = MoneyHelper.somar(totalizador, valorTotal);
|
||||||
|
}
|
||||||
|
|
||||||
|
numeroFinal = numeroFormulario;
|
||||||
|
|
||||||
|
registroBPS.setNumeroFinal(numeroFinal);
|
||||||
|
|
||||||
|
registroBPS.setQuantidadeTotal(quantidadeTotal);
|
||||||
|
registroBPS.setQuantidadeCancelados(quantidadeCancelado);
|
||||||
|
registroBPS.setValorTotal(totalizador);
|
||||||
|
|
||||||
|
// DBP
|
||||||
|
registroDBP = new ExportacaoRMDTipoSeqDBP(ufDestino);
|
||||||
|
|
||||||
|
Integer indice = registroBPS.getListaDBP().indexOf(registroDBP);
|
||||||
|
|
||||||
|
if (indice == -1) {
|
||||||
|
registroBPS.getListaDBP().add(registroDBP);
|
||||||
|
|
||||||
|
registroDBP.setCfop(cfop); // IM=5357; Serviço IE= 6357
|
||||||
|
registroDBP.setUfOrigem(ufOrigem);
|
||||||
|
registroDBP.setMunicipioOrigem(municipioOrigem);
|
||||||
|
|
||||||
|
registroDBP.setCodigoSituacaoTribColunaB(null);
|
||||||
|
|
||||||
|
// 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||||
|
if (isenta) {
|
||||||
|
registroDBP.setCodigoSituacaoTribColunaB(40);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||||
|
if (registroDBP.getCodigoSituacaoTribColunaB() == null) {
|
||||||
|
registroDBP.setCodigoSituacaoTribColunaB(red_base_calc_icms == null || red_base_calc_icms.compareTo(BigDecimal.ZERO) == 0 ? 0 : 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
registroDBP.setValorBaseCalculoICMS(BigDecimal.ZERO);
|
||||||
|
registroDBP.setValorTotal(BigDecimal.ZERO);
|
||||||
|
registroDBP.setValorICMS(BigDecimal.ZERO);
|
||||||
|
registroDBP.setValorICMSIsento(BigDecimal.ZERO);
|
||||||
|
registroDBP.setValorICMSOutros(BigDecimal.ZERO);
|
||||||
|
} else {
|
||||||
|
registroDBP = registroBPS.getListaDBP().get(indice);
|
||||||
|
}
|
||||||
|
|
||||||
|
BigDecimal valorBaseCalculoICMS = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
BigDecimal valorIsenta = BigDecimal.ZERO;
|
||||||
|
BigDecimal valorIsentaOutros = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
if (base.getBoletoIsento() == 1) {
|
||||||
|
valorIsenta = valorTotal;
|
||||||
|
valorTotal = BigDecimal.ZERO;
|
||||||
|
} else {
|
||||||
|
if (red_base_calc_icms != null) {
|
||||||
|
valorBaseCalculoICMS = valorTotal.subtract(valorTotal.multiply(red_base_calc_icms.divide(BigDecimal.valueOf(100d))));
|
||||||
|
} else {
|
||||||
|
valorBaseCalculoICMS = valorTotal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
registroDBP.setAliquotaICMS(tributacao_importacao);
|
||||||
|
|
||||||
|
if (tributacao_importacao == null) {
|
||||||
|
tributacao_importacao = BigDecimal.ZERO;
|
||||||
|
} else {
|
||||||
|
if (red_base_calc_icms != null) {
|
||||||
|
BigDecimal porc_red = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
if (ufOrigem.equals(ufDestino)) {
|
||||||
|
if (porc_red_municipal != null) {
|
||||||
|
porc_red = porc_red_municipal;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (porc_red_estadual != null) {
|
||||||
|
porc_red = porc_red_estadual;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BigDecimal porc = tributacao_importacao.subtract(porc_red.divide(BigDecimal.valueOf(100d)));
|
||||||
|
valorIsentaOutros = valorTotal.multiply(porc);
|
||||||
|
}
|
||||||
|
|
||||||
|
tributacao_importacao = MoneyHelper.dividir(tributacao_importacao, BigDecimal.valueOf(100d));
|
||||||
|
}
|
||||||
|
|
||||||
|
BigDecimal valorICMS = MoneyHelper.multiplicar(valorBaseCalculoICMS, tributacao_importacao);
|
||||||
|
|
||||||
|
registroDBP.setValorBaseCalculoICMS(registroDBP.getValorBaseCalculoICMS().add(valorBaseCalculoICMS));
|
||||||
|
registroDBP.setValorTotal(registroDBP.getValorTotal().add(valorTotal));
|
||||||
|
registroDBP.setValorICMS(registroDBP.getValorICMS().add(valorICMS));
|
||||||
|
registroDBP.setValorICMSIsento(registroDBP.getValorICMSIsento().add(valorIsenta));
|
||||||
|
registroDBP.setValorICMSOutros(registroDBP.getValorICMSOutros().add(valorIsentaOutros));
|
||||||
|
}
|
||||||
|
|
||||||
|
Collections.sort(listaRegistroBPRTipoSeqBPS, new Comparator<ExportacaoRMDTipoSeqBPS>(){
|
||||||
|
public int compare(ExportacaoRMDTipoSeqBPS e1, ExportacaoRMDTipoSeqBPS e2) {
|
||||||
|
String c1 = e1.getCodigoEstabelecimento() + "-" + e1.getNumeroInicial();
|
||||||
|
String c2 = e2.getCodigoEstabelecimento() + "-" + e2.getNumeroInicial();
|
||||||
|
|
||||||
|
return c1.compareToIgnoreCase(c2);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,364 @@
|
||||||
|
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class ExportacaoBPRBase {
|
||||||
|
// PAR
|
||||||
|
private Integer codigoParticipantePar;
|
||||||
|
private Integer codigoEstabelecimentoPar;
|
||||||
|
private String nomeParticipante;
|
||||||
|
private String ufParticipante;
|
||||||
|
private String cpfParticipante;
|
||||||
|
private String ieParticipante;
|
||||||
|
private String imParticipante;
|
||||||
|
private String logradouro;
|
||||||
|
private String numero;
|
||||||
|
private String complemento;
|
||||||
|
private String bairro;
|
||||||
|
private Integer cep;
|
||||||
|
|
||||||
|
// RMD
|
||||||
|
private String dataEmissaoRMD;
|
||||||
|
private Integer codigoParticipante;
|
||||||
|
private Integer codigoEstabelecimento;
|
||||||
|
private String numeroAIDF;
|
||||||
|
private String serieAIDF;
|
||||||
|
private String subSerieAIDF;
|
||||||
|
private Long numeroFormularioBilheteAIDF;
|
||||||
|
private Boolean documentoCancelado;
|
||||||
|
private String codigoContabil;
|
||||||
|
|
||||||
|
// BPS
|
||||||
|
private String dataEmissao;
|
||||||
|
private Long numeroFormulario;
|
||||||
|
private String numeroAIDFRMD;
|
||||||
|
private String serieAIDFRMD;
|
||||||
|
private String subSerieAIDFRMD;
|
||||||
|
private Integer numeroRMD;
|
||||||
|
private Integer boletoIsento;
|
||||||
|
private Integer boletoCancelado;
|
||||||
|
private BigDecimal valorPago;
|
||||||
|
|
||||||
|
// DBP
|
||||||
|
private String ufDestino;
|
||||||
|
private String ufOrigem;
|
||||||
|
private Integer municipioOrigem;
|
||||||
|
private Integer cfop;
|
||||||
|
private BigDecimal reducaoBaseCalcICMS;
|
||||||
|
private BigDecimal porcReducaoMunicipal;
|
||||||
|
private BigDecimal porcReducaoEstadual;
|
||||||
|
private BigDecimal tributacaoImportacao;
|
||||||
|
|
||||||
|
public ExportacaoBPRBase() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCodigoParticipantePar() {
|
||||||
|
return codigoParticipantePar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodigoParticipantePar(Integer codigoParticipantePar) {
|
||||||
|
this.codigoParticipantePar = codigoParticipantePar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCodigoEstabelecimentoPar() {
|
||||||
|
return codigoEstabelecimentoPar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodigoEstabelecimentoPar(Integer codigoEstabelecimentoPar) {
|
||||||
|
this.codigoEstabelecimentoPar = codigoEstabelecimentoPar;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNomeParticipante() {
|
||||||
|
return nomeParticipante;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNomeParticipante(String nomeParticipante) {
|
||||||
|
this.nomeParticipante = nomeParticipante;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUfParticipante() {
|
||||||
|
return ufParticipante;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUfParticipante(String ufParticipante) {
|
||||||
|
this.ufParticipante = ufParticipante;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCpfParticipante() {
|
||||||
|
return cpfParticipante;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCpfParticipante(String cpfParticipante) {
|
||||||
|
this.cpfParticipante = cpfParticipante;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIeParticipante() {
|
||||||
|
return ieParticipante;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIeParticipante(String ieParticipante) {
|
||||||
|
this.ieParticipante = ieParticipante;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImParticipante() {
|
||||||
|
return imParticipante;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setImParticipante(String imParticipante) {
|
||||||
|
this.imParticipante = imParticipante;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLogradouro() {
|
||||||
|
return logradouro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLogradouro(String logradouro) {
|
||||||
|
this.logradouro = logradouro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumero() {
|
||||||
|
return numero;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumero(String numero) {
|
||||||
|
this.numero = numero;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getComplemento() {
|
||||||
|
return complemento;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setComplemento(String complemento) {
|
||||||
|
this.complemento = complemento;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBairro() {
|
||||||
|
return bairro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBairro(String bairro) {
|
||||||
|
this.bairro = bairro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCep() {
|
||||||
|
return cep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCep(Integer cep) {
|
||||||
|
this.cep = cep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataEmissaoRMD() {
|
||||||
|
return dataEmissaoRMD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataEmissaoRMD(String dataEmissaoRMD) {
|
||||||
|
this.dataEmissaoRMD = dataEmissaoRMD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCodigoParticipante() {
|
||||||
|
return codigoParticipante;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodigoParticipante(Integer codigoParticipante) {
|
||||||
|
this.codigoParticipante = codigoParticipante;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCodigoEstabelecimento() {
|
||||||
|
return codigoEstabelecimento;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodigoEstabelecimento(Integer codigoEstabelecimento) {
|
||||||
|
this.codigoEstabelecimento = codigoEstabelecimento;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumeroAIDF() {
|
||||||
|
return numeroAIDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumeroAIDF(String numeroAIDF) {
|
||||||
|
this.numeroAIDF = numeroAIDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerieAIDF() {
|
||||||
|
return serieAIDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSerieAIDF(String serieAIDF) {
|
||||||
|
this.serieAIDF = serieAIDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubSerieAIDF() {
|
||||||
|
return subSerieAIDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubSerieAIDF(String subSerieAIDF) {
|
||||||
|
this.subSerieAIDF = subSerieAIDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getNumeroFormularioBilheteAIDF() {
|
||||||
|
return numeroFormularioBilheteAIDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumeroFormularioBilheteAIDF(Long numeroFormularioBilheteAIDF) {
|
||||||
|
this.numeroFormularioBilheteAIDF = numeroFormularioBilheteAIDF;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getDocumentoCancelado() {
|
||||||
|
return documentoCancelado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocumentoCancelado(Boolean documentoCancelado) {
|
||||||
|
this.documentoCancelado = documentoCancelado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodigoContabil() {
|
||||||
|
return codigoContabil;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCodigoContabil(String codigoContabil) {
|
||||||
|
this.codigoContabil = codigoContabil;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDataEmissao() {
|
||||||
|
return dataEmissao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDataEmissao(String dataEmissao) {
|
||||||
|
this.dataEmissao = dataEmissao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getNumeroFormulario() {
|
||||||
|
return numeroFormulario;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumeroFormulario(Long numeroFormulario) {
|
||||||
|
this.numeroFormulario = numeroFormulario;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumeroAIDFRMD() {
|
||||||
|
return numeroAIDFRMD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumeroAIDFRMD(String numeroAIDFRMD) {
|
||||||
|
this.numeroAIDFRMD = numeroAIDFRMD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerieAIDFRMD() {
|
||||||
|
return serieAIDFRMD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSerieAIDFRMD(String serieAIDFRMD) {
|
||||||
|
this.serieAIDFRMD = serieAIDFRMD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSubSerieAIDFRMD() {
|
||||||
|
return subSerieAIDFRMD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSubSerieAIDFRMD(String subSerieAIDFRMD) {
|
||||||
|
this.subSerieAIDFRMD = subSerieAIDFRMD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getNumeroRMD() {
|
||||||
|
return numeroRMD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumeroRMD(Integer numeroRMD) {
|
||||||
|
this.numeroRMD = numeroRMD;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBoletoIsento() {
|
||||||
|
return boletoIsento == null ? 0 : boletoIsento;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBoletoIsento(Integer boletoIsento) {
|
||||||
|
this.boletoIsento = boletoIsento;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBoletoCancelado() {
|
||||||
|
return boletoCancelado == null ? 0 : boletoCancelado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBoletoCancelado(Integer boletoCancelado) {
|
||||||
|
this.boletoCancelado = boletoCancelado;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getValorPago() {
|
||||||
|
return valorPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValorPago(BigDecimal valorPago) {
|
||||||
|
this.valorPago = valorPago;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUfDestino() {
|
||||||
|
return ufDestino;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUfDestino(String ufDestino) {
|
||||||
|
this.ufDestino = ufDestino;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUfOrigem() {
|
||||||
|
return ufOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUfOrigem(String ufOrigem) {
|
||||||
|
this.ufOrigem = ufOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMunicipioOrigem() {
|
||||||
|
return municipioOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMunicipioOrigem(Integer municipioOrigem) {
|
||||||
|
this.municipioOrigem = municipioOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCfop() {
|
||||||
|
return cfop;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCfop(Integer cfop) {
|
||||||
|
this.cfop = cfop;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getReducaoBaseCalcICMS() {
|
||||||
|
return reducaoBaseCalcICMS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setReducaoBaseCalcICMS(BigDecimal reducaoBaseCalcICMS) {
|
||||||
|
this.reducaoBaseCalcICMS = reducaoBaseCalcICMS;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPorcReducaoMunicipal() {
|
||||||
|
return porcReducaoMunicipal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPorcReducaoMunicipal(BigDecimal porcReducaoMunicipal) {
|
||||||
|
this.porcReducaoMunicipal = porcReducaoMunicipal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPorcReducaoEstadual() {
|
||||||
|
return porcReducaoEstadual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPorcReducaoEstadual(BigDecimal porcReducaoEstadual) {
|
||||||
|
this.porcReducaoEstadual = porcReducaoEstadual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTributacaoImportacao() {
|
||||||
|
return tributacaoImportacao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTributacaoImportacao(BigDecimal tributacaoImportacao) {
|
||||||
|
this.tributacaoImportacao = tributacaoImportacao;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ExportacaoRMDBase [codigoParticipantePar=" + codigoParticipantePar + ", codigoEstabelecimentoPar=" + codigoEstabelecimentoPar + ", nomeParticipante=" + nomeParticipante + ", ufParticipante=" + ufParticipante + ", cpfParticipante=" + cpfParticipante + ", ieParticipante=" + ieParticipante + ", imParticipante=" + imParticipante + ", logradouro=" + logradouro + ", numero=" + numero + ", complemento=" + complemento + ", bairro=" + bairro + ", cep=" + cep + ", dataEmissaoRMD=" + dataEmissaoRMD + ", codigoParticipante=" + codigoParticipante + ", codigoEstabelecimento=" + codigoEstabelecimento + ", numeroAIDF=" + numeroAIDF + ", serieAIDF=" + serieAIDF + ", subSerieAIDF=" + subSerieAIDF + ", numeroFormularioBilheteAIDF=" + numeroFormularioBilheteAIDF + ", documentoCancelado=" + documentoCancelado + ", codigoContabil=" + codigoContabil + ", dataEmissao=" + dataEmissao + ", numeroFormulario=" + numeroFormulario + ", numeroAIDFRMD=" + numeroAIDFRMD + ", serieAIDFRMD=" + serieAIDFRMD + ", subSerieAIDFRMD=" + subSerieAIDFRMD + ", numeroRMD=" + numeroRMD + ", boletoCancelado=" + boletoCancelado + ", valorPago=" + valorPago + ", ufDestino=" + ufDestino + ", ufOrigem=" + ufOrigem + ", municipioOrigem=" + municipioOrigem + ", cfop=" + cfop + ", reducaoBaseCalcICMS=" + reducaoBaseCalcICMS + ", porcReducaoMunicipal=" + porcReducaoMunicipal + ", porcReducaoEstadual=" + porcReducaoEstadual + ", tributacaoImportacao=" + tributacaoImportacao + "]";
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,24 +0,0 @@
|
||||||
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class ExportacaoRMD {
|
|
||||||
private List<ExportacaoRMDBase> listaRegistroRMD;
|
|
||||||
|
|
||||||
public ExportacaoRMD() {
|
|
||||||
listaRegistroRMD = new ArrayList<ExportacaoRMDBase>(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<ExportacaoRMDBase> getListaRegistroRMD() {
|
|
||||||
return listaRegistroRMD;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setListaRegistroRMD(List<ExportacaoRMDBase> listaRegistroRMD) {
|
|
||||||
this.listaRegistroRMD = listaRegistroRMD;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void gerarListas() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo;
|
|
||||||
|
|
||||||
public class ExportacaoRMDBase {
|
|
||||||
|
|
||||||
public ExportacaoRMDBase() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -5,8 +5,8 @@ public class ExportacaoRMDTipoRMD {
|
||||||
private String numeroAIDF;
|
private String numeroAIDF;
|
||||||
private String serieAIDF;
|
private String serieAIDF;
|
||||||
private String subSerieAIDF;
|
private String subSerieAIDF;
|
||||||
private Integer numeroBilheteAIDF;
|
private Long numeroBilheteAIDF;
|
||||||
private Integer numeroFormularioAIDF;
|
private Long numeroFormularioAIDF;
|
||||||
private String dataEmissao;
|
private String dataEmissao;
|
||||||
private Boolean cancelado;
|
private Boolean cancelado;
|
||||||
private Integer codigoParticipante;
|
private Integer codigoParticipante;
|
||||||
|
@ -48,19 +48,19 @@ public class ExportacaoRMDTipoRMD {
|
||||||
this.subSerieAIDF = subSerieAIDF;
|
this.subSerieAIDF = subSerieAIDF;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getNumeroBilheteAIDF() {
|
public Long getNumeroBilheteAIDF() {
|
||||||
return numeroBilheteAIDF;
|
return numeroBilheteAIDF;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNumeroBilheteAIDF(Integer numeroBilheteAIDF) {
|
public void setNumeroBilheteAIDF(Long numeroBilheteAIDF) {
|
||||||
this.numeroBilheteAIDF = numeroBilheteAIDF;
|
this.numeroBilheteAIDF = numeroBilheteAIDF;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getNumeroFormularioAIDF() {
|
public Long getNumeroFormularioAIDF() {
|
||||||
return numeroFormularioAIDF;
|
return numeroFormularioAIDF;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNumeroFormularioAIDF(Integer numeroFormularioAIDF) {
|
public void setNumeroFormularioAIDF(Long numeroFormularioAIDF) {
|
||||||
this.numeroFormularioAIDF = numeroFormularioAIDF;
|
this.numeroFormularioAIDF = numeroFormularioAIDF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import java.util.List;
|
||||||
public class ExportacaoRMDTipoSeqBPS {
|
public class ExportacaoRMDTipoSeqBPS {
|
||||||
private Integer codigoEstabelecimento;
|
private Integer codigoEstabelecimento;
|
||||||
private String especie;
|
private String especie;
|
||||||
private Long numeroAIDF;
|
private String numeroAIDF;
|
||||||
private String serieAIDF;
|
private String serieAIDF;
|
||||||
private String subSerieAIDF;
|
private String subSerieAIDF;
|
||||||
private Long numeroInicial;
|
private Long numeroInicial;
|
||||||
|
@ -15,7 +15,7 @@ public class ExportacaoRMDTipoSeqBPS {
|
||||||
private Integer quantidadeCancelados;
|
private Integer quantidadeCancelados;
|
||||||
private String dataEmissao;
|
private String dataEmissao;
|
||||||
private BigDecimal valorTotal;
|
private BigDecimal valorTotal;
|
||||||
private Long numeroAIDFRMD;
|
private String numeroAIDFRMD;
|
||||||
private String serieAIDFRMD;
|
private String serieAIDFRMD;
|
||||||
private String subSerieAIDFRMD;
|
private String subSerieAIDFRMD;
|
||||||
private Integer numeroRMD;
|
private Integer numeroRMD;
|
||||||
|
@ -46,11 +46,11 @@ public class ExportacaoRMDTipoSeqBPS {
|
||||||
this.especie = especie;
|
this.especie = especie;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getNumeroAIDF() {
|
public String getNumeroAIDF() {
|
||||||
return numeroAIDF;
|
return numeroAIDF;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNumeroAIDF(Long numeroAIDF) {
|
public void setNumeroAIDF(String numeroAIDF) {
|
||||||
this.numeroAIDF = numeroAIDF;
|
this.numeroAIDF = numeroAIDF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -122,11 +122,11 @@ public class ExportacaoRMDTipoSeqBPS {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getNumeroAIDFRMD() {
|
public String getNumeroAIDFRMD() {
|
||||||
return numeroAIDFRMD;
|
return numeroAIDFRMD;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNumeroAIDFRMD(Long numeroAIDFRMD) {
|
public void setNumeroAIDFRMD(String numeroAIDFRMD) {
|
||||||
this.numeroAIDFRMD = numeroAIDFRMD;
|
this.numeroAIDFRMD = numeroAIDFRMD;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue