- MERGE precoLinha
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@25799 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
acd3d37a2d
commit
dd97edc961
|
@ -2,6 +2,27 @@ package com.rjconsultores.ventaboletos.dao;
|
|||
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoTramo;
|
||||
|
||||
public interface OrgaoTramoDAO extends GenericDAO<OrgaoTramo, Integer> {
|
||||
public interface OrgaoTramoDAO {
|
||||
|
||||
/**
|
||||
* Hace la busqueda de la configuracion del coeficiente por tramo <br/>
|
||||
*
|
||||
* @param origenId
|
||||
* @param destinoId
|
||||
* @param viaId
|
||||
* @param orgaoConcedenteId
|
||||
* @param claseServicioId
|
||||
* @return
|
||||
*/
|
||||
public OrgaoTramo buscar(Integer origenId, Integer destinoId, Integer viaId, Integer orgaoConcedenteId, Short claseServicioId);
|
||||
|
||||
/**
|
||||
* Graba el registro en la base de datos
|
||||
* @param orgaoTramo
|
||||
* @return
|
||||
*/
|
||||
public OrgaoTramo suscribir(OrgaoTramo orgaoTramo);
|
||||
|
||||
public Long count(String campo, Object o);
|
||||
|
||||
}
|
||||
|
|
|
@ -15,10 +15,11 @@ import com.rjconsultores.ventaboletos.entidad.RutaCombinacion;
|
|||
import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.entidad.Tramo;
|
||||
import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.TarifaEscalaGroupVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.TarifaEscalaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.TarifaOficialEscalaGroupVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.TarifaOficialEscalaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.tarifa.TarifaEscalaGroupVO;
|
||||
import com.rjconsultores.ventaboletos.vo.tarifa.TarifaEscalaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.tarifa.TarifaOficialEscalaGroupVO;
|
||||
import com.rjconsultores.ventaboletos.vo.tarifa.TarifaOficialEscalaVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.rjconsultores.ventaboletos.dao.hibernate;
|
|||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.FetchMode;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -13,20 +14,39 @@ import com.rjconsultores.ventaboletos.dao.OrgaoTramoDAO;
|
|||
import com.rjconsultores.ventaboletos.entidad.OrgaoTramo;
|
||||
|
||||
@Repository("orgaoTramoDAO")
|
||||
public class OrgaoTramoHibernateDAO extends GenericHibernateDAO<OrgaoTramo, Integer>
|
||||
implements OrgaoTramoDAO {
|
||||
public class OrgaoTramoHibernateDAO extends GenericHibernateDAO<OrgaoTramo, Integer> implements OrgaoTramoDAO {
|
||||
|
||||
@Autowired
|
||||
public OrgaoTramoHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<OrgaoTramo> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
public OrgaoTramo buscar(Integer origenId, Integer destinoId, Integer viaId, Integer orgaoConcedenteId, Short claseServicioId) {
|
||||
Criteria c = makeCriteria();
|
||||
Criteria cTramo = c.createCriteria("tramo");
|
||||
cTramo.add(Restrictions.eq("origem.paradaId", origenId));
|
||||
cTramo.add(Restrictions.eq("destino.paradaId", destinoId));
|
||||
cTramo.add(Restrictions.eq("via.viaId", viaId));
|
||||
|
||||
c.add(Restrictions.eq("orgaoConcedente.orgaoConcedenteId", orgaoConcedenteId));
|
||||
c.add(Restrictions.eq("claseServicio.claseservicioId", claseServicioId));
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
|
||||
return c.list();
|
||||
c.setFetchMode("tramo", FetchMode.SELECT);
|
||||
|
||||
List<OrgaoTramo> list = c.list();
|
||||
|
||||
if (list.size() > 1) {
|
||||
throw new RuntimeException("Erro ao consultar os dados do coeficiente por trecho. Retornou mais de um resultado");
|
||||
}
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
return list.get(0);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -35,10 +35,11 @@ import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
|
|||
import com.rjconsultores.ventaboletos.entidad.Tramo;
|
||||
import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.TarifaEscalaGroupVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.TarifaEscalaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.TarifaOficialEscalaGroupVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.TarifaOficialEscalaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.tarifa.TarifaEscalaGroupVO;
|
||||
import com.rjconsultores.ventaboletos.vo.tarifa.TarifaEscalaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.tarifa.TarifaOficialEscalaGroupVO;
|
||||
import com.rjconsultores.ventaboletos.vo.tarifa.TarifaOficialEscalaVO;
|
||||
|
||||
import org.hibernate.transform.AliasToBeanResultTransformer;
|
||||
|
||||
/**
|
||||
|
|
|
@ -4,65 +4,66 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.TramoServicioDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.Tramo;
|
||||
import com.rjconsultores.ventaboletos.entidad.TramoServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.TramoTiempo;
|
||||
import com.rjconsultores.ventaboletos.entidad.Via;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.FetchMode;
|
||||
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.TramoServicioDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.Tramo;
|
||||
import com.rjconsultores.ventaboletos.entidad.TramoServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.Via;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
*/
|
||||
@Repository("tramoServicioDAO")
|
||||
public class TramoServicioHibernateDAO extends GenericHibernateDAO<TramoServicio, Integer>
|
||||
implements TramoServicioDAO {
|
||||
implements TramoServicioDAO {
|
||||
|
||||
@Autowired
|
||||
public TramoServicioHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
@Autowired
|
||||
public TramoServicioHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
public List<TramoServicio> buscarPorTramo(Tramo tramo) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("tramo", tramo));
|
||||
public List<TramoServicio> buscarPorTramo(Tramo tramo) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("tramo", tramo));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<TramoServicio> buscarPorTramo(Tramo tramo, ClaseServicio clase) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("tramo", tramo));
|
||||
c.add(Restrictions.eq("claseServicio", clase));
|
||||
public List<TramoServicio> buscarPorTramo(Tramo tramo, ClaseServicio clase) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("tramo", tramo));
|
||||
c.add(Restrictions.eq("claseServicio", clase));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
return c.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TramoServicio buscar(Parada origen, Parada destino, Via via, ClaseServicio clase) {
|
||||
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
Criteria cTramo = c.createCriteria("tramo");
|
||||
cTramo.add(Restrictions.eq("origem", origen));
|
||||
cTramo.add(Restrictions.eq("destino", destino));
|
||||
cTramo.add(Restrictions.eq("via", via));
|
||||
cTramo.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("claseServicio", clase));
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
Criteria cTramo = c.createCriteria("tramo");
|
||||
cTramo.add(Restrictions.eq("origem", origen));
|
||||
cTramo.add(Restrictions.eq("destino", destino));
|
||||
cTramo.add(Restrictions.eq("via", via));
|
||||
cTramo.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("claseServicio", clase));
|
||||
|
||||
return (TramoServicio) c.uniqueResult();
|
||||
return (TramoServicio) c.uniqueResult();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,20 @@
|
|||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa;
|
||||
import java.util.List;
|
||||
|
||||
public interface CoeficienteTarifaService extends GenericService<CoeficienteTarifa, Integer>{
|
||||
import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa;
|
||||
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
||||
|
||||
public interface CoeficienteTarifaService {
|
||||
|
||||
public List<CoeficienteTarifa> obtenerTodos();
|
||||
|
||||
public CoeficienteTarifa obtenerID(Integer id);
|
||||
|
||||
public CoeficienteTarifa suscribir(CoeficienteTarifa entidad);
|
||||
|
||||
public CoeficienteTarifa actualizacion(CoeficienteTarifa entidad);
|
||||
|
||||
public void borrar(CoeficienteTarifa entidad) throws RegistroConDependenciaException;
|
||||
|
||||
}
|
||||
|
|
|
@ -4,15 +4,27 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Estado;
|
||||
import com.rjconsultores.ventaboletos.entidad.Pais;
|
||||
import java.util.List;
|
||||
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author MCosso
|
||||
*/
|
||||
public interface EstadoService extends GenericService<Estado, Integer> {
|
||||
public interface EstadoService {
|
||||
|
||||
public List<Estado> obtenerTodos();
|
||||
|
||||
public Estado obtenerID(Integer id);
|
||||
|
||||
public Estado suscribir(Estado entidad);
|
||||
|
||||
public Estado actualizacion(Estado entidad);
|
||||
|
||||
public void borrar(Estado entidad) throws RegistroConDependenciaException;
|
||||
|
||||
public List<Estado> buscar(String nombestado, Pais pais);
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoTramo;
|
||||
|
||||
public interface OrgaoTramoService extends GenericService<OrgaoTramo, Integer> {
|
||||
public interface OrgaoTramoService{
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.rjconsultores.ventaboletos.entidad.Nodo;
|
|||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -22,7 +23,7 @@ public interface ParadaService {
|
|||
|
||||
public Parada suscribirActualizar(Parada entidad) throws BusinessException;
|
||||
|
||||
public void borrar(Parada entidad);
|
||||
public void borrar(Parada entidad) throws RegistroConDependenciaException;
|
||||
|
||||
public List<Parada> buscar(String descparada, String cveparada, Ciudad ciudad,
|
||||
TipoParada tipoParada, Nodo nodo);
|
||||
|
|
|
@ -4,17 +4,29 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.DiagramaAutobus;
|
||||
import com.rjconsultores.ventaboletos.entidad.RolOperativo;
|
||||
import java.util.List;
|
||||
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Rafius
|
||||
*/
|
||||
public interface RolOperativoService extends GenericService<RolOperativo, Integer> {
|
||||
public interface RolOperativoService {
|
||||
|
||||
public List<RolOperativo> pesquisar(DiagramaAutobus diagrama,String rol);
|
||||
public List<RolOperativo> obtenerTodos();
|
||||
|
||||
public List<RolOperativo> buscar(String descroloperativo);
|
||||
public RolOperativo obtenerID(Integer id);
|
||||
|
||||
public RolOperativo suscribir(RolOperativo entidad);
|
||||
|
||||
public RolOperativo actualizacion(RolOperativo entidad);
|
||||
|
||||
public void borrar(RolOperativo entidad) throws RegistroConDependenciaException;
|
||||
|
||||
public List<RolOperativo> pesquisar(DiagramaAutobus diagrama, String rol);
|
||||
|
||||
public List<RolOperativo> buscar(String descroloperativo);
|
||||
}
|
||||
|
|
|
@ -4,14 +4,26 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoParada;
|
||||
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrador
|
||||
*/
|
||||
public interface TipoParadaService extends GenericService<TipoParada, Integer> {
|
||||
public interface TipoParadaService {
|
||||
|
||||
public List<TipoParada> obtenerTodos();
|
||||
|
||||
public TipoParada obtenerID(Integer id);
|
||||
|
||||
public TipoParada suscribir(TipoParada entidad);
|
||||
|
||||
public TipoParada actualizacion(TipoParada entidad);
|
||||
|
||||
public void borrar(TipoParada entidad) throws RegistroConDependenciaException;
|
||||
|
||||
public List<TipoParada> buscar(String desctipo);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.util.List;
|
|||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.RutaTramoVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.SecuenciaRutaTramoVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.SecuenciaRutaTramoCoeficienteVO;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,7 @@ public interface TramoRutaService {
|
|||
* @param rutaTramoVO
|
||||
* @return
|
||||
*/
|
||||
public List<SecuenciaRutaTramoVO> generarCombinacion(RutaTramoVO rutaTramoVO);
|
||||
public List<SecuenciaRutaTramoCoeficienteVO> generarCombinacion(RutaTramoVO rutaTramoVO);
|
||||
|
||||
/**
|
||||
* Renera los datos de regreso para la ruta informada
|
||||
|
|
|
@ -38,7 +38,7 @@ public interface TramoServicioService extends GenericService<TramoServicio, Inte
|
|||
/**
|
||||
* Genera un nuevo registro de tramo y tramo servicio sino ya existen.
|
||||
*
|
||||
* Si el tramo y tramo tiempo existen, el es retornado.
|
||||
* Si el tramo y tramo tiempo existen, es retornado false.
|
||||
*
|
||||
* @param origen
|
||||
* @param destino
|
||||
|
|
|
@ -4,14 +4,26 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Via;
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Via;
|
||||
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Administrador
|
||||
*/
|
||||
public interface ViaService extends GenericService<Via, Integer> {
|
||||
public interface ViaService {
|
||||
|
||||
public List<Via> buscar(String nombvia);
|
||||
public List<Via> obtenerTodos();
|
||||
|
||||
public Via obtenerID(Integer id);
|
||||
|
||||
public Via suscribir(Via entidad);
|
||||
|
||||
public Via actualizacion(Via entidad);
|
||||
|
||||
public void borrar(Via entidad) throws RegistroConDependenciaException;
|
||||
|
||||
public List<Via> buscar(String nombvia);
|
||||
}
|
||||
|
|
|
@ -8,8 +8,10 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.CoeficienteTarifaDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.OrgaoTramoDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa;
|
||||
import com.rjconsultores.ventaboletos.service.CoeficienteTarifaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
|
||||
@Service("coeficienteTarifaService")
|
||||
|
@ -17,6 +19,8 @@ public class CoeficienteTarifaServiceImpl implements CoeficienteTarifaService {
|
|||
|
||||
@Autowired
|
||||
private CoeficienteTarifaDAO coeficienteTarifaDAO;
|
||||
@Autowired
|
||||
private OrgaoTramoDAO orgaoTramoDAO;
|
||||
|
||||
public List<CoeficienteTarifa> obtenerTodos() {
|
||||
return coeficienteTarifaDAO.obtenerTodos();
|
||||
|
@ -45,7 +49,16 @@ public class CoeficienteTarifaServiceImpl implements CoeficienteTarifaService {
|
|||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(CoeficienteTarifa entidad) {
|
||||
public void borrar(CoeficienteTarifa entidad) throws RegistroConDependenciaException {
|
||||
long count =0;
|
||||
count +=orgaoTramoDAO.count("coeficienteTarifa1", entidad);
|
||||
count +=orgaoTramoDAO.count("coeficienteTarifa2", entidad);
|
||||
count +=orgaoTramoDAO.count("coeficienteTarifa3", entidad);
|
||||
|
||||
if (count >0 ){
|
||||
throw new RegistroConDependenciaException();
|
||||
}
|
||||
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
|
|
@ -58,7 +58,7 @@ public class EstadoServiceImpl implements EstadoService {
|
|||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(Estado entidad) {
|
||||
public void borrar(Estado entidad) throws RegistroConDependenciaException {
|
||||
|
||||
if (ciudadDAO.count("estado", entidad) > 0l){
|
||||
throw new RegistroConDependenciaException();
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
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.OrgaoTramoDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoTramo;
|
||||
import com.rjconsultores.ventaboletos.service.OrgaoTramoService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
|
||||
@Service("orgaoTramoService")
|
||||
public class OrgaoTramoServiceImpl implements OrgaoTramoService {
|
||||
|
@ -18,38 +12,4 @@ public class OrgaoTramoServiceImpl implements OrgaoTramoService {
|
|||
@Autowired
|
||||
private OrgaoTramoDAO orgaoTramoDAO;
|
||||
|
||||
public List<OrgaoTramo> obtenerTodos() {
|
||||
return orgaoTramoDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public OrgaoTramo obtenerID(Integer id) {
|
||||
return orgaoTramoDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public OrgaoTramo suscribir(OrgaoTramo entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return orgaoTramoDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public OrgaoTramo actualizacion(OrgaoTramo entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return orgaoTramoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(OrgaoTramo entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
orgaoTramoDAO.actualizacion(entidad);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,13 @@
|
|||
*/
|
||||
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.EsquemaCorridaDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.RolOperativoDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.DiagramaAutobus;
|
||||
|
@ -11,11 +18,6 @@ import com.rjconsultores.ventaboletos.entidad.RolOperativo;
|
|||
import com.rjconsultores.ventaboletos.service.RolOperativoService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.RegistroConDependenciaException;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
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;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -24,55 +26,56 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
@Service("rolOperativoService")
|
||||
public class RolOperativoServiceImpl implements RolOperativoService {
|
||||
|
||||
@Autowired
|
||||
private RolOperativoDAO rolOperativoDAO;
|
||||
@Autowired
|
||||
private EsquemaCorridaDAO esquemaCorridaDAO;
|
||||
@Autowired
|
||||
private RolOperativoDAO rolOperativoDAO;
|
||||
@Autowired
|
||||
private EsquemaCorridaDAO esquemaCorridaDAO;
|
||||
|
||||
public List<RolOperativo> obtenerTodos() {
|
||||
return rolOperativoDAO.obtenerTodos();
|
||||
}
|
||||
public List<RolOperativo> obtenerTodos() {
|
||||
return rolOperativoDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public RolOperativo obtenerID(Integer id) {
|
||||
return rolOperativoDAO.obtenerID(id);
|
||||
}
|
||||
public RolOperativo obtenerID(Integer id) {
|
||||
return rolOperativoDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public RolOperativo suscribir(RolOperativo entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
@Transactional
|
||||
public RolOperativo suscribir(RolOperativo entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return rolOperativoDAO.suscribir(entidad);
|
||||
}
|
||||
return rolOperativoDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public RolOperativo actualizacion(RolOperativo entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
@Transactional
|
||||
public RolOperativo actualizacion(RolOperativo entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return rolOperativoDAO.actualizacion(entidad);
|
||||
}
|
||||
return rolOperativoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(RolOperativo entidad) throws RegistroConDependenciaException {
|
||||
if (esquemaCorridaDAO.count("rolOperativo", entidad) > 0l) {
|
||||
throw new RegistroConDependenciaException();
|
||||
}
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
@Transactional
|
||||
public void borrar(RolOperativo entidad) throws RegistroConDependenciaException {
|
||||
if (esquemaCorridaDAO.count("rolOperativo", entidad) > 0l) {
|
||||
throw new RegistroConDependenciaException();
|
||||
}
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
rolOperativoDAO.actualizacion(entidad);
|
||||
}
|
||||
rolOperativoDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
public List<RolOperativo> pesquisar(DiagramaAutobus diagrama, String rol) {
|
||||
public List<RolOperativo> pesquisar(DiagramaAutobus diagrama, String rol) {
|
||||
|
||||
return rolOperativoDAO.pesquisar(diagrama, rol);
|
||||
}
|
||||
return rolOperativoDAO.pesquisar(diagrama, rol);
|
||||
}
|
||||
|
||||
public List<RolOperativo> buscar(String descroloperativo) {
|
||||
return rolOperativoDAO.buscar(descroloperativo);
|
||||
}
|
||||
|
||||
public List<RolOperativo> buscar(String descroloperativo) {
|
||||
return rolOperativoDAO.buscar(descroloperativo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,10 +18,11 @@ import com.rjconsultores.ventaboletos.entidad.Tramo;
|
|||
import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa;
|
||||
import com.rjconsultores.ventaboletos.service.RutaCombinacionService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.TarifaEscalaGroupVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.TarifaEscalaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.TarifaOficialEscalaGroupVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.TarifaOficialEscalaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.tarifa.TarifaEscalaGroupVO;
|
||||
import com.rjconsultores.ventaboletos.vo.tarifa.TarifaEscalaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.tarifa.TarifaOficialEscalaGroupVO;
|
||||
import com.rjconsultores.ventaboletos.vo.tarifa.TarifaOficialEscalaVO;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -12,13 +12,20 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.OrgaoTramoDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.RutaDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.TramoDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.TramoServicioDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoTramo;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
import com.rjconsultores.ventaboletos.entidad.RutaCombinacion;
|
||||
import com.rjconsultores.ventaboletos.entidad.RutaEmpresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.RutaSecuencia;
|
||||
import com.rjconsultores.ventaboletos.entidad.Tramo;
|
||||
import com.rjconsultores.ventaboletos.entidad.TramoServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.Via;
|
||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||
|
@ -31,305 +38,407 @@ import com.rjconsultores.ventaboletos.service.TramoServicioService;
|
|||
import com.rjconsultores.ventaboletos.utilerias.HoraSistema;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.RutaTramoVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.SecuenciaRutaTramoCoeficienteVO;
|
||||
import com.rjconsultores.ventaboletos.vo.esquemaoperacional.SecuenciaRutaTramoVO;
|
||||
|
||||
@Service("tramoRutaService")
|
||||
public class TramoRutaServiceImpl implements TramoRutaService {
|
||||
|
||||
private static Logger log = Logger.getLogger(TramoRutaServiceImpl.class);
|
||||
@Autowired
|
||||
private RutaService rutaService;
|
||||
@Autowired
|
||||
private RutaCombinacionService rutaCombinacionService;
|
||||
@Autowired
|
||||
private RutaSecuenciaService rutaSecuenciaService;
|
||||
@Autowired
|
||||
private TramoService tramoService;
|
||||
@Autowired
|
||||
private TramoServicioService tramoServicioService;
|
||||
@Autowired
|
||||
private RutaDAO rutaDAO;
|
||||
private static Logger log = Logger.getLogger(TramoRutaServiceImpl.class);
|
||||
@Autowired
|
||||
private RutaService rutaService;
|
||||
@Autowired
|
||||
private RutaCombinacionService rutaCombinacionService;
|
||||
@Autowired
|
||||
private RutaSecuenciaService rutaSecuenciaService;
|
||||
@Autowired
|
||||
private TramoService tramoService;
|
||||
@Autowired
|
||||
private TramoServicioService tramoServicioService;
|
||||
@Autowired
|
||||
private RutaDAO rutaDAO;
|
||||
@Autowired
|
||||
private OrgaoTramoDAO orgaoTramoDAO;
|
||||
@Autowired
|
||||
private TramoServicioDAO tramoServicioDAO;
|
||||
@Autowired
|
||||
private TramoDAO tramoDAO;
|
||||
|
||||
/**
|
||||
* Hace la validación de los datos del rutaTramoVO
|
||||
* @param rutaTramoVO
|
||||
* @throws BusinessException
|
||||
*/
|
||||
private void validarGenerarTramosRutas(RutaTramoVO rutaTramoVO) throws BusinessException {
|
||||
if (rutaTramoVO.getLsSecuenciaRutaTramoVO().isEmpty()) {
|
||||
throw new BusinessException("tramoRutaServiceImpl.msg.secuenciaObligatorio");
|
||||
}
|
||||
if ((rutaTramoVO.getPrefixo() == null) || (rutaTramoVO.getPrefixo().isEmpty())) {
|
||||
throw new BusinessException("tramoRutaServiceImpl.msg.prefixoObligatorio");
|
||||
}
|
||||
if (rutaTramoVO.getLsEmpresa().isEmpty()) {
|
||||
throw new BusinessException("tramoRutaServiceImpl.msg.empresaObligatoria");
|
||||
}
|
||||
/**
|
||||
* Hace la validación de los datos del rutaTramoVO
|
||||
*
|
||||
* @param rutaTramoVO
|
||||
* @throws BusinessException
|
||||
*/
|
||||
private void validarGenerarTramosRutas(RutaTramoVO rutaTramoVO) throws BusinessException {
|
||||
if (rutaTramoVO.getLsSecuenciaRutaTramoVO().isEmpty()) {
|
||||
throw new BusinessException("tramoRutaServiceImpl.msg.secuenciaObligatorio");
|
||||
}
|
||||
if ((rutaTramoVO.getPrefixo() == null) || (rutaTramoVO.getPrefixo().isEmpty())) {
|
||||
throw new BusinessException("tramoRutaServiceImpl.msg.prefixoObligatorio");
|
||||
}
|
||||
if (rutaTramoVO.getLsEmpresa().isEmpty()) {
|
||||
throw new BusinessException("tramoRutaServiceImpl.msg.empresaObligatoria");
|
||||
}
|
||||
|
||||
if (rutaTramoVO.getLsCombinacionRutaTramoVO().isEmpty()) {
|
||||
throw new BusinessException("tramoRutaServiceImpl.msg.combinacionObligatorio");
|
||||
}
|
||||
for (SecuenciaRutaTramoVO s : rutaTramoVO.getLsCombinacionRutaTramoVO()) {
|
||||
if (s.getTramoId() != null) {
|
||||
continue;
|
||||
}
|
||||
if ((s.getOrigen() == null) || (s.getDestino() == null) || (s.getVia() == null)
|
||||
|| (s.getKmReal() == null) || (s.getSecuencia() == null) || (s.getTiempoRecorrido() == null)) {
|
||||
throw new BusinessException("tramoRutaServiceImpl.msg.cambosObligatoriosCombinacion", new Object[]{s.getOrigen(),
|
||||
s.getDestino()});
|
||||
}
|
||||
}
|
||||
for (SecuenciaRutaTramoVO s : rutaTramoVO.getLsSecuenciaRutaTramoVO()) {
|
||||
if (s.getTramoId() != null) {
|
||||
continue;
|
||||
}
|
||||
if ((s.getOrigen() == null) || (s.getDestino() == null) || (s.getVia() == null)
|
||||
|| (s.getKmReal() == null) || (s.getSecuencia() == null) || (s.getTiempoRecorrido() == null)) {
|
||||
throw new BusinessException("tramoRutaServiceImpl.msg.cambosObligatoriosSecuencia", new Object[]{s.getOrigen(),
|
||||
s.getDestino()});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (rutaTramoVO.getLsCombinacionRutaTramoVO().isEmpty()) {
|
||||
throw new BusinessException("tramoRutaServiceImpl.msg.combinacionObligatorio");
|
||||
}
|
||||
for (SecuenciaRutaTramoCoeficienteVO s : rutaTramoVO.getLsCombinacionRutaTramoVO()) {
|
||||
if (s.getTramoId() != null) {
|
||||
continue;
|
||||
}
|
||||
if ((s.getOrigen() == null) || (s.getDestino() == null) || (s.getVia() == null)
|
||||
|| (s.getKmReal() == null) || (s.getSecuencia() == null) || (s.getTiempoRecorrido() == null)
|
||||
|| (s.getCoeficienteTarifa1() == null) || (s.getKmCoeficiente1() == null) || (s.getKmCoeficiente1() == 0)) {
|
||||
|
||||
@Transactional(rollbackFor = BusinessException.class)
|
||||
@Override
|
||||
public Ruta generarTramosRutas(RutaTramoVO rutaTramoVO) throws BusinessException {
|
||||
throw new BusinessException("tramoRutaServiceImpl.msg.cambosObligatoriosCombinacion", new Object[] { s.getOrigen(),s.getDestino() });
|
||||
}
|
||||
}
|
||||
for (SecuenciaRutaTramoVO s : rutaTramoVO.getLsSecuenciaRutaTramoVO()) {
|
||||
if (s.getTramoId() != null) {
|
||||
continue;
|
||||
}
|
||||
if ((s.getOrigen() == null) || (s.getDestino() == null) || (s.getVia() == null)
|
||||
|| (s.getKmReal() == null) || (s.getSecuencia() == null) || (s.getTiempoRecorrido() == null)) {
|
||||
throw new BusinessException("tramoRutaServiceImpl.msg.cambosObligatoriosSecuencia", new Object[] { s.getOrigen(),
|
||||
s.getDestino() });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.validarGenerarTramosRutas(rutaTramoVO);
|
||||
@Transactional(rollbackFor = BusinessException.class)
|
||||
@Override
|
||||
public Ruta generarTramosRutas(RutaTramoVO rutaTramoVO) throws BusinessException {
|
||||
|
||||
// Genero los tramos y tramos servicios de la combinacion que no existen
|
||||
// Aqui si genera tambien los tramos de la secuencia
|
||||
for (SecuenciaRutaTramoVO s : rutaTramoVO.getLsCombinacionRutaTramoVO()) {
|
||||
log.debug("Origen:" + s.getOrigen() + ";Destino:" + s.getDestino() + ";Via:" + s.getVia());
|
||||
boolean fueGenerado = tramoServicioService.generarTramoTiempo(s.getOrigen(), s.getDestino(), s.getVia(), s.getKmReal(),
|
||||
s.getTiempoRecorrido().getFecha(), rutaTramoVO.getClaseServicio());
|
||||
log.debug("Fue Generado:" + fueGenerado);
|
||||
}
|
||||
this.validarGenerarTramosRutas(rutaTramoVO);
|
||||
|
||||
// Genero la relacion de ruta con empresa
|
||||
List<RutaEmpresa> lsRutaEmpresa = new ArrayList<RutaEmpresa>();
|
||||
for (Empresa e : rutaTramoVO.getLsEmpresa()) {
|
||||
RutaEmpresa rutaEmpresa = new RutaEmpresa();
|
||||
rutaEmpresa.setEmpresa(e);
|
||||
rutaEmpresa.setActivo(Boolean.TRUE);
|
||||
rutaEmpresa.setFecmodif(Calendar.getInstance().getTime());
|
||||
rutaEmpresa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
// Genero los tramos y tramos servicios de la combinacion que no existen
|
||||
// Aqui si genera tambien los tramos de la secuencia
|
||||
for (SecuenciaRutaTramoCoeficienteVO s : rutaTramoVO.getLsCombinacionRutaTramoVO()) {
|
||||
log.debug("Origen:" + s.getOrigen() + ";Destino:" + s.getDestino() + ";Via:" + s.getVia());
|
||||
boolean fueGenerado = generarDatos(s, rutaTramoVO.getClaseServicio(), rutaTramoVO.getOrgaoConcedente());
|
||||
log.debug("Fue Generado:" + fueGenerado);
|
||||
}
|
||||
|
||||
lsRutaEmpresa.add(rutaEmpresa);
|
||||
}
|
||||
// Genero la relacion de ruta con empresa
|
||||
List<RutaEmpresa> lsRutaEmpresa = new ArrayList<RutaEmpresa>();
|
||||
for (Empresa e : rutaTramoVO.getLsEmpresa()) {
|
||||
RutaEmpresa rutaEmpresa = new RutaEmpresa();
|
||||
rutaEmpresa.setEmpresa(e);
|
||||
rutaEmpresa.setActivo(Boolean.TRUE);
|
||||
rutaEmpresa.setFecmodif(Calendar.getInstance().getTime());
|
||||
rutaEmpresa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
|
||||
// Genero la ruta
|
||||
Ruta ruta = new Ruta();
|
||||
ruta.setDescruta(rutaTramoVO.getDescRuta());
|
||||
ruta.setClaseServicio(rutaTramoVO.getClaseServicio());
|
||||
ruta.setOrgaoConcedente(rutaTramoVO.getOrgaoConcedente());
|
||||
ruta.setIndNombreObligatorio(rutaTramoVO.getSolicitaNombrePasajero());
|
||||
ruta.setIndSentidoIda(rutaTramoVO.getIndSentidoIda());
|
||||
if (rutaTramoVO.getVentaHandHeld() == null){
|
||||
ruta.setVentaOffLine(false);
|
||||
}else{
|
||||
lsRutaEmpresa.add(rutaEmpresa);
|
||||
}
|
||||
|
||||
// Genero la ruta
|
||||
Ruta ruta = new Ruta();
|
||||
ruta.setDescruta(rutaTramoVO.getDescRuta());
|
||||
ruta.setClaseServicio(rutaTramoVO.getClaseServicio());
|
||||
ruta.setOrgaoConcedente(rutaTramoVO.getOrgaoConcedente());
|
||||
ruta.setIndNombreObligatorio(rutaTramoVO.getSolicitaNombrePasajero());
|
||||
ruta.setIndSentidoIda(rutaTramoVO.getIndSentidoIda());
|
||||
if (rutaTramoVO.getVentaHandHeld() == null) {
|
||||
ruta.setVentaOffLine(false);
|
||||
} else {
|
||||
ruta.setVentaOffLine(rutaTramoVO.getVentaHandHeld());
|
||||
}
|
||||
|
||||
ruta.setLsRutaEmpresa(lsRutaEmpresa);
|
||||
ruta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
ruta.setActivo(Boolean.TRUE);
|
||||
ruta.setFecmodif(new java.util.Date());
|
||||
ruta.setPrefixo(rutaTramoVO.getPrefixo());
|
||||
ruta.setNumRuta(rutaTramoVO.getNumRuta());
|
||||
ruta.setLsRutaEmpresa(lsRutaEmpresa);
|
||||
ruta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
ruta.setActivo(Boolean.TRUE);
|
||||
ruta.setFecmodif(new java.util.Date());
|
||||
ruta.setPrefixo(rutaTramoVO.getPrefixo());
|
||||
ruta.setNumRuta(rutaTramoVO.getNumRuta());
|
||||
|
||||
ruta = rutaDAO.suscribir(ruta);
|
||||
ruta = rutaDAO.suscribir(ruta);
|
||||
|
||||
// Genero la secuencia de la ruta
|
||||
for (SecuenciaRutaTramoVO s : rutaTramoVO.getLsSecuenciaRutaTramoVO()) {
|
||||
RutaSecuencia rutaSecuencia = new RutaSecuencia();
|
||||
rutaSecuencia.setNumsecuencia(s.getSecuencia().shortValue());
|
||||
rutaSecuencia.setTramo(tramoService.obtenerTramotPorOrigemDestinoVia(s.getOrigen(), s.getDestino(), s.getVia()));
|
||||
rutaSecuencia.setRuta(ruta);
|
||||
rutaSecuencia = rutaSecuenciaService.suscribir(rutaSecuencia);
|
||||
}
|
||||
// Genero la secuencia de la ruta
|
||||
for (SecuenciaRutaTramoVO s : rutaTramoVO.getLsSecuenciaRutaTramoVO()) {
|
||||
RutaSecuencia rutaSecuencia = new RutaSecuencia();
|
||||
rutaSecuencia.setNumsecuencia(s.getSecuencia().shortValue());
|
||||
rutaSecuencia.setTramo(tramoService.obtenerTramotPorOrigemDestinoVia(s.getOrigen(), s.getDestino(), s.getVia()));
|
||||
rutaSecuencia.setRuta(ruta);
|
||||
rutaSecuencia = rutaSecuenciaService.suscribir(rutaSecuencia);
|
||||
}
|
||||
|
||||
for (SecuenciaRutaTramoVO s : rutaTramoVO.getLsCombinacionRutaTramoVO()) {
|
||||
RutaCombinacion rutaCombinacion = new RutaCombinacion();
|
||||
rutaCombinacion.setIndventa(Boolean.TRUE);
|
||||
rutaCombinacion.setRuta(ruta);
|
||||
rutaCombinacion.setTramo(tramoService.obtenerTramotPorOrigemDestinoVia(s.getOrigen(), s.getDestino(), s.getVia()));
|
||||
for (SecuenciaRutaTramoCoeficienteVO s : rutaTramoVO.getLsCombinacionRutaTramoVO()) {
|
||||
RutaCombinacion rutaCombinacion = new RutaCombinacion();
|
||||
rutaCombinacion.setIndventa(Boolean.TRUE);
|
||||
rutaCombinacion.setRuta(ruta);
|
||||
rutaCombinacion.setTramo(tramoService.obtenerTramotPorOrigemDestinoVia(s.getOrigen(), s.getDestino(), s.getVia()));
|
||||
|
||||
rutaCombinacion = rutaCombinacionService.suscribir(rutaCombinacion);
|
||||
}
|
||||
rutaCombinacion = rutaCombinacionService.suscribir(rutaCombinacion);
|
||||
}
|
||||
|
||||
return ruta;
|
||||
}
|
||||
return ruta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public RutaTramoVO generarRutaRegreso(RutaTramoVO rutaTramoVO) {
|
||||
RutaTramoVO rutaTramoRegresoVO = new RutaTramoVO();
|
||||
rutaTramoRegresoVO.setClaseServicio(rutaTramoVO.getClaseServicio());
|
||||
rutaTramoRegresoVO.setOrgaoConcedente(rutaTramoVO.getOrgaoConcedente());
|
||||
rutaTramoRegresoVO.setSolicitaNombrePasajero(rutaTramoVO.getSolicitaNombrePasajero());
|
||||
rutaTramoRegresoVO.setVentaHandHeld(rutaTramoVO.getVentaHandHeld());
|
||||
rutaTramoRegresoVO.setLsEmpresa(rutaTramoVO.getLsEmpresa());
|
||||
@Override
|
||||
public RutaTramoVO generarRutaRegreso(RutaTramoVO rutaTramoVO) {
|
||||
RutaTramoVO rutaTramoRegresoVO = new RutaTramoVO();
|
||||
rutaTramoRegresoVO.setClaseServicio(rutaTramoVO.getClaseServicio());
|
||||
rutaTramoRegresoVO.setOrgaoConcedente(rutaTramoVO.getOrgaoConcedente());
|
||||
rutaTramoRegresoVO.setSolicitaNombrePasajero(rutaTramoVO.getSolicitaNombrePasajero());
|
||||
rutaTramoRegresoVO.setVentaHandHeld(rutaTramoVO.getVentaHandHeld());
|
||||
rutaTramoRegresoVO.setLsEmpresa(rutaTramoVO.getLsEmpresa());
|
||||
|
||||
if(rutaTramoVO.getIndSentidoIda()){
|
||||
rutaTramoRegresoVO.setIndSentidoIda(Boolean.FALSE);
|
||||
}else{
|
||||
rutaTramoRegresoVO.setIndSentidoIda(Boolean.TRUE);
|
||||
}
|
||||
rutaTramoRegresoVO.setNumRuta(rutaTramoVO.getNumRuta());
|
||||
rutaTramoRegresoVO.setPrefixo(rutaTramoVO.getPrefixo());
|
||||
if (rutaTramoVO.getDescRuta() != null) {
|
||||
rutaTramoRegresoVO.setDescRuta(rutaTramoVO.getDescRuta());
|
||||
} else {
|
||||
rutaTramoRegresoVO.setDescRuta("-");
|
||||
}
|
||||
if (rutaTramoVO.getIndSentidoIda()) {
|
||||
rutaTramoRegresoVO.setIndSentidoIda(Boolean.FALSE);
|
||||
} else {
|
||||
rutaTramoRegresoVO.setIndSentidoIda(Boolean.TRUE);
|
||||
}
|
||||
rutaTramoRegresoVO.setNumRuta(rutaTramoVO.getNumRuta());
|
||||
rutaTramoRegresoVO.setPrefixo(rutaTramoVO.getPrefixo());
|
||||
if (rutaTramoVO.getDescRuta() != null) {
|
||||
rutaTramoRegresoVO.setDescRuta(rutaTramoVO.getDescRuta());
|
||||
} else {
|
||||
rutaTramoRegresoVO.setDescRuta("-");
|
||||
}
|
||||
|
||||
List<SecuenciaRutaTramoVO> lsSecuenciaRutaTramoRegresoVO = new ArrayList<SecuenciaRutaTramoVO>();
|
||||
List<SecuenciaRutaTramoVO> lsSecuenciaRutaTramoIdaVO = new ArrayList<SecuenciaRutaTramoVO>(rutaTramoVO.getLsSecuenciaRutaTramoVO());
|
||||
Collections.sort(lsSecuenciaRutaTramoIdaVO, new Comparator<SecuenciaRutaTramoVO>() {
|
||||
List<SecuenciaRutaTramoVO> lsSecuenciaRutaTramoRegresoVO = new ArrayList<SecuenciaRutaTramoVO>();
|
||||
List<SecuenciaRutaTramoVO> lsSecuenciaRutaTramoIdaVO = new ArrayList<SecuenciaRutaTramoVO>(rutaTramoVO.getLsSecuenciaRutaTramoVO());
|
||||
//Reordena a lista
|
||||
Collections.sort(lsSecuenciaRutaTramoIdaVO, new Comparator<SecuenciaRutaTramoVO>() {
|
||||
|
||||
@Override
|
||||
public int compare(SecuenciaRutaTramoVO o1, SecuenciaRutaTramoVO o2) {
|
||||
return o2.getSecuencia().compareTo(o1.getSecuencia());
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public int compare(SecuenciaRutaTramoVO o1, SecuenciaRutaTramoVO o2) {
|
||||
return o2.getSecuencia().compareTo(o1.getSecuencia());
|
||||
}
|
||||
});
|
||||
|
||||
int secuencia = 0;
|
||||
int secuencia = 0;
|
||||
|
||||
for (SecuenciaRutaTramoVO s : lsSecuenciaRutaTramoIdaVO) {
|
||||
TramoServicio tramoServicio = tramoServicioService.buscar(s.getOrigen(), s.getDestino(), s.getVia(), rutaTramoVO.getClaseServicio());
|
||||
if (tramoServicio != null) {
|
||||
s.setTramoId(tramoServicio.getTramo().getTramoId());
|
||||
s.setTramoServicioId(tramoServicio.getTramoservicioId());
|
||||
for (SecuenciaRutaTramoVO s : lsSecuenciaRutaTramoIdaVO) {
|
||||
TramoServicio tramoServicio = tramoServicioService.buscar( s.getDestino(),s.getOrigen(), s.getVia(), rutaTramoVO.getClaseServicio());
|
||||
if (tramoServicio != null) {
|
||||
s.setTramoId(tramoServicio.getTramo().getTramoId());
|
||||
s.setTramoServicioId(tramoServicio.getTramoservicioId());
|
||||
|
||||
lsSecuenciaRutaTramoRegresoVO.add(new SecuenciaRutaTramoVO(s.getDestino(), s.getOrigen(), s.getVia(), ++secuencia, s.getKmReal(), s.getTiempoRecorrido(),
|
||||
s.getTramoId(), s.getTramoServicioId(),rutaTramoRegresoVO.getNumRuta(), rutaTramoRegresoVO.getIndSentidoIda()));
|
||||
} else {
|
||||
lsSecuenciaRutaTramoRegresoVO.add(new SecuenciaRutaTramoVO(s.getDestino(), s.getOrigen(), s.getVia(), ++secuencia, s.getKmReal(), s.getTiempoRecorrido(),rutaTramoRegresoVO.getNumRuta(), rutaTramoRegresoVO.getIndSentidoIda()));
|
||||
}
|
||||
}
|
||||
rutaTramoRegresoVO.setLsSecuenciaRutaTramoVO(lsSecuenciaRutaTramoRegresoVO);
|
||||
lsSecuenciaRutaTramoRegresoVO.add(new SecuenciaRutaTramoVO(s.getDestino(), s.getOrigen(), s.getVia(), ++secuencia, s.getKmReal(), s.getTiempoRecorrido(),
|
||||
s.getTramoId(), s.getTramoServicioId(), rutaTramoRegresoVO.getNumRuta(), rutaTramoRegresoVO.getIndSentidoIda()));
|
||||
} else {
|
||||
lsSecuenciaRutaTramoRegresoVO.add(new SecuenciaRutaTramoVO(s.getDestino(), s.getOrigen(), s.getVia(), ++secuencia, s.getKmReal(), s.getTiempoRecorrido(), rutaTramoRegresoVO.getNumRuta(), rutaTramoRegresoVO.getIndSentidoIda()));
|
||||
}
|
||||
}
|
||||
rutaTramoRegresoVO.setLsSecuenciaRutaTramoVO(lsSecuenciaRutaTramoRegresoVO);
|
||||
|
||||
List<SecuenciaRutaTramoVO> lsCombinacionRutaTramoRegresoVO = new ArrayList<SecuenciaRutaTramoVO>();
|
||||
List<SecuenciaRutaTramoVO> lsCombinacionTramoIdaVO = new ArrayList<SecuenciaRutaTramoVO>(rutaTramoVO.getLsCombinacionRutaTramoVO());
|
||||
Collections.sort(lsCombinacionTramoIdaVO, new Comparator<SecuenciaRutaTramoVO>() {
|
||||
List<SecuenciaRutaTramoCoeficienteVO> lsCombinacionRutaTramoRegresoVO = new ArrayList<SecuenciaRutaTramoCoeficienteVO>();
|
||||
List<SecuenciaRutaTramoCoeficienteVO> lsCombinacionTramoIdaVO = new ArrayList<SecuenciaRutaTramoCoeficienteVO>(rutaTramoVO.getLsCombinacionRutaTramoVO());
|
||||
Collections.sort(lsCombinacionTramoIdaVO, new Comparator<SecuenciaRutaTramoCoeficienteVO>() {
|
||||
|
||||
@Override
|
||||
public int compare(SecuenciaRutaTramoVO o1, SecuenciaRutaTramoVO o2) {
|
||||
return o2.getSecuencia().compareTo(o1.getSecuencia());
|
||||
}
|
||||
});
|
||||
@Override
|
||||
public int compare(SecuenciaRutaTramoCoeficienteVO o1, SecuenciaRutaTramoCoeficienteVO o2) {
|
||||
return o2.getSecuencia().compareTo(o1.getSecuencia());
|
||||
}
|
||||
});
|
||||
|
||||
secuencia = 0;
|
||||
for (SecuenciaRutaTramoVO s : lsCombinacionTramoIdaVO) {
|
||||
TramoServicio tramoServicio = tramoServicioService.buscar(s.getOrigen(), s.getDestino(), s.getVia(), rutaTramoVO.getClaseServicio());
|
||||
if (tramoServicio != null) {
|
||||
s.setTramoId(tramoServicio.getTramo().getTramoId());
|
||||
s.setTramoServicioId(tramoServicio.getTramoservicioId());
|
||||
secuencia = 0;
|
||||
for (SecuenciaRutaTramoCoeficienteVO s : lsCombinacionTramoIdaVO) {
|
||||
TramoServicio tramoServicio = tramoServicioService.buscar(s.getDestino(), s.getOrigen(), s.getVia(), rutaTramoVO.getClaseServicio());
|
||||
if (tramoServicio != null) {
|
||||
s.setTramoId(tramoServicio.getTramo().getTramoId());
|
||||
s.setTramoServicioId(tramoServicio.getTramoservicioId());
|
||||
|
||||
lsCombinacionRutaTramoRegresoVO.add(new SecuenciaRutaTramoVO(s.getDestino(), s.getOrigen(), s.getVia(), ++secuencia, s.getKmReal(), s.getTiempoRecorrido(),
|
||||
s.getTramoId(), s.getTramoServicioId(), rutaTramoRegresoVO.getNumRuta(), rutaTramoRegresoVO.getIndSentidoIda()));
|
||||
} else {
|
||||
lsCombinacionRutaTramoRegresoVO.add(new SecuenciaRutaTramoVO(s.getDestino(), s.getOrigen(), s.getVia(), ++secuencia, s.getKmReal(), s.getTiempoRecorrido(),rutaTramoRegresoVO.getNumRuta(), rutaTramoRegresoVO.getIndSentidoIda()));
|
||||
}
|
||||
SecuenciaRutaTramoCoeficienteVO secuenciaRutaTramoCoeficienteVO = new SecuenciaRutaTramoCoeficienteVO(s.getDestino(), s.getOrigen(), s.getVia(), ++secuencia, s.getKmReal(), s.getTiempoRecorrido(),
|
||||
s.getTramoId(), s.getTramoServicioId(), rutaTramoRegresoVO.getNumRuta());
|
||||
|
||||
}
|
||||
rutaTramoRegresoVO.setLsCombinacionRutaTramoVO(lsCombinacionRutaTramoRegresoVO);
|
||||
OrgaoTramo orgaoTramo = orgaoTramoDAO.buscar(s.getDestino().getParadaId(), s.getOrigen().getParadaId(), s.getVia().getViaId(), rutaTramoVO.getOrgaoConcedente().getOrgaoConcedenteId(), rutaTramoVO.getClaseServicio().getClaseservicioId());
|
||||
|
||||
return rutaTramoRegresoVO;
|
||||
}
|
||||
if (orgaoTramo != null){
|
||||
secuenciaRutaTramoCoeficienteVO.setOrgaoTramoId(orgaoTramo.getOrgaoTramoId());
|
||||
|
||||
@Override
|
||||
public List<SecuenciaRutaTramoVO> generarCombinacion(RutaTramoVO rutaTramoVO) {
|
||||
List<SecuenciaRutaTramoVO> lsSecuenciaRutaTramoVO = new ArrayList<SecuenciaRutaTramoVO>(rutaTramoVO.getLsSecuenciaRutaTramoVO());
|
||||
List<SecuenciaRutaTramoVO> lsSecuenciaCombinacionRutaTramoVO = new ArrayList<SecuenciaRutaTramoVO>();
|
||||
secuenciaRutaTramoCoeficienteVO.setCoeficienteTarifa1(orgaoTramo.getCoeficienteTarifa1());
|
||||
secuenciaRutaTramoCoeficienteVO.setKmCoeficiente1(orgaoTramo.getKmCoeficiente1());
|
||||
|
||||
Collections.sort(lsSecuenciaRutaTramoVO, new Comparator<SecuenciaRutaTramoVO>() {
|
||||
if (orgaoTramo.getCoeficienteTarifa2()!=null){
|
||||
secuenciaRutaTramoCoeficienteVO.setCoeficienteTarifa2(orgaoTramo.getCoeficienteTarifa2());
|
||||
secuenciaRutaTramoCoeficienteVO.setKmCoeficiente2(orgaoTramo.getKmCoeficiente2());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compare(SecuenciaRutaTramoVO o1, SecuenciaRutaTramoVO o2) {
|
||||
return o1.getSecuencia().compareTo(o2.getSecuencia());
|
||||
}
|
||||
});
|
||||
// Collections.sort(lsSecuenciaCombinacionRutaTramoVO, new
|
||||
// Comparator<SecuenciaRutaTramoVO>() {
|
||||
//
|
||||
// @Override
|
||||
// public int compare(SecuenciaRutaTramoVO o1, SecuenciaRutaTramoVO o2)
|
||||
// {
|
||||
// return o1.getSecuencia().compareTo(o2.getSecuencia());
|
||||
// }
|
||||
// });
|
||||
lsCombinacionRutaTramoRegresoVO.add(secuenciaRutaTramoCoeficienteVO);
|
||||
} else {
|
||||
SecuenciaRutaTramoCoeficienteVO secuenciaRutaTramoCoeficienteVO = new SecuenciaRutaTramoCoeficienteVO(s.getDestino(), s.getOrigen(), s.getVia(), ++secuencia, s.getKmReal(), s.getTiempoRecorrido(), rutaTramoRegresoVO.getNumRuta());
|
||||
|
||||
int qtdTramos = lsSecuenciaRutaTramoVO.size();
|
||||
int secuencia = 0;
|
||||
for (int i = 0; i < qtdTramos; i++) {
|
||||
SecuenciaRutaTramoVO secuenciaInicial = lsSecuenciaRutaTramoVO.get(i);
|
||||
Parada origen = secuenciaInicial.getOrigen();
|
||||
BigDecimal totalKmsReal = secuenciaInicial.getKmReal();
|
||||
HoraSistema totalTiempoRecorrido = secuenciaInicial.getTiempoRecorrido();
|
||||
boolean primeraCombinacion = true;
|
||||
int j = i + 1;
|
||||
for (; j < (qtdTramos); j++) {
|
||||
Parada destino = lsSecuenciaRutaTramoVO.get(j).getOrigen();
|
||||
secuenciaRutaTramoCoeficienteVO.setCoeficienteTarifa1(s.getCoeficienteTarifa1());
|
||||
secuenciaRutaTramoCoeficienteVO.setKmCoeficiente1(s.getKmCoeficiente1());
|
||||
|
||||
Via via = secuenciaInicial.getVia();
|
||||
// if (primeraCombinacion) {
|
||||
// via = secuenciaInicial.getVia();
|
||||
// }
|
||||
secuenciaRutaTramoCoeficienteVO.setCoeficienteTarifa2(s.getCoeficienteTarifa2());
|
||||
secuenciaRutaTramoCoeficienteVO.setKmCoeficiente2(s.getKmCoeficiente2());
|
||||
|
||||
SecuenciaRutaTramoVO nuevaSecuencia = new SecuenciaRutaTramoVO(origen, destino, via, ++secuencia,
|
||||
totalKmsReal, totalTiempoRecorrido, rutaTramoVO.getNumRuta(), rutaTramoVO.getIndSentidoIda());
|
||||
lsCombinacionRutaTramoRegresoVO.add(secuenciaRutaTramoCoeficienteVO);
|
||||
}
|
||||
|
||||
if (via != null) {
|
||||
TramoServicio tramoServicio = tramoServicioService.buscar(origen, destino, via, rutaTramoVO.getClaseServicio());
|
||||
if (tramoServicio != null) {
|
||||
log.debug("TRAMO EXISTE");
|
||||
}
|
||||
rutaTramoRegresoVO.setLsCombinacionRutaTramoVO(lsCombinacionRutaTramoRegresoVO);
|
||||
|
||||
nuevaSecuencia.setKmReal(tramoServicio.getTramo().getKmReal());
|
||||
nuevaSecuencia.setTiempoRecorrido(new HoraSistema(tramoServicio.getTiemporecorrido()));
|
||||
nuevaSecuencia.setTramoId(tramoServicio.getTramo().getTramoId());
|
||||
nuevaSecuencia.setTramoServicioId(tramoServicio.getTramoservicioId());
|
||||
return rutaTramoRegresoVO;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
lsSecuenciaCombinacionRutaTramoVO.add(nuevaSecuencia);
|
||||
@Override
|
||||
public List<SecuenciaRutaTramoCoeficienteVO> generarCombinacion(RutaTramoVO rutaTramoVO) {
|
||||
// una nueva lista que va a ser ordenada. Con eso, no afecta la lista original
|
||||
List<SecuenciaRutaTramoVO> lsSecuenciaRutaTramoVO = new ArrayList<SecuenciaRutaTramoVO>(rutaTramoVO.getLsSecuenciaRutaTramoVO());
|
||||
List<SecuenciaRutaTramoCoeficienteVO> lsSecuenciaCombinacionRutaTramoVO = new ArrayList<SecuenciaRutaTramoCoeficienteVO>();
|
||||
|
||||
totalKmsReal = totalKmsReal.add(lsSecuenciaRutaTramoVO.get(j).getKmReal());
|
||||
totalTiempoRecorrido = totalTiempoRecorrido.sumar(lsSecuenciaRutaTramoVO.get(j).getTiempoRecorrido());
|
||||
Collections.sort(lsSecuenciaRutaTramoVO, new Comparator<SecuenciaRutaTramoVO>() {
|
||||
|
||||
log.debug("Origen:" + nuevaSecuencia.getOrigen() + ";Destino:" + nuevaSecuencia.getDestino() + ";Via:"
|
||||
+ nuevaSecuencia.getVia() + ";KmsReal:" + nuevaSecuencia.getKmReal() + ";hora:" + nuevaSecuencia.getTiempoRecorrido());
|
||||
@Override
|
||||
public int compare(SecuenciaRutaTramoVO o1, SecuenciaRutaTramoVO o2) {
|
||||
return o1.getSecuencia().compareTo(o2.getSecuencia());
|
||||
}
|
||||
});
|
||||
|
||||
primeraCombinacion = false;
|
||||
}
|
||||
Parada destino = lsSecuenciaRutaTramoVO.get(qtdTramos - 1).getDestino();
|
||||
int qtdTramos = lsSecuenciaRutaTramoVO.size();
|
||||
int secuencia = 0;
|
||||
for (int i = 0; i < qtdTramos; i++) {
|
||||
SecuenciaRutaTramoVO secuenciaInicial = lsSecuenciaRutaTramoVO.get(i);
|
||||
Parada origen = secuenciaInicial.getOrigen();
|
||||
BigDecimal totalKmsReal = secuenciaInicial.getKmReal();
|
||||
HoraSistema totalTiempoRecorrido = secuenciaInicial.getTiempoRecorrido();
|
||||
|
||||
Via via = secuenciaInicial.getVia();
|
||||
// if (primeraCombinacion) {
|
||||
// via = secuenciaInicial.getVia();
|
||||
// }
|
||||
int j = i + 1;
|
||||
for (; j < (qtdTramos); j++) {
|
||||
Parada destino = lsSecuenciaRutaTramoVO.get(j).getOrigen();
|
||||
|
||||
SecuenciaRutaTramoVO nuevaSecuencia = new SecuenciaRutaTramoVO(origen, destino, via, ++secuencia,
|
||||
totalKmsReal, totalTiempoRecorrido, rutaTramoVO.getNumRuta(), rutaTramoVO.getIndSentidoIda());
|
||||
if (via != null) {
|
||||
TramoServicio tramoServicio = tramoServicioService.buscar(origen, destino, via, rutaTramoVO.getClaseServicio());
|
||||
if (tramoServicio != null) {
|
||||
log.debug("TRAMO EXISTE");
|
||||
Via via = secuenciaInicial.getVia();
|
||||
|
||||
nuevaSecuencia.setKmReal(tramoServicio.getTramo().getKmReal());
|
||||
nuevaSecuencia.setTiempoRecorrido(new HoraSistema(tramoServicio.getTiemporecorrido()));
|
||||
nuevaSecuencia.setTramoId(tramoServicio.getTramo().getTramoId());
|
||||
nuevaSecuencia.setTramoServicioId(tramoServicio.getTramoservicioId());
|
||||
}
|
||||
}
|
||||
nuevaSecuencia.setNumRuta(rutaTramoVO.getNumRuta());
|
||||
nuevaSecuencia.setIndSentidoIda(rutaTramoVO.getIndSentidoIda());
|
||||
lsSecuenciaCombinacionRutaTramoVO.add(nuevaSecuencia);
|
||||
log.debug("Origen:" + nuevaSecuencia.getOrigen() + ";Destino:" + nuevaSecuencia.getDestino() + ";Via:"
|
||||
+ nuevaSecuencia.getVia() + ";KmsReal:" + nuevaSecuencia.getKmReal() + ";hora:" + nuevaSecuencia.getTiempoRecorrido());
|
||||
SecuenciaRutaTramoCoeficienteVO nuevaSecuencia = new SecuenciaRutaTramoCoeficienteVO(origen, destino, via, ++secuencia,
|
||||
totalKmsReal, totalTiempoRecorrido, rutaTramoVO.getNumRuta());
|
||||
|
||||
}
|
||||
if (via != null) {
|
||||
TramoServicio tramoServicio = tramoServicioService.buscar(origen, destino, via, rutaTramoVO.getClaseServicio());
|
||||
if (tramoServicio != null) {
|
||||
log.debug("TRAMO EXISTE");
|
||||
|
||||
return lsSecuenciaCombinacionRutaTramoVO;
|
||||
}
|
||||
nuevaSecuencia.setKmReal(tramoServicio.getTramo().getKmReal());
|
||||
nuevaSecuencia.setTiempoRecorrido(new HoraSistema(tramoServicio.getTiemporecorrido()));
|
||||
nuevaSecuencia.setTramoId(tramoServicio.getTramo().getTramoId());
|
||||
nuevaSecuencia.setTramoServicioId(tramoServicio.getTramoservicioId());
|
||||
|
||||
}
|
||||
OrgaoTramo orgaoTramo = orgaoTramoDAO.buscar(origen.getParadaId(), destino.getParadaId(), via.getViaId(), rutaTramoVO.getOrgaoConcedente().getOrgaoConcedenteId(), rutaTramoVO.getClaseServicio().getClaseservicioId());
|
||||
if (orgaoTramo != null) {
|
||||
nuevaSecuencia.setCoeficienteTarifa1(orgaoTramo.getCoeficienteTarifa1());
|
||||
nuevaSecuencia.setKmCoeficiente1(orgaoTramo.getKmCoeficiente1());
|
||||
nuevaSecuencia.setCoeficienteTarifa2(orgaoTramo.getCoeficienteTarifa2());
|
||||
nuevaSecuencia.setKmCoeficiente2(orgaoTramo.getKmCoeficiente2());
|
||||
nuevaSecuencia.setOrgaoTramoId(orgaoTramo.getOrgaoTramoId());
|
||||
}
|
||||
}
|
||||
|
||||
if (nuevaSecuencia.getKmCoeficiente1() == null) {
|
||||
nuevaSecuencia.setKmCoeficiente1(nuevaSecuencia.getKmReal().intValue());
|
||||
}
|
||||
|
||||
lsSecuenciaCombinacionRutaTramoVO.add(nuevaSecuencia);
|
||||
|
||||
totalKmsReal = totalKmsReal.add(lsSecuenciaRutaTramoVO.get(j).getKmReal());
|
||||
totalTiempoRecorrido = totalTiempoRecorrido.sumar(lsSecuenciaRutaTramoVO.get(j).getTiempoRecorrido());
|
||||
|
||||
log.debug("Origen:" + nuevaSecuencia.getOrigen() + ";Destino:" + nuevaSecuencia.getDestino() + ";Via:"
|
||||
+ nuevaSecuencia.getVia() + ";KmsReal:" + nuevaSecuencia.getKmReal() + ";hora:" + nuevaSecuencia.getTiempoRecorrido());
|
||||
|
||||
}
|
||||
|
||||
Parada destino = lsSecuenciaRutaTramoVO.get(qtdTramos - 1).getDestino();
|
||||
|
||||
Via via = secuenciaInicial.getVia();
|
||||
|
||||
SecuenciaRutaTramoCoeficienteVO nuevaSecuencia = new SecuenciaRutaTramoCoeficienteVO(origen, destino, via, ++secuencia,
|
||||
totalKmsReal, totalTiempoRecorrido, rutaTramoVO.getNumRuta());
|
||||
if (via != null) {
|
||||
TramoServicio tramoServicio = tramoServicioService.buscar(origen, destino, via, rutaTramoVO.getClaseServicio());
|
||||
if (tramoServicio != null) {
|
||||
log.debug("TRAMO EXISTE");
|
||||
|
||||
nuevaSecuencia.setKmReal(tramoServicio.getTramo().getKmReal());
|
||||
nuevaSecuencia.setTiempoRecorrido(new HoraSistema(tramoServicio.getTiemporecorrido()));
|
||||
nuevaSecuencia.setTramoId(tramoServicio.getTramo().getTramoId());
|
||||
nuevaSecuencia.setTramoServicioId(tramoServicio.getTramoservicioId());
|
||||
}
|
||||
OrgaoTramo orgaoTramo = orgaoTramoDAO.buscar(origen.getParadaId(), destino.getParadaId(), via.getViaId(), rutaTramoVO.getOrgaoConcedente().getOrgaoConcedenteId(), rutaTramoVO.getClaseServicio().getClaseservicioId());
|
||||
if (orgaoTramo != null) {
|
||||
nuevaSecuencia.setCoeficienteTarifa1(orgaoTramo.getCoeficienteTarifa1());
|
||||
nuevaSecuencia.setKmCoeficiente1(orgaoTramo.getKmCoeficiente1());
|
||||
nuevaSecuencia.setCoeficienteTarifa2(orgaoTramo.getCoeficienteTarifa2());
|
||||
nuevaSecuencia.setKmCoeficiente2(orgaoTramo.getKmCoeficiente2());
|
||||
nuevaSecuencia.setOrgaoTramoId(orgaoTramo.getOrgaoTramoId());
|
||||
}
|
||||
}
|
||||
if (nuevaSecuencia.getKmCoeficiente1() == null) {
|
||||
nuevaSecuencia.setKmCoeficiente1(nuevaSecuencia.getKmReal().intValue());
|
||||
}
|
||||
nuevaSecuencia.setNumRuta(rutaTramoVO.getNumRuta());
|
||||
lsSecuenciaCombinacionRutaTramoVO.add(nuevaSecuencia);
|
||||
log.debug("Origen:" + nuevaSecuencia.getOrigen() + ";Destino:" + nuevaSecuencia.getDestino() + ";Via:"
|
||||
+ nuevaSecuencia.getVia() + ";KmsReal:" + nuevaSecuencia.getKmReal() + ";hora:" + nuevaSecuencia.getTiempoRecorrido());
|
||||
|
||||
}
|
||||
|
||||
return lsSecuenciaCombinacionRutaTramoVO;
|
||||
}
|
||||
|
||||
/**
|
||||
* Genera los datos de tramo, tramo tiempo e coeficiente tarifa sino existen los datos
|
||||
*
|
||||
* @param secuencia
|
||||
* @param claseServicio
|
||||
* @param orgaoConcedente
|
||||
* @return
|
||||
*/
|
||||
private boolean generarDatos(SecuenciaRutaTramoCoeficienteVO secuencia, ClaseServicio claseServicio, OrgaoConcedente orgaoConcedente) {
|
||||
TramoServicio tramoServicio = tramoServicioDAO.buscar(secuencia.getOrigen(), secuencia.getDestino(), secuencia.getVia(), claseServicio);
|
||||
|
||||
Tramo tramo = null;
|
||||
if (tramoServicio == null) {
|
||||
tramo = tramoService.buscar(secuencia.getOrigen(), secuencia.getDestino(), secuencia.getVia());
|
||||
if (tramo == null) {
|
||||
tramo = new Tramo();
|
||||
tramo.setDesctramo(tramoService.gerarDescripcionTramo(secuencia.getOrigen(), secuencia.getDestino(), secuencia.getVia()));
|
||||
tramo.setOrigem(secuencia.getOrigen());
|
||||
tramo.setDestino(secuencia.getDestino());
|
||||
tramo.setKmReal(secuencia.getKmReal());
|
||||
tramo.setVia(secuencia.getVia());
|
||||
tramo.setActivo(Boolean.TRUE);
|
||||
tramo.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
tramo.setFecmodif(new java.util.Date());
|
||||
|
||||
tramo = tramoDAO.suscribir(tramo);
|
||||
}
|
||||
tramoServicio = new TramoServicio();
|
||||
tramoServicio.setClaseServicio(claseServicio);
|
||||
tramoServicio.setTramo(tramo);
|
||||
tramoServicio.setTiemporecorrido(secuencia.getTiempoRecorrido().getFecha());
|
||||
|
||||
tramoServicio = tramoServicioService.suscribir(tramoServicio);
|
||||
|
||||
if (secuencia.getOrgaoTramoId() == null) {
|
||||
OrgaoTramo orgaoTramo = new OrgaoTramo();
|
||||
orgaoTramo.setClaseServicio(claseServicio);
|
||||
orgaoTramo.setOrgaoConcedente(orgaoConcedente);
|
||||
orgaoTramo.setTramo(tramo);
|
||||
|
||||
orgaoTramo.setActivo(Boolean.TRUE);
|
||||
orgaoTramo.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
orgaoTramo.setFecmodif(new java.util.Date());
|
||||
orgaoTramo.setCoeficienteTarifa1(secuencia.getCoeficienteTarifa1());
|
||||
orgaoTramo.setKmCoeficiente1(secuencia.getKmCoeficiente1());
|
||||
|
||||
if (secuencia.getCoeficienteTarifa2() != null) {
|
||||
orgaoTramo.setCoeficienteTarifa2(secuencia.getCoeficienteTarifa2());
|
||||
orgaoTramo.setKmCoeficiente2(secuencia.getKmCoeficiente2());
|
||||
}
|
||||
|
||||
orgaoTramo = orgaoTramoDAO.suscribir(orgaoTramo);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,9 +10,14 @@ import org.zkoss.util.resource.Labels;
|
|||
*
|
||||
* @author gleimar
|
||||
*/
|
||||
public class RegistroConDependenciaException extends RuntimeException {
|
||||
public class RegistroConDependenciaException extends Exception {
|
||||
|
||||
public RegistroConDependenciaException() {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public RegistroConDependenciaException() {
|
||||
super(Labels.getLabel("MSG.exception.RegistroConDependenciaException"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ public class RutaTramoVO {
|
|||
private ClaseServicio claseServicio;
|
||||
private OrgaoConcedente orgaoConcedente;
|
||||
private List<SecuenciaRutaTramoVO> lsSecuenciaRutaTramoVO;
|
||||
private List<SecuenciaRutaTramoVO> lsCombinacionRutaTramoVO;
|
||||
private List<SecuenciaRutaTramoCoeficienteVO> lsCombinacionRutaTramoVO;
|
||||
private List<Empresa> lsEmpresa;
|
||||
private String prefixo;
|
||||
private String descRuta;
|
||||
|
@ -25,7 +25,7 @@ public class RutaTramoVO {
|
|||
public RutaTramoVO() {
|
||||
lsSecuenciaRutaTramoVO = new ArrayList<SecuenciaRutaTramoVO>();
|
||||
lsEmpresa = new ArrayList<Empresa>();
|
||||
lsCombinacionRutaTramoVO = new ArrayList<SecuenciaRutaTramoVO>();
|
||||
lsCombinacionRutaTramoVO = new ArrayList<SecuenciaRutaTramoCoeficienteVO>();
|
||||
}
|
||||
|
||||
public Boolean getVentaHandHeld() {
|
||||
|
@ -87,11 +87,11 @@ public class RutaTramoVO {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
public List<SecuenciaRutaTramoVO> getLsCombinacionRutaTramoVO() {
|
||||
public List<SecuenciaRutaTramoCoeficienteVO> getLsCombinacionRutaTramoVO() {
|
||||
return Collections.unmodifiableList(lsCombinacionRutaTramoVO);
|
||||
}
|
||||
|
||||
public void setLsCombinacionRutaTramoVO(List<SecuenciaRutaTramoVO> lsCombinacionRutaTramoVO) {
|
||||
public void setLsCombinacionRutaTramoVO(List<SecuenciaRutaTramoCoeficienteVO> lsCombinacionRutaTramoVO) {
|
||||
this.lsCombinacionRutaTramoVO = lsCombinacionRutaTramoVO;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,198 @@
|
|||
package com.rjconsultores.ventaboletos.vo.esquemaoperacional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.Via;
|
||||
import com.rjconsultores.ventaboletos.utilerias.HoraSistema;
|
||||
|
||||
public class SecuenciaRutaTramoCoeficienteVO {
|
||||
|
||||
private Parada origen;
|
||||
private Parada destino;
|
||||
private Via via;
|
||||
private Integer secuencia;
|
||||
private BigDecimal kmReal;
|
||||
private HoraSistema tiempoRecorrido;
|
||||
private Integer tramoId;
|
||||
private Integer tramoServicioId;
|
||||
private Integer numRuta;
|
||||
private Integer orgaoTramoId;
|
||||
private CoeficienteTarifa coeficienteTarifa1;
|
||||
private Integer kmCoeficiente1;
|
||||
private CoeficienteTarifa coeficienteTarifa2;
|
||||
private Integer kmCoeficiente2;
|
||||
|
||||
public SecuenciaRutaTramoCoeficienteVO(Parada origen, Parada destino, Via via, Integer secuencia, BigDecimal kmReal, HoraSistema tiempoRecorrido) {
|
||||
super();
|
||||
this.origen = origen;
|
||||
this.destino = destino;
|
||||
this.via = via;
|
||||
this.secuencia = secuencia;
|
||||
this.kmReal = kmReal;
|
||||
this.setTiempoRecorrido(tiempoRecorrido);
|
||||
}
|
||||
|
||||
public SecuenciaRutaTramoCoeficienteVO(Parada origen, Parada destino, Via via, Integer secuencia, BigDecimal kmReal, HoraSistema tiempoRecorrido, Integer numruta) {
|
||||
this(origen, destino, via, secuencia, kmReal, tiempoRecorrido);
|
||||
this.numRuta = numruta;
|
||||
}
|
||||
|
||||
public SecuenciaRutaTramoCoeficienteVO(Parada origen, Parada destino, Integer secuencia, Via via) {
|
||||
super();
|
||||
this.origen = origen;
|
||||
this.destino = destino;
|
||||
this.secuencia = secuencia;
|
||||
this.via = via;
|
||||
this.setTiempoRecorrido(null);
|
||||
}
|
||||
|
||||
public SecuenciaRutaTramoCoeficienteVO(Parada origen, Parada destino, Integer secuencia, Via via, Integer numruta) {
|
||||
this(origen, destino, secuencia, via);
|
||||
this.numRuta = numruta;
|
||||
}
|
||||
|
||||
public SecuenciaRutaTramoCoeficienteVO(Parada origen, Parada destino, Via via, Integer secuencia, BigDecimal kmReal,
|
||||
HoraSistema tiempoRecorrido, Integer tramoId, Integer tramoServicioId) {
|
||||
super();
|
||||
this.origen = origen;
|
||||
this.destino = destino;
|
||||
this.via = via;
|
||||
this.secuencia = secuencia;
|
||||
this.kmReal = kmReal;
|
||||
this.setTiempoRecorrido(tiempoRecorrido);
|
||||
this.tramoId = tramoId;
|
||||
this.tramoServicioId = tramoId;
|
||||
}
|
||||
|
||||
public SecuenciaRutaTramoCoeficienteVO(Parada origen, Parada destino, Via via, Integer secuencia, BigDecimal kmReal,
|
||||
HoraSistema tiempoRecorrido, Integer tramoId, Integer tramoServicioId, Integer numruta) {
|
||||
this(origen, destino, via, secuencia, kmReal, tiempoRecorrido, tramoId, tramoServicioId);
|
||||
this.numRuta = numruta;
|
||||
}
|
||||
|
||||
public Parada getOrigen() {
|
||||
return origen;
|
||||
}
|
||||
|
||||
public void setOrigen(Parada origen) {
|
||||
this.origen = origen;
|
||||
}
|
||||
|
||||
public Parada getDestino() {
|
||||
return destino;
|
||||
}
|
||||
|
||||
public HoraSistema getTiempoRecorrido() {
|
||||
return tiempoRecorrido;
|
||||
}
|
||||
|
||||
public void setTiempoRecorrido(HoraSistema tiempoRecorrido) {
|
||||
if (tiempoRecorrido == null) {
|
||||
tiempoRecorrido = new HoraSistema();
|
||||
}
|
||||
this.tiempoRecorrido = tiempoRecorrido;
|
||||
}
|
||||
|
||||
public void setDestino(Parada destino) {
|
||||
this.destino = destino;
|
||||
}
|
||||
|
||||
public Via getVia() {
|
||||
return via;
|
||||
}
|
||||
|
||||
public void setVia(Via via) {
|
||||
this.via = via;
|
||||
}
|
||||
|
||||
public Integer getSecuencia() {
|
||||
return secuencia;
|
||||
}
|
||||
|
||||
public void setSecuencia(Integer secuencia) {
|
||||
this.secuencia = secuencia;
|
||||
}
|
||||
|
||||
public BigDecimal getKmReal() {
|
||||
return kmReal;
|
||||
}
|
||||
|
||||
public void setKmReal(BigDecimal kmReal) {
|
||||
this.kmReal = kmReal;
|
||||
}
|
||||
|
||||
public Integer getTramoId() {
|
||||
return tramoId;
|
||||
}
|
||||
|
||||
public void setTramoId(Integer tramoId) {
|
||||
this.tramoId = tramoId;
|
||||
}
|
||||
|
||||
public Integer getTramoServicioId() {
|
||||
return tramoServicioId;
|
||||
}
|
||||
|
||||
public void setTramoServicioId(Integer tramoServicioId) {
|
||||
this.tramoServicioId = tramoServicioId;
|
||||
}
|
||||
|
||||
public Integer getNumRuta() {
|
||||
return numRuta;
|
||||
}
|
||||
|
||||
public void setNumRuta(Integer numRuta) {
|
||||
this.numRuta = numRuta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
HoraSistema hora = getTiempoRecorrido();
|
||||
|
||||
return secuencia + ";" + origen + ";" + destino + ";" + via + ";" + kmReal + ";"
|
||||
+ ((hora != null) ? hora.getHora() : "-") + ";" + ((hora != null) ? hora.getMinuto() : "-");
|
||||
}
|
||||
|
||||
public Integer getOrgaoTramoId() {
|
||||
return orgaoTramoId;
|
||||
}
|
||||
|
||||
public void setOrgaoTramoId(Integer orgaoTramoId) {
|
||||
this.orgaoTramoId = orgaoTramoId;
|
||||
}
|
||||
|
||||
public CoeficienteTarifa getCoeficienteTarifa1() {
|
||||
return coeficienteTarifa1;
|
||||
}
|
||||
|
||||
public void setCoeficienteTarifa1(CoeficienteTarifa coeficienteTarifa1) {
|
||||
this.coeficienteTarifa1 = coeficienteTarifa1;
|
||||
}
|
||||
|
||||
public Integer getKmCoeficiente1() {
|
||||
return kmCoeficiente1;
|
||||
}
|
||||
|
||||
public void setKmCoeficiente1(Integer kmCoeficiente1) {
|
||||
this.kmCoeficiente1 = kmCoeficiente1;
|
||||
}
|
||||
|
||||
public CoeficienteTarifa getCoeficienteTarifa2() {
|
||||
return coeficienteTarifa2;
|
||||
}
|
||||
|
||||
public void setCoeficienteTarifa2(CoeficienteTarifa coeficienteTarifa2) {
|
||||
this.coeficienteTarifa2 = coeficienteTarifa2;
|
||||
}
|
||||
|
||||
public Integer getKmCoeficiente2() {
|
||||
return kmCoeficiente2;
|
||||
}
|
||||
|
||||
public void setKmCoeficiente2(Integer kmCoeficiente2) {
|
||||
this.kmCoeficiente2 = kmCoeficiente2;
|
||||
}
|
||||
|
||||
}
|
|
@ -2,6 +2,7 @@ package com.rjconsultores.ventaboletos.vo.esquemaoperacional;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.CoeficienteTarifa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.Via;
|
||||
import com.rjconsultores.ventaboletos.utilerias.HoraSistema;
|
||||
|
@ -19,8 +20,7 @@ public class SecuenciaRutaTramoVO {
|
|||
private Boolean indSentidoIda;
|
||||
private Integer numRuta;
|
||||
|
||||
public SecuenciaRutaTramoVO(Parada origen, Parada destino, Via via, Integer secuencia, BigDecimal kmReal,
|
||||
HoraSistema tiempoRecorrido) {
|
||||
public SecuenciaRutaTramoVO(Parada origen, Parada destino, Via via, Integer secuencia, BigDecimal kmReal, HoraSistema tiempoRecorrido) {
|
||||
super();
|
||||
this.origen = origen;
|
||||
this.destino = destino;
|
||||
|
@ -30,8 +30,7 @@ public class SecuenciaRutaTramoVO {
|
|||
this.setTiempoRecorrido(tiempoRecorrido);
|
||||
}
|
||||
|
||||
public SecuenciaRutaTramoVO(Parada origen, Parada destino, Via via, Integer secuencia, BigDecimal kmReal,
|
||||
HoraSistema tiempoRecorrido, Integer numruta, Boolean indSentidoIda) {
|
||||
public SecuenciaRutaTramoVO(Parada origen, Parada destino, Via via, Integer secuencia, BigDecimal kmReal, HoraSistema tiempoRecorrido, Integer numruta, Boolean indSentidoIda) {
|
||||
this(origen, destino, via, secuencia, kmReal, tiempoRecorrido);
|
||||
this.numRuta = numruta;
|
||||
this.indSentidoIda = indSentidoIda;
|
||||
|
@ -45,9 +44,10 @@ public class SecuenciaRutaTramoVO {
|
|||
this.via = via;
|
||||
this.setTiempoRecorrido(null);
|
||||
}
|
||||
|
||||
public SecuenciaRutaTramoVO(Parada origen, Parada destino, Integer secuencia, Via via, Integer numruta, Boolean indSentidoIda) {
|
||||
this( origen, destino, secuencia, via);
|
||||
this.numRuta = numRuta;
|
||||
this(origen, destino, secuencia, via);
|
||||
this.numRuta = numruta;
|
||||
this.indSentidoIda = indSentidoIda;
|
||||
}
|
||||
|
||||
|
@ -138,8 +138,6 @@ public class SecuenciaRutaTramoVO {
|
|||
this.tramoServicioId = tramoServicioId;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Boolean getIndSentidoIda() {
|
||||
return indSentidoIda;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.vo.esquemaoperacional;
|
||||
package com.rjconsultores.ventaboletos.vo.tarifa;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
|
@ -2,7 +2,7 @@
|
|||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.vo.esquemaoperacional;
|
||||
package com.rjconsultores.ventaboletos.vo.tarifa;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.vo.esquemaoperacional;
|
||||
package com.rjconsultores.ventaboletos.vo.tarifa;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
* To change this template, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
package com.rjconsultores.ventaboletos.vo.esquemaoperacional;
|
||||
package com.rjconsultores.ventaboletos.vo.tarifa;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
Loading…
Reference in New Issue