Merge branch 'master' of http://18.235.188.113:3000/adm/ModelWeb into AL-4318
commit
90a3d6632b
4
pom.xml
4
pom.xml
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ModelWeb</artifactId>
|
||||
<version>1.88.2</version>
|
||||
<version>1.91.0</version>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
|
@ -176,7 +176,7 @@
|
|||
<dependency>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>GeneradorBoletosCNAB</artifactId>
|
||||
<version>1.7.1</version>
|
||||
<version>1.8.0</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>log4j</groupId>
|
||||
|
|
|
@ -5,13 +5,37 @@ import java.lang.annotation.Retention;
|
|||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Anotação para marcar campos que devem ser renderizados e utilizados no Render Padrão {@link RenderPadrao}.
|
||||
*
|
||||
* A anotação permite configurar um conversor personalizado e especificar a posição de ordenação dos campos.
|
||||
*/
|
||||
@Target(ElementType.FIELD)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface Renderizado{
|
||||
Class<? extends Enum<?>> conversor() default DefaultEnum.class;
|
||||
public @interface Renderizado {
|
||||
|
||||
String metodoConversor() default "buscarPeloValor";
|
||||
/**
|
||||
* Define a classe do conversor que será usado para converter o valor do campo.
|
||||
*
|
||||
* @return A classe Enum do conversor que deve obrigatoriamente
|
||||
* implementar o um metodo String buscarPeloValor( String valor).
|
||||
*/
|
||||
Class<? extends Enum<?>> conversor() default DefaultEnum.class;
|
||||
|
||||
enum DefaultEnum{
|
||||
}
|
||||
/**
|
||||
* Define o nome do método do conversor que será chamado para converter o valor do campo.
|
||||
*
|
||||
* @return O nome do método do conversor. O padrão é "buscarPeloValor".
|
||||
*/
|
||||
String metodoConversor() default "buscarPeloValor";
|
||||
|
||||
/**
|
||||
* Define a posição de ordenação do campo. Campos com valores menores são ordenados primeiro.
|
||||
*
|
||||
* @return A posição numerica de ordenação do campo .
|
||||
*/
|
||||
int posicao() default Integer.MAX_VALUE;
|
||||
|
||||
enum DefaultEnum {
|
||||
}
|
||||
}
|
|
@ -80,4 +80,6 @@ public interface RutaDAO extends GenericDAO<Ruta, Integer> {
|
|||
|
||||
public List<Ruta> buscarPorOrgaoEcasetaPeaje(OrgaoConcedente orgao, Integer[] listCasetaPeaje, Empresa empresa);
|
||||
|
||||
public List<Ruta> buscarRutasPorEmpresaOrgaoConcedenteClaseServicio(Empresa empresa, OrgaoConcedente orgao, ClaseServicio claseServicio);
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||
|
||||
public interface SolicitudExpresosDAO extends GenericDAO<SolicitudExpreso, Integer>{
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||
import com.rjconsultores.ventaboletos.entidad.TarjetaViaje;
|
||||
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||
|
||||
public interface TrayectosExpresosDAO extends GenericDAO<TrayectosExpresos, Integer>{
|
||||
|
||||
List<TrayectosExpresos> obtenerTrayectosPorServicioId(SolicitudExpreso expreso);
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Voucher;
|
||||
|
||||
public interface VoucherDAO extends GenericDAO<Voucher, Long> {
|
||||
|
||||
public List<Voucher> buscarConsulta(Long voucherId, String numContrato, String nit, String nomeTransportadora, Date dataInicial, Date dataFinal, Integer origemId, Integer destinoId);
|
||||
|
||||
}
|
|
@ -7,10 +7,9 @@ import java.util.ArrayList;
|
|||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.GenericDAO;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.Session;
|
||||
import org.hibernate.criterion.Criterion;
|
||||
import org.hibernate.criterion.Projections;
|
||||
|
@ -24,6 +23,8 @@ import org.hibernate.loader.criteria.CriteriaLoader;
|
|||
import org.hibernate.persister.entity.OuterJoinLoadable;
|
||||
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.GenericDAO;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author gleimar
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.hibernate.type.StringType;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
import com.rjconsultores.ventaboletos.ArquivoRemessa;
|
||||
import com.rjconsultores.ventaboletos.ArquivoRemessaItem;
|
||||
|
@ -73,6 +74,7 @@ import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
|||
import com.rjconsultores.ventaboletos.enuns.Aceite;
|
||||
import com.rjconsultores.ventaboletos.enuns.BancoLayout;
|
||||
import com.rjconsultores.ventaboletos.enuns.TipoInscricaoPagador;
|
||||
import com.rjconsultores.ventaboletos.exception.ComissaoException;
|
||||
import com.rjconsultores.ventaboletos.exception.ValidacaoRemessaException;
|
||||
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
||||
import com.rjconsultores.ventaboletos.utilerias.CustomEnum;
|
||||
|
@ -1330,7 +1332,7 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
|||
|
||||
sb.append("SELECT ");
|
||||
sb.append("fb.FECHAMENTOBOLETO_ID AS \"id\", ");
|
||||
sb.append("(NVL(fp.COUNT_REMESSA, 0) + 1) AS \"idRemessa\", ");
|
||||
sb.append("(NVL(fp.COUNT_REMESSA, 1) + 1) AS \"idRemessa\", ");
|
||||
sb.append("fp.COD_EMP_BANCO AS \"codEmpresaBanco\", ");
|
||||
sb.append("emp.CNPJ AS \"cnpj\", ");
|
||||
sb.append("emp.NOMBEMPRESA AS \"nomeEmpresa\", ");
|
||||
|
@ -1357,7 +1359,8 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
|||
sb.append("ci.NOMBCIUDAD AS \"cidadePagador\", ");
|
||||
sb.append("es.NOMBESTADO AS \"estadoPagador\", ");
|
||||
sb.append("fp.BOLETO_BANCO_AGENCIA_DIGITO AS \"digitoAgencia\", ");
|
||||
sb.append("fp.BOLETO_BANCO_CARTEIRA_VARIAVEL AS \"variavelCarteira\" ");
|
||||
sb.append("fp.BOLETO_BANCO_CARTEIRA_VARIAVEL AS \"variavelCarteira\", ");
|
||||
sb.append("es.CVEESTADO AS \"cveEstado\" ");
|
||||
writeFROMClause(sb, dataDe != null && dataAte != null, reenviar);
|
||||
|
||||
Query query = getSession().createSQLQuery(sb.toString());
|
||||
|
@ -1372,7 +1375,7 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
|||
|
||||
String nomeArquivo = "Sicoob" + new SimpleDateFormat("ddMM").format(new Date());
|
||||
int variavel = 0;
|
||||
int seqRegistro = 0;
|
||||
int seqRegistro = 1;
|
||||
int qtdeTitulos = 0;
|
||||
BigDecimal valorTitulos = BigDecimal.ZERO;
|
||||
|
||||
|
@ -1418,7 +1421,6 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
|||
cabecalhoLoteRemessaSicoob.setNomeEmpresa(nomeEmpresa);
|
||||
cabecalhoLoteRemessaSicoob.setNumeroRemessa(idRemessa);
|
||||
cabecalhoLoteRemessaSicoob.setDataGeracao(new Date());
|
||||
|
||||
cabecalhoRemessaSicoob.setCabecalhoLoteRemessaSicoob(cabecalhoLoteRemessaSicoob);
|
||||
|
||||
arquivoRemessaItem = new ArquivoRemessaSicoob();
|
||||
|
@ -1428,10 +1430,10 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
|||
}else {
|
||||
try{
|
||||
if( !(cabecalhoRemessaSicoob.getNumConvenio()).equals(codEmpresaBanco)) {
|
||||
throw new ValidacaoRemessaException("O codigo de convênio não confere com o codigo do banco \r\n favor entrar em contato com o suporte! ");
|
||||
throw new ValidacaoRemessaException(Labels.getLabel("relatorioRemessaCNAB.exception.ValidacaoRemessaConvenioException"));
|
||||
}
|
||||
}catch(Exception e){
|
||||
throw new ValidacaoRemessaException("Houve um erro na montagem do cabeçalho do arquivo de remessa \r\n favor entrar em contato com o suporte! ");
|
||||
throw new ValidacaoRemessaException(Labels.getLabel("relatorioRemessaCNAB.exception.ValidacaoRemessaMontagemCabecalhoException"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1449,13 +1451,14 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
|||
titulosSicoob.setVencimento((Date) tupla[10]);
|
||||
titulosSicoob.setValor( valor );
|
||||
titulosSicoob.setEmissao((Date) tupla[13]);
|
||||
titulosSicoob.setCodCarteira(Integer.valueOf(tupla[8].toString()));
|
||||
try{
|
||||
titulosSicoob.setCodMora(1);
|
||||
titulosSicoob.setJurosDeMora(new BigDecimal(tupla[16].toString().replaceAll(",", ".")));
|
||||
titulosSicoob.setDataMora((Date) tupla[10]);
|
||||
titulosSicoob.setDataMora(DateUtil.somarDias((Date) tupla[10], 1));
|
||||
}catch(NullPointerException e){
|
||||
titulosSicoob.setCodMora(1);
|
||||
titulosSicoob.setDataMora((Date) tupla[10]);
|
||||
titulosSicoob.setCodMora(BigDecimal.ZERO.intValue());
|
||||
titulosSicoob.setDataMora(null);
|
||||
titulosSicoob.setJurosDeMora(BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
|
@ -1464,8 +1467,8 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
|||
titulosSicoob.setDataDesconto((Date) tupla[10]);
|
||||
titulosSicoob.setDescontoConcedido(new BigDecimal(tupla[17].toString().replaceAll(",", ".")));
|
||||
}catch(NullPointerException e){
|
||||
titulosSicoob.setCodigoDesconto(1);
|
||||
titulosSicoob.setDataDesconto((Date) tupla[10]);
|
||||
titulosSicoob.setCodigoDesconto(BigDecimal.ZERO.intValue());
|
||||
titulosSicoob.setDataDesconto(null);
|
||||
titulosSicoob.setDescontoConcedido(BigDecimal.ZERO);
|
||||
}
|
||||
|
||||
|
@ -1476,10 +1479,10 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
|||
titulosSicoob.setAbatimentoConcedido(BigDecimal.ZERO);
|
||||
}
|
||||
titulosSicoob.setNossoNumeroEmp(tupla[0].toString());
|
||||
titulosSicoob.setCodigoProtesto(3);
|
||||
titulosSicoob.setDiasProtesto(0);
|
||||
titulosSicoob.setCodigoProtesto(1);
|
||||
titulosSicoob.setDiasProtesto(1);
|
||||
titulosSicoob.setCodigoBaixa(2);
|
||||
titulosSicoob.setDiasBaixa(0);
|
||||
titulosSicoob.setDiasBaixa(000);
|
||||
titulosSicoob.setNumeroContrato(Integer.parseInt(tupla[0].toString()));
|
||||
|
||||
DetalheObrigatorioDadosPagadorSicoob pagadorSicoob = new DetalheObrigatorioDadosPagadorSicoob();
|
||||
|
@ -1502,31 +1505,37 @@ public class RemessaCNABBancosHibernateDAO extends GenericHibernateDAO<Fechament
|
|||
try{
|
||||
pagadorSicoob.setNumeroInscricaoSacado(tupla[20].toString());
|
||||
}catch(Exception e){
|
||||
throw new ValidacaoRemessaException("O CNPJ do ponto de venda "+tupla[20]+" está fora do padrão, favor corrigir");
|
||||
throw new ValidacaoRemessaException("relatorioRemessaCNAB.exception.ValidacaoRemessaCNPJException", null, tupla[20]);
|
||||
}
|
||||
|
||||
try{
|
||||
pagadorSicoob.setLogradouroSacado(tupla[22].toString());
|
||||
}catch(Exception e){
|
||||
throw new ValidacaoRemessaException("O Logradouro do ponto de venda "+tupla[20]+" está fora do padrão, favor corrigir");
|
||||
throw new ValidacaoRemessaException("relatorioRemessaCNAB.exception.ValidacaoRemessaLogradouroException", null, tupla[22]);
|
||||
}
|
||||
|
||||
try{
|
||||
pagadorSicoob.setBairroSacado(tupla[23].toString());
|
||||
}catch(Exception e){
|
||||
throw new ValidacaoRemessaException("O Bairro do ponto de venda "+tupla[20]+" está fora do padrão, favor corrigir");
|
||||
throw new ValidacaoRemessaException("relatorioRemessaCNAB.exception.ValidacaoRemessaBairroException", null, tupla[23]);
|
||||
}
|
||||
|
||||
try{
|
||||
pagadorSicoob.setCidade(tupla[25].toString());
|
||||
}catch(Exception e){
|
||||
throw new ValidacaoRemessaException("A cidade do ponto de venda "+tupla[20]+" está fora do padrão, favor corrigir");
|
||||
throw new ValidacaoRemessaException("relatorioRemessaCNAB.exception.ValidacaoRemessaCidadeException", null, tupla[25]);
|
||||
}
|
||||
|
||||
try{
|
||||
pagadorSicoob.setEstado(tupla[26].toString());
|
||||
}catch(Exception e){
|
||||
throw new ValidacaoRemessaException("O Estado do ponto de venda "+tupla[20]+" está fora do padrão, favor corrigir");
|
||||
throw new ValidacaoRemessaException("relatorioRemessaCNAB.exception.ValidacaoRemessaEstadoException", null, tupla[26]);
|
||||
}
|
||||
|
||||
try{
|
||||
pagadorSicoob.setCveEstado(tupla[29].toString());
|
||||
}catch(Exception e){
|
||||
throw new ValidacaoRemessaException("relatorioRemessaCNAB.exception.ValidacaoRemessaCVEEstadoException", null, tupla[29]);
|
||||
}
|
||||
|
||||
titulosSicoob.setDetalheObrigatorioDadosPagadorSicoob(pagadorSicoob);
|
||||
|
|
|
@ -525,4 +525,28 @@ public class RutaHibernateDAO extends GenericHibernateDAO<Ruta, Integer> impleme
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Ruta> buscarRutasPorEmpresaOrgaoConcedenteClaseServicio(Empresa empresa, OrgaoConcedente orgao, ClaseServicio claseServicio) {
|
||||
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq(ACTIVO, Boolean.TRUE));
|
||||
c.add(Restrictions.ne("rutaId", -1));
|
||||
|
||||
if (empresa != null && empresa.getEmpresaId() != -1) {
|
||||
c.createCriteria("lsRutaEmpresa").add(Restrictions.eq("empresa", empresa));
|
||||
}
|
||||
|
||||
if (orgao != null && orgao.getOrgaoConcedenteId() != -1) {
|
||||
c.add(Restrictions.eq("orgaoConcedente", orgao));
|
||||
}
|
||||
|
||||
if (claseServicio != null && claseServicio.getClaseservicioId() != -1) {
|
||||
c.add(Restrictions.eq("claseServicio", claseServicio));
|
||||
}
|
||||
|
||||
c.addOrder(Order.asc("descruta"));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
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.SolicitudExpresosDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.TrayectosExpresosDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||
|
||||
@Repository("solicitudExpresosDAO")
|
||||
public class SolicitudExpresosHibernateDAO extends GenericHibernateDAO<SolicitudExpreso, Integer> implements SolicitudExpresosDAO{
|
||||
@Autowired
|
||||
public SolicitudExpresosHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.TarjetaViajeDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.TrayectosExpresosDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||
import com.rjconsultores.ventaboletos.entidad.TarjetaViaje;
|
||||
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||
|
||||
@Repository("trayectosExpresosDAO")
|
||||
public class TrayectosExpresosHibernateDAO extends GenericHibernateDAO<TrayectosExpresos, Integer> implements TrayectosExpresosDAO{
|
||||
@Autowired
|
||||
public TrayectosExpresosHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TrayectosExpresos> obtenerTrayectosPorServicioId(SolicitudExpreso expreso) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("SOLICITUDEXPRESO_ID", expreso.getSolicitudExpresoId()));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,165 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.Query;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.VoucherDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.Voucher;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Repository("voucherDAO")
|
||||
public class VoucherHibernateDAO extends GenericHibernateDAO<Voucher, Long> implements VoucherDAO {
|
||||
|
||||
@Autowired
|
||||
public VoucherHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Voucher> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq(ACTIVO, Boolean.TRUE));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Voucher> buscarConsulta(Long voucherId,
|
||||
String numContrato,
|
||||
String nit,
|
||||
String nomeTransportadora,
|
||||
Date dataInicial,
|
||||
Date dataFinal,
|
||||
Integer origemId,
|
||||
Integer destinoId) {
|
||||
|
||||
StringBuilder hql = new StringBuilder();
|
||||
hql.append("SELECT v, ori.descParada AS descOrigem , des.descParada AS descDestino ");
|
||||
hql.append("FROM Voucher v ");
|
||||
|
||||
setJoins( numContrato,
|
||||
nit,
|
||||
nomeTransportadora,
|
||||
hql);
|
||||
|
||||
hql.append("WHERE v.activo = 1 ");
|
||||
|
||||
setClausulas(voucherId,
|
||||
numContrato,
|
||||
nit,
|
||||
nomeTransportadora,
|
||||
dataInicial,
|
||||
dataFinal,
|
||||
origemId,
|
||||
destinoId,
|
||||
hql);
|
||||
|
||||
hql.append("ORDER BY voucherId ");
|
||||
|
||||
Query query = getSession().createQuery(hql.toString());
|
||||
|
||||
setParametros(voucherId,
|
||||
numContrato,
|
||||
nit,
|
||||
nomeTransportadora,
|
||||
dataInicial,
|
||||
dataFinal,
|
||||
origemId,
|
||||
destinoId,
|
||||
query);
|
||||
|
||||
return query.list();
|
||||
}
|
||||
|
||||
private void setJoins(String numContrato, String nit, String nomeTransportadora, StringBuilder hql) {
|
||||
hql.append("LEFT JOIN Parada ori ON v.origenId = ori.origenId ");
|
||||
hql.append("LEFT JOIN Parada des ON v.origenId = des.origenId ");
|
||||
|
||||
}
|
||||
|
||||
private void setClausulas(Long voucherId, String numContrato, String nit, String nomeTransportadora,
|
||||
Date dataInicial, Date dataFinal, Integer origemId, Integer destinoId, StringBuilder hql) {
|
||||
if(voucherId != null ){
|
||||
hql.append(" AND v.voucherId = :voucherId ");
|
||||
}
|
||||
|
||||
if(numContrato != null ){
|
||||
hql.append(" AND v.voucherId = :voucherId ");
|
||||
}
|
||||
|
||||
if(nit != null ){
|
||||
hql.append(" AND v.voucherId = :voucherId ");
|
||||
}
|
||||
|
||||
if(nomeTransportadora != null ){
|
||||
hql.append(" AND v.voucherId = :voucherId ");
|
||||
}
|
||||
|
||||
if(dataInicial != null ){
|
||||
hql.append(" AND v.dataValidade >= :dataInicial ");
|
||||
}
|
||||
|
||||
if(dataFinal != null ){
|
||||
hql.append(" AND v.dataValidade <= :dataFinal ");
|
||||
}
|
||||
|
||||
if(origemId != null ){
|
||||
hql.append(" AND v.origenId = :origemId ");
|
||||
}
|
||||
|
||||
if(destinoId != null ){
|
||||
hql.append(" AND v.destinoId = :destinoId ");
|
||||
}
|
||||
}
|
||||
|
||||
private void setParametros(Long voucherId,
|
||||
String numContrato,
|
||||
String nit,
|
||||
String nomeTransportadora,
|
||||
Date dataInicial,
|
||||
Date dataFinal,
|
||||
Integer origemId,
|
||||
Integer destinoId,
|
||||
Query query) {
|
||||
|
||||
if(voucherId != null ){
|
||||
query.setLong("voucherId", voucherId);
|
||||
}
|
||||
|
||||
if(numContrato != null ){
|
||||
query.setString("numContrato", numContrato);
|
||||
}
|
||||
|
||||
if(nit != null ){
|
||||
query.setString("nit", nit);
|
||||
}
|
||||
|
||||
if(nomeTransportadora != null ){
|
||||
query.setString("nomeTransportadora", nomeTransportadora);
|
||||
}
|
||||
|
||||
if(dataInicial != null ){
|
||||
query.setDate("dataInicial", dataInicial);
|
||||
}
|
||||
|
||||
if(dataFinal != null ){
|
||||
query.setDate("dataFinal", dataFinal);
|
||||
}
|
||||
|
||||
if(origemId != null ){
|
||||
query.setInteger("origemId", origemId);
|
||||
}
|
||||
|
||||
if(destinoId != null ){
|
||||
query.setInteger("destinoId", destinoId);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -16,6 +16,11 @@ import javax.persistence.Table;
|
|||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
import org.hibernate.annotations.Parameter;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.rjconsultores.ventaboletos.enums.EnumClasseServicoConfortoMonitrip;
|
||||
|
||||
@Entity
|
||||
@SequenceGenerator(name = "ALIAS_CLASSE_SEQ", sequenceName = "ALIAS_CLASSE_SEQ", allocationSize = 1)
|
||||
@Table(name = "ALIAS_CLASSE_SERVICO")
|
||||
|
@ -40,6 +45,14 @@ public class AliasClasse implements Serializable {
|
|||
@JoinColumn(name = "ORGAOCONCEDENTE_ID")
|
||||
private OrgaoConcedente orgaoConcedente;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "RUTA_ID")
|
||||
private Ruta ruta;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "EMPRESA_ID")
|
||||
private Empresa empresa;
|
||||
|
||||
@Column(name = "MENSAGEM")
|
||||
private String mensagem;
|
||||
|
||||
|
@ -53,6 +66,17 @@ public class AliasClasse implements Serializable {
|
|||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
|
||||
@Column(name = "INDSOMENTEIMPRESSAO")
|
||||
private Boolean indSomenteImpressao;
|
||||
|
||||
@Type(type = "com.rjconsultores.ventaboletos.constantes.CustomEnumTypeHibernate", parameters = {
|
||||
@Parameter(name = "type", value = "com.rjconsultores.ventaboletos.constantes.CustomEnumTypeHibernate"),
|
||||
@Parameter(name = "class", value = "com.rjconsultores.ventaboletos.enums.EnumClasseServicoConfortoMonitrip"),
|
||||
@Parameter(name = "sqlType", value = "12")/*Types.VARCHAR*/,
|
||||
@Parameter(name = "enumName", value = "true")})
|
||||
@Column(name = "CLASSE_CONFORTO_MONITRIP")
|
||||
private com.rjconsultores.ventaboletos.enums.EnumClasseServicoConfortoMonitrip classeConfortoMonitrip;
|
||||
|
||||
public AliasClasse() {
|
||||
super();
|
||||
}
|
||||
|
@ -145,4 +169,37 @@ public class AliasClasse implements Serializable {
|
|||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
public EnumClasseServicoConfortoMonitrip getClasseConfortoMonitrip() {
|
||||
return classeConfortoMonitrip;
|
||||
}
|
||||
|
||||
public void setClasseConfortoMonitrip(EnumClasseServicoConfortoMonitrip classeConfortoMonitrip) {
|
||||
this.classeConfortoMonitrip = classeConfortoMonitrip;
|
||||
}
|
||||
|
||||
public Ruta getRuta() {
|
||||
return ruta;
|
||||
}
|
||||
|
||||
public void setRuta(Ruta ruta) {
|
||||
this.ruta = ruta;
|
||||
}
|
||||
|
||||
public Empresa getEmpresa() {
|
||||
return empresa;
|
||||
}
|
||||
|
||||
public void setEmpresa(Empresa empresa) {
|
||||
this.empresa = empresa;
|
||||
}
|
||||
|
||||
public Boolean getIndSomenteImpressao() {
|
||||
return indSomenteImpressao;
|
||||
}
|
||||
|
||||
public void setIndSomenteImpressao(Boolean indSomenteImpressao) {
|
||||
this.indSomenteImpressao = indSomenteImpressao;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -166,4 +166,9 @@ public class ContratoCorporativo implements Serializable {
|
|||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.getContratoId().toString();
|
||||
}
|
||||
|
||||
}
|
|
@ -10,6 +10,7 @@ import javax.persistence.Basic;
|
|||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
|
@ -113,32 +114,32 @@ public class EsquemaCorrida implements Serializable, Auditavel<EsquemaCorrida> {
|
|||
private String statusCorrida;
|
||||
|
||||
@JoinColumn(name = "RUTA_ID", referencedColumnName = "RUTA_ID")
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
private Ruta ruta;
|
||||
|
||||
@JoinColumn(name = "ROLOPERATIVO_ID", referencedColumnName = "ROLOPERATIVO_ID")
|
||||
@ManyToOne(cascade = CascadeType.ALL)
|
||||
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
private RolOperativo rolOperativo;
|
||||
|
||||
@JoinColumn(name = "MARCA_ID", referencedColumnName = "MARCA_ID")
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
private Marca marca;
|
||||
|
||||
@JoinColumn(name = "ESQUEMAOPERACIONAL_ID", referencedColumnName = "ESQUEMAOPERACIONAL_ID")
|
||||
@ManyToOne(cascade = CascadeType.ALL)
|
||||
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
@AuditarEntidade
|
||||
private EsquemaOperacional esquemaOperacional;
|
||||
|
||||
@JoinColumn(name = "EMPRESACORRIDA_ID", referencedColumnName = "EMPRESA_ID")
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
private Empresa empresa;
|
||||
|
||||
@JoinColumn(name = "EMPRESAINGRESO_ID", referencedColumnName = "EMPRESA_ID")
|
||||
@ManyToOne
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
private Empresa empresa1;
|
||||
|
||||
@JoinColumn(name = "CLASESERVICIO_ID", referencedColumnName = "CLASESERVICIO_ID")
|
||||
@ManyToOne(cascade = CascadeType.ALL)
|
||||
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
private ClaseServicio claseServicio;
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL)
|
||||
|
@ -146,7 +147,7 @@ public class EsquemaCorrida implements Serializable, Auditavel<EsquemaCorrida> {
|
|||
@AuditarLista(auditarEntidades = true, nome = "Localidade")
|
||||
private List<EsquemaTramo> esquemaTramoList;
|
||||
|
||||
@OneToMany(cascade = CascadeType.PERSIST)
|
||||
@OneToMany(cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "ESQUEMACORRIDA_ID", referencedColumnName = "ESQUEMACORRIDA_ID")
|
||||
@AuditarLista(auditarEntidades = true, nome = "Cotas")
|
||||
private List<EsquemaAsiento> esquemaAsientoList;
|
||||
|
@ -155,11 +156,11 @@ public class EsquemaCorrida implements Serializable, Auditavel<EsquemaCorrida> {
|
|||
private String tipocorrida;
|
||||
|
||||
@JoinColumn(name = "ESQUEMAREBOTE_ID", referencedColumnName = "ESQUEMACORRIDA_ID")
|
||||
@ManyToOne(cascade = CascadeType.ALL)
|
||||
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
private EsquemaCorrida esquemaCorridaRebote;
|
||||
|
||||
@JoinColumn(name = "DIVISION_ID", referencedColumnName = "DIVISION_ID")
|
||||
@ManyToOne(cascade = CascadeType.ALL)
|
||||
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
private Division division;
|
||||
|
||||
@Column(name = "NUMCORRIDA")
|
||||
|
@ -190,14 +191,14 @@ public class EsquemaCorrida implements Serializable, Auditavel<EsquemaCorrida> {
|
|||
private Boolean indDiaSimDiaNao;
|
||||
|
||||
@JoinColumn(name = "AUTOBUS_ID", referencedColumnName = "AUTOBUS_ID")
|
||||
@ManyToOne(cascade = CascadeType.ALL)
|
||||
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
private Autobus autoBus;
|
||||
|
||||
@OneToMany(mappedBy = "esquemaCorrida", cascade = CascadeType.ALL)
|
||||
@OneToMany(mappedBy = "esquemaCorrida", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
@AuditarLista(auditarEntidades = true, nome = "Embarque/Desembarque")
|
||||
private List<EsquemaCorridaEmbarqueDesembarque> lsEsquemaCorridaEmbarqueDesembarque;
|
||||
|
||||
@OneToMany(mappedBy = "esquemaCorrida", cascade = CascadeType.ALL)
|
||||
@OneToMany(mappedBy = "esquemaCorrida", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
@AuditarLista(auditarEntidades = true, nome = "Info Tramo>")
|
||||
private List<EsquemaCorridaInfo> lsEsquemaCorridaInfo;
|
||||
|
||||
|
@ -236,7 +237,7 @@ public class EsquemaCorrida implements Serializable, Auditavel<EsquemaCorrida> {
|
|||
private Integer minutosAutomacaoHEAte;
|
||||
|
||||
@JoinColumn(name = "ROLOPERATIVO_SERVICOEXTRA_ID", referencedColumnName = "ROLOPERATIVO_ID")
|
||||
@ManyToOne(cascade = CascadeType.ALL)
|
||||
@ManyToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
|
||||
private RolOperativo rolOperativoServicoExtra;
|
||||
|
||||
@Column(name = "NUMCORRIDA_SERVICOEXTRA")
|
||||
|
|
|
@ -0,0 +1,426 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Blob;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
import org.hibernate.type.LobType;
|
||||
|
||||
import oracle.sql.BLOB;
|
||||
|
||||
@Entity
|
||||
@SequenceGenerator(name = "SOLICITUD_EXPRESO_SEQ", sequenceName = "SOLICITUD_EXPRESO_SEQ", allocationSize = 1)
|
||||
@Table(name = "SOLICITUD_EXPRESO")
|
||||
public class SolicitudExpreso implements Serializable{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "SOLICITUD_EXPRESO_SEQ")
|
||||
@Column(name = "SOLICITUDEXPRESO_ID")
|
||||
private Integer solicitudExpresoId;
|
||||
|
||||
@JoinColumn(name = "CIUDADORIGEN_ID")
|
||||
@OneToOne
|
||||
private Ciudad ciudadOrigen;
|
||||
|
||||
@JoinColumn(name = "CIUDADDESTINO_ID")
|
||||
@OneToOne
|
||||
private Ciudad ciudadDestino;
|
||||
|
||||
@Column(name = "CANTPASAJEROS")
|
||||
private Integer cantidadPasajeros;
|
||||
|
||||
@Column(name = "FECSOLICITUD")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fechaSolicitud;
|
||||
|
||||
@JoinColumn(name = "TIPOIDENTIFICACION_ID")
|
||||
@OneToOne
|
||||
private TipoIdentificacion tipoIdentificacion;
|
||||
|
||||
@Column(name = "NUMIDENTIFICACION")
|
||||
private String numIdentidicacion;
|
||||
|
||||
@Column(name = "DESCNOMBRE")
|
||||
private String descNombre;
|
||||
|
||||
@Column(name = "DESCAPELLIDOS")
|
||||
private String descApellidos;
|
||||
|
||||
@Column(name = "DESCDIRECCION")
|
||||
private String descDireccion;
|
||||
|
||||
@Column(name = "DESCTELEFONO")
|
||||
private String descTelefono;
|
||||
|
||||
@Column(name = "DESCEMAIL")
|
||||
private String descEmail;
|
||||
|
||||
@Column(name = "INDVIAJEREDONDO")
|
||||
private Boolean indViajeRedondo;
|
||||
|
||||
@Column(name = "FECHORIDA")
|
||||
private Date fechaHoraIda;
|
||||
|
||||
@Column(name = "DESCOBSERVACIONIDA")
|
||||
private String descObservacionIda;
|
||||
|
||||
@Column(name = "DESCSITIOPARTIDAIDA")
|
||||
private String descSitioPartidaIda;
|
||||
|
||||
@Column(name = "DESCSITIOLLEGADAIDA")
|
||||
private String descSitioLlegadaIda;
|
||||
|
||||
@Column(name = "FECHORREGRESO")
|
||||
private Date fechaHoraRegreso;
|
||||
|
||||
@Column(name = "DESCOBSERVACIONREGRESO")
|
||||
private String descObservacionRegreso;
|
||||
|
||||
@Column(name = "DESCSITIOPARTIDAREGRESO")
|
||||
private String descSitioPartidaRegreso;
|
||||
|
||||
@Column(name = "DESCSITIOLLEGADAREGRESO")
|
||||
private String descSitioLlegadaRegreso;
|
||||
|
||||
@Column(name = "INDREQUIEREDISPVEHICULO")
|
||||
private Integer indRequiereDispVehiculo;
|
||||
|
||||
@Column(name = "INDREQUIERERECORRIDOSINTERNOS")
|
||||
private Integer indRequiereRecorridosInternos;
|
||||
|
||||
@Column(name = "STATUSSOLICITUDEXPRESO_ID")
|
||||
private Integer statusSolicitudExpresoId;
|
||||
|
||||
@Lob
|
||||
@Column(name = "DOCCOTIZACION", columnDefinition="BLOB")
|
||||
private byte[] docCotizacion;
|
||||
|
||||
@Lob
|
||||
@Column(name = "DOCCONTRATO", columnDefinition="BLOB")
|
||||
private byte[] docContrato;
|
||||
|
||||
@Column(name = "VALORCOTIZACION")
|
||||
private Integer valorCotizacion;
|
||||
|
||||
@Column(name = "FORMAPAGO_ID")
|
||||
private Integer formaPagoId;
|
||||
|
||||
@Column(name = "USUARIOAUTORIZACREDITO")
|
||||
private Integer usuarioAutorizaCredito;
|
||||
|
||||
@Column(name = "FECHORAUTORIZACREDITO")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fechaHoraAutorizaCredito;
|
||||
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fechaHoraModif;
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
|
||||
public Integer getSolicitudExpresoId() {
|
||||
return solicitudExpresoId;
|
||||
}
|
||||
|
||||
public void setSolicitudExpresoId(Integer solicitudExpresoId) {
|
||||
this.solicitudExpresoId = solicitudExpresoId;
|
||||
}
|
||||
|
||||
public Ciudad getCiudadOrigen() {
|
||||
return ciudadOrigen;
|
||||
}
|
||||
|
||||
public void setCiudadOrigen(Ciudad ciudadOrigen) {
|
||||
this.ciudadOrigen = ciudadOrigen;
|
||||
}
|
||||
|
||||
public Ciudad getCiudadDestino() {
|
||||
return ciudadDestino;
|
||||
}
|
||||
|
||||
public void setCiudadDestino(Ciudad ciudadDestino) {
|
||||
this.ciudadDestino = ciudadDestino;
|
||||
}
|
||||
|
||||
public Integer getCantidadPasajeros() {
|
||||
return cantidadPasajeros;
|
||||
}
|
||||
|
||||
public void setCantidadPasajeros(Integer cantidadPasajeros) {
|
||||
this.cantidadPasajeros = cantidadPasajeros;
|
||||
}
|
||||
|
||||
public Date getFechaSolicitud() {
|
||||
return fechaSolicitud;
|
||||
}
|
||||
|
||||
public void setFechaSolicitud(Date fechaSolicitud) {
|
||||
this.fechaSolicitud = fechaSolicitud;
|
||||
}
|
||||
|
||||
public TipoIdentificacion getTipoIdentificacion() {
|
||||
return tipoIdentificacion;
|
||||
}
|
||||
|
||||
public void setTipoIdentificacion(TipoIdentificacion tipoIdentificacion) {
|
||||
this.tipoIdentificacion = tipoIdentificacion;
|
||||
}
|
||||
|
||||
public String getNumIdentidicacion() {
|
||||
return numIdentidicacion;
|
||||
}
|
||||
|
||||
public void setNumIdentidicacion(String numIdentidicacion) {
|
||||
this.numIdentidicacion = numIdentidicacion;
|
||||
}
|
||||
|
||||
public String getDescNombre() {
|
||||
return descNombre;
|
||||
}
|
||||
|
||||
public void setDescNombre(String descNombre) {
|
||||
this.descNombre = descNombre;
|
||||
}
|
||||
|
||||
public String getDescApellidos() {
|
||||
return descApellidos;
|
||||
}
|
||||
|
||||
public void setDescApellidos(String descApellidos) {
|
||||
this.descApellidos = descApellidos;
|
||||
}
|
||||
|
||||
public String getDescDireccion() {
|
||||
return descDireccion;
|
||||
}
|
||||
|
||||
public void setDescDireccion(String descDireccion) {
|
||||
this.descDireccion = descDireccion;
|
||||
}
|
||||
|
||||
public String getDescTelefono() {
|
||||
return descTelefono;
|
||||
}
|
||||
|
||||
public void setDescTelefono(String descTelefono) {
|
||||
this.descTelefono = descTelefono;
|
||||
}
|
||||
|
||||
public String getDescEmail() {
|
||||
return descEmail;
|
||||
}
|
||||
|
||||
public void setDescEmail(String descEmail) {
|
||||
this.descEmail = descEmail;
|
||||
}
|
||||
|
||||
public Boolean getIndViajeRedondo() {
|
||||
return indViajeRedondo;
|
||||
}
|
||||
|
||||
public void setIndViajeRedondo(Boolean indViajeRedondo) {
|
||||
this.indViajeRedondo = indViajeRedondo;
|
||||
}
|
||||
|
||||
public Date getFechaHoraIda() {
|
||||
return fechaHoraIda;
|
||||
}
|
||||
|
||||
public void setFechaHoraIda(Date fechaHoraIda) {
|
||||
this.fechaHoraIda = fechaHoraIda;
|
||||
}
|
||||
|
||||
public String getDescObservacionIda() {
|
||||
return descObservacionIda;
|
||||
}
|
||||
|
||||
public void setDescObservacionIda(String descObservacionIda) {
|
||||
this.descObservacionIda = descObservacionIda;
|
||||
}
|
||||
|
||||
public String getDescSitioPartidaIda() {
|
||||
return descSitioPartidaIda;
|
||||
}
|
||||
|
||||
public void setDescSitioPartidaIda(String descSitioPartidaIda) {
|
||||
this.descSitioPartidaIda = descSitioPartidaIda;
|
||||
}
|
||||
|
||||
public String getDescSitioLlegadaIda() {
|
||||
return descSitioLlegadaIda;
|
||||
}
|
||||
|
||||
public void setDescSitioLlegadaIda(String descSitioLlegadaIda) {
|
||||
this.descSitioLlegadaIda = descSitioLlegadaIda;
|
||||
}
|
||||
|
||||
public Date getFechaHoraRegreso() {
|
||||
return fechaHoraRegreso;
|
||||
}
|
||||
|
||||
public void setFechaHoraRegreso(Date fechaHoraRegreso) {
|
||||
this.fechaHoraRegreso = fechaHoraRegreso;
|
||||
}
|
||||
|
||||
public String getDescObservacionRegreso() {
|
||||
return descObservacionRegreso;
|
||||
}
|
||||
|
||||
public void setDescObservacionRegreso(String descObservacionRegreso) {
|
||||
this.descObservacionRegreso = descObservacionRegreso;
|
||||
}
|
||||
|
||||
public String getDescSitioPartidaRegreso() {
|
||||
return descSitioPartidaRegreso;
|
||||
}
|
||||
|
||||
public void setDescSitioPartidaRegreso(String descSitioPartidaRegreso) {
|
||||
this.descSitioPartidaRegreso = descSitioPartidaRegreso;
|
||||
}
|
||||
|
||||
public String getDescSitioLlegadaRegreso() {
|
||||
return descSitioLlegadaRegreso;
|
||||
}
|
||||
|
||||
public void setDescSitioLlegadaRegreso(String descSitioLlegadaRegreso) {
|
||||
this.descSitioLlegadaRegreso = descSitioLlegadaRegreso;
|
||||
}
|
||||
|
||||
public Integer getIndRequiereDispVehiculo() {
|
||||
return indRequiereDispVehiculo;
|
||||
}
|
||||
|
||||
public void setIndRequiereDispVehiculo(Integer indRequiereDispVehiculo) {
|
||||
this.indRequiereDispVehiculo = indRequiereDispVehiculo;
|
||||
}
|
||||
|
||||
public Integer getIndRequiereRecorridosInternos() {
|
||||
return indRequiereRecorridosInternos;
|
||||
}
|
||||
|
||||
public void setIndRequiereRecorridosInternos(Integer indRequiereRecorridosInternos) {
|
||||
this.indRequiereRecorridosInternos = indRequiereRecorridosInternos;
|
||||
}
|
||||
|
||||
public Integer getStatusSolicitudExpresoId() {
|
||||
return statusSolicitudExpresoId;
|
||||
}
|
||||
|
||||
public void setStatusSolicitudExpresoId(Integer statusSolicitudExpresoId) {
|
||||
this.statusSolicitudExpresoId = statusSolicitudExpresoId;
|
||||
}
|
||||
|
||||
public byte[] getDocCotizacion() {
|
||||
return docCotizacion;
|
||||
}
|
||||
|
||||
public void setDocCotizacion(byte[] docCotizacion) {
|
||||
this.docCotizacion = docCotizacion;
|
||||
}
|
||||
|
||||
public byte[] getDocContrato() {
|
||||
return docContrato;
|
||||
}
|
||||
|
||||
public void setDocContrato(byte[] docContrato) {
|
||||
this.docContrato = docContrato;
|
||||
}
|
||||
|
||||
public Integer getValorCotizacion() {
|
||||
return valorCotizacion;
|
||||
}
|
||||
|
||||
public void setValorCotizacion(Integer valorCotizacion) {
|
||||
this.valorCotizacion = valorCotizacion;
|
||||
}
|
||||
|
||||
public Integer getFormaPagoId() {
|
||||
return formaPagoId;
|
||||
}
|
||||
|
||||
public void setFormaPagoId(Integer formaPagoId) {
|
||||
this.formaPagoId = formaPagoId;
|
||||
}
|
||||
|
||||
public Integer getUsuarioAutorizaCredito() {
|
||||
return usuarioAutorizaCredito;
|
||||
}
|
||||
|
||||
public void setUsuarioAutorizaCredito(Integer usuarioAutorizaCredito) {
|
||||
this.usuarioAutorizaCredito = usuarioAutorizaCredito;
|
||||
}
|
||||
|
||||
public Date getFechaHoraAutorizaCredito() {
|
||||
return fechaHoraAutorizaCredito;
|
||||
}
|
||||
|
||||
public void setFechaHoraAutorizaCredito(Date fechaHoraAutorizaCredito) {
|
||||
this.fechaHoraAutorizaCredito = fechaHoraAutorizaCredito;
|
||||
}
|
||||
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
public Date getFechaHoraModif() {
|
||||
return fechaHoraModif;
|
||||
}
|
||||
|
||||
public void setFechaHoraModif(Date fechaHoraModif) {
|
||||
this.fechaHoraModif = fechaHoraModif;
|
||||
}
|
||||
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "SolicitudExpreso [solicitudExpresoId=" + solicitudExpresoId + ", ciudadOrigen=" + ciudadOrigen
|
||||
+ ", ciudadDestino=" + ciudadDestino + ", cantidadPasajeros=" + cantidadPasajeros + ", fechaSolicitud="
|
||||
+ fechaSolicitud + ", tipoIdentificacion=" + tipoIdentificacion + ", numIdentidicacion="
|
||||
+ numIdentidicacion + ", descNombre=" + descNombre + ", descApellidos=" + descApellidos
|
||||
+ ", descDireccion=" + descDireccion + ", descTelefono=" + descTelefono + ", descEmail=" + descEmail
|
||||
+ ", indViajeRedondo=" + indViajeRedondo + ", fechaHoraIda=" + fechaHoraIda + ", descObservacionIda="
|
||||
+ descObservacionIda + ", descSitioPartidaIda=" + descSitioPartidaIda + ", descSitioLlegadaIda="
|
||||
+ descSitioLlegadaIda + ", fechaHoraRegreso=" + fechaHoraRegreso + ", descObservacionRegreso="
|
||||
+ descObservacionRegreso + ", descSitioPartidaRegreso=" + descSitioPartidaRegreso
|
||||
+ ", descSitioLlegadaRegreso=" + descSitioLlegadaRegreso + ", indRequiereDispVehiculo="
|
||||
+ indRequiereDispVehiculo + ", indRequiereRecorridosInternos=" + indRequiereRecorridosInternos
|
||||
+ ", statusSolicitudExpresoId=" + statusSolicitudExpresoId + ", docCotizacion="
|
||||
+ Arrays.toString(docCotizacion) + ", docContrato=" + Arrays.toString(docContrato)
|
||||
+ ", valorCotizacion=" + valorCotizacion + ", formaPagoId=" + formaPagoId + ", usuarioAutorizaCredito="
|
||||
+ usuarioAutorizaCredito + ", fechaHoraAutorizaCredito=" + fechaHoraAutorizaCredito + ", activo="
|
||||
+ activo + ", fechaHoraModif=" + fechaHoraModif + ", usuarioId=" + usuarioId + "]";
|
||||
}
|
||||
}
|
|
@ -62,4 +62,12 @@ public class Transportadora implements Serializable{
|
|||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecModif;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return nomeTransportadora;
|
||||
}
|
||||
|
||||
public Transportadora(String nomeTransportadora) {
|
||||
this.nomeTransportadora = nomeTransportadora;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,152 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
@Entity
|
||||
@SequenceGenerator(name = "TRAYECTOS_EXPRESO_SEQ", sequenceName = "TRAYECTOS_EXPRESO_SEQ", allocationSize = 1)
|
||||
@Table(name = "TRAYECTOS_EXPRESOS")
|
||||
public class TrayectosExpresos implements Serializable{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "TRAYECTOS_EXPRESO_SEQ")
|
||||
@Column(name = "TRAYECTOSEXPRESOS_ID")
|
||||
private Integer trayectoExpresoId;
|
||||
|
||||
@JoinColumn(name = "SOLICITUDEXPRESO_ID")
|
||||
@OneToOne
|
||||
private SolicitudExpreso solicitudExpresoId;
|
||||
|
||||
@Column(name = "DESCTRAYECTO")
|
||||
private String descTrayecto;
|
||||
|
||||
@Column(name = "VALORTRAYECTO")
|
||||
private Integer valorTrayecto;
|
||||
|
||||
@Column(name = "CANTVEHICULOS")
|
||||
private Integer cantVehiculos;
|
||||
|
||||
@Column(name = "NUMPLACA")
|
||||
private String numPlaca;
|
||||
|
||||
@Lob
|
||||
@Column(name = "DOCFLUEC", columnDefinition="BLOB")
|
||||
private byte[] docFluec;
|
||||
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fechaHoraModif;
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
|
||||
public Integer getTrayectoExpresoId() {
|
||||
return trayectoExpresoId;
|
||||
}
|
||||
|
||||
public void setTrayectoExpresoId(Integer trayectoExpresoId) {
|
||||
this.trayectoExpresoId = trayectoExpresoId;
|
||||
}
|
||||
|
||||
public SolicitudExpreso getSolicitudExpresoId() {
|
||||
return solicitudExpresoId;
|
||||
}
|
||||
|
||||
public void setSolicitudExpresoId(SolicitudExpreso solicitudExpresoId) {
|
||||
this.solicitudExpresoId = solicitudExpresoId;
|
||||
}
|
||||
|
||||
public String getDescTrayecto() {
|
||||
return descTrayecto;
|
||||
}
|
||||
|
||||
public void setDescTrayecto(String descTrayecto) {
|
||||
this.descTrayecto = descTrayecto;
|
||||
}
|
||||
|
||||
public Integer getValorTrayecto() {
|
||||
return valorTrayecto;
|
||||
}
|
||||
|
||||
public void setValorTrayecto(Integer valorTrayecto) {
|
||||
this.valorTrayecto = valorTrayecto;
|
||||
}
|
||||
|
||||
public Integer getCantVehiculos() {
|
||||
return cantVehiculos;
|
||||
}
|
||||
|
||||
public void setCantVehiculos(Integer cantVehiculos) {
|
||||
this.cantVehiculos = cantVehiculos;
|
||||
}
|
||||
|
||||
public String getNumPlaca() {
|
||||
return numPlaca;
|
||||
}
|
||||
|
||||
public void setNumPlaca(String numPlaca) {
|
||||
this.numPlaca = numPlaca;
|
||||
}
|
||||
|
||||
public byte[] getDocFluec() {
|
||||
return docFluec;
|
||||
}
|
||||
|
||||
public void setDocFluec(byte[] docFluec) {
|
||||
this.docFluec = docFluec;
|
||||
}
|
||||
|
||||
public Boolean getActivo() {
|
||||
return activo;
|
||||
}
|
||||
|
||||
public void setActivo(Boolean activo) {
|
||||
this.activo = activo;
|
||||
}
|
||||
|
||||
public Date getFechaHoraModif() {
|
||||
return fechaHoraModif;
|
||||
}
|
||||
|
||||
public void setFechaHoraModif(Date fechaHoraModif) {
|
||||
this.fechaHoraModif = fechaHoraModif;
|
||||
}
|
||||
|
||||
public Integer getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
|
||||
public void setUsuarioId(Integer usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TrayectosExpresos [trayectoExpresoId=" + trayectoExpresoId + ", solicitudExpresoId="
|
||||
+ solicitudExpresoId + ", descTrayecto=" + descTrayecto + ", valorTrayecto=" + valorTrayecto
|
||||
+ ", cantVehiculos=" + cantVehiculos + ", numPlaca=" + numPlaca + ", docFluec="
|
||||
+ Arrays.toString(docFluec) + ", activo=" + activo + ", fechaHoraModif=" + fechaHoraModif
|
||||
+ ", usuarioId=" + usuarioId + "]";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,144 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
import com.rjconsultores.ventaboletos.anotacao.Renderizado;
|
||||
import com.rjconsultores.ventaboletos.enums.SituacaoVoucher;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Entity
|
||||
@SequenceGenerator(name = "VOUCHER_SEQ", sequenceName = "VOUCHER_SEQ", allocationSize = 1)
|
||||
@Table(name = "VOUCHER")
|
||||
public class Voucher implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -3684489881654368314L;
|
||||
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "VOUCHER_SEQ")
|
||||
@Renderizado( posicao = 1)
|
||||
@Column(name = "VOUCHER_ID")
|
||||
private Long voucherId;
|
||||
|
||||
@OneToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "CONTRATO_ID")
|
||||
@Renderizado( posicao = 2)
|
||||
private ContratoCorporativo contrato;
|
||||
|
||||
@Column(name = "NOME_PASSAGEIRO", length = 150)
|
||||
private String nomePassageiro;
|
||||
|
||||
@Column(name = "NUM_FATURA", length = 30)
|
||||
private String numFatura;
|
||||
|
||||
@Column(name = "VALOR_LICITADO")
|
||||
@Renderizado( posicao = 5 )
|
||||
private BigDecimal valorLicitado;
|
||||
|
||||
@Renderizado( posicao = 6)
|
||||
@Column(name = "VALOR_LEGALIZADO")
|
||||
private BigDecimal valorLegalizado;
|
||||
|
||||
@Renderizado( posicao = 4)
|
||||
@Column(name = "DATA_VALIDADE")
|
||||
private Date dataValidade;
|
||||
|
||||
@Column(name = "DATA_INCLUSAO")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date dataInclusao;
|
||||
|
||||
@Column(name = "ORIGEN_ID")
|
||||
private Integer origenId;
|
||||
|
||||
@Column(name = "DESTINO_ID")
|
||||
private Integer destinoId;
|
||||
|
||||
@Column(name = "CLASESERVICIO_ID")
|
||||
private Long claseServicioId;
|
||||
|
||||
@Column(name = "STATUS")
|
||||
@Renderizado( conversor = SituacaoVoucher.class, posicao = 3)
|
||||
private Integer status;
|
||||
|
||||
@Column(name = "CLIENTECORPORATIVO_ID")
|
||||
private Long clienteCorporativoId;
|
||||
|
||||
@Column(name = "MOTIVOCANCELACION_ID")
|
||||
private Long motivoCancelacionId;
|
||||
|
||||
@Column(name = "GRUPOCONTRATO_ID")
|
||||
private Long grupoContratoId;
|
||||
|
||||
@OneToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "TRANSPORTADORA_ID")
|
||||
private Transportadora transportadora;
|
||||
|
||||
@Column(name = "ACTIVO")
|
||||
private boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecModif;
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
|
||||
@Transient
|
||||
@Renderizado( posicao = 7 )
|
||||
private transient String descOrigem;
|
||||
|
||||
@Transient
|
||||
@Renderizado( posicao = 8 )
|
||||
private String descDestino;
|
||||
|
||||
public SituacaoVoucher getSituacaoVoucher() {
|
||||
return SituacaoVoucher.buscarPeloValor(status);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final Voucher other = (Voucher) obj;
|
||||
return this.getVoucherId().equals(other.getVoucherId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 7;
|
||||
hash = 59 * hash + (this.getVoucherId() != null ? this.getVoucherId().hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package com.rjconsultores.ventaboletos.enums;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
public enum EnumClasseServicoConfortoMonitrip {
|
||||
|
||||
CAMA(1, Labels.getLabel("editarAliasServicoController.tipoClasseConfortoMonitrip.cama")),
|
||||
LEITO(2, Labels.getLabel("editarAliasServicoController.tipoClasseConfortoMonitrip.leito")),
|
||||
SEMILEITO(3, Labels.getLabel("editarAliasServicoController.tipoClasseConfortoMonitrip.semileito")),
|
||||
EXECUTIVA(4, Labels.getLabel("editarAliasServicoController.tipoClasseConfortoMonitrip.executiva")),
|
||||
BASICA(5, Labels.getLabel("editarAliasServicoController.tipoClasseConfortoMonitrip.basica"));
|
||||
|
||||
|
||||
private Integer codigo;
|
||||
private String descricao;
|
||||
|
||||
private EnumClasseServicoConfortoMonitrip(Integer codigo, String descricao) {
|
||||
this.codigo = codigo;
|
||||
this.descricao = descricao;
|
||||
}
|
||||
|
||||
public Integer getCodigo() {
|
||||
return codigo;
|
||||
}
|
||||
|
||||
public String getDescricao() {
|
||||
return descricao;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getDescricao();
|
||||
}
|
||||
|
||||
public static List<EnumClasseServicoConfortoMonitrip> getList() {
|
||||
return Arrays.asList(EnumClasseServicoConfortoMonitrip.values());
|
||||
}
|
||||
|
||||
public static EnumClasseServicoConfortoMonitrip getTipo(Integer codigo) {
|
||||
|
||||
for (EnumClasseServicoConfortoMonitrip tipoClasseServicoBPe : EnumClasseServicoConfortoMonitrip.values()) {
|
||||
if(tipoClasseServicoBPe.getCodigo().equals(codigo)) {
|
||||
return tipoClasseServicoBPe;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package com.rjconsultores.ventaboletos.enums;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
public enum SituacaoVoucher {
|
||||
|
||||
EMITIDO(0,Labels.getLabel("label.situacaoVoucher.emitido")),
|
||||
LEGALIZADO(1,Labels.getLabel("label.situacaoVoucher.legalizado")),
|
||||
FATURADO(2,Labels.getLabel("label.situacaoVoucher.faturado")),
|
||||
CANCELADO(3,Labels.getLabel("label.situacaoVoucher.cancelado")),
|
||||
;
|
||||
|
||||
private Integer valor;
|
||||
private String descricao;
|
||||
|
||||
private SituacaoVoucher(Integer valor, String descricao) {
|
||||
this.valor = valor;
|
||||
this.descricao = descricao;
|
||||
}
|
||||
|
||||
public String getDescricao() {
|
||||
return descricao;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getDescricao();
|
||||
}
|
||||
|
||||
public Integer getValor() {
|
||||
return valor;
|
||||
}
|
||||
|
||||
public static SituacaoVoucher buscarPeloValor(Integer valor) {
|
||||
|
||||
for (SituacaoVoucher tipo : SituacaoVoucher.values()) {
|
||||
if (tipo.getValor().equals(valor)) {
|
||||
return tipo;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static SituacaoVoucher buscarPeloValor(String valor) {
|
||||
return buscarPeloValor( Integer.valueOf(valor));
|
||||
}
|
||||
}
|
|
@ -11,6 +11,7 @@ public enum TipoLancamentoCaixa {
|
|||
BILHETE_CONFIRMADO(4,Labels.getLabel("label.tipoLancamento.bilheteConfirmado"), false),
|
||||
BILHETE_ABERTO(5,Labels.getLabel("label.tipoLancamento.bilheteAberto"), false),
|
||||
EVENTO_EXTRA(6,Labels.getLabel("label.tipoLancamento.eventoExtra"), false),
|
||||
VOUCHER(7,Labels.getLabel("label.tipoLancamento.voucher"), false),
|
||||
;
|
||||
|
||||
private Integer valor;
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package com.rjconsultores.ventaboletos.exception;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import org.zkoss.util.resource.Labels;
|
||||
|
||||
public class ValidacaoRemessaException extends RuntimeException {
|
||||
|
||||
private static final long serialVersionUID = -919934943159729995L;
|
||||
|
@ -8,4 +12,8 @@ public class ValidacaoRemessaException extends RuntimeException {
|
|||
super(message);
|
||||
}
|
||||
|
||||
public ValidacaoRemessaException(String message, Object oMsg, Object... parametros) {
|
||||
super(new MessageFormat(Labels.getLabel(message, parametros)).format(oMsg));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import com.rjconsultores.ventaboletos.exception.BusinessException;
|
|||
|
||||
public interface ConvenioTransportadoraService extends GenericService<ConvenioTransportadora, Long> {
|
||||
|
||||
ConvenioTransportadora buscarPelaTransportadoraId(Long transportadoraId);
|
||||
public ConvenioTransportadora buscarPelaTransportadoraId(Long transportadoraId);
|
||||
|
||||
public ConvenioTransportadora suscribirActualizar(ConvenioTransportadora convenio) throws BusinessException;
|
||||
|
||||
|
|
|
@ -128,4 +128,7 @@ public interface RutaService {
|
|||
|
||||
public List<Ruta> buscarPorOrgaoEcasetaPeaje(OrgaoConcedente orgao, Integer[] listCasetaPeaje, Empresa empresa);
|
||||
|
||||
public List<Ruta> buscarRutasPorEmpresaOrgaoConcedenteClaseServicio(Empresa empresa, OrgaoConcedente orgao, ClaseServicio claseServicio);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||
|
||||
public interface SolicitudExpresosService extends GenericService<SolicitudExpreso, Integer>{
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.CorridaTramo;
|
||||
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||
|
||||
public interface TrayectosExpresosService extends GenericService<TrayectosExpresos, Integer>{
|
||||
|
||||
List<TrayectosExpresos> obtenerTrayectosPorServicioId(SolicitudExpreso expreso);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Voucher;
|
||||
|
||||
public interface VoucherService extends GenericService<Voucher, Long> {
|
||||
|
||||
List<Voucher> buscarConsulta(Long voucherId, String numContrato, String nit, String nomeTransportadora, Date dataInicial, Date dataFinal, Integer origemId, Integer destinoId);
|
||||
|
||||
}
|
|
@ -621,6 +621,11 @@ public class RutaServiceImpl implements RutaService {
|
|||
return rutaDAO.buscarRutasPorEmpresaOrgaoConcedente(empresa, orgao);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Ruta> buscarRutasPorEmpresaOrgaoConcedenteClaseServicio(Empresa empresa, OrgaoConcedente orgao, ClaseServicio claseServicio) {
|
||||
return rutaDAO.buscarRutasPorEmpresaOrgaoConcedenteClaseServicio(empresa, orgao, claseServicio);
|
||||
}
|
||||
|
||||
class CambioRutaTramo {
|
||||
private Tramo viejoTramo;
|
||||
private Tramo nuevoTramo;
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
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.SolicitudExpresosDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.TrayectosExpresosDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||
import com.rjconsultores.ventaboletos.service.SolicitudExpresosService;
|
||||
|
||||
@Service("solicitudExpresosService")
|
||||
public class SolicitudExpresosServiceImpl implements SolicitudExpresosService{
|
||||
|
||||
@Autowired
|
||||
private SolicitudExpresosDAO solicitudExpresosDAO;
|
||||
|
||||
@Override
|
||||
public List<SolicitudExpreso> obtenerTodos() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SolicitudExpreso obtenerID(Integer id) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SolicitudExpreso suscribir(SolicitudExpreso entidad) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public SolicitudExpreso actualizacion(SolicitudExpreso entidad) {
|
||||
|
||||
entidad.setFechaHoraModif(Calendar.getInstance().getTime());
|
||||
return solicitudExpresosDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void borrar(SolicitudExpreso entidad) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
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.TarjetaViajeDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.TrayectosExpresosDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||
import com.rjconsultores.ventaboletos.service.TrayectosExpresosService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
|
||||
@Service("trayectosExpresosService")
|
||||
public class TrayectosExpresosServiceImpl implements TrayectosExpresosService{
|
||||
|
||||
@Autowired
|
||||
private TrayectosExpresosDAO trayectosExpresosDAO;
|
||||
|
||||
@Override
|
||||
public List<TrayectosExpresos> obtenerTodos() {
|
||||
return trayectosExpresosDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TrayectosExpresos obtenerID(Integer id) {
|
||||
return trayectosExpresosDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public TrayectosExpresos suscribir(TrayectosExpresos entidad) {
|
||||
entidad.setActivo(true);
|
||||
entidad.setFechaHoraModif(Calendar.getInstance().getTime());
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
return trayectosExpresosDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public TrayectosExpresos actualizacion(TrayectosExpresos entidad) {
|
||||
entidad.setFechaHoraModif(Calendar.getInstance().getTime());
|
||||
return trayectosExpresosDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(TrayectosExpresos entidad) {
|
||||
entidad.setFechaHoraModif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(false);
|
||||
trayectosExpresosDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TrayectosExpresos> obtenerTrayectosPorServicioId(SolicitudExpreso expreso) {
|
||||
return trayectosExpresosDAO.obtenerTrayectosPorServicioId(expreso);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
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.VoucherDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.Voucher;
|
||||
import com.rjconsultores.ventaboletos.service.VoucherService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
|
||||
@Service("voucherService")
|
||||
public class VoucherServiceImpl implements VoucherService {
|
||||
|
||||
@Autowired
|
||||
private VoucherDAO voucherDAO;
|
||||
|
||||
public List<Voucher> obtenerTodos() {
|
||||
return voucherDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public Voucher obtenerID(Long id) {
|
||||
return voucherDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Voucher suscribir(Voucher entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecModif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return voucherDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Voucher actualizacion(Voucher entidad) {
|
||||
return voucherDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(Voucher entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecModif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
voucherDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Voucher> buscarConsulta(Long voucherId,
|
||||
String numContrato,
|
||||
String nit,
|
||||
String nomeTransportadora,
|
||||
Date dataInicial,
|
||||
Date dataFinal,
|
||||
Integer origemId,
|
||||
Integer destinoId) {
|
||||
return voucherDAO.buscarConsulta(voucherId,
|
||||
numContrato,
|
||||
nit,
|
||||
nomeTransportadora,
|
||||
dataInicial,
|
||||
dataFinal,
|
||||
origemId,
|
||||
destinoId);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue