Exportação Fiscal : ECF e RMD (issue 8120)
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@62584 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
af8bab6c13
commit
1572135409
|
@ -6,6 +6,14 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.EsquemaCorrida;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCCF;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCFC;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoICF;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoPRC;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoBPS;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoDBP;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoPAR;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoRMD;
|
||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalReducaoZVO;
|
||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalVO;
|
||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionManualFiscalVO;
|
||||
|
@ -23,4 +31,20 @@ public interface FiscalDAO {
|
|||
|
||||
public List<ImportacionNaoFiscalVO> buscaDatosNaoFiscais(Date inicio, Date fim, Integer empresaId, Connection connection) throws SQLException;
|
||||
|
||||
public List<ExportacaoECFTipoCFC> buscarRegistroECFTipoCFC(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
||||
|
||||
public List<ExportacaoECFTipoCCF> buscarRegistroECFTipoCCF(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
||||
|
||||
public List<ExportacaoECFTipoICF> buscarRegistroECFTipoICF(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 List<ExportacaoRMDTipoPAR> buscarRegistroRMDTipoPAR(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
||||
|
||||
public List<ExportacaoRMDTipoRMD> buscarRegistroRMDTipoRMD(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
||||
|
||||
public List<ExportacaoRMDTipoBPS> buscarRegistroRMDTipoBPS(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
||||
|
||||
public List<ExportacaoRMDTipoDBP> buscarRegistroRMDTipoDBP(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
||||
|
||||
}
|
||||
|
|
|
@ -13,6 +13,8 @@ import java.util.List;
|
|||
import javax.sql.DataSource;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.jfree.util.Log;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
|
@ -20,6 +22,14 @@ import com.rjconsultores.ventaboletos.dao.FiscalDAO;
|
|||
import com.rjconsultores.ventaboletos.entidad.EsquemaCorrida;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.utilerias.StringHelper;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCCF;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCFC;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoICF;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoPRC;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoBPS;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoDBP;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoPAR;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoRMD;
|
||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalReducaoZVO;
|
||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalVO;
|
||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionManualFiscalVO;
|
||||
|
@ -29,8 +39,10 @@ import com.rjconsultores.ventaboletos.vo.impressaofiscal.SituacaoTributaria;
|
|||
|
||||
@Repository("fiscalDAO")
|
||||
public class FiscalHibernateDAO implements FiscalDAO {
|
||||
|
||||
public static final String DATE_FORMAT_FISCAL = "yyyyMMdd";
|
||||
|
||||
private static Logger log = Logger.getLogger(FiscalHibernateDAO.class);
|
||||
|
||||
@Autowired
|
||||
private DataSource dataSource;
|
||||
|
||||
|
@ -1206,4 +1218,359 @@ public class FiscalHibernateDAO implements FiscalDAO {
|
|||
return importacionNaoFiscalVOs;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExportacaoECFTipoCFC> buscarRegistroECFTipoCFC(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado) {
|
||||
List<ExportacaoECFTipoCFC> retorno = new ArrayList<ExportacaoECFTipoCFC>();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(" select distinct r2.datamov as datamov, r2.cooinicial as cooinicial, r2.coofinal as coofinal, r2.crz as crz, r2.cro as cro, r2.coo as coo, r2.vendabrutadiaria as vendabrutadiaria, r2.totgeral as totgeral")
|
||||
.append(" from fiscal_r2 r2")
|
||||
.append(" where r2.datamov >= ? and r2.datamov <= ?");
|
||||
|
||||
try {
|
||||
PreparedStatement ps = connection.prepareStatement(sb.toString());
|
||||
ps.setLong(1, Long.valueOf(DateUtil.getStringDate(inicio, DATE_FORMAT_FISCAL)));
|
||||
ps.setLong(2, Long.valueOf(DateUtil.getStringDate(fim, DATE_FORMAT_FISCAL)));
|
||||
|
||||
ResultSet rs = ps.executeQuery();
|
||||
|
||||
ExportacaoECFTipoCFC registro = null;
|
||||
|
||||
while (rs.next()) {
|
||||
registro = new ExportacaoECFTipoCFC();
|
||||
registro.setEstabelecimento(99); // FIXME: Falta definir informação para a Exportação Fiscal ECF
|
||||
registro.setDataEmissao(rs.getString("datamov"));
|
||||
registro.setNumeroIdentificacaoECF(99); // FIXME: Falta definir informação para a Exportação Fiscal ECF
|
||||
registro.setCooReducaoZ(Integer.valueOf(rs.getString("coo")));
|
||||
registro.setCooInicial(Integer.valueOf(rs.getString("cooinicial")));
|
||||
registro.setCooFinal(Integer.valueOf(rs.getString("coofinal")));
|
||||
registro.setContadorReducao(Integer.valueOf(rs.getString("crz")));
|
||||
registro.setCro(Integer.valueOf(rs.getString("cro")));
|
||||
registro.setValorTotal(BigDecimal.valueOf(Double.valueOf(rs.getString("vendabrutadiaria")) / 100));
|
||||
registro.setValorIsentas(BigDecimal.ZERO);
|
||||
registro.setEstabelecimentoECF(9); // FIXME: Falta definir informação para a Exportação Fiscal ECF
|
||||
|
||||
retorno.add(registro);
|
||||
}
|
||||
|
||||
rs.close();
|
||||
ps.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExportacaoECFTipoCCF> buscarRegistroECFTipoCCF(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado) {
|
||||
List<ExportacaoECFTipoCCF> retorno = new ArrayList<ExportacaoECFTipoCCF>();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(" select distinct r5.coo as coo, r5.impunitario as valortarifa, co.codibge as municipio_origem, eo.cveestado as estado_origem, cd.codibge as municipio_destino, ed.cveestado as estado_destino, r4.impsubtotal as valortotal, cos.CODIBGE as municipio_origem_alias, eos.cveestado as estado_origem_alias, cds.CODIBGE as municipio_destino_alias, eds.cveestado as estado_destino_alias, ei.porcredbaseicms as red_base_calc_icms, eis.porcredbaseicms as red_base_calc_icms_alias")
|
||||
.append(" from fiscal_r5 r5")
|
||||
.append(" join fiscal_r4 r4 on r4.numserie20 = r5.numserie20 and r4.coo = r5.coo")
|
||||
.append(" join boleto b on b.boleto_id = r4.boleto_id")
|
||||
.append(" join parada po on po.parada_id = b.origen_id")
|
||||
.append(" join ciudad co on co.ciudad_id = po.ciudad_id")
|
||||
.append(" join estado eo on eo.estado_id = co.estado_id")
|
||||
.append(" join parada pd on pd.parada_id = b.destino_id")
|
||||
.append(" join ciudad cd on cd.ciudad_id = pd.ciudad_id")
|
||||
.append(" join estado ed on ed.estado_id = cd.estado_id")
|
||||
.append(" join empresa_imposto ei on ei.empresa_id = b.empresacorrida_id and ei.estado_id = ed.estado_id")
|
||||
.append(" left join alias_servico s on s.origen_id = b.origen_id and s.destino_id = b.destino_id and s.corrida_id = b.corrida_id and s.ruta_id = b.ruta_id")
|
||||
.append(" left join parada pos on pos.parada_id = s.aliasorigen_id")
|
||||
.append(" left join ciudad cos on cos.ciudad_id = pos.ciudad_id")
|
||||
.append(" left join estado eos on eos.estado_id = cos.estado_id")
|
||||
.append(" left join parada pds on pds.parada_id = s.aliasdestino_id")
|
||||
.append(" left join ciudad cds on cds.ciudad_id = pds.ciudad_id")
|
||||
.append(" left join estado eds on eds.estado_id = cds.estado_id")
|
||||
.append(" left join empresa_imposto eis on eis.empresa_id = b.empresacorrida_id and eis.estado_id = eds.estado_id")
|
||||
.append(" where r5.codproduto like '%-TA' and r4.indvendamanual = 0 and r5.datamov >= ? and r5.datamov <= ?");
|
||||
|
||||
try {
|
||||
PreparedStatement ps = connection.prepareStatement(sb.toString());
|
||||
ps.setLong(1, Long.valueOf(DateUtil.getStringDate(inicio, DATE_FORMAT_FISCAL)));
|
||||
ps.setLong(2, Long.valueOf(DateUtil.getStringDate(fim, DATE_FORMAT_FISCAL)));
|
||||
|
||||
ResultSet rs = ps.executeQuery();
|
||||
|
||||
ExportacaoECFTipoCCF registro = null;
|
||||
|
||||
while (rs.next()) {
|
||||
registro = new ExportacaoECFTipoCCF();
|
||||
registro.setCoo(Integer.valueOf(rs.getString("coo")));
|
||||
registro.setValorServico(BigDecimal.valueOf(Double.valueOf(rs.getString("valortarifa")) / 100));
|
||||
registro.setDescontoGlobal(null);
|
||||
registro.setCodigoParticipante(null);
|
||||
registro.setSituacaoCOO(0); // 0 - Documento Regular; 2 - Documento Cancelado
|
||||
registro.setAcrescimo(null);
|
||||
|
||||
// 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
registro.setCodigoSituacaoTribColunaB(null); // FIXME: Falta validar tabela para isentos
|
||||
|
||||
if (rs.getString("estado_origem_alias") == null) {
|
||||
registro.setUfOrigem(rs.getString("estado_origem"));
|
||||
registro.setMunicipioOrigem(Integer.valueOf(rs.getString("municipio_origem")));
|
||||
registro.setUfDestino(rs.getString("estado_destino"));
|
||||
|
||||
// IM=5357; Serviço IE= 6357
|
||||
if (rs.getString("estado_origem").equals(rs.getString("estado_destino"))) {
|
||||
registro.setCfop(5357);
|
||||
} else {
|
||||
registro.setCfop(6357);
|
||||
}
|
||||
|
||||
// 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
if (registro.getCodigoSituacaoTribColunaB() == null) {
|
||||
registro.setCodigoSituacaoTribColunaB(rs.getInt("red_base_calc_icms") == 0 ? 0 : 20);
|
||||
}
|
||||
} else {
|
||||
registro.setUfOrigem(rs.getString("estado_origem_alias"));
|
||||
registro.setMunicipioOrigem(Integer.valueOf(rs.getString("municipio_origem_alias")));
|
||||
registro.setUfDestino(rs.getString("estado_destino_alias"));
|
||||
|
||||
// IM=5357; Serviço IE= 6357
|
||||
if (rs.getString("estado_origem_alias").equals(rs.getString("estado_destino_alias"))) {
|
||||
registro.setCfop(5357);
|
||||
} else {
|
||||
registro.setCfop(6357);
|
||||
}
|
||||
|
||||
// 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
if (registro.getCodigoSituacaoTribColunaB() == null) {
|
||||
registro.setCodigoSituacaoTribColunaB(rs.getInt("red_base_calc_icms_alias") == 0 ? 0 : 20);
|
||||
}
|
||||
}
|
||||
|
||||
registro.setValorTotal(BigDecimal.valueOf(Double.valueOf(rs.getString("valortotal")) / 100));
|
||||
|
||||
// 1 - Demais; 2 - Região Metropolitanao ou seja, quando o campo CSTB for "40", esse campo deve vir "2". Do contrário, deve vir "1"
|
||||
registro.setTributacaoICMS(9); // FIXME: Falta definir informação para a Exportação Fiscal ECF
|
||||
|
||||
registro.setValorBaseCalculoICMS(BigDecimal.valueOf(Double.valueOf(rs.getString("valortotal")) / 100));
|
||||
registro.setAliquotaICMS("99"); // FIXME: Falta definir informação para a Exportação Fiscal ECF
|
||||
|
||||
retorno.add(registro);
|
||||
}
|
||||
|
||||
rs.close();
|
||||
ps.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExportacaoECFTipoICF> buscarRegistroECFTipoICF(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado) {
|
||||
List<ExportacaoECFTipoICF> retorno = new ArrayList<ExportacaoECFTipoICF>();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(" select distinct co.codibge as municipio_origem, eo.cveestado as estado_origem, cd.codibge as municipio_destino, ed.cveestado as estado_destino, r4.impsubtotal as valortotal, cos.CODIBGE as municipio_origem_alias, eos.cveestado as estado_origem_alias, cds.CODIBGE as municipio_destino_alias, eds.cveestado as estado_destino_alias, ei.porcredbaseicms as red_base_calc_icms, eis.porcredbaseicms as red_base_calc_icms_alias")
|
||||
.append(" from fiscal_r4 r4")
|
||||
.append(" join boleto b on b.boleto_id = r4.boleto_id")
|
||||
.append(" join parada po on po.parada_id = b.origen_id")
|
||||
.append(" join ciudad co on co.ciudad_id = po.ciudad_id")
|
||||
.append(" join estado eo on eo.estado_id = co.estado_id")
|
||||
.append(" join parada pd on pd.parada_id = b.destino_id")
|
||||
.append(" join ciudad cd on cd.ciudad_id = pd.ciudad_id")
|
||||
.append(" join estado ed on ed.estado_id = cd.estado_id")
|
||||
.append(" join empresa_imposto ei on ei.empresa_id = b.empresacorrida_id and ei.estado_id = ed.estado_id")
|
||||
.append(" left join alias_servico s on s.origen_id = b.origen_id and s.destino_id = b.destino_id and s.corrida_id = b.corrida_id and s.ruta_id = b.ruta_id")
|
||||
.append(" left join parada pos on pos.parada_id = s.aliasorigen_id")
|
||||
.append(" left join ciudad cos on cos.ciudad_id = pos.ciudad_id")
|
||||
.append(" left join estado eos on eos.estado_id = cos.estado_id")
|
||||
.append(" left join parada pds on pds.parada_id = s.aliasdestino_id")
|
||||
.append(" left join ciudad cds on cds.ciudad_id = pds.ciudad_id")
|
||||
.append(" left join estado eds on eds.estado_id = cds.estado_id")
|
||||
.append(" left join empresa_imposto eis on eis.empresa_id = b.empresacorrida_id and eis.estado_id = eds.estado_id")
|
||||
.append(" where r4.indvendamanual = 0 and r4.datamov >= ? and r4.datamov <= ?");
|
||||
|
||||
try {
|
||||
PreparedStatement ps = connection.prepareStatement(sb.toString());
|
||||
ps.setLong(1, Long.valueOf(DateUtil.getStringDate(inicio, DATE_FORMAT_FISCAL)));
|
||||
ps.setLong(2, Long.valueOf(DateUtil.getStringDate(fim, DATE_FORMAT_FISCAL)));
|
||||
|
||||
ResultSet rs = ps.executeQuery();
|
||||
|
||||
ExportacaoECFTipoICF registro = null;
|
||||
|
||||
while (rs.next()) {
|
||||
BigDecimal valorTotal = BigDecimal.valueOf(Double.valueOf(rs.getString("valortotal")) / 100);
|
||||
BigDecimal valorBaseCalculoICMS = BigDecimal.valueOf(Double.valueOf(rs.getString("valortotal")) / 100);
|
||||
String aliquotaICMS = "99"; // FIXME: Falta definir informação para a Exportação Fiscal ECF
|
||||
BigDecimal valorICMSDebitado = valorBaseCalculoICMS.multiply(BigDecimal.valueOf(Double.valueOf(aliquotaICMS)));
|
||||
BigDecimal valorICMSIsento = BigDecimal.ZERO;
|
||||
BigDecimal valorICMSOutros = BigDecimal.ZERO;
|
||||
|
||||
String ufDestino = "";
|
||||
String ufOrigem = "";
|
||||
Integer municipioOrigem = 0;
|
||||
Integer cfop = 0; // IM=5357; Serviço IE= 6357
|
||||
|
||||
// 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
Integer codigoSituacaoTribColunaB = null; // FIXME: Falta validar tabela para isentos
|
||||
|
||||
if (rs.getString("estado_origem_alias") == null) {
|
||||
ufDestino = rs.getString("estado_destino");
|
||||
ufOrigem = rs.getString("estado_origem");
|
||||
municipioOrigem = Integer.valueOf(rs.getString("municipio_origem"));
|
||||
|
||||
// IM=5357; Serviço IE= 6357
|
||||
if (rs.getString("estado_origem").equals(rs.getString("estado_destino"))) {
|
||||
cfop = 5357;
|
||||
} else {
|
||||
cfop = 6357;
|
||||
}
|
||||
|
||||
// 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
if (codigoSituacaoTribColunaB == null) {
|
||||
codigoSituacaoTribColunaB = rs.getInt("red_base_calc_icms") == 0 ? 0 : 20;
|
||||
}
|
||||
} else {
|
||||
ufDestino = rs.getString("estado_origem_alias");
|
||||
ufOrigem = rs.getString("estado_origem_alias");
|
||||
municipioOrigem = Integer.valueOf(rs.getString("municipio_origem_alias"));
|
||||
|
||||
// IM=5357; Serviço IE= 6357
|
||||
if (rs.getString("estado_origem_alias").equals(rs.getString("estado_destino_alias"))) {
|
||||
cfop = 5357;
|
||||
} else {
|
||||
cfop = 6357;
|
||||
}
|
||||
|
||||
// 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
if (codigoSituacaoTribColunaB == null) {
|
||||
codigoSituacaoTribColunaB = rs.getInt("red_base_calc_icms_alias") == 0 ? 0 : 20;
|
||||
}
|
||||
}
|
||||
|
||||
registro = new ExportacaoECFTipoICF();
|
||||
registro.setValorTotal(valorTotal);
|
||||
registro.setUfDestino(ufDestino);
|
||||
registro.setCfop(cfop); // IM=5357; Serviço IE= 6357
|
||||
registro.setValorBaseCalculoICMS(valorBaseCalculoICMS);
|
||||
registro.setAliquotaICMS(aliquotaICMS);
|
||||
registro.setValorICMSDebitado(valorICMSDebitado);
|
||||
registro.setValorICMSIsento(valorICMSIsento);
|
||||
registro.setValorICMSOutros(valorICMSOutros);
|
||||
registro.setCodigoSituacaoTribColunaB(codigoSituacaoTribColunaB); // 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
registro.setUfOrigem(ufOrigem);
|
||||
registro.setMunicipioOrigem(municipioOrigem);
|
||||
|
||||
retorno.add(registro);
|
||||
}
|
||||
|
||||
rs.close();
|
||||
ps.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExportacaoECFTipoPRC> buscarRegistroECFTipoPRC(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado) {
|
||||
List<ExportacaoECFTipoPRC> retorno = new ArrayList<ExportacaoECFTipoPRC>();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(" select distinct co.codibge as municipio_origem, eo.cveestado as estado_origem, cd.codibge as municipio_destino, ed.cveestado as estado_destino, r4.impsubtotal as valortotal, cos.CODIBGE as municipio_origem_alias, eos.cveestado as estado_origem_alias, cds.CODIBGE as municipio_destino_alias, eds.cveestado as estado_destino_alias, ei.porcredbaseicms as red_base_calc_icms, eis.porcredbaseicms as red_base_calc_icms_alias")
|
||||
.append(" from fiscal_r4 r4")
|
||||
.append(" join boleto b on b.boleto_id = r4.boleto_id")
|
||||
.append(" join parada po on po.parada_id = b.origen_id")
|
||||
.append(" join ciudad co on co.ciudad_id = po.ciudad_id")
|
||||
.append(" join estado eo on eo.estado_id = co.estado_id")
|
||||
.append(" join parada pd on pd.parada_id = b.destino_id")
|
||||
.append(" join ciudad cd on cd.ciudad_id = pd.ciudad_id")
|
||||
.append(" join estado ed on ed.estado_id = cd.estado_id")
|
||||
.append(" join empresa_imposto ei on ei.empresa_id = b.empresacorrida_id and ei.estado_id = ed.estado_id")
|
||||
.append(" left join alias_servico s on s.origen_id = b.origen_id and s.destino_id = b.destino_id and s.corrida_id = b.corrida_id and s.ruta_id = b.ruta_id")
|
||||
.append(" left join parada pos on pos.parada_id = s.aliasorigen_id")
|
||||
.append(" left join ciudad cos on cos.ciudad_id = pos.ciudad_id")
|
||||
.append(" left join estado eos on eos.estado_id = cos.estado_id")
|
||||
.append(" left join parada pds on pds.parada_id = s.aliasdestino_id")
|
||||
.append(" left join ciudad cds on cds.ciudad_id = pds.ciudad_id")
|
||||
.append(" left join estado eds on eds.estado_id = cds.estado_id")
|
||||
.append(" left join empresa_imposto eis on eis.empresa_id = b.empresacorrida_id and eis.estado_id = eds.estado_id")
|
||||
.append(" where r4.indvendamanual = 0 and r4.datamov >= ? and r4.datamov <= ?");
|
||||
|
||||
try {
|
||||
PreparedStatement ps = connection.prepareStatement(sb.toString());
|
||||
ps.setLong(1, Long.valueOf(DateUtil.getStringDate(inicio, DATE_FORMAT_FISCAL)));
|
||||
ps.setLong(2, Long.valueOf(DateUtil.getStringDate(fim, DATE_FORMAT_FISCAL)));
|
||||
|
||||
ResultSet rs = ps.executeQuery();
|
||||
|
||||
ExportacaoECFTipoPRC registro = null;
|
||||
|
||||
while (rs.next()) {
|
||||
BigDecimal valorTotal = BigDecimal.valueOf(Double.valueOf(rs.getString("valortotal")) / 100);
|
||||
BigDecimal valorBaseCalculoICMS = BigDecimal.valueOf(Double.valueOf(rs.getString("valortotal")) / 100);
|
||||
BigDecimal valorICMS = BigDecimal.ZERO; // FIXME: Falta definir informação para a Exportação Fiscal ECF
|
||||
|
||||
String ufOrigem = "";
|
||||
Integer municipioOrigem = 0;
|
||||
|
||||
if (rs.getString("estado_origem_alias") == null) {
|
||||
ufOrigem = rs.getString("estado_origem");
|
||||
municipioOrigem = Integer.valueOf(rs.getString("municipio_origem"));
|
||||
} else {
|
||||
ufOrigem = rs.getString("estado_origem_alias");
|
||||
municipioOrigem = Integer.valueOf(rs.getString("municipio_origem_alias"));
|
||||
}
|
||||
|
||||
registro = new ExportacaoECFTipoPRC();
|
||||
registro.setUfOrigem(ufOrigem);
|
||||
registro.setMunicipioOrigem(municipioOrigem);
|
||||
registro.setValorTotal(valorTotal);
|
||||
registro.setValorBaseCalculoICMS(valorBaseCalculoICMS);
|
||||
registro.setValorICMS(valorICMS);
|
||||
|
||||
retorno.add(registro);
|
||||
}
|
||||
|
||||
rs.close();
|
||||
ps.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExportacaoRMDTipoPAR> buscarRegistroRMDTipoPAR(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado) {
|
||||
List<ExportacaoRMDTipoPAR> retorno = new ArrayList<ExportacaoRMDTipoPAR>();
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExportacaoRMDTipoRMD> buscarRegistroRMDTipoRMD(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado) {
|
||||
List<ExportacaoRMDTipoRMD> retorno = new ArrayList<ExportacaoRMDTipoRMD>();
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExportacaoRMDTipoBPS> buscarRegistroRMDTipoBPS(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado) {
|
||||
List<ExportacaoRMDTipoBPS> retorno = new ArrayList<ExportacaoRMDTipoBPS>();
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExportacaoRMDTipoDBP> buscarRegistroRMDTipoDBP(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado) {
|
||||
List<ExportacaoRMDTipoDBP> retorno = new ArrayList<ExportacaoRMDTipoDBP>();
|
||||
|
||||
return retorno;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.EsquemaCorrida;
|
||||
import com.rjconsultores.ventaboletos.entidad.Estado;
|
||||
|
||||
public interface FiscalService {
|
||||
|
||||
|
@ -38,4 +39,8 @@ public interface FiscalService {
|
|||
public File importacionFiscalECFCanceladosXls(Empresa empresa, File arquivoTxt);
|
||||
|
||||
public File importacionFiscalECFPendencias(Date inicio, Date fim, Empresa empresa);
|
||||
|
||||
public File buscarArquivoExportacaoECF(Date value, Date value2, Empresa empresa, Estado estado);
|
||||
|
||||
public File buscarArquivoExportacaoRMD(Date value, Date value2, Empresa empresa, Estado estado);
|
||||
}
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import com.rjconsultores.ventaboletos.dao.FiscalDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.EsquemaCorrida;
|
||||
import com.rjconsultores.ventaboletos.entidad.Estado;
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtra;
|
||||
import com.rjconsultores.ventaboletos.service.FiscalService;
|
||||
import com.rjconsultores.ventaboletos.service.TipoEventoExtraService;
|
||||
|
@ -39,6 +40,15 @@ import com.rjconsultores.ventaboletos.utilerias.archivointegracion.ArchivoIntegr
|
|||
import com.rjconsultores.ventaboletos.utilerias.archivointegracion.ArchivoIntegracionECFReducaoZ;
|
||||
import com.rjconsultores.ventaboletos.utilerias.archivointegracion.ArchivoIntegracionNaoFiscal;
|
||||
import com.rjconsultores.ventaboletos.utilerias.archivointegracion.ArchivoIntegracionReducaoZ;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.ExportacaoFiscal;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCCF;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCFC;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoICF;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoPRC;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoBPS;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoDBP;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoPAR;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoRMD;
|
||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalReducaoZVO;
|
||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalVO;
|
||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionManualFiscalVO;
|
||||
|
@ -50,8 +60,8 @@ import com.rjconsultores.ventaboletos.vo.impressaofiscal.LeitorNaoFiscalVO;
|
|||
|
||||
@Service("fiscalService")
|
||||
public class FiscalServiceImpl implements FiscalService {
|
||||
|
||||
private static Logger log = Logger.getLogger(FiscalServiceImpl.class);
|
||||
|
||||
public static final String DATE_FORMAT_FISCAL = "yyyyMMdd";
|
||||
public static final BigDecimal CEM = BigDecimal.valueOf(100);
|
||||
public static final String QUEBRA_LINHA = "\r\n";
|
||||
|
@ -67,6 +77,9 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
@Autowired
|
||||
private DataSource dataSourceRead;
|
||||
|
||||
@Autowired
|
||||
private ExportacaoFiscal exportacaoFiscal;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int gerarRegistroP2_F2(List<EsquemaCorrida> lsEsquemaCorrida, Date dataDe, Date dataAte) throws SQLException {
|
||||
|
@ -768,4 +781,69 @@ public class FiscalServiceImpl implements FiscalService {
|
|||
return lsTipoEventoExtra;
|
||||
}
|
||||
|
||||
@Override
|
||||
public File buscarArquivoExportacaoECF(Date inicio, Date fim, Empresa empresa, Estado estado) {
|
||||
Connection connection = null;
|
||||
|
||||
try {
|
||||
connection = getConnection();
|
||||
|
||||
List<ExportacaoECFTipoCFC> listaRegistroECFTipoCFC = fiscalDAO.buscarRegistroECFTipoCFC(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||
List<ExportacaoECFTipoCCF> listaRegistroECFTipoCCF = fiscalDAO.buscarRegistroECFTipoCCF(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||
List<ExportacaoECFTipoICF> listaRegistroECFTipoICF = fiscalDAO.buscarRegistroECFTipoICF(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||
List<ExportacaoECFTipoPRC> listaRegistroECFTipoPRC = fiscalDAO.buscarRegistroECFTipoPRC(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||
|
||||
return exportacaoFiscal.gerarArquivoECF(inicio, fim, empresa.getNombempresa(), listaRegistroECFTipoCFC, listaRegistroECFTipoCCF, listaRegistroECFTipoICF,
|
||||
listaRegistroECFTipoPRC);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
|
||||
} finally {
|
||||
try {
|
||||
if (connection != null && !connection.isClosed()) {
|
||||
connection.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
log.error("error fechar conexão", e);
|
||||
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public File buscarArquivoExportacaoRMD(Date inicio, Date fim, Empresa empresa, Estado estado) {
|
||||
Connection connection = null;
|
||||
|
||||
try {
|
||||
connection = getConnection();
|
||||
|
||||
List<ExportacaoRMDTipoPAR> listaRegistroRMDTipoPAR = fiscalDAO.buscarRegistroRMDTipoPAR(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||
List<ExportacaoRMDTipoRMD> listaRegistroRMDTipoRMD = fiscalDAO.buscarRegistroRMDTipoRMD(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||
List<ExportacaoRMDTipoBPS> listaRegistroRMDTipoBPS = fiscalDAO.buscarRegistroRMDTipoBPS(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||
List<ExportacaoRMDTipoDBP> listaRegistroRMDTipoDBP = fiscalDAO.buscarRegistroRMDTipoDBP(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado());
|
||||
|
||||
return exportacaoFiscal.gerarArquivoRMD(inicio, fim, empresa.getNombempresa(), listaRegistroRMDTipoPAR, listaRegistroRMDTipoRMD, listaRegistroRMDTipoBPS,
|
||||
listaRegistroRMDTipoDBP);
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
|
||||
} finally {
|
||||
try {
|
||||
if (connection != null && !connection.isClosed()) {
|
||||
connection.close();
|
||||
}
|
||||
} catch (SQLException e) {
|
||||
log.error("error fechar conexão", e);
|
||||
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,535 @@
|
|||
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UtiliteriasFiscal;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCCF;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoCFC;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoICF;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoECFTipoPRC;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoBPS;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoDBP;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoPAR;
|
||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoRMD;
|
||||
|
||||
@Service("exportacaoFiscal")
|
||||
public class ExportacaoFiscal {
|
||||
private static Logger log = Logger.getLogger(ExportacaoFiscal.class);
|
||||
|
||||
private static String VAZIO = " ";
|
||||
|
||||
public ExportacaoFiscal() {
|
||||
|
||||
}
|
||||
|
||||
public File gerarArquivoECF(final Date dataInicial, final Date dataFinal, final String nomeEmpresa, final List<ExportacaoECFTipoCFC> listaRegistroECFTipoCFC,
|
||||
final List<ExportacaoECFTipoCCF> listaRegistroECFTipoCCF, final List<ExportacaoECFTipoICF> listaRegistroECFTipoICF, final List<ExportacaoECFTipoPRC> listaRegistroECFTipoPRC) {
|
||||
try {
|
||||
String nomeArquivo = "fiscal_vendas_impressas_" + DateUtil.getStringDate(Calendar.getInstance().getTime(), "yyyyMMddhhmmss");
|
||||
|
||||
File arquivo = File.createTempFile(nomeArquivo, ".txt");
|
||||
|
||||
PrintWriter writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(arquivo), Constantes.UTF_8));
|
||||
|
||||
adicionarRegistroECFTipoCAB(writer, dataInicial, dataFinal, nomeEmpresa);
|
||||
adicionarRegistroECFTipoCFC(writer, listaRegistroECFTipoCFC);
|
||||
adicionarRegistroECFTipoCCF(writer, listaRegistroECFTipoCCF);
|
||||
adicionarRegistroECFTipoICF(writer, listaRegistroECFTipoICF);
|
||||
adicionarRegistroECFTipoPRC(writer, listaRegistroECFTipoPRC);
|
||||
|
||||
writer.close();
|
||||
|
||||
return arquivo;
|
||||
|
||||
} catch (IOException e) {
|
||||
log.error( e.getMessage(), e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void adicionarRegistroECFTipoCAB(final PrintWriter writer, final Date dataInicial, final Date dataFinal, final String nomeEmpresa) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("CAB");
|
||||
sb.append("95");
|
||||
sb.append("TotalBus");
|
||||
sb.append(new SimpleDateFormat("yyyyMMdd").format(new Date()));
|
||||
sb.append(formataCaracter(nomeEmpresa, false, 15));
|
||||
sb.append(new SimpleDateFormat("yyyyMMdd").format(dataInicial));
|
||||
sb.append(new SimpleDateFormat("yyyyMMdd").format(dataFinal));
|
||||
sb.append("TotalBus RN ECF " + new SimpleDateFormat("yyyyMM").format(dataFinal));
|
||||
sb.append("N");
|
||||
|
||||
writer.print(sb.toString() + UtiliteriasFiscal.QUEBRA_LINHA);
|
||||
}
|
||||
|
||||
private void adicionarRegistroECFTipoCFC(PrintWriter writer, final List<ExportacaoECFTipoCFC> listaRegistroECFTipoCFC) {
|
||||
for (ExportacaoECFTipoCFC registro : listaRegistroECFTipoCFC) {
|
||||
Integer estabelecimento = registro.getEstabelecimento();
|
||||
String dataEmissao = registro.getDataEmissao();
|
||||
Integer numeroIdentificacaoECF = registro.getNumeroIdentificacaoECF();
|
||||
Integer cooReducaoZ = registro.getCooReducaoZ();
|
||||
Integer cooInicial = registro.getCooInicial();
|
||||
Integer cooFinal = registro.getCooFinal();
|
||||
Integer contadorReducao = registro.getContadorReducao();
|
||||
Integer cro = registro.getCro();
|
||||
BigDecimal valorTotal = registro.getValorTotal();
|
||||
BigDecimal valorIsentas = registro.getValorIsentas();
|
||||
Integer estabelecimentoECF = registro.getEstabelecimentoECF();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("CFC");
|
||||
sb.append(formataNumerico(estabelecimento, false, 4));
|
||||
sb.append(formataCaracter(dataEmissao, true, 8));
|
||||
sb.append(formataNumerico(numeroIdentificacaoECF, true, 3));
|
||||
sb.append(formataNumerico(cooReducaoZ, true, 6));
|
||||
sb.append(formataNumerico(cooInicial, true, 6));
|
||||
sb.append(formataNumerico(cooFinal, true, 6));
|
||||
sb.append(formataNumerico(contadorReducao, true, 6));
|
||||
sb.append(formataNumerico(cro, true, 6));
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 12
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 13
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 14
|
||||
sb.append(formataValor(valorIsentas, 15));
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 16
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 17
|
||||
sb.append("N");
|
||||
sb.append(formataCaracter(VAZIO, false, 25)); // Posição 19
|
||||
sb.append(formataCaracter(VAZIO, false, 3)); // Posição 20
|
||||
sb.append(formataCaracter(VAZIO, false, 3)); // Posição 21
|
||||
sb.append(formataCaracter(VAZIO, false, 6)); // Posição 22
|
||||
sb.append(formataCaracter(VAZIO, false, 2)); // Posição 23
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 26
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 27
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 28
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 29
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 30
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 31
|
||||
sb.append(""); // Posição 32
|
||||
sb.append("V");
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 34
|
||||
sb.append(formataNumerico(estabelecimentoECF.toString(), false, 4));
|
||||
|
||||
writer.print(sb.toString() + UtiliteriasFiscal.QUEBRA_LINHA);
|
||||
}
|
||||
}
|
||||
|
||||
private void adicionarRegistroECFTipoCCF(PrintWriter writer, final List<ExportacaoECFTipoCCF> listaRegistroECFTipoCCF) {
|
||||
for (ExportacaoECFTipoCCF registro : listaRegistroECFTipoCCF) {
|
||||
Integer coo = registro.getCoo();
|
||||
BigDecimal valorServico = registro.getValorServico();
|
||||
BigDecimal descontoGlobal = registro.getDescontoGlobal();
|
||||
Integer codigoParticipante = registro.getCodigoParticipante();
|
||||
Integer situacaoCOO = registro.getSituacaoCOO(); // 0 - Documento Regular; 2 - Documento Cancelado
|
||||
BigDecimal acrescimo = registro.getAcrescimo();
|
||||
String ufOrigem = registro.getUfOrigem();
|
||||
Integer municipioOrigem = registro.getMunicipioOrigem();
|
||||
String ufDestino = registro.getUfDestino();
|
||||
Integer cfop = registro.getCfop(); // IM=5357; Serviço IE= 6357
|
||||
Integer codigoSituacaoTribColunaB = registro.getCodigoSituacaoTribColunaB(); // 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
BigDecimal valorTotal = registro.getValorTotal();
|
||||
Integer tributacaoICMS = registro.getTributacaoICMS(); // 1 - Demais; 2 - Região Metropolitanao ou seja, quando o campo CSTB for "40", esse campo deve vir "2". Do contrário, deve vir "1"
|
||||
BigDecimal valorBaseCalculoICMS = registro.getValorBaseCalculoICMS();
|
||||
String aliquotaICMS = registro.getAliquotaICMS();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("CCF");
|
||||
sb.append(formataNumerico(coo.toString(), true, 6));
|
||||
sb.append(formataValor(valorServico, 15));
|
||||
sb.append(formataValor(descontoGlobal, 15));
|
||||
sb.append(formataNumerico(codigoParticipante, true, 15));
|
||||
sb.append(formataNumerico(situacaoCOO, true, 1));
|
||||
sb.append(formataValor(acrescimo, 15));
|
||||
sb.append(formataCaracter(ufOrigem, true, 2));
|
||||
sb.append(formataNumerico(municipioOrigem, true, 5));
|
||||
sb.append(formataCaracter(ufDestino, true, 2));
|
||||
sb.append(formataNumerico(cfop, true, 4));
|
||||
sb.append("0");
|
||||
sb.append(formataNumerico(codigoSituacaoTribColunaB, true, 2));
|
||||
sb.append(formataCaracter(VAZIO, false, 1)); // Posição 14
|
||||
sb.append(formataCaracter(VAZIO, false, 1)); // Posição 15
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(formataNumerico(tributacaoICMS, true, 1));
|
||||
sb.append(formataValor(valorBaseCalculoICMS, 15));
|
||||
sb.append(formataCaracter(aliquotaICMS, false, 5));
|
||||
sb.append("01");
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(formataCaracter(VAZIO, false, 5)); // Posição 22
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 23
|
||||
sb.append(formataCaracter(VAZIO, false, 3)); // Posição 24
|
||||
sb.append("01");
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(formataCaracter(VAZIO, false, 5)); // Posição 27
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 28
|
||||
sb.append(formataCaracter(VAZIO, false, 3)); // Posição 29
|
||||
|
||||
writer.print(sb.toString() + UtiliteriasFiscal.QUEBRA_LINHA);
|
||||
}
|
||||
}
|
||||
|
||||
private void adicionarRegistroECFTipoICF(PrintWriter writer, final List<ExportacaoECFTipoICF> listaRegistroECFTipoICF) {
|
||||
for (ExportacaoECFTipoICF registro : listaRegistroECFTipoICF) {
|
||||
BigDecimal valorTotal = registro.getValorTotal();
|
||||
String ufDestino = registro.getUfDestino();
|
||||
Integer cfop = registro.getCfop(); // IM=5357; Serviço IE= 6357
|
||||
BigDecimal valorBaseCalculoICMS = registro.getValorBaseCalculoICMS();
|
||||
String aliquotaICMS = registro.getAliquotaICMS();
|
||||
BigDecimal valorICMSDebitado = registro.getValorICMSDebitado();
|
||||
BigDecimal valorICMSIsento = registro.getValorICMSIsento();
|
||||
BigDecimal valorICMSOutros = registro.getValorICMSOutros();
|
||||
Integer codigoSituacaoTribColunaB = registro.getCodigoSituacaoTribColunaB(); // 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
String ufOrigem = registro.getUfOrigem();
|
||||
Integer municipioOrigem = registro.getMunicipioOrigem();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("ICF");
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(formataCaracter(ufDestino, true, 2));
|
||||
sb.append(formataNumerico(cfop, true, 4));
|
||||
sb.append(formataValor(valorBaseCalculoICMS, 15));
|
||||
sb.append(formataCaracter(aliquotaICMS, false, 5));
|
||||
sb.append(formataValor(valorICMSDebitado, 15));
|
||||
sb.append(formataValor(valorICMSIsento, 15));
|
||||
sb.append(formataValor(valorICMSOutros, 15));
|
||||
sb.append("N");
|
||||
sb.append("N");
|
||||
sb.append("N");
|
||||
sb.append("0");
|
||||
sb.append(formataNumerico(codigoSituacaoTribColunaB, true, 2));
|
||||
sb.append(formataCaracter(VAZIO, false, 1)); // Posição 15
|
||||
sb.append(formataCaracter(VAZIO, false, 3)); // Posição 16
|
||||
sb.append("N");
|
||||
sb.append("N");
|
||||
sb.append(formataCaracter(ufOrigem, true, 2));
|
||||
sb.append(formataNumerico(municipioOrigem, true, 5));
|
||||
|
||||
writer.print(sb.toString() + UtiliteriasFiscal.QUEBRA_LINHA);
|
||||
}
|
||||
}
|
||||
|
||||
private void adicionarRegistroECFTipoPRC(PrintWriter writer, final List<ExportacaoECFTipoPRC> listaRegistroECFTipoPRC) {
|
||||
for (ExportacaoECFTipoPRC registro : listaRegistroECFTipoPRC) {
|
||||
String ufOrigem = registro.getUfOrigem();
|
||||
Integer municipioOrigem = registro.getMunicipioOrigem();
|
||||
BigDecimal valorTotal = registro.getValorTotal();
|
||||
BigDecimal valorBaseCalculoICMS = registro.getValorBaseCalculoICMS();
|
||||
BigDecimal valorICMS = registro.getValorICMS();
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("PRC");
|
||||
sb.append(formataCaracter(ufOrigem, true, 2));
|
||||
sb.append(formataNumerico(municipioOrigem, true, 5));
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(formataValor(valorBaseCalculoICMS, 15));
|
||||
sb.append(formataValor(valorICMS, 15));
|
||||
|
||||
writer.print(sb.toString() + UtiliteriasFiscal.QUEBRA_LINHA);
|
||||
}
|
||||
}
|
||||
|
||||
public File gerarArquivoRMD(final Date dataInicial, final Date dataFinal, final String nomeEmpresa, List<ExportacaoRMDTipoPAR> listaRegistroRMDTipoPAR,
|
||||
List<ExportacaoRMDTipoRMD> listaRegistroRMDTipoRMD, List<ExportacaoRMDTipoBPS> listaRegistroRMDTipoBPS, List<ExportacaoRMDTipoDBP> listaRegistroRMDTipoDBP) {
|
||||
try {
|
||||
String nomeArquivo = "fiscal_vendas_manual_" + DateUtil.getStringDate(Calendar.getInstance().getTime(), "yyyyMMddhhmmss");
|
||||
|
||||
File arquivo = File.createTempFile(nomeArquivo, ".txt");
|
||||
|
||||
PrintWriter writer = new PrintWriter(new OutputStreamWriter(new FileOutputStream(arquivo), Constantes.UTF_8));
|
||||
|
||||
adicionarRegistroRMDTipoCAB(writer, dataInicial, dataFinal, nomeEmpresa);
|
||||
adicionarRegistroRMDTipoPAR(writer, listaRegistroRMDTipoPAR);
|
||||
adicionarRegistroRMDTipoRMD(writer, listaRegistroRMDTipoRMD);
|
||||
adicionarRegistroRMDTipoBPS(writer, listaRegistroRMDTipoBPS);
|
||||
adicionarRegistroRMDTipoDBP(writer, listaRegistroRMDTipoBPS);
|
||||
|
||||
writer.close();
|
||||
|
||||
return arquivo;
|
||||
|
||||
} catch (IOException e) {
|
||||
log.error( e.getMessage(), e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private void adicionarRegistroRMDTipoCAB(PrintWriter writer, Date dataInicial, Date dataFinal, String nomeEmpresa) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("CAB");
|
||||
sb.append("63");
|
||||
sb.append("TotalBus");
|
||||
sb.append(new SimpleDateFormat("yyyyMMdd").format(new Date()));
|
||||
sb.append(formataCaracter(nomeEmpresa, false, 15));
|
||||
sb.append(new SimpleDateFormat("yyyyMMdd").format(dataInicial));
|
||||
sb.append(new SimpleDateFormat("yyyyMMdd").format(dataFinal));
|
||||
sb.append("TotalBus AL BPR " + new SimpleDateFormat("yyyyMM").format(dataFinal));
|
||||
sb.append("N");
|
||||
|
||||
writer.print(sb.toString() + UtiliteriasFiscal.QUEBRA_LINHA);
|
||||
}
|
||||
|
||||
private void adicionarRegistroRMDTipoPAR(PrintWriter writer, List<ExportacaoRMDTipoPAR> listaRegistroRMDTipoPAR) {
|
||||
Integer codigoParticipante = 7;
|
||||
String nomeParticipante = "EXPRESSO GUANABARA S/A";
|
||||
String ufParticipante = "AL";
|
||||
String cpfParticipante = "41550112004514";
|
||||
String ieParticipante = "241034574";
|
||||
String imParticipante = "";
|
||||
String logradouro = "AV. GOV. LAMENHA FILHO. TERM.RODOV. MACEIO/AL";
|
||||
Integer numero = 10;
|
||||
String complemento = "";
|
||||
String bairro = "";
|
||||
Integer cep = 0;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("PAR");
|
||||
sb.append(formataNumerico(codigoParticipante, true, 9));
|
||||
sb.append(formataCaracter(nomeParticipante, false, 60));
|
||||
sb.append(formataCaracter(ufParticipante, false, 2));
|
||||
sb.append(formataCaracter(cpfParticipante, true, 14));
|
||||
sb.append(formataCaracter(ieParticipante, true, 14));
|
||||
sb.append(formataCaracter(imParticipante, true, 20));
|
||||
sb.append("N");
|
||||
sb.append("N");
|
||||
sb.append("N");
|
||||
sb.append("N");
|
||||
sb.append("N");
|
||||
sb.append("N");
|
||||
sb.append("N");
|
||||
sb.append("0");
|
||||
sb.append(formataCaracter(logradouro, false, 60));
|
||||
sb.append(formataNumerico(numero, true, 6));
|
||||
sb.append(formataCaracter(complemento, false, 60));
|
||||
sb.append("0");
|
||||
sb.append(formataCaracter(bairro, false, 50));
|
||||
sb.append(formataNumerico(cep, true, 8));
|
||||
sb.append(formataCaracter(VAZIO, false, 5)); // Posição 23
|
||||
sb.append(formataCaracter(VAZIO, false, 3)); // Posição 24
|
||||
sb.append(formataCaracter(VAZIO, false, 9)); // Posição 25
|
||||
sb.append(formataCaracter(VAZIO, false, 14)); // Posição 26
|
||||
sb.append("N");
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 28
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 29
|
||||
sb.append("1558");
|
||||
sb.append("N");
|
||||
sb.append("N");
|
||||
sb.append(formataCaracter(VAZIO, false, 60)); // Posição 33
|
||||
sb.append(VAZIO); // Posição 34
|
||||
sb.append(VAZIO); // Posição 35
|
||||
sb.append(formataCaracter(VAZIO, false, 7)); // Posição 36
|
||||
|
||||
writer.print(sb.toString() + UtiliteriasFiscal.QUEBRA_LINHA);
|
||||
}
|
||||
|
||||
private void adicionarRegistroRMDTipoRMD(PrintWriter writer, List<ExportacaoRMDTipoRMD> listaRegistroRMDTipoRMD) {
|
||||
Integer codigoEstabelecimento = 8;
|
||||
Integer numeroAIDF = 114034303;
|
||||
String serieAIDF = "F";
|
||||
String subSerieAIDF = "";
|
||||
Integer numeroBilheteAIDF = 2723;
|
||||
Integer numeroFormularioAIDF = 2723;
|
||||
String dataEmissao = "20160501";
|
||||
Boolean cancelado = Boolean.FALSE;
|
||||
Integer codigoParticipante = 7;
|
||||
String codigoContabil = "31102010010001";
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("RMD");
|
||||
sb.append(formataNumerico(codigoEstabelecimento, true, 9));
|
||||
sb.append(formataNumerico(numeroAIDF, true, 25));
|
||||
sb.append(formataCaracter(serieAIDF, false, 3));
|
||||
sb.append(formataCaracter(subSerieAIDF, false, 3));
|
||||
sb.append(formataNumerico(numeroBilheteAIDF, true, 6));
|
||||
sb.append(formataNumerico(numeroFormularioAIDF, true, 6));
|
||||
sb.append(formataCaracter(dataEmissao, false, 6));
|
||||
sb.append(cancelado ? "S" : "N");
|
||||
sb.append(""); // Posição 10
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 11
|
||||
sb.append(formataCaracter(VAZIO, false, 4)); // Posição 12
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 13
|
||||
sb.append(formataCaracter(VAZIO, false, 5)); // Posição 14
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 15
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 16
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 17
|
||||
sb.append(formataNumerico(codigoParticipante, true, 9));
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 19
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 20
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 21
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 22
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 23
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 24
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 25
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 26
|
||||
sb.append("01");
|
||||
sb.append("01");
|
||||
sb.append(formataNumerico(codigoContabil, true, 9));
|
||||
sb.append(formataCaracter(VAZIO, false, 9)); // Posição 30
|
||||
sb.append(formataCaracter(VAZIO, false, 9)); // Posição 31
|
||||
sb.append(formataCaracter(VAZIO, false, 9)); // Posição 32
|
||||
sb.append(formataCaracter(VAZIO, false, 8)); // Posição 33
|
||||
sb.append(formataCaracter(VAZIO, false, 3)); // Posição 32
|
||||
sb.append(formataCaracter(VAZIO, false, 3)); // Posição 33
|
||||
|
||||
writer.print(sb.toString() + UtiliteriasFiscal.QUEBRA_LINHA);
|
||||
}
|
||||
|
||||
private void adicionarRegistroRMDTipoBPS(PrintWriter writer, List<ExportacaoRMDTipoBPS> listaRegistroRMDTipoBPS) {
|
||||
Integer codigoEstabelecimento = 8;
|
||||
String especie = "BPR";
|
||||
Integer numeroAIDF = 114034303;
|
||||
String serieAIDF = "F";
|
||||
String subSerieAIDF = "";
|
||||
String numeroInicial = "039384";
|
||||
String numeroFinal = "039386";
|
||||
Integer quantidadeCancelados = 0;
|
||||
String dataEmissao = "20160501";
|
||||
BigDecimal valorTotal = new BigDecimal("114.82");
|
||||
Boolean resumoMovimentoDiario = Boolean.TRUE;
|
||||
Integer numeroAIDFRMD = 114034303;
|
||||
String serieAIDFRMD = "F";
|
||||
String subSerieAIDFRMD = "";
|
||||
Integer numeroRMD = 2723;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("BPS");
|
||||
sb.append(formataNumerico(codigoEstabelecimento, true, 9));
|
||||
sb.append(formataCaracter(especie, false, 5));
|
||||
sb.append(formataNumerico(numeroAIDF, true, 25));
|
||||
sb.append(formataCaracter(serieAIDF, false, 3));
|
||||
sb.append(formataCaracter(subSerieAIDF, false, 3));
|
||||
sb.append(formataCaracter(numeroInicial, true, 6));
|
||||
sb.append(formataCaracter(numeroFinal, true, 6));
|
||||
sb.append(formataNumerico(quantidadeCancelados, true, 9));
|
||||
sb.append(formataCaracter(numeroInicial, true, 6));
|
||||
sb.append(formataCaracter(numeroFinal, true, 6));
|
||||
sb.append(formataCaracter(dataEmissao, true, 8));
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(resumoMovimentoDiario ? "S" : "N");
|
||||
sb.append(formataNumerico(numeroAIDFRMD, true, 25));
|
||||
sb.append(formataCaracter(serieAIDFRMD, false, 3));
|
||||
sb.append(formataCaracter(subSerieAIDFRMD, false, 3));
|
||||
sb.append(formataNumerico(numeroRMD, true, 6));
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 21
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 22
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 23
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 24
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 25
|
||||
sb.append(formataCaracter(VAZIO, false, 15)); // Posição 26
|
||||
sb.append(""); // Posição 27
|
||||
sb.append("01");
|
||||
sb.append("01");
|
||||
sb.append(formataCaracter(VAZIO, false, 3)); // Posição 30
|
||||
sb.append(formataCaracter(VAZIO, false, 3)); // Posição 31
|
||||
sb.append(formataCaracter(VAZIO, false, 8)); // Posição 32
|
||||
|
||||
writer.print(sb.toString() + UtiliteriasFiscal.QUEBRA_LINHA);
|
||||
}
|
||||
|
||||
private void adicionarRegistroRMDTipoDBP(PrintWriter writer, List<ExportacaoRMDTipoBPS> listaRegistroRMDTipoBPS) {
|
||||
String ufDestino = "MA";
|
||||
Integer cfop = 6357; // IM=5357; Serviço IE= 6357
|
||||
BigDecimal valorTotal = new BigDecimal("114.82");
|
||||
BigDecimal valorBaseCalculoICMS = new BigDecimal("114.82");
|
||||
String aliquotaICMS = "17";
|
||||
BigDecimal valorICMSDebitado = new BigDecimal("114.82");
|
||||
BigDecimal valorICMSIsento = BigDecimal.ZERO;
|
||||
BigDecimal valorICMSOutros = BigDecimal.ZERO;
|
||||
Integer codigoSituacaoTribColunaB = 0; // 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
String ufOrigem = "RN";
|
||||
Integer municipioOrigem = 8003;
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("DBP");
|
||||
sb.append(formataCaracter(ufDestino, true, 2));
|
||||
sb.append(formataNumerico(cfop, true, 4));
|
||||
sb.append(formataValor(valorTotal, 15));
|
||||
sb.append(formataValor(valorBaseCalculoICMS, 15));
|
||||
sb.append(formataCaracter(aliquotaICMS, false, 5));
|
||||
sb.append(formataValor(valorICMSDebitado, 15));
|
||||
sb.append(formataValor(valorICMSIsento, 15));
|
||||
sb.append(formataValor(valorICMSOutros, 15));
|
||||
sb.append(formataNumerico(codigoSituacaoTribColunaB, true, 2));
|
||||
sb.append(formataCaracter(ufOrigem, true, 2));
|
||||
sb.append(formataNumerico(municipioOrigem, true, 5));
|
||||
sb.append(formataCaracter(VAZIO, false, 3)); // Posição 13
|
||||
|
||||
writer.print(sb.toString() + UtiliteriasFiscal.QUEBRA_LINHA);
|
||||
}
|
||||
|
||||
private String formataCaracter(String valor, boolean removeMascara, int tamanho) {
|
||||
if (valor == null) {
|
||||
valor = "";
|
||||
}
|
||||
|
||||
if (removeMascara) {
|
||||
valor = valor.replace("-", "").replace(".", "").replace("/", "");
|
||||
}
|
||||
|
||||
if (valor.length() > tamanho) {
|
||||
valor = valor.substring(0, tamanho);
|
||||
}
|
||||
|
||||
return String.format("%1$-" + tamanho + "s", valor);
|
||||
}
|
||||
|
||||
private String formataNumerico(final String valor, final boolean removeMascara, final int tamanho) {
|
||||
String retorno = StringUtils.trim(valor);
|
||||
|
||||
if (retorno == null) {
|
||||
retorno = "";
|
||||
}
|
||||
|
||||
if (removeMascara) {
|
||||
retorno = retorno.replace("-", "").replace(".", "").replace("/", "");
|
||||
}
|
||||
|
||||
retorno = retorno.replace(".", "").replace(",","");
|
||||
|
||||
if (tamanho > 0) {
|
||||
if (retorno.length() > tamanho) {
|
||||
retorno = retorno.substring(retorno.length() - tamanho, retorno.length());
|
||||
}
|
||||
|
||||
return StringUtils.leftPad(retorno, tamanho, "0");
|
||||
}
|
||||
|
||||
return retorno;
|
||||
}
|
||||
|
||||
private String formataNumerico(final Integer valor, final boolean removeMascara, final int tamanho) {
|
||||
if (valor == null) {
|
||||
return formataCaracter(" ", true, tamanho);
|
||||
} else {
|
||||
return formataNumerico(valor.toString(), removeMascara, tamanho);
|
||||
}
|
||||
}
|
||||
|
||||
private String formataValor(final BigDecimal valor, final int tamanho) {
|
||||
if (valor == null) {
|
||||
return formataCaracter(" ", true, tamanho);
|
||||
} else {
|
||||
return formataNumerico(valor.setScale(2).toString(), false, tamanho);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class ExportacaoECFTipoCCF {
|
||||
private Integer coo;
|
||||
private BigDecimal valorServico;
|
||||
private BigDecimal descontoGlobal;
|
||||
private Integer codigoParticipante;
|
||||
private Integer situacaoCOO; // 0 - Documento Regular; 2 - Documento Cancelado
|
||||
private BigDecimal acrescimo;
|
||||
private String ufOrigem;
|
||||
private Integer municipioOrigem;
|
||||
private String ufDestino;
|
||||
private Integer cfop; // IM=5357; Serviço IE= 6357
|
||||
private Integer codigoSituacaoTribColunaB; // 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
private BigDecimal valorTotal;
|
||||
private Integer tributacaoICMS; // 1 - Demais; 2 - Região Metropolitanao ou seja, quando o campo CSTB for "40", esse campo deve vir "2". Do contrário, deve vir "1"
|
||||
private BigDecimal valorBaseCalculoICMS;
|
||||
private String aliquotaICMS;
|
||||
|
||||
public ExportacaoECFTipoCCF() {
|
||||
|
||||
}
|
||||
|
||||
public Integer getCoo() {
|
||||
return coo;
|
||||
}
|
||||
|
||||
public void setCoo(Integer coo) {
|
||||
this.coo = coo;
|
||||
}
|
||||
|
||||
public BigDecimal getValorServico() {
|
||||
return valorServico;
|
||||
}
|
||||
|
||||
public void setValorServico(BigDecimal valorServico) {
|
||||
this.valorServico = valorServico;
|
||||
}
|
||||
|
||||
public BigDecimal getDescontoGlobal() {
|
||||
return descontoGlobal;
|
||||
}
|
||||
|
||||
public void setDescontoGlobal(BigDecimal descontoGlobal) {
|
||||
this.descontoGlobal = descontoGlobal;
|
||||
}
|
||||
|
||||
public Integer getCodigoParticipante() {
|
||||
return codigoParticipante;
|
||||
}
|
||||
|
||||
public void setCodigoParticipante(Integer codigoParticipante) {
|
||||
this.codigoParticipante = codigoParticipante;
|
||||
}
|
||||
|
||||
public Integer getSituacaoCOO() {
|
||||
return situacaoCOO;
|
||||
}
|
||||
|
||||
public void setSituacaoCOO(Integer situacaoCOO) {
|
||||
this.situacaoCOO = situacaoCOO;
|
||||
}
|
||||
|
||||
public BigDecimal getAcrescimo() {
|
||||
return acrescimo;
|
||||
}
|
||||
|
||||
public void setAcrescimo(BigDecimal acrescimo) {
|
||||
this.acrescimo = acrescimo;
|
||||
}
|
||||
|
||||
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 String getUfDestino() {
|
||||
return ufDestino;
|
||||
}
|
||||
|
||||
public void setUfDestino(String ufDestino) {
|
||||
this.ufDestino = ufDestino;
|
||||
}
|
||||
|
||||
public Integer getCfop() {
|
||||
return cfop;
|
||||
}
|
||||
|
||||
public void setCfop(Integer cfop) {
|
||||
this.cfop = cfop;
|
||||
}
|
||||
|
||||
public Integer getCodigoSituacaoTribColunaB() {
|
||||
return codigoSituacaoTribColunaB;
|
||||
}
|
||||
|
||||
public void setCodigoSituacaoTribColunaB(Integer codigoSituacaoTribColunaB) {
|
||||
this.codigoSituacaoTribColunaB = codigoSituacaoTribColunaB;
|
||||
}
|
||||
|
||||
public BigDecimal getValorTotal() {
|
||||
return valorTotal;
|
||||
}
|
||||
|
||||
public void setValorTotal(BigDecimal valorTotal) {
|
||||
this.valorTotal = valorTotal;
|
||||
}
|
||||
|
||||
public Integer getTributacaoICMS() {
|
||||
return tributacaoICMS;
|
||||
}
|
||||
|
||||
public void setTributacaoICMS(Integer tributacaoICMS) {
|
||||
this.tributacaoICMS = tributacaoICMS;
|
||||
}
|
||||
|
||||
public BigDecimal getValorBaseCalculoICMS() {
|
||||
return valorBaseCalculoICMS;
|
||||
}
|
||||
|
||||
public void setValorBaseCalculoICMS(BigDecimal valorBaseCalculoICMS) {
|
||||
this.valorBaseCalculoICMS = valorBaseCalculoICMS;
|
||||
}
|
||||
|
||||
public String getAliquotaICMS() {
|
||||
return aliquotaICMS;
|
||||
}
|
||||
|
||||
public void setAliquotaICMS(String aliquotaICMS) {
|
||||
this.aliquotaICMS = aliquotaICMS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExportacaoECFTipoCCF [coo=" + coo + ", valorServico=" + valorServico + ", descontoGlobal=" + descontoGlobal + ", codigoParticipante=" + codigoParticipante + ", situacaoCOO=" + situacaoCOO + ", acrescimo=" + acrescimo + ", ufOrigem=" + ufOrigem + ", municipioOrigem=" + municipioOrigem + ", ufDestino=" + ufDestino + ", cfop=" + cfop + ", codigoSituacaoTribColunaB=" + codigoSituacaoTribColunaB + ", valorTotal=" + valorTotal + ", tributacaoICMS=" + tributacaoICMS + ", valorBaseCalculoICMS=" + valorBaseCalculoICMS + ", aliquotaICMS=" + aliquotaICMS + "]";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class ExportacaoECFTipoCFC {
|
||||
private Integer estabelecimento;
|
||||
private String dataEmissao;
|
||||
private Integer numeroIdentificacaoECF;
|
||||
private Integer cooReducaoZ;
|
||||
private Integer cooInicial;
|
||||
private Integer cooFinal;
|
||||
private Integer contadorReducao;
|
||||
private Integer cro;
|
||||
private BigDecimal valorTotal;
|
||||
private BigDecimal valorIsentas;
|
||||
private Integer estabelecimentoECF;
|
||||
|
||||
public ExportacaoECFTipoCFC() {
|
||||
|
||||
}
|
||||
|
||||
public Integer getEstabelecimento() {
|
||||
return estabelecimento;
|
||||
}
|
||||
|
||||
public void setEstabelecimento(Integer estabelecimento) {
|
||||
this.estabelecimento = estabelecimento;
|
||||
}
|
||||
|
||||
public String getDataEmissao() {
|
||||
return dataEmissao;
|
||||
}
|
||||
|
||||
public void setDataEmissao(String dataEmissao) {
|
||||
this.dataEmissao = dataEmissao;
|
||||
}
|
||||
|
||||
public Integer getNumeroIdentificacaoECF() {
|
||||
return numeroIdentificacaoECF;
|
||||
}
|
||||
|
||||
public void setNumeroIdentificacaoECF(Integer numeroIdentificacaoECF) {
|
||||
this.numeroIdentificacaoECF = numeroIdentificacaoECF;
|
||||
}
|
||||
|
||||
public Integer getCooReducaoZ() {
|
||||
return cooReducaoZ;
|
||||
}
|
||||
|
||||
public void setCooReducaoZ(Integer cooReducaoZ) {
|
||||
this.cooReducaoZ = cooReducaoZ;
|
||||
}
|
||||
|
||||
public Integer getCooInicial() {
|
||||
return cooInicial;
|
||||
}
|
||||
|
||||
public void setCooInicial(Integer cooInicial) {
|
||||
this.cooInicial = cooInicial;
|
||||
}
|
||||
|
||||
public Integer getCooFinal() {
|
||||
return cooFinal;
|
||||
}
|
||||
|
||||
public void setCooFinal(Integer cooFinal) {
|
||||
this.cooFinal = cooFinal;
|
||||
}
|
||||
|
||||
public Integer getContadorReducao() {
|
||||
return contadorReducao;
|
||||
}
|
||||
|
||||
public void setContadorReducao(Integer contadorReducao) {
|
||||
this.contadorReducao = contadorReducao;
|
||||
}
|
||||
|
||||
public Integer getCro() {
|
||||
return cro;
|
||||
}
|
||||
|
||||
public void setCro(Integer cro) {
|
||||
this.cro = cro;
|
||||
}
|
||||
|
||||
public BigDecimal getValorTotal() {
|
||||
return valorTotal;
|
||||
}
|
||||
|
||||
public void setValorTotal(BigDecimal valorTotal) {
|
||||
this.valorTotal = valorTotal;
|
||||
}
|
||||
|
||||
public BigDecimal getValorIsentas() {
|
||||
return valorIsentas;
|
||||
}
|
||||
|
||||
public void setValorIsentas(BigDecimal valorIsentas) {
|
||||
this.valorIsentas = valorIsentas;
|
||||
}
|
||||
|
||||
public Integer getEstabelecimentoECF() {
|
||||
return estabelecimentoECF;
|
||||
}
|
||||
|
||||
public void setEstabelecimentoECF(Integer estabelecimentoECF) {
|
||||
this.estabelecimentoECF = estabelecimentoECF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExportacaoECFTipoCFC [estabelecimento=" + estabelecimento + ", dataEmissao=" + dataEmissao + ", numeroIdentificacaoECF=" + numeroIdentificacaoECF + ", cooReducaoZ=" + cooReducaoZ + ", cooInicial=" + cooInicial + ", cooFinal=" + cooFinal + ", contadorReducao=" + contadorReducao + ", cro=" + cro + ", valorTotal=" + valorTotal + ", valorIsentas=" + valorIsentas + ", estabelecimentoECF=" + estabelecimentoECF + "]";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class ExportacaoECFTipoICF {
|
||||
private BigDecimal valorTotal;
|
||||
private String ufDestino;
|
||||
private Integer cfop; // IM=5357; Serviço IE= 6357
|
||||
private BigDecimal valorBaseCalculoICMS;
|
||||
private String aliquotaICMS;
|
||||
private BigDecimal valorICMSDebitado;
|
||||
private BigDecimal valorICMSIsento;
|
||||
private BigDecimal valorICMSOutros;
|
||||
private Integer codigoSituacaoTribColunaB; // 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
private String ufOrigem;
|
||||
private Integer municipioOrigem;
|
||||
|
||||
public ExportacaoECFTipoICF() {
|
||||
|
||||
}
|
||||
|
||||
public BigDecimal getValorTotal() {
|
||||
return valorTotal;
|
||||
}
|
||||
|
||||
public void setValorTotal(BigDecimal valorTotal) {
|
||||
this.valorTotal = valorTotal;
|
||||
}
|
||||
|
||||
public String getUfDestino() {
|
||||
return ufDestino;
|
||||
}
|
||||
|
||||
public void setUfDestino(String ufDestino) {
|
||||
this.ufDestino = ufDestino;
|
||||
}
|
||||
|
||||
public Integer getCfop() {
|
||||
return cfop;
|
||||
}
|
||||
|
||||
public void setCfop(Integer cfop) {
|
||||
this.cfop = cfop;
|
||||
}
|
||||
|
||||
public BigDecimal getValorBaseCalculoICMS() {
|
||||
return valorBaseCalculoICMS;
|
||||
}
|
||||
|
||||
public void setValorBaseCalculoICMS(BigDecimal valorBaseCalculoICMS) {
|
||||
this.valorBaseCalculoICMS = valorBaseCalculoICMS;
|
||||
}
|
||||
|
||||
public String getAliquotaICMS() {
|
||||
return aliquotaICMS;
|
||||
}
|
||||
|
||||
public void setAliquotaICMS(String aliquotaICMS) {
|
||||
this.aliquotaICMS = aliquotaICMS;
|
||||
}
|
||||
|
||||
public BigDecimal getValorICMSDebitado() {
|
||||
return valorICMSDebitado;
|
||||
}
|
||||
|
||||
public void setValorICMSDebitado(BigDecimal valorICMSDebitado) {
|
||||
this.valorICMSDebitado = valorICMSDebitado;
|
||||
}
|
||||
|
||||
public BigDecimal getValorICMSIsento() {
|
||||
return valorICMSIsento;
|
||||
}
|
||||
|
||||
public void setValorICMSIsento(BigDecimal valorICMSIsento) {
|
||||
this.valorICMSIsento = valorICMSIsento;
|
||||
}
|
||||
|
||||
public BigDecimal getValorICMSOutros() {
|
||||
return valorICMSOutros;
|
||||
}
|
||||
|
||||
public void setValorICMSOutros(BigDecimal valorICMSOutros) {
|
||||
this.valorICMSOutros = valorICMSOutros;
|
||||
}
|
||||
|
||||
public Integer getCodigoSituacaoTribColunaB() {
|
||||
return codigoSituacaoTribColunaB;
|
||||
}
|
||||
|
||||
public void setCodigoSituacaoTribColunaB(Integer codigoSituacaoTribColunaB) {
|
||||
this.codigoSituacaoTribColunaB = codigoSituacaoTribColunaB;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExportacaoECFTipoICF [valorTotal=" + valorTotal + ", ufDestino=" + ufDestino + ", cfop=" + cfop + ", valorBaseCalculoICMS=" + valorBaseCalculoICMS + ", aliquotaICMS=" + aliquotaICMS + ", valorICMSDebitado=" + valorICMSDebitado + ", valorICMSIsento=" + valorICMSIsento + ", valorICMSOutros=" + valorICMSOutros + ", codigoSituacaoTribColunaB=" + codigoSituacaoTribColunaB + ", ufOrigem=" + ufOrigem + ", municipioOrigem=" + municipioOrigem + "]";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class ExportacaoECFTipoPRC {
|
||||
private String ufOrigem;
|
||||
private Integer municipioOrigem ;
|
||||
private BigDecimal valorTotal;
|
||||
private BigDecimal valorBaseCalculoICMS;
|
||||
private BigDecimal valorICMS;
|
||||
|
||||
public ExportacaoECFTipoPRC() {
|
||||
|
||||
}
|
||||
|
||||
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 BigDecimal getValorTotal() {
|
||||
return valorTotal;
|
||||
}
|
||||
|
||||
public void setValorTotal(BigDecimal valorTotal) {
|
||||
this.valorTotal = valorTotal;
|
||||
}
|
||||
|
||||
public BigDecimal getValorBaseCalculoICMS() {
|
||||
return valorBaseCalculoICMS;
|
||||
}
|
||||
|
||||
public void setValorBaseCalculoICMS(BigDecimal valorBaseCalculoICMS) {
|
||||
this.valorBaseCalculoICMS = valorBaseCalculoICMS;
|
||||
}
|
||||
|
||||
public BigDecimal getValorICMS() {
|
||||
return valorICMS;
|
||||
}
|
||||
|
||||
public void setValorICMS(BigDecimal valorICMS) {
|
||||
this.valorICMS = valorICMS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExportacaoECFTipoPRC [ufOrigem=" + ufOrigem + ", municipioOrigem=" + municipioOrigem + ", valorTotal=" + valorTotal + ", valorBaseCalculoICMS=" + valorBaseCalculoICMS + ", valorICMS=" + valorICMS + "]";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,150 @@
|
|||
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class ExportacaoRMDTipoBPS {
|
||||
private Integer codigoEstabelecimento;
|
||||
private String especie;
|
||||
private Integer numeroAIDF;
|
||||
private String serieAIDF;
|
||||
private String subSerieAIDF;
|
||||
private String numeroInicial;
|
||||
private String numeroFinal;
|
||||
private Integer quantidadeCancelados;
|
||||
private String dataEmissao;
|
||||
private BigDecimal valorTotal;
|
||||
private Boolean resumoMovimentoDiario;
|
||||
private Integer numeroAIDFRMD;
|
||||
private String serieAIDFRMD;
|
||||
private String subSerieAIDFRMD;
|
||||
private Integer numeroRMD;
|
||||
|
||||
public ExportacaoRMDTipoBPS() {
|
||||
|
||||
}
|
||||
|
||||
public Integer getCodigoEstabelecimento() {
|
||||
return codigoEstabelecimento;
|
||||
}
|
||||
|
||||
public void setCodigoEstabelecimento(Integer codigoEstabelecimento) {
|
||||
this.codigoEstabelecimento = codigoEstabelecimento;
|
||||
}
|
||||
|
||||
public String getEspecie() {
|
||||
return especie;
|
||||
}
|
||||
|
||||
public void setEspecie(String especie) {
|
||||
this.especie = especie;
|
||||
}
|
||||
|
||||
public Integer getNumeroAIDF() {
|
||||
return numeroAIDF;
|
||||
}
|
||||
|
||||
public void setNumeroAIDF(Integer 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 String getNumeroInicial() {
|
||||
return numeroInicial;
|
||||
}
|
||||
|
||||
public void setNumeroInicial(String numeroInicial) {
|
||||
this.numeroInicial = numeroInicial;
|
||||
}
|
||||
|
||||
public String getNumeroFinal() {
|
||||
return numeroFinal;
|
||||
}
|
||||
|
||||
public void setNumeroFinal(String numeroFinal) {
|
||||
this.numeroFinal = numeroFinal;
|
||||
}
|
||||
|
||||
public Integer getQuantidadeCancelados() {
|
||||
return quantidadeCancelados;
|
||||
}
|
||||
|
||||
public void setQuantidadeCancelados(Integer quantidadeCancelados) {
|
||||
this.quantidadeCancelados = quantidadeCancelados;
|
||||
}
|
||||
|
||||
public String getDataEmissao() {
|
||||
return dataEmissao;
|
||||
}
|
||||
|
||||
public void setDataEmissao(String dataEmissao) {
|
||||
this.dataEmissao = dataEmissao;
|
||||
}
|
||||
|
||||
public BigDecimal getValorTotal() {
|
||||
return valorTotal;
|
||||
}
|
||||
|
||||
public void setValorTotal(BigDecimal valorTotal) {
|
||||
this.valorTotal = valorTotal;
|
||||
}
|
||||
|
||||
public Boolean getResumoMovimentoDiario() {
|
||||
return resumoMovimentoDiario;
|
||||
}
|
||||
|
||||
public void setResumoMovimentoDiario(Boolean resumoMovimentoDiario) {
|
||||
this.resumoMovimentoDiario = resumoMovimentoDiario;
|
||||
}
|
||||
|
||||
public Integer getNumeroAIDFRMD() {
|
||||
return numeroAIDFRMD;
|
||||
}
|
||||
|
||||
public void setNumeroAIDFRMD(Integer 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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExportacaoRMDTipoBPS [codigoEstabelecimento=" + codigoEstabelecimento + ", especie=" + especie + ", numeroAIDF=" + numeroAIDF + ", serieAIDF=" + serieAIDF + ", subSerieAIDF=" + subSerieAIDF + ", numeroInicial=" + numeroInicial + ", numeroFinal=" + numeroFinal + ", quantidadeCancelados=" + quantidadeCancelados + ", dataEmissao=" + dataEmissao + ", valorTotal=" + valorTotal + ", resumoMovimentoDiario=" + resumoMovimentoDiario + ", numeroAIDFRMD=" + numeroAIDFRMD + ", serieAIDFRMD=" + serieAIDFRMD + ", subSerieAIDFRMD=" + subSerieAIDFRMD + ", numeroRMD=" + numeroRMD + "]";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class ExportacaoRMDTipoDBP {
|
||||
private String ufDestino;
|
||||
private Integer cfop; // IM=5357; Serviço IE= 6357
|
||||
private BigDecimal valorTotal;
|
||||
private BigDecimal valorBaseCalculoICMS;
|
||||
private String aliquotaICMS;
|
||||
private BigDecimal valorICMSDebitado;
|
||||
private BigDecimal valorICMSIsento;
|
||||
private BigDecimal valorICMSOutros;
|
||||
private Integer codigoSituacaoTribColunaB; // 00 - tributação normal; 20 - tributação com redução na base de calculo; 40 - isentos
|
||||
private String ufOrigem;
|
||||
private Integer municipioOrigem;
|
||||
|
||||
public ExportacaoRMDTipoDBP() {
|
||||
|
||||
}
|
||||
|
||||
public String getUfDestino() {
|
||||
return ufDestino;
|
||||
}
|
||||
|
||||
public void setUfDestino(String ufDestino) {
|
||||
this.ufDestino = ufDestino;
|
||||
}
|
||||
|
||||
public Integer getCfop() {
|
||||
return cfop;
|
||||
}
|
||||
|
||||
public void setCfop(Integer cfop) {
|
||||
this.cfop = cfop;
|
||||
}
|
||||
|
||||
public BigDecimal getValorTotal() {
|
||||
return valorTotal;
|
||||
}
|
||||
|
||||
public void setValorTotal(BigDecimal valorTotal) {
|
||||
this.valorTotal = valorTotal;
|
||||
}
|
||||
|
||||
public BigDecimal getValorBaseCalculoICMS() {
|
||||
return valorBaseCalculoICMS;
|
||||
}
|
||||
|
||||
public void setValorBaseCalculoICMS(BigDecimal valorBaseCalculoICMS) {
|
||||
this.valorBaseCalculoICMS = valorBaseCalculoICMS;
|
||||
}
|
||||
|
||||
public String getAliquotaICMS() {
|
||||
return aliquotaICMS;
|
||||
}
|
||||
|
||||
public void setAliquotaICMS(String aliquotaICMS) {
|
||||
this.aliquotaICMS = aliquotaICMS;
|
||||
}
|
||||
|
||||
public BigDecimal getValorICMSDebitado() {
|
||||
return valorICMSDebitado;
|
||||
}
|
||||
|
||||
public void setValorICMSDebitado(BigDecimal valorICMSDebitado) {
|
||||
this.valorICMSDebitado = valorICMSDebitado;
|
||||
}
|
||||
|
||||
public BigDecimal getValorICMSIsento() {
|
||||
return valorICMSIsento;
|
||||
}
|
||||
|
||||
public void setValorICMSIsento(BigDecimal valorICMSIsento) {
|
||||
this.valorICMSIsento = valorICMSIsento;
|
||||
}
|
||||
|
||||
public BigDecimal getValorICMSOutros() {
|
||||
return valorICMSOutros;
|
||||
}
|
||||
|
||||
public void setValorICMSOutros(BigDecimal valorICMSOutros) {
|
||||
this.valorICMSOutros = valorICMSOutros;
|
||||
}
|
||||
|
||||
public Integer getCodigoSituacaoTribColunaB() {
|
||||
return codigoSituacaoTribColunaB;
|
||||
}
|
||||
|
||||
public void setCodigoSituacaoTribColunaB(Integer codigoSituacaoTribColunaB) {
|
||||
this.codigoSituacaoTribColunaB = codigoSituacaoTribColunaB;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExportacaoRMDTipoDBP [ufDestino=" + ufDestino + ", cfop=" + cfop + ", valorTotal=" + valorTotal + ", valorBaseCalculoICMS=" + valorBaseCalculoICMS + ", aliquotaICMS=" + aliquotaICMS + ", valorICMSDebitado=" + valorICMSDebitado + ", valorICMSIsento=" + valorICMSIsento + ", valorICMSOutros=" + valorICMSOutros + ", codigoSituacaoTribColunaB=" + codigoSituacaoTribColunaB + ", ufOrigem=" + ufOrigem + ", municipioOrigem=" + municipioOrigem + "]";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,112 @@
|
|||
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo;
|
||||
|
||||
public class ExportacaoRMDTipoPAR {
|
||||
private Integer codigoParticipante;
|
||||
private String nomeParticipante;
|
||||
private String ufParticipante;
|
||||
private String cpfParticipante;
|
||||
private String ieParticipante;
|
||||
private String imParticipante;
|
||||
private String logradouro;
|
||||
private Integer numero;
|
||||
private String complemento;
|
||||
private String bairro;
|
||||
private Integer cep;
|
||||
|
||||
public ExportacaoRMDTipoPAR() {
|
||||
|
||||
}
|
||||
|
||||
public Integer getCodigoParticipante() {
|
||||
return codigoParticipante;
|
||||
}
|
||||
|
||||
public void setCodigoParticipante(Integer codigoParticipante) {
|
||||
this.codigoParticipante = codigoParticipante;
|
||||
}
|
||||
|
||||
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 Integer getNumero() {
|
||||
return numero;
|
||||
}
|
||||
|
||||
public void setNumero(Integer 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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExportacaoRMDTipoPAR [codigoParticipante=" + codigoParticipante + ", nomeParticipante=" + nomeParticipante + ", ufParticipante=" + ufParticipante + ", cpfParticipante=" + cpfParticipante + ", ieParticipante=" + ieParticipante + ", imParticipante=" + imParticipante + ", logradouro=" + logradouro + ", numero=" + numero + ", complemento=" + complemento + ", bairro=" + bairro + ", cep=" + cep + "]";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo;
|
||||
|
||||
public class ExportacaoRMDTipoRMD {
|
||||
private Integer codigoEstabelecimento;
|
||||
private Integer numeroAIDF;
|
||||
private String serieAIDF;
|
||||
private String subSerieAIDF;
|
||||
private Integer numeroBilheteAIDF;
|
||||
private Integer numeroFormularioAIDF;
|
||||
private String dataEmissao;
|
||||
private Boolean cancelado;
|
||||
private Integer codigoParticipante;
|
||||
private String codigoContabil;
|
||||
|
||||
public ExportacaoRMDTipoRMD() {
|
||||
|
||||
}
|
||||
|
||||
public Integer getCodigoEstabelecimento() {
|
||||
return codigoEstabelecimento;
|
||||
}
|
||||
|
||||
public void setCodigoEstabelecimento(Integer codigoEstabelecimento) {
|
||||
this.codigoEstabelecimento = codigoEstabelecimento;
|
||||
}
|
||||
|
||||
public Integer getNumeroAIDF() {
|
||||
return numeroAIDF;
|
||||
}
|
||||
|
||||
public void setNumeroAIDF(Integer 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 Integer getNumeroBilheteAIDF() {
|
||||
return numeroBilheteAIDF;
|
||||
}
|
||||
|
||||
public void setNumeroBilheteAIDF(Integer numeroBilheteAIDF) {
|
||||
this.numeroBilheteAIDF = numeroBilheteAIDF;
|
||||
}
|
||||
|
||||
public Integer getNumeroFormularioAIDF() {
|
||||
return numeroFormularioAIDF;
|
||||
}
|
||||
|
||||
public void setNumeroFormularioAIDF(Integer numeroFormularioAIDF) {
|
||||
this.numeroFormularioAIDF = numeroFormularioAIDF;
|
||||
}
|
||||
|
||||
public String getDataEmissao() {
|
||||
return dataEmissao;
|
||||
}
|
||||
|
||||
public void setDataEmissao(String dataEmissao) {
|
||||
this.dataEmissao = dataEmissao;
|
||||
}
|
||||
|
||||
public Boolean getCancelado() {
|
||||
return cancelado;
|
||||
}
|
||||
|
||||
public void setCancelado(Boolean cancelado) {
|
||||
this.cancelado = cancelado;
|
||||
}
|
||||
|
||||
public Integer getCodigoParticipante() {
|
||||
return codigoParticipante;
|
||||
}
|
||||
|
||||
public void setCodigoParticipante(Integer codigoParticipante) {
|
||||
this.codigoParticipante = codigoParticipante;
|
||||
}
|
||||
|
||||
public String getCodigoContabil() {
|
||||
return codigoContabil;
|
||||
}
|
||||
|
||||
public void setCodigoContabil(String codigoContabil) {
|
||||
this.codigoContabil = codigoContabil;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ExportacaoRMDTipoRMD [codigoEstabelecimento=" + codigoEstabelecimento + ", numeroAIDF=" + numeroAIDF + ", serieAIDF=" + serieAIDF + ", subSerieAIDF=" + subSerieAIDF + ", numeroBilheteAIDF=" + numeroBilheteAIDF + ", numeroFormularioAIDF=" + numeroFormularioAIDF + ", dataEmissao=" + dataEmissao + ", cancelado=" + cancelado + ", codigoParticipante=" + codigoParticipante + ", codigoContabil=" + codigoContabil + "]";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue