bug #8122
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@64238 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
2c8ab342c2
commit
c474b0d1de
|
@ -12,8 +12,10 @@ public interface AidfDAO extends GenericDAO<Aidf, Long> {
|
||||||
|
|
||||||
public List<Aidf> buscaAidfsPorEmpresas(List<Empresa> empresas);
|
public List<Aidf> buscaAidfsPorEmpresas(List<Empresa> empresas);
|
||||||
|
|
||||||
public List<AidfVo> obtenerAidfFromSerieDocfiscal(String serie,String docfiscal, Connection conn);
|
public List<AidfVo> obtenerAidfFromSerieDocfiscal(String serie, String docfiscal, Connection conn);
|
||||||
|
|
||||||
public Boolean existeAidfComCodFiscalEEstado(Long idAidf, String docFiscal, Estado estado);
|
public Boolean existeAidfComCodFiscalEEstado(Long idAidf, String docFiscal, Estado estado);
|
||||||
|
|
||||||
|
public List<Aidf> buscaAidfRMD(Integer empresaId, Integer estadoId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,9 +11,10 @@ import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoEC
|
||||||
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.ExportacaoRMDTipoBPS;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoBPS;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoDBP;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoBRP;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoPAR;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoPAR;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoRMD;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoRMD;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.impressaormd.vo.ImpressaoRMD;
|
||||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalReducaoZVO;
|
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalReducaoZVO;
|
||||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalVO;
|
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalVO;
|
||||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionManualFiscalVO;
|
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionManualFiscalVO;
|
||||||
|
@ -45,6 +46,7 @@ public interface FiscalDAO {
|
||||||
|
|
||||||
public List<ExportacaoRMDTipoBPS> buscarRegistroRMDTipoBPS(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);
|
public List<ExportacaoRMDTipoBRP> buscarRegistroRMDTipoDBP(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado);
|
||||||
|
|
||||||
|
public List<ImpressaoRMD> getRegistroImpressaoRMDTipoDVB(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado, String rmd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ package com.rjconsultores.ventaboletos.dao;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.RegionMetropolitana;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
||||||
|
|
||||||
|
@ -49,4 +50,6 @@ public interface ParadaDAO {
|
||||||
public List<Parada> obtenerTodos();
|
public List<Parada> obtenerTodos();
|
||||||
|
|
||||||
public List<Parada> obterPossiveisDestinos(Parada origem);
|
public List<Parada> obterPossiveisDestinos(Parada origem);
|
||||||
|
|
||||||
|
public List<Parada> buscaParadaRegionMetropolitana(RegionMetropolitana regionMetropolitana);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.RegionMetropolitana;
|
||||||
|
|
||||||
|
public interface RegionMetropolitanaDAO extends GenericDAO<RegionMetropolitana, Long> {
|
||||||
|
|
||||||
|
}
|
|
@ -21,7 +21,7 @@ import com.rjconsultores.ventaboletos.entidad.Estado;
|
||||||
import com.rjconsultores.ventaboletos.vo.aidf.AidfVo;
|
import com.rjconsultores.ventaboletos.vo.aidf.AidfVo;
|
||||||
|
|
||||||
@Repository("aidfDAO")
|
@Repository("aidfDAO")
|
||||||
public class AidfHibernateDAO extends GenericHibernateDAO<Aidf, Long> implements AidfDAO{
|
public class AidfHibernateDAO extends GenericHibernateDAO<Aidf, Long> implements AidfDAO {
|
||||||
|
|
||||||
private static Logger log = Logger.getLogger(AidfHibernateDAO.class);
|
private static Logger log = Logger.getLogger(AidfHibernateDAO.class);
|
||||||
|
|
||||||
|
@ -36,11 +36,11 @@ public class AidfHibernateDAO extends GenericHibernateDAO<Aidf, Long> implements
|
||||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||||
|
|
||||||
return (List<Aidf>)c.list();
|
return (List<Aidf>) c.list();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AidfVo> obtenerAidfFromSerieDocfiscal(String serie, String docfiscal, Connection conn){
|
public List<AidfVo> obtenerAidfFromSerieDocfiscal(String serie, String docfiscal, Connection conn) {
|
||||||
|
|
||||||
PreparedStatement pstmt = null;
|
PreparedStatement pstmt = null;
|
||||||
ResultSet rs = null;
|
ResultSet rs = null;
|
||||||
|
@ -65,18 +65,17 @@ public class AidfHibernateDAO extends GenericHibernateDAO<Aidf, Long> implements
|
||||||
sb.append(" x.SUBSERIE, ");
|
sb.append(" x.SUBSERIE, ");
|
||||||
sb.append(" x.CNPJ, ");
|
sb.append(" x.CNPJ, ");
|
||||||
sb.append(" x.TIPOVALIDAVENTA ");
|
sb.append(" x.TIPOVALIDAVENTA ");
|
||||||
sb.append(" from AIDF x where x.SERIE like '"+serie+"' ");
|
sb.append(" from AIDF x where x.SERIE like '" + serie + "' ");
|
||||||
sb.append(" and REGEXP_REPLACE( x.docfiscal ,'[^[:alnum:]'' '']', NULL) like '"+docfiscal+"' ");
|
sb.append(" and REGEXP_REPLACE( x.docfiscal ,'[^[:alnum:]'' '']', NULL) like '" + docfiscal + "' ");
|
||||||
sb.append(" and x.activo = 1 ");
|
sb.append(" and x.activo = 1 ");
|
||||||
|
|
||||||
|
|
||||||
List<AidfVo> ls = new ArrayList<AidfVo>();
|
List<AidfVo> ls = new ArrayList<AidfVo>();
|
||||||
|
|
||||||
try{
|
try {
|
||||||
pstmt = conn.prepareStatement(sb.toString());
|
pstmt = conn.prepareStatement(sb.toString());
|
||||||
|
|
||||||
rs = pstmt.executeQuery();
|
rs = pstmt.executeQuery();
|
||||||
while (rs.next()){
|
while (rs.next()) {
|
||||||
AidfVo a = new AidfVo();
|
AidfVo a = new AidfVo();
|
||||||
a.setAidfId(rs.getLong(1));
|
a.setAidfId(rs.getLong(1));
|
||||||
a.setDocfiscal(rs.getString(3));
|
a.setDocfiscal(rs.getString(3));
|
||||||
|
@ -85,12 +84,24 @@ public class AidfHibernateDAO extends GenericHibernateDAO<Aidf, Long> implements
|
||||||
a.setFormfinal(rs.getString(7));
|
a.setFormfinal(rs.getString(7));
|
||||||
ls.add(a);
|
ls.add(a);
|
||||||
}
|
}
|
||||||
} catch (Exception e){
|
} catch (Exception e) {
|
||||||
log.error("", e);
|
log.error("", e);
|
||||||
} finally {
|
} finally {
|
||||||
try { rs.close(); } catch (Exception ignore) { log.error("", ignore); }
|
try {
|
||||||
try { pstmt.close(); } catch (Exception ignore) { log.error("", ignore); }
|
rs.close();
|
||||||
try { conn.close(); } catch (Exception ignore) { log.error("", ignore); }
|
} catch (Exception ignore) {
|
||||||
|
log.error("", ignore);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
pstmt.close();
|
||||||
|
} catch (Exception ignore) {
|
||||||
|
log.error("", ignore);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
conn.close();
|
||||||
|
} catch (Exception ignore) {
|
||||||
|
log.error("", ignore);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return ls;
|
return ls;
|
||||||
|
@ -103,20 +114,33 @@ public class AidfHibernateDAO extends GenericHibernateDAO<Aidf, Long> implements
|
||||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||||
c.add(Restrictions.in("empresa", empresas));
|
c.add(Restrictions.in("empresa", empresas));
|
||||||
|
|
||||||
return (List<Aidf>)c.list();
|
return (List<Aidf>) c.list();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean existeAidfComCodFiscalEEstado(Long idAidf, String docFiscal, Estado estado){
|
public Boolean existeAidfComCodFiscalEEstado(Long idAidf, String docFiscal, Estado estado) {
|
||||||
|
|
||||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||||
c.add(Restrictions.eq("estado", estado));
|
c.add(Restrictions.eq("estado", estado));
|
||||||
c.add(Restrictions.eq("docfiscal", docFiscal));
|
c.add(Restrictions.eq("docfiscal", docFiscal));
|
||||||
|
|
||||||
if(idAidf != null){
|
if (idAidf != null) {
|
||||||
c.add(Restrictions.ne("aidfId", idAidf));
|
c.add(Restrictions.ne("aidfId", idAidf));
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.list().isEmpty();
|
return c.list().isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Aidf> buscaAidfRMD(Integer empresaId, Integer estadoId) {
|
||||||
|
|
||||||
|
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||||
|
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||||
|
c.add(Restrictions.eq("estado.estadoId", estadoId));
|
||||||
|
c.add(Restrictions.eq("empresa.empresaId", empresaId));
|
||||||
|
|
||||||
|
// c.add(Restrictions.eq("aidfEspecie.decespecie", "RMD"));
|
||||||
|
|
||||||
|
return (List<Aidf>) c.list();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,8 @@ import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRM
|
||||||
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;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoRMD;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoRMD;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.impressaormd.vo.DetalhadoRMDTipoDVB;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.impressaormd.vo.ImpressaoRMD;
|
||||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalReducaoZVO;
|
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalReducaoZVO;
|
||||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalVO;
|
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalVO;
|
||||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionManualFiscalVO;
|
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionManualFiscalVO;
|
||||||
|
@ -2154,4 +2156,216 @@ public class FiscalHibernateDAO implements FiscalDAO {
|
||||||
|
|
||||||
return retorno;
|
return retorno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<ImpressaoRMD> getRegistroImpressaoRMDTipoDVB(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado, String rmd) {
|
||||||
|
|
||||||
|
List<ImpressaoRMD> list = new ArrayList<ImpressaoRMD>();
|
||||||
|
|
||||||
|
// IMPRESSAO RMD MANUAL
|
||||||
|
|
||||||
|
String serie = null;
|
||||||
|
Date data = null;
|
||||||
|
// int primeiroFolio = 0;
|
||||||
|
int anteriorFolio = 0;
|
||||||
|
|
||||||
|
ImpressaoRMD impRmd = null;
|
||||||
|
|
||||||
|
for (DetalhadoRMDTipoDVB brp : buscarRegistroImpressaoRMDTipoDVB(connection, inicio, fim, empresaId, cveestado)) {
|
||||||
|
|
||||||
|
if (serie == null) {
|
||||||
|
impRmd = new ImpressaoRMD(brp.getEmpresa(), brp.getEnderecoEmpresa(), brp.getCnpjEmpresa(), brp.getIeEmpresa(),
|
||||||
|
brp.getFechorVenta(), rmd, "SERVIÇO DE TRANSPORTE", "DVB", "", brp.getSerie());
|
||||||
|
serie = brp.getSerie();
|
||||||
|
data = brp.getFechorVenta();
|
||||||
|
// primeiroFolio = brp.getFolio();
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (serie.equals(brp.getSerie()) && data.equals(brp.getFechorVenta())) {
|
||||||
|
if (anteriorFolio + 1 == brp.getFolio()) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
impRmd.setNumero(brp.getFolio().toString());
|
||||||
|
list.add(impRmd);
|
||||||
|
impRmd = new ImpressaoRMD(brp.getEmpresa(), brp.getEnderecoEmpresa(), brp.getCnpjEmpresa(), brp.getIeEmpresa(),
|
||||||
|
brp.getFechorVenta(), rmd, "SERVIÇO DE TRANSPORTE", "DVB", "", brp.getSerie());
|
||||||
|
serie = brp.getSerie();
|
||||||
|
data = brp.getFechorVenta();
|
||||||
|
// primeiroFolio = brp.getFolio();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
impRmd.setNumero(brp.getFolio().toString());
|
||||||
|
list.add(impRmd);
|
||||||
|
impRmd = new ImpressaoRMD(brp.getEmpresa(), brp.getEnderecoEmpresa(), brp.getCnpjEmpresa(), brp.getIeEmpresa(),
|
||||||
|
brp.getFechorVenta(), rmd, "SERVIÇO DE TRANSPORTE", "DVB", "", brp.getSerie());
|
||||||
|
serie = brp.getSerie();
|
||||||
|
data = brp.getFechorVenta();
|
||||||
|
// primeiroFolio = brp.getFolio();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
BigDecimal valorContabil = impRmd.getValorContabil() == null ? BigDecimal.ZERO : impRmd.getValorContabil().add(somarTotalBilhete(brp));
|
||||||
|
BigDecimal baseCalculo = impRmd.getBaseCalculo() == null ? BigDecimal.ZERO : impRmd.getBaseCalculo().add(
|
||||||
|
brp.getTarifa() == null ? BigDecimal.ZERO : brp.getTarifa());
|
||||||
|
|
||||||
|
BigDecimal aliquota = brp.getIcmsInterestadual();
|
||||||
|
BigDecimal icms = baseCalculo.multiply(aliquota.divide(BigDecimal.TEN.multiply(BigDecimal.TEN)));
|
||||||
|
|
||||||
|
BigDecimal isentos = BigDecimal.ZERO;
|
||||||
|
BigDecimal outros = valorContabil.subtract(baseCalculo);
|
||||||
|
|
||||||
|
impRmd.setValorContabil(valorContabil);
|
||||||
|
impRmd.setBaseCalculo(baseCalculo);
|
||||||
|
impRmd.setAliquota(aliquota);
|
||||||
|
impRmd.setIcms(icms);
|
||||||
|
impRmd.setIsentos(isentos);
|
||||||
|
impRmd.setOutros(outros);
|
||||||
|
|
||||||
|
impRmd.getDetalhada().add(brp);
|
||||||
|
anteriorFolio = brp.getFolio();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
private BigDecimal somarTotalBilhete(DetalhadoRMDTipoDVB brp) {
|
||||||
|
|
||||||
|
BigDecimal total = BigDecimal.ZERO;
|
||||||
|
total = total.add(brp.getTarifa() == null ? BigDecimal.ZERO : brp.getTarifa());
|
||||||
|
total = total.add(brp.getTaxaEmbarque() == null ? BigDecimal.ZERO : brp.getTaxaEmbarque());
|
||||||
|
total = total.add(brp.getPedagio() == null ? BigDecimal.ZERO : brp.getPedagio());
|
||||||
|
total = total.add(brp.getSeguro() == null ? BigDecimal.ZERO : brp.getSeguro());
|
||||||
|
total = total.add(brp.getOutros() == null ? BigDecimal.ZERO : brp.getOutros());
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DetalhadoRMDTipoDVB> buscarRegistroImpressaoRMDTipoDVB(Connection connection, Date inicio, Date fim, Integer empresaId, String cveestado) {
|
||||||
|
|
||||||
|
List<DetalhadoRMDTipoDVB> list = new ArrayList<DetalhadoRMDTipoDVB>();
|
||||||
|
try {
|
||||||
|
StringBuilder sql = new StringBuilder();
|
||||||
|
sql.append("select ");
|
||||||
|
sql.append(" b.boleto_id as boletoId, ");
|
||||||
|
sql.append(" b.numoperacion as numoperacion, ");
|
||||||
|
sql.append(" b.numseriepreimpresa as serieCompl, ");
|
||||||
|
sql.append(" b.numfoliopreimpreso as folio, ");
|
||||||
|
sql.append(" a.acfiscal as numAidf, ");
|
||||||
|
sql.append(" a.serie as serieAidf, ");
|
||||||
|
sql.append(" a.subserie as subSerieAidf, ");
|
||||||
|
sql.append(" trunc(b.fechorventa) as fechorVenta, ");
|
||||||
|
sql.append(" e.nombempresa as empresa, ");
|
||||||
|
sql.append(" e.cnpj as cnpjEmpresa, ");
|
||||||
|
sql.append(" e.logradouro || ', ' || e.numero || ' - ' || e.bairro || ', ' || ce.nombciudad ");
|
||||||
|
sql.append(" || ' - ' || ee.cveestado || ', ' || e.cep ");
|
||||||
|
sql.append(" as enderecoEmpresa, ");
|
||||||
|
sql.append(" ie.numinscricaoestadual as ieEmpresa, ");
|
||||||
|
sql.append(" coalesce(eos.estado_id, eo.estado_id) as estadoId, ");
|
||||||
|
sql.append(" coalesce(ei.icms, eo.icms) as icmsInterestadual, ");
|
||||||
|
sql.append(" ei.icmsim as icmsIntermunicipal, ");
|
||||||
|
sql.append(" coalesce(eos.cveestado, eo.cveestado) as estadoOrigem, ");
|
||||||
|
sql.append(" coalesce(eds.cveestado, ed.cveestado) as estadoDestino, ");
|
||||||
|
sql.append(" coalesce(cos.codibge, co.codibge) as municipioOrigem, ");
|
||||||
|
sql.append(" case when((coalesce(eos.cveestado, eo.cveestado)) = ");
|
||||||
|
sql.append(" (coalesce(eds.cveestado, ed.cveestado))) ");
|
||||||
|
sql.append(" then 0 else 1 ");
|
||||||
|
sql.append(" end as isInterEstadual, ");
|
||||||
|
sql.append(" ei.porcredbaseicms as redBaseCalcIcms, ");
|
||||||
|
sql.append(" ei.porcredmunicipal as porcRedMunicipal, ");
|
||||||
|
sql.append(" ei.porcredestadual as porcRedEstadual, ");
|
||||||
|
sql.append(" ei.tributacaoimportacao as tributacaoImportacao, ");
|
||||||
|
sql.append(" case when (coalesce(pos.regionmetropolitana_id, po.regionmetropolitana_id, -1) = ");
|
||||||
|
sql.append(" coalesce(pds.regionmetropolitana_id, pd.regionmetropolitana_id, -2)) ");
|
||||||
|
sql.append(" then 1 else 0 end as isenta, ");
|
||||||
|
sql.append(" coalesce(b.preciopagado, 0) as tarifa, ");
|
||||||
|
sql.append(" coalesce(b.importetaxaembarque, 0) as taxaEmbarque, ");
|
||||||
|
sql.append(" coalesce(b.importepedagio, 0) as pedagio, ");
|
||||||
|
sql.append(" coalesce(b.importeseguro, 0) as seguro, ");
|
||||||
|
sql.append(" coalesce(b.importeoutros, 0) as outros ");
|
||||||
|
sql.append("from boleto b ");
|
||||||
|
sql.append(" join empresa e on e.empresa_id = b.empresacorrida_id ");
|
||||||
|
sql.append(" join ciudad ce on ce.ciudad_id = e.ciudad_id ");
|
||||||
|
sql.append(" join estado ee on ee.estado_id = ce.estado_id ");
|
||||||
|
sql.append(" join parada po on po.parada_id = b.origen_id ");
|
||||||
|
sql.append(" join ciudad co on co.ciudad_id = po.ciudad_id ");
|
||||||
|
sql.append(" join estado eo on eo.estado_id = co.estado_id ");
|
||||||
|
sql.append(" join parada pd on pd.parada_id = b.destino_id ");
|
||||||
|
sql.append(" join ciudad cd on cd.ciudad_id = pd.ciudad_id ");
|
||||||
|
sql.append(" join estado ed on ed.estado_id = cd.estado_id ");
|
||||||
|
sql.append(" left join alias_servico s on s.origen_id = b.origen_id ");
|
||||||
|
sql.append(" and s.destino_id = b.destino_id and s.corrida_id = b.corrida_id ");
|
||||||
|
sql.append(" and s.ruta_id = b.ruta_id ");
|
||||||
|
sql.append(" left join parada pos on pos.parada_id = s.aliasorigen_id ");
|
||||||
|
sql.append(" left join ciudad cos on cos.ciudad_id = pos.ciudad_id ");
|
||||||
|
sql.append(" left join estado eos on eos.estado_id = cos.estado_id ");
|
||||||
|
sql.append(" left join parada pds on pds.parada_id = s.aliasdestino_id ");
|
||||||
|
sql.append(" left join ciudad cds on cds.ciudad_id = pds.ciudad_id ");
|
||||||
|
sql.append(" left join estado eds on eds.estado_id = cds.estado_id ");
|
||||||
|
sql.append(" join inscricao_estadual ie on e.empresa_id = ie.empresa_id ");
|
||||||
|
sql.append(" and ie.estado_id = coalesce(eos.estado_id, eo.estado_id) and ie.activo = 1 ");
|
||||||
|
sql.append(" join empresa_imposto ei on ei.empresa_id = b.empresacorrida_id ");
|
||||||
|
sql.append(" and ei.estado_id = coalesce(eos.estado_id, eo.estado_id) and ei.activo = 1 ");
|
||||||
|
sql.append(" left join aidf a on a.serie = substr(b.numseriepreimpresa, 1, 3) ");
|
||||||
|
sql.append(" and a.estado_id = (CASE WHEN s.aliasorigen_id IS NULL ");
|
||||||
|
sql.append(" THEN eo.estado_id ELSE eos.estado_id END) ");
|
||||||
|
sql.append("where ");
|
||||||
|
sql.append(" b.activo = 1 ");
|
||||||
|
sql.append(" and b.tipoventa_id = 3 ");
|
||||||
|
sql.append(" and b.indstatusboleto like 'V' ");
|
||||||
|
sql.append(" and b.empresacorrida_id = ? ");
|
||||||
|
sql.append(" and b.fechorventa between ? and ? ");
|
||||||
|
sql.append(" and coalesce(eos.cveestado, eo.cveestado) = ? ");
|
||||||
|
sql.append("order by estadoId, fechorVenta ");
|
||||||
|
|
||||||
|
PreparedStatement ps = connection.prepareStatement(sql.toString());
|
||||||
|
ps.setLong(1, Long.valueOf(empresaId));
|
||||||
|
ps.setDate(2, new java.sql.Date(inicio.getTime()));
|
||||||
|
ps.setDate(3, new java.sql.Date(fim.getTime()));
|
||||||
|
ps.setString(4, cveestado);
|
||||||
|
|
||||||
|
ResultSet rs = ps.executeQuery();
|
||||||
|
while (rs.next()) {
|
||||||
|
|
||||||
|
DetalhadoRMDTipoDVB brp = new DetalhadoRMDTipoDVB();
|
||||||
|
brp.setBoletoId(rs.getLong("boletoId"));
|
||||||
|
brp.setNumoperacion(rs.getString("numoperacion"));
|
||||||
|
brp.setSerie(rs.getString("serieCompl"));
|
||||||
|
brp.setFolio(rs.getInt("folio"));
|
||||||
|
brp.setEstadoId(rs.getInt("estadoId"));
|
||||||
|
brp.setFechorVenta(rs.getDate("fechorVenta"));
|
||||||
|
brp.setEmpresa(rs.getString("empresa"));
|
||||||
|
brp.setEnderecoEmpresa(rs.getString("enderecoEmpresa"));
|
||||||
|
brp.setCnpjEmpresa(rs.getString("cnpjEmpresa"));
|
||||||
|
brp.setIeEmpresa(rs.getString("ieEmpresa"));
|
||||||
|
brp.setIcmsInterestadual(rs.getBigDecimal("icmsInterestadual"));
|
||||||
|
brp.setIcmsIntermunicipal(rs.getBigDecimal("icmsIntermunicipal"));
|
||||||
|
brp.setEstadoOrigem(rs.getString("estadoOrigem"));
|
||||||
|
brp.setEstadoDestino(rs.getString("estadoDestino"));
|
||||||
|
brp.setMunicipioOrigem(rs.getString("municipioOrigem"));
|
||||||
|
brp.setInterEstadual(rs.getBoolean("isInterEstadual"));
|
||||||
|
brp.setIcmsInterestadual(rs.getBigDecimal("icmsInterestadual"));
|
||||||
|
brp.setRedBaseCalcIcms(rs.getBigDecimal("redBaseCalcIcms"));
|
||||||
|
brp.setPorcRedMunicipal(rs.getBigDecimal("porcRedMunicipal"));
|
||||||
|
brp.setPorcRedEstadual(rs.getBigDecimal("porcRedEstadual"));
|
||||||
|
brp.setTributacaoImportacao(rs.getBigDecimal("tributacaoImportacao"));
|
||||||
|
brp.setIsenta(rs.getBigDecimal("isenta"));
|
||||||
|
brp.setTarifa(rs.getBigDecimal("tarifa"));
|
||||||
|
brp.setTaxaEmbarque(rs.getBigDecimal("taxaEmbarque"));
|
||||||
|
brp.setPedagio(rs.getBigDecimal("pedagio"));
|
||||||
|
brp.setSeguro(rs.getBigDecimal("seguro"));
|
||||||
|
brp.setOutros(rs.getBigDecimal("outros"));
|
||||||
|
|
||||||
|
list.add(brp);
|
||||||
|
}
|
||||||
|
|
||||||
|
rs.close();
|
||||||
|
ps.close();
|
||||||
|
|
||||||
|
} catch (SQLException e) {
|
||||||
|
log.error("", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ import com.rjconsultores.ventaboletos.dao.ParadaDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.RegionMetropolitana;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
||||||
|
|
||||||
|
@ -134,4 +135,11 @@ public class ParadaHibernateDAO extends GenericHibernateDAO<Parada, Integer> imp
|
||||||
|
|
||||||
return getSession().createQuery(sql).setEntity("origem", origem).list();
|
return getSession().createQuery(sql).setEntity("origem", origem).list();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Parada> buscaParadaRegionMetropolitana(RegionMetropolitana regionMetropolitana) {
|
||||||
|
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||||
|
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||||
|
c.add(Restrictions.eq("regionMetropolitana.regionMetropolitanaId", regionMetropolitana.getRegionMetropolitanaId()));
|
||||||
|
return c.list();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||||
|
|
||||||
|
import org.hibernate.SessionFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.RegionMetropolitanaDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.RegionMetropolitana;
|
||||||
|
|
||||||
|
@Repository("regionMetropolitanaDAO")
|
||||||
|
public class RegionMetropolitanaHibernateDAO extends GenericHibernateDAO<RegionMetropolitana, Long>
|
||||||
|
implements RegionMetropolitanaDAO {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public RegionMetropolitanaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||||
|
setSessionFactory(factory);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -72,11 +72,6 @@ public class Aidf implements java.io.Serializable {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return String.format("%s - %s", docfiscal, acfiscal);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 0;
|
int hash = 0;
|
||||||
|
@ -97,10 +92,9 @@ public class Aidf implements java.io.Serializable {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@GenericGenerator(name="aidfgen_id", strategy="com.rjconsultores.ventaboletos.dao.util.AidfGenerator")
|
@GenericGenerator(name = "aidfgen_id", strategy = "com.rjconsultores.ventaboletos.dao.util.AidfGenerator")
|
||||||
@GeneratedValue(generator="aidfgen_id")
|
@GeneratedValue(generator = "aidfgen_id")
|
||||||
@Column(name = "AIDF_ID", unique = true, nullable = false, precision = 15, scale = 0)
|
@Column(name = "AIDF_ID", unique = true, nullable = false, precision = 15, scale = 0)
|
||||||
public Long getAidfId() {
|
public Long getAidfId() {
|
||||||
return aidfId;
|
return aidfId;
|
||||||
|
@ -209,7 +203,7 @@ public class Aidf implements java.io.Serializable {
|
||||||
return cnpj;
|
return cnpj;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCnpj(String cnpj){
|
public void setCnpj(String cnpj) {
|
||||||
this.cnpj = cnpj;
|
this.cnpj = cnpj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,7 +264,7 @@ public class Aidf implements java.io.Serializable {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Column(name="TIPOVALIDAVENTA")
|
@Column(name = "TIPOVALIDAVENTA")
|
||||||
public String getTipoValidaVenta() {
|
public String getTipoValidaVenta() {
|
||||||
return tipoValidaVenta;
|
return tipoValidaVenta;
|
||||||
}
|
}
|
||||||
|
@ -278,4 +272,11 @@ public class Aidf implements java.io.Serializable {
|
||||||
public void setTipoValidaVenta(String tipoValidaVenta) {
|
public void setTipoValidaVenta(String tipoValidaVenta) {
|
||||||
this.tipoValidaVenta = tipoValidaVenta;
|
this.tipoValidaVenta = tipoValidaVenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return String.format("%s - %s", this.getAidfId(), (this.getSerie() == null ? "" : this.getSerie()
|
||||||
|
+ this.getSubserie() == null ? "" : this.getSubserie()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -15,6 +15,7 @@ import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.OneToOne;
|
import javax.persistence.OneToOne;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
|
@ -78,6 +79,10 @@ public class Parada implements Serializable {
|
||||||
@Column(name = "CODANTT")
|
@Column(name = "CODANTT")
|
||||||
private Integer codantt;
|
private Integer codantt;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "REGIONMETROPOLITANA_ID", referencedColumnName = "REGIONMETROPOLITANA_ID")
|
||||||
|
private RegionMetropolitana regionMetropolitana;
|
||||||
|
|
||||||
public Parada() {
|
public Parada() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,4 +257,13 @@ public class Parada implements Serializable {
|
||||||
public String toStringCve() {
|
public String toStringCve() {
|
||||||
return getCveparada();
|
return getCveparada();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RegionMetropolitana getRegionMetropolitana() {
|
||||||
|
return regionMetropolitana;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRegionMetropolitana(RegionMetropolitana regionMetropolitana) {
|
||||||
|
this.regionMetropolitana = regionMetropolitana;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import javax.persistence.Basic;
|
import javax.persistence.Basic;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
|
@ -9,6 +10,7 @@ import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
|
@ -24,7 +26,7 @@ public class RegionMetropolitana implements Serializable {
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "REGION_METROPOLITANA_SEQ")
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "REGION_METROPOLITANA_SEQ")
|
||||||
@Column(name = "REGIONMETROPOLITANA_ID")
|
@Column(name = "REGIONMETROPOLITANA_ID")
|
||||||
private Integer regionMetropolitanaId;
|
private Long regionMetropolitanaId;
|
||||||
@Column(name = "DESCREGION")
|
@Column(name = "DESCREGION")
|
||||||
private String descRegion;
|
private String descRegion;
|
||||||
@Column(name = "ACTIVO")
|
@Column(name = "ACTIVO")
|
||||||
|
@ -34,12 +36,14 @@ public class RegionMetropolitana implements Serializable {
|
||||||
private Date fecmodif;
|
private Date fecmodif;
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
|
@OneToMany(mappedBy = "regionMetropolitana")
|
||||||
|
private List<Parada> paradaList;
|
||||||
|
|
||||||
public Integer getRegionMetropolitanaId() {
|
public Long getRegionMetropolitanaId() {
|
||||||
return regionMetropolitanaId;
|
return regionMetropolitanaId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRegionMetropolitanaId(Integer regionMetropolitanaId) {
|
public void setRegionMetropolitanaId(Long regionMetropolitanaId) {
|
||||||
this.regionMetropolitanaId = regionMetropolitanaId;
|
this.regionMetropolitanaId = regionMetropolitanaId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,4 +79,12 @@ public class RegionMetropolitana implements Serializable {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Parada> getParadaList() {
|
||||||
|
return paradaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParadaList(List<Parada> paradaList) {
|
||||||
|
this.paradaList = paradaList;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,17 +13,30 @@ import com.rjconsultores.ventaboletos.vo.aidf.AidfVo;
|
||||||
public interface AidfService {
|
public interface AidfService {
|
||||||
|
|
||||||
public List<Aidf> obtenerTodos();
|
public List<Aidf> obtenerTodos();
|
||||||
|
|
||||||
public Aidf obtenerID(Long id);
|
public Aidf obtenerID(Long id);
|
||||||
|
|
||||||
public Aidf suscribir(Aidf entidad);
|
public Aidf suscribir(Aidf entidad);
|
||||||
|
|
||||||
public Aidf actualizacion(Aidf entidad);
|
public Aidf actualizacion(Aidf entidad);
|
||||||
|
|
||||||
public void borrar(Aidf entidad);
|
public void borrar(Aidf entidad);
|
||||||
|
|
||||||
public List<AidfEspecie> obtenerTodosAdifEspecie();
|
public List<AidfEspecie> obtenerTodosAdifEspecie();
|
||||||
|
|
||||||
public List<AidfTipo> obtenerTodosAdifTipo();
|
public List<AidfTipo> obtenerTodosAdifTipo();
|
||||||
|
|
||||||
public List<Aidf> buscaAidfsPorEmpresas(List<Empresa> empresas);
|
public List<Aidf> buscaAidfsPorEmpresas(List<Empresa> empresas);
|
||||||
|
|
||||||
public Long validarDocFiscalSerieFormInicialFinal(Aidf entidad, Connection conn);
|
public Long validarDocFiscalSerieFormInicialFinal(Aidf entidad, Connection conn);
|
||||||
public List<AidfVo> obtenerAidfFromSerieDocfiscal(String serie,String docfiscal, Connection conn);
|
|
||||||
|
public List<AidfVo> obtenerAidfFromSerieDocfiscal(String serie, String docfiscal, Connection conn);
|
||||||
|
|
||||||
public Boolean validarDocFiscalPorEstado(Long idAidf, String docFiscal, Estado estado);
|
public Boolean validarDocFiscalPorEstado(Long idAidf, String docFiscal, Estado estado);
|
||||||
|
|
||||||
public Boolean validarTipoVenda(String tipoVenda, String serie, Integer idTipo);
|
public Boolean validarTipoVenda(String tipoVenda, String serie, Integer idTipo);
|
||||||
|
|
||||||
public Boolean validarVendaManual(Integer idTipo, String serie);
|
public Boolean validarVendaManual(Integer idTipo, String serie);
|
||||||
|
|
||||||
|
public List<Aidf> buscaAidfRMD(Integer empresaId, Integer estadoId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.rjconsultores.ventaboletos.service;
|
package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.sql.Connection;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -9,6 +10,7 @@ import java.util.List;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.EsquemaCorrida;
|
import com.rjconsultores.ventaboletos.entidad.EsquemaCorrida;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Estado;
|
import com.rjconsultores.ventaboletos.entidad.Estado;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.impressaormd.vo.ImpressaoRMD;
|
||||||
|
|
||||||
public interface FiscalService {
|
public interface FiscalService {
|
||||||
|
|
||||||
|
@ -43,4 +45,6 @@ public interface FiscalService {
|
||||||
public File buscarArquivoExportacaoECF(Date value, Date value2, Empresa empresa, Estado estado);
|
public File buscarArquivoExportacaoECF(Date value, Date value2, Empresa empresa, Estado estado);
|
||||||
|
|
||||||
public File buscarArquivoExportacaoRMD(Date value, Date value2, Empresa empresa, Estado estado);
|
public File buscarArquivoExportacaoRMD(Date value, Date value2, Empresa empresa, Estado estado);
|
||||||
|
|
||||||
|
public List<ImpressaoRMD> getRegistroImpressaoRMDTipoDVB(Connection connection, Date inicio, Date fim, Empresa empresa, Estado estado, String rmd);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,16 +4,17 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.service;
|
package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.RegionMetropolitana;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
||||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Administrador
|
* @author Administrador
|
||||||
|
@ -40,4 +41,6 @@ public interface ParadaService {
|
||||||
public List<Parada> obtenerTodos();
|
public List<Parada> obtenerTodos();
|
||||||
|
|
||||||
public List<Parada> obterPossiveisDestinos(Parada origem);
|
public List<Parada> obterPossiveisDestinos(Parada origem);
|
||||||
|
|
||||||
|
public List<Parada> buscaParadaRegionMetropolitana(RegionMetropolitana regionMetropolitana);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.RegionMetropolitana;
|
||||||
|
|
||||||
|
public interface RegionMetropolitanaService extends GenericService<RegionMetropolitana, Long> {
|
||||||
|
|
||||||
|
}
|
|
@ -54,7 +54,7 @@ public class AidfServiceImpl implements AidfService {
|
||||||
|
|
||||||
Aidf aidf = aidfDAO.suscribir(entidad);
|
Aidf aidf = aidfDAO.suscribir(entidad);
|
||||||
|
|
||||||
if(aidf != null)
|
if (aidf != null)
|
||||||
movimentacionBilhetesService.realizaAdquisicionBilhetes(aidf);
|
movimentacionBilhetesService.realizaAdquisicionBilhetes(aidf);
|
||||||
|
|
||||||
return aidf;
|
return aidf;
|
||||||
|
@ -73,7 +73,7 @@ public class AidfServiceImpl implements AidfService {
|
||||||
aidfDAO.borrar(entidad);
|
aidfDAO.borrar(entidad);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setUsuarioFecmodifActivo(Aidf entidad){
|
private void setUsuarioFecmodifActivo(Aidf entidad) {
|
||||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
entidad.setActivo(Boolean.TRUE);
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
@ -92,17 +92,17 @@ public class AidfServiceImpl implements AidfService {
|
||||||
return aidfs;
|
return aidfs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<AidfVo> obtenerAidfFromSerieDocfiscal(String serie,String docfiscal, Connection conn){
|
public List<AidfVo> obtenerAidfFromSerieDocfiscal(String serie, String docfiscal, Connection conn) {
|
||||||
return aidfDAO.obtenerAidfFromSerieDocfiscal( serie, docfiscal, conn );
|
return aidfDAO.obtenerAidfFromSerieDocfiscal(serie, docfiscal, conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long validarDocFiscalSerieFormInicialFinal(Aidf entidad, Connection conn){
|
public Long validarDocFiscalSerieFormInicialFinal(Aidf entidad, Connection conn) {
|
||||||
|
|
||||||
List<AidfVo> list = obtenerAidfFromSerieDocfiscal(entidad.getSerie() , entidad.getDocfiscal().replaceAll("[^a-zA-Z0-9]+","") , conn);
|
List<AidfVo> list = obtenerAidfFromSerieDocfiscal(entidad.getSerie(), entidad.getDocfiscal().replaceAll("[^a-zA-Z0-9]+", ""), conn);
|
||||||
|
|
||||||
for (AidfVo aidf : list) {
|
for (AidfVo aidf : list) {
|
||||||
// desconsiderar o próprio ID, caso contrário o erro de validação sempre acontece qdo o registro é editado.
|
// desconsiderar o próprio ID, caso contrário o erro de validação sempre acontece qdo o registro é editado.
|
||||||
if ( (entidad.getAidfId() == null) || (aidf.getAidfId().compareTo(entidad.getAidfId()) != 0)) {
|
if ((entidad.getAidfId() == null) || (aidf.getAidfId().compareTo(entidad.getAidfId()) != 0)) {
|
||||||
if (aidf.getDocfiscal().trim().equals(entidad.getDocfiscal().replaceAll("[^a-zA-Z0-9]+", "").trim())) {
|
if (aidf.getDocfiscal().trim().equals(entidad.getDocfiscal().replaceAll("[^a-zA-Z0-9]+", "").trim())) {
|
||||||
if (aidf.getSerie().trim().equals(entidad.getSerie().trim())) {
|
if (aidf.getSerie().trim().equals(entidad.getSerie().trim())) {
|
||||||
if ((Long.parseLong(entidad.getForminicial()) >= Long.parseLong(aidf.getForminicial()) && Long.parseLong(entidad.getForminicial()) <= Long.parseLong(aidf.getFormfinal()))
|
if ((Long.parseLong(entidad.getForminicial()) >= Long.parseLong(aidf.getForminicial()) && Long.parseLong(entidad.getForminicial()) <= Long.parseLong(aidf.getFormfinal()))
|
||||||
|
@ -116,7 +116,7 @@ public class AidfServiceImpl implements AidfService {
|
||||||
return -1l;
|
return -1l;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean validarDocFiscalPorEstado(Long idAidf, String docFiscal, Estado estado){
|
public Boolean validarDocFiscalPorEstado(Long idAidf, String docFiscal, Estado estado) {
|
||||||
return aidfDAO.existeAidfComCodFiscalEEstado(idAidf, docFiscal, estado);
|
return aidfDAO.existeAidfComCodFiscalEEstado(idAidf, docFiscal, estado);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,8 +125,13 @@ public class AidfServiceImpl implements AidfService {
|
||||||
&& ("UNIC".equals(serie) || TIPO_FORMULARIO_CONTINUO.equals(idTipo)));
|
&& ("UNIC".equals(serie) || TIPO_FORMULARIO_CONTINUO.equals(idTipo)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean validarVendaManual(Integer idTipo, String serie){
|
public Boolean validarVendaManual(Integer idTipo, String serie) {
|
||||||
return !(TIPO_VENDA_MANUAL.equals(idTipo) && "UNIC".equals(serie));
|
return !(TIPO_VENDA_MANUAL.equals(idTipo) && "UNIC".equals(serie));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Aidf> buscaAidfRMD(Integer empresaId, Integer estadoId) {
|
||||||
|
return aidfDAO.buscaAidfRMD(empresaId, estadoId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,6 +49,7 @@ import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRM
|
||||||
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;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoRMD;
|
import com.rjconsultores.ventaboletos.utilerias.exportacaofiscal.vo.ExportacaoRMDTipoRMD;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.impressaormd.vo.ImpressaoRMD;
|
||||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalReducaoZVO;
|
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalReducaoZVO;
|
||||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalVO;
|
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionFiscalVO;
|
||||||
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionManualFiscalVO;
|
import com.rjconsultores.ventaboletos.vo.impressaofiscal.ImportacionManualFiscalVO;
|
||||||
|
@ -86,6 +87,11 @@ public class FiscalServiceImpl implements FiscalService {
|
||||||
return fiscalDAO.gerarRegistroP2_F2(lsEsquemaCorrida, dataDe, dataAte);
|
return fiscalDAO.gerarRegistroP2_F2(lsEsquemaCorrida, dataDe, dataAte);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ImpressaoRMD> getRegistroImpressaoRMDTipoDVB(Connection connection, Date inicio, Date fim, Empresa empresa, Estado estado, String rmd) {
|
||||||
|
return fiscalDAO.getRegistroImpressaoRMDTipoDVB(connection, inicio, fim, empresa.getEmpresaId(), estado.getCveestado(), rmd);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public File importacionFiscalECFManual(Date inicio, Date fim, Empresa empresa) {
|
public File importacionFiscalECFManual(Date inicio, Date fim, Empresa empresa) {
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@ import com.rjconsultores.ventaboletos.dao.TramoDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
import com.rjconsultores.ventaboletos.entidad.Nodo;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.RegionMetropolitana;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
||||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||||
|
@ -169,4 +170,8 @@ public class ParadaServiceImpl implements ParadaService {
|
||||||
return new ArrayList<Parada>();
|
return new ArrayList<Parada>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Parada> buscaParadaRegionMetropolitana(RegionMetropolitana regionMetropolitana){
|
||||||
|
return paradaDAO.buscaParadaRegionMetropolitana(regionMetropolitana);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,6 @@ import org.tempuri.IAG;
|
||||||
import org.tempuri.IAGservice;
|
import org.tempuri.IAGservice;
|
||||||
import org.tempuri.IAGserviceLocator;
|
import org.tempuri.IAGserviceLocator;
|
||||||
|
|
||||||
import AGIntf.TCliente;
|
|
||||||
import AGIntf.TFornecedor;
|
|
||||||
import AGIntf.TServicosCliente;
|
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.PuntoVentaDAO;
|
import com.rjconsultores.ventaboletos.dao.PuntoVentaDAO;
|
||||||
import com.rjconsultores.ventaboletos.dao.UsuarioUbicacionDAO;
|
import com.rjconsultores.ventaboletos.dao.UsuarioUbicacionDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Constante;
|
import com.rjconsultores.ventaboletos.entidad.Constante;
|
||||||
|
@ -58,6 +54,10 @@ import com.rjconsultores.ws.utileria.RetornoTotvs.TipoRetorno;
|
||||||
import com.rjconsultores.wsag.Constantes;
|
import com.rjconsultores.wsag.Constantes;
|
||||||
import com.rjconsultores.wsag.dao.DaoAG;
|
import com.rjconsultores.wsag.dao.DaoAG;
|
||||||
|
|
||||||
|
import AGIntf.TCliente;
|
||||||
|
import AGIntf.TFornecedor;
|
||||||
|
import AGIntf.TServicosCliente;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Administrador
|
* @author Administrador
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service.impl;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.RegionMetropolitanaDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.RegionMetropolitana;
|
||||||
|
import com.rjconsultores.ventaboletos.service.RegionMetropolitanaService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
|
@Service("regionMetropolitanaService")
|
||||||
|
public class RegionMetropolitanaServiceImpl implements RegionMetropolitanaService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RegionMetropolitanaDAO regionMetropolitanaDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RegionMetropolitana> obtenerTodos() {
|
||||||
|
return regionMetropolitanaDAO.obtenerTodos();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RegionMetropolitana obtenerID(Long id) {
|
||||||
|
return regionMetropolitanaDAO.obtenerID(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public RegionMetropolitana suscribir(RegionMetropolitana entidad) {
|
||||||
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
|
return regionMetropolitanaDAO.suscribir(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public RegionMetropolitana actualizacion(RegionMetropolitana entidad) {
|
||||||
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
entidad.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
|
return regionMetropolitanaDAO.actualizacion(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void borrar(RegionMetropolitana entidad) {
|
||||||
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
entidad.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
|
regionMetropolitanaDAO.actualizacion(entidad);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,252 @@
|
||||||
|
package com.rjconsultores.ventaboletos.utilerias.impressaormd.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public class DetalhadoRMDTipoDVB {
|
||||||
|
|
||||||
|
private Long boletoId;
|
||||||
|
private String numoperacion;
|
||||||
|
private String serie;
|
||||||
|
private Integer folio;
|
||||||
|
private Integer estadoId;
|
||||||
|
private Date fechorVenta;
|
||||||
|
private String empresa;
|
||||||
|
private String enderecoEmpresa;
|
||||||
|
private String cnpjEmpresa;
|
||||||
|
private String ieEmpresa;
|
||||||
|
private BigDecimal icmsInterestadual;
|
||||||
|
private BigDecimal icmsIntermunicipal;
|
||||||
|
private String estadoOrigem;
|
||||||
|
private String estadoDestino;
|
||||||
|
private String municipioOrigem;
|
||||||
|
private boolean isInterEstadual;
|
||||||
|
private BigDecimal redBaseCalcIcms;
|
||||||
|
private BigDecimal porcRedMunicipal;
|
||||||
|
private BigDecimal porcRedEstadual;
|
||||||
|
private BigDecimal tributacaoImportacao;
|
||||||
|
private BigDecimal isenta;
|
||||||
|
private String rmd;
|
||||||
|
private BigDecimal tarifa;
|
||||||
|
private BigDecimal taxaEmbarque;
|
||||||
|
private BigDecimal pedagio;
|
||||||
|
private BigDecimal seguro;
|
||||||
|
private BigDecimal outros;
|
||||||
|
|
||||||
|
public Long getBoletoId() {
|
||||||
|
return boletoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBoletoId(Long boletoId) {
|
||||||
|
this.boletoId = boletoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumoperacion() {
|
||||||
|
return numoperacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumoperacion(String numoperacion) {
|
||||||
|
this.numoperacion = numoperacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerie() {
|
||||||
|
return serie;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSerie(String serie) {
|
||||||
|
this.serie = serie;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFolio() {
|
||||||
|
return folio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFolio(Integer folio) {
|
||||||
|
this.folio = folio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getEstadoId() {
|
||||||
|
return estadoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEstadoId(Integer estadoId) {
|
||||||
|
this.estadoId = estadoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFechorVenta() {
|
||||||
|
return fechorVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechorVenta(Date fechorVenta) {
|
||||||
|
this.fechorVenta = fechorVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmpresa() {
|
||||||
|
return empresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmpresa(String empresa) {
|
||||||
|
this.empresa = empresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnderecoEmpresa() {
|
||||||
|
return enderecoEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnderecoEmpresa(String enderecoEmpresa) {
|
||||||
|
this.enderecoEmpresa = enderecoEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCnpjEmpresa() {
|
||||||
|
return cnpjEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCnpjEmpresa(String cnpjEmpresa) {
|
||||||
|
this.cnpjEmpresa = cnpjEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIeEmpresa() {
|
||||||
|
return ieEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIeEmpresa(String ieEmpresa) {
|
||||||
|
this.ieEmpresa = ieEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getIcmsInterestadual() {
|
||||||
|
return icmsInterestadual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIcmsInterestadual(BigDecimal icmsInterestadual) {
|
||||||
|
this.icmsInterestadual = icmsInterestadual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getIcmsIntermunicipal() {
|
||||||
|
return icmsIntermunicipal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIcmsIntermunicipal(BigDecimal icmsIntermunicipal) {
|
||||||
|
this.icmsIntermunicipal = icmsIntermunicipal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEstadoOrigem() {
|
||||||
|
return estadoOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEstadoOrigem(String estadoOrigem) {
|
||||||
|
this.estadoOrigem = estadoOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEstadoDestino() {
|
||||||
|
return estadoDestino;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEstadoDestino(String estadoDestino) {
|
||||||
|
this.estadoDestino = estadoDestino;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMunicipioOrigem() {
|
||||||
|
return municipioOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMunicipioOrigem(String municipioOrigem) {
|
||||||
|
this.municipioOrigem = municipioOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isInterEstadual() {
|
||||||
|
return isInterEstadual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInterEstadual(boolean isInterEstadual) {
|
||||||
|
this.isInterEstadual = isInterEstadual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getRedBaseCalcIcms() {
|
||||||
|
return redBaseCalcIcms;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRedBaseCalcIcms(BigDecimal redBaseCalcIcms) {
|
||||||
|
this.redBaseCalcIcms = redBaseCalcIcms;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPorcRedMunicipal() {
|
||||||
|
return porcRedMunicipal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPorcRedMunicipal(BigDecimal porcRedMunicipal) {
|
||||||
|
this.porcRedMunicipal = porcRedMunicipal;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPorcRedEstadual() {
|
||||||
|
return porcRedEstadual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPorcRedEstadual(BigDecimal porcRedEstadual) {
|
||||||
|
this.porcRedEstadual = porcRedEstadual;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTributacaoImportacao() {
|
||||||
|
return tributacaoImportacao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTributacaoImportacao(BigDecimal tributacaoImportacao) {
|
||||||
|
this.tributacaoImportacao = tributacaoImportacao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getIsenta() {
|
||||||
|
return isenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsenta(BigDecimal isenta) {
|
||||||
|
this.isenta = isenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRmd() {
|
||||||
|
return rmd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRmd(String rmd) {
|
||||||
|
this.rmd = rmd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTarifa() {
|
||||||
|
return tarifa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTarifa(BigDecimal tarifa) {
|
||||||
|
this.tarifa = tarifa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTaxaEmbarque() {
|
||||||
|
return taxaEmbarque;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTaxaEmbarque(BigDecimal taxaEmbarque) {
|
||||||
|
this.taxaEmbarque = taxaEmbarque;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPedagio() {
|
||||||
|
return pedagio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPedagio(BigDecimal pedagio) {
|
||||||
|
this.pedagio = pedagio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getSeguro() {
|
||||||
|
return seguro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSeguro(BigDecimal seguro) {
|
||||||
|
this.seguro = seguro;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getOutros() {
|
||||||
|
return outros;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOutros(BigDecimal outros) {
|
||||||
|
this.outros = outros;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,197 @@
|
||||||
|
package com.rjconsultores.ventaboletos.utilerias.impressaormd.vo;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ImpressaoRMD {
|
||||||
|
|
||||||
|
private String empresa;
|
||||||
|
private String enderecoEmpresa;
|
||||||
|
private String cnpjEmpresa;
|
||||||
|
private String ieEmpresa;
|
||||||
|
private Date data;
|
||||||
|
private String rmd;
|
||||||
|
private String naturezaOperacao;
|
||||||
|
private String tipo;
|
||||||
|
private String serie;
|
||||||
|
private String numero;
|
||||||
|
private BigDecimal valorContabil;
|
||||||
|
private BigDecimal baseCalculo;
|
||||||
|
private BigDecimal aliquota;
|
||||||
|
private BigDecimal isentos;
|
||||||
|
private BigDecimal outros;
|
||||||
|
private BigDecimal icms;
|
||||||
|
private String obs;
|
||||||
|
|
||||||
|
private List<DetalhadoRMDTipoDVB> detalhada;
|
||||||
|
|
||||||
|
public ImpressaoRMD(String empresa, String enderecoEmpresa, String cnpjEmpresa, String ieEmpresa,
|
||||||
|
Date data, String rmd, String naturezaOperacao, String tipo, String serie, String obs) {
|
||||||
|
super();
|
||||||
|
this.empresa = empresa;
|
||||||
|
this.enderecoEmpresa = enderecoEmpresa;
|
||||||
|
this.cnpjEmpresa = cnpjEmpresa;
|
||||||
|
this.ieEmpresa = ieEmpresa;
|
||||||
|
this.data = data;
|
||||||
|
this.rmd = rmd;
|
||||||
|
this.naturezaOperacao = naturezaOperacao;
|
||||||
|
this.tipo = tipo;
|
||||||
|
this.serie = serie;
|
||||||
|
this.obs = obs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmpresa() {
|
||||||
|
return empresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmpresa(String empresa) {
|
||||||
|
this.empresa = empresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEnderecoEmpresa() {
|
||||||
|
return enderecoEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnderecoEmpresa(String enderecoEmpresa) {
|
||||||
|
this.enderecoEmpresa = enderecoEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCnpjEmpresa() {
|
||||||
|
return cnpjEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCnpjEmpresa(String cnpjEmpresa) {
|
||||||
|
this.cnpjEmpresa = cnpjEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getIeEmpresa() {
|
||||||
|
return ieEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIeEmpresa(String ieEmpresa) {
|
||||||
|
this.ieEmpresa = ieEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(Date data) {
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRmd() {
|
||||||
|
return rmd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRmd(String rmd) {
|
||||||
|
this.rmd = rmd;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNaturezaOperacao() {
|
||||||
|
return naturezaOperacao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNaturezaOperacao(String naturezaOperacao) {
|
||||||
|
this.naturezaOperacao = naturezaOperacao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTipo() {
|
||||||
|
return tipo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTipo(String tipo) {
|
||||||
|
this.tipo = tipo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSerie() {
|
||||||
|
return serie;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSerie(String serie) {
|
||||||
|
this.serie = serie;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumero() {
|
||||||
|
return numero;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumero(String numero) {
|
||||||
|
this.numero = numero;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getValorContabil() {
|
||||||
|
return valorContabil == null ? BigDecimal.ZERO : valorContabil;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValorContabil(BigDecimal valorContabil) {
|
||||||
|
this.valorContabil = valorContabil;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getBaseCalculo() {
|
||||||
|
return baseCalculo == null ? BigDecimal.ZERO : baseCalculo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBaseCalculo(BigDecimal baseCalculo) {
|
||||||
|
this.baseCalculo = baseCalculo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getAliquota() {
|
||||||
|
return aliquota;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAliquota(BigDecimal aliquota) {
|
||||||
|
this.aliquota = aliquota;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getIsentos() {
|
||||||
|
return isentos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIsentos(BigDecimal isentos) {
|
||||||
|
this.isentos = isentos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getOutros() {
|
||||||
|
return outros;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOutros(BigDecimal outros) {
|
||||||
|
this.outros = outros;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getObs() {
|
||||||
|
return obs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setObs(String obs) {
|
||||||
|
this.obs = obs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DetalhadoRMDTipoDVB> getDetalhada() {
|
||||||
|
if (detalhada == null) {
|
||||||
|
detalhada = new ArrayList<DetalhadoRMDTipoDVB>();
|
||||||
|
}
|
||||||
|
return detalhada;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDetalhada(List<DetalhadoRMDTipoDVB> detalhada) {
|
||||||
|
this.detalhada = detalhada;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getIcms() {
|
||||||
|
return icms;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIcms(BigDecimal icms) {
|
||||||
|
this.icms = icms;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ImpressaoRMD [empresa=" + empresa + ", enderecoEmpresa=" + enderecoEmpresa + ", cnpjEmpresa=" + cnpjEmpresa + ", ieEmpresa=" + ieEmpresa + ", data=" + data + ", rmd=" + rmd + ", naturezaOperacao=" + naturezaOperacao + ", tipo=" + tipo + ", serie=" + serie + ", numero=" + numero + ", valorContabil=" + valorContabil + ", baseCalculo=" + baseCalculo + ", aliquota=" + aliquota + ", isentos=" + isentos + ", outros=" + outros + ", icms=" + icms + ", obs=" + obs + ", detalhada=" + detalhada + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue