fixes bug#22049
qua:junia,waly,willian dev: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@106650 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
cf6b50d157
commit
cbd9183d2a
|
@ -0,0 +1,7 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
|
||||||
|
public interface ConexionRutaCtrlDAO extends GenericDAO<ConexionRutaCtrl, Integer> {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaExcepcionPtoVta;
|
||||||
|
|
||||||
|
public interface ConexionRutaExcepcionPtoVtaDAO extends GenericDAO<ConexionRutaExcepcionPtoVta, Integer> {
|
||||||
|
|
||||||
|
public List<ConexionRutaExcepcionPtoVta> obtenerConexionRutaExcepcionPtoVtasActivo(ConexionRutaCtrl conexionRutaCtrl);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaExcepcionTipoPtoVta;
|
||||||
|
|
||||||
|
public interface ConexionRutaExcepcionTipoPtoVtaDAO extends GenericDAO<ConexionRutaExcepcionTipoPtoVta, Integer> {
|
||||||
|
|
||||||
|
public List<ConexionRutaExcepcionTipoPtoVta> obtenerConexionRutaExcepcionTipoPtoVtaActivo(ConexionRutaCtrl conexionRutaCtrl);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaTramoCtrl;
|
||||||
|
|
||||||
|
public interface ConexionRutaTramoCtrlDAO extends GenericDAO<ConexionRutaTramoCtrl, Integer> {
|
||||||
|
|
||||||
|
boolean validarConexioneRutasExistentes(Integer rutaOrigenId, Integer rutaDestinoId, Integer paradaOrigenId, Integer paradaDestinoId, Integer origemTrechoId, Integer destinoTrechoId);
|
||||||
|
|
||||||
|
}
|
|
@ -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.ConexionRutaCtrlDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
|
||||||
|
@Repository("conexionRutaCtrlDAO")
|
||||||
|
public class ConexionRutaCtrlHibernateDAO extends GenericHibernateDAO<ConexionRutaCtrl, Integer> implements ConexionRutaCtrlDAO {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public ConexionRutaCtrlHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||||
|
setSessionFactory(factory);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
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.ConexionRutaExcepcionTipoPtoVtaDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaExcepcionTipoPtoVta;
|
||||||
|
|
||||||
|
@Repository("conexionRutaExcepcionTipoPtoVtaDAO")
|
||||||
|
public class ConexionRutaExcepcionTipoPtoVtaHibernateDAO extends GenericHibernateDAO<ConexionRutaExcepcionTipoPtoVta, Integer> implements ConexionRutaExcepcionTipoPtoVtaDAO {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public ConexionRutaExcepcionTipoPtoVtaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||||
|
setSessionFactory(factory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ConexionRutaExcepcionTipoPtoVta> obtenerConexionRutaExcepcionTipoPtoVtaActivo(ConexionRutaCtrl conexionRutaCtrl) {
|
||||||
|
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||||
|
c.add(Restrictions.eq("conexionRutaCtrl", conexionRutaCtrl));
|
||||||
|
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||||
|
return c.list();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
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.ConexionRutaExcepcionPtoVtaDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaExcepcionPtoVta;
|
||||||
|
|
||||||
|
@Repository("conexionRutaRestricaoPtoVtaDAO")
|
||||||
|
public class ConexionRutaRestricaoPtoVtaHibernateDAO extends GenericHibernateDAO<ConexionRutaExcepcionPtoVta, Integer> implements ConexionRutaExcepcionPtoVtaDAO {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public ConexionRutaRestricaoPtoVtaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||||
|
setSessionFactory(factory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ConexionRutaExcepcionPtoVta> obtenerConexionRutaExcepcionPtoVtasActivo(ConexionRutaCtrl conexionRutaCtrl) {
|
||||||
|
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||||
|
c.add(Restrictions.eq("conexionRutaCtrl", conexionRutaCtrl));
|
||||||
|
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||||
|
return c.list();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||||
|
|
||||||
|
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.ConexionRutaTramoCtrlDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaTramoCtrl;
|
||||||
|
|
||||||
|
@Repository("conexionRutaTramoCtrlDAO")
|
||||||
|
public class ConexionRutaTramoCtrlHibernateDAO extends GenericHibernateDAO<ConexionRutaTramoCtrl, Integer> implements ConexionRutaTramoCtrlDAO {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public ConexionRutaTramoCtrlHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||||
|
setSessionFactory(factory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validarConexioneRutasExistentes(Integer rutaOrigenId, Integer rutaDestinoId, Integer paradaOrigenId, Integer paradaDestinoId, Integer origemTrechoId, Integer destinoTrechoId) {
|
||||||
|
|
||||||
|
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
sb.append("SELECT *");
|
||||||
|
sb.append(" FROM conexion_ruta_ctrl crt ");
|
||||||
|
sb.append(" INNER JOIN conexion_ruta_tramo_ctrl crtl ON (crtl.conexionrutactrl_id = crt.conexionrutactrl_id) ");
|
||||||
|
sb.append(" INNER JOIN conexion c ON (c.conexionrutatramoctrl_id = crtl.conexionrutatramoctrl_id) ");
|
||||||
|
sb.append(" INNER JOIN conexion_ctrl cc ON (cc.conexionctrl_id = c.conexionctrl_id) ");
|
||||||
|
sb.append(" WHERE crt.ruta_origen_id = ").append(rutaOrigenId);
|
||||||
|
sb.append(" AND crt.ruta_destino_id = ").append(rutaDestinoId);
|
||||||
|
sb.append(" AND crtl.origen_id = ").append(paradaOrigenId);
|
||||||
|
sb.append(" AND crtl.destino_id = ").append(paradaDestinoId);
|
||||||
|
sb.append(" AND cc.origen_id = ").append(origemTrechoId);
|
||||||
|
sb.append(" AND cc.destino_id = ").append(destinoTrechoId);
|
||||||
|
sb.append(" and crt.activo = 1 and crtl.activo = 1 and c.activo =1 and cc.activo = 1");
|
||||||
|
|
||||||
|
Query query = getSession().createSQLQuery(sb.toString());
|
||||||
|
List<Object[]> list = query.list();
|
||||||
|
|
||||||
|
return !list.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -15,13 +15,11 @@ import javax.persistence.Entity;
|
||||||
import javax.persistence.GeneratedValue;
|
import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.OneToMany;
|
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
import javax.persistence.Transient;
|
import javax.persistence.Transient;
|
||||||
import javax.persistence.Version;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -58,6 +56,10 @@ public class Conexion implements Serializable {
|
||||||
private Long corridaId;
|
private Long corridaId;
|
||||||
@Transient
|
@Transient
|
||||||
private List<ConexionDescuento> conexionesDescuentos;
|
private List<ConexionDescuento> conexionesDescuentos;
|
||||||
|
@Column(name = "RUTA_ID")
|
||||||
|
private Integer rutaId;
|
||||||
|
@Column(name = "CONEXIONRUTATRAMOCTRL_ID")
|
||||||
|
private Integer conexionRutaTramoId;
|
||||||
|
|
||||||
public Long getCorridaId() {
|
public Long getCorridaId() {
|
||||||
return corridaId;
|
return corridaId;
|
||||||
|
@ -184,4 +186,20 @@ public class Conexion implements Serializable {
|
||||||
this.conexionesDescuentos = conexionesDescuentos;
|
this.conexionesDescuentos = conexionesDescuentos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getRutaId() {
|
||||||
|
return rutaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRutaId(Integer rutaId) {
|
||||||
|
this.rutaId = rutaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getConexionRutaTramoId() {
|
||||||
|
return conexionRutaTramoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConexionRutaTramoId(Integer conexionRutaTramoId) {
|
||||||
|
this.conexionRutaTramoId = conexionRutaTramoId;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,6 +45,14 @@ public class ConexionCtrl implements Serializable {
|
||||||
public ConexionCtrl() {
|
public ConexionCtrl() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ConexionCtrl(Integer origenId, Integer destinoId) {
|
||||||
|
super();
|
||||||
|
this.origenId = origenId;
|
||||||
|
this.destinoId = destinoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public ConexionCtrl(Long conexionctrlId) {
|
public ConexionCtrl(Long conexionctrlId) {
|
||||||
this.conexionctrlId = conexionctrlId;
|
this.conexionctrlId = conexionctrlId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,133 @@
|
||||||
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import javax.persistence.Basic;
|
||||||
|
import javax.persistence.CascadeType;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.OneToMany;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.LazyCollection;
|
||||||
|
import org.hibernate.annotations.LazyCollectionOption;
|
||||||
|
import org.hibernate.annotations.Where;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author wallace
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@SequenceGenerator(name = "CONEXION_RUTA_CTRL_SEQ", sequenceName = "CONEXION_RUTA_CTRL_SEQ", allocationSize = 1)
|
||||||
|
@Table(name = "CONEXION_RUTA_CTRL")
|
||||||
|
public class ConexionRutaCtrl implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@Id
|
||||||
|
@Basic(optional = false)
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "CONEXION_RUTA_CTRL_SEQ")
|
||||||
|
@Column(name = "CONEXIONRUTACTRL_ID")
|
||||||
|
private Integer conexionRutaId;
|
||||||
|
@Column(name = "ACTIVO")
|
||||||
|
private Boolean activo;
|
||||||
|
@Column(name = "FECMODIF")
|
||||||
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
|
private Date fecmodif;
|
||||||
|
@Column(name = "USUARIO_ID")
|
||||||
|
private Integer usuarioId;
|
||||||
|
@Column(name = "RUTA_ORIGEN_ID")
|
||||||
|
private Integer rutaOrigenId;
|
||||||
|
@Column(name = "RUTA_DESTINO_ID")
|
||||||
|
private Integer rutaDestinoId;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "conexionRutaCtrl", cascade = CascadeType.ALL)
|
||||||
|
@LazyCollection(LazyCollectionOption.FALSE)
|
||||||
|
@Where(clause="ACTIVO=1")
|
||||||
|
private List<ConexionRutaExcepcionTipoPtoVta> conexionRutaCanalVendasList;
|
||||||
|
|
||||||
|
@OneToMany(mappedBy = "conexionRutaCtrl", cascade = CascadeType.ALL)
|
||||||
|
@LazyCollection(LazyCollectionOption.FALSE)
|
||||||
|
@Where(clause="ACTIVO=1")
|
||||||
|
private List<ConexionRutaExcepcionPtoVta> conexionRutaPuntoVendaList;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public List<ConexionRutaExcepcionTipoPtoVta> getConexionRutaCanalVendasList() {
|
||||||
|
return conexionRutaCanalVendasList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConexionRutaCanalVendasList(List<ConexionRutaExcepcionTipoPtoVta> conexionRutaCanalVendasList) {
|
||||||
|
this.conexionRutaCanalVendasList = conexionRutaCanalVendasList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ConexionRutaExcepcionPtoVta> getConexionRutaPuntoVendaList() {
|
||||||
|
return conexionRutaPuntoVendaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConexionRutaPuntoVendaList(List<ConexionRutaExcepcionPtoVta> conexionRutaPuntoVendaList) {
|
||||||
|
this.conexionRutaPuntoVendaList = conexionRutaPuntoVendaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConexionRutaCtrl() {
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getActivo() {
|
||||||
|
return activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getConexionRutaId() {
|
||||||
|
return conexionRutaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setConexionRutaId(Integer conexionRutaId) {
|
||||||
|
this.conexionRutaId = conexionRutaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivo(Boolean activo) {
|
||||||
|
this.activo = activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFecmodif() {
|
||||||
|
return fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFecmodif(Date fecmodif) {
|
||||||
|
this.fecmodif = fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUsuarioId() {
|
||||||
|
return usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
|
this.usuarioId = usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRutaOrigenId() {
|
||||||
|
return rutaOrigenId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRutaOrigenId(Integer rutaOrigenId) {
|
||||||
|
this.rutaOrigenId = rutaOrigenId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRutaDestinoId() {
|
||||||
|
return rutaDestinoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRutaDestinoId(Integer rutaDestinoId) {
|
||||||
|
this.rutaDestinoId = rutaDestinoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,129 @@
|
||||||
|
/*
|
||||||
|
* To change this template, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
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.ManyToOne;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author wallace
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@SequenceGenerator(name = "CONEXIORUTAEXCEPCIONPTOVTA_SEQ", sequenceName = "CONEXIORUTAEXCEPCIONPTOVTA_SEQ", allocationSize = 1)
|
||||||
|
@Table(name = "CONEXION_RUTA_EXCEPCION_PTOVTA")
|
||||||
|
public class ConexionRutaExcepcionPtoVta implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@Id
|
||||||
|
@Basic(optional = false)
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "CONEXIORUTAEXCEPCIONPTOVTA_SEQ")
|
||||||
|
@Column(name = "CONEXIONRUTAPTOVTA_ID")
|
||||||
|
private Integer conexionRutaPtovtaId;
|
||||||
|
@Column(name = "ACTIVO")
|
||||||
|
private Boolean activo;
|
||||||
|
@Column(name = "FECMODIF")
|
||||||
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
|
private Date fecmodif;
|
||||||
|
@Column(name = "USUARIO_ID")
|
||||||
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "PUNTOVENTA_ID", referencedColumnName = "PUNTOVENTA_ID")
|
||||||
|
private PuntoVenta puntoVenta;
|
||||||
|
|
||||||
|
@JoinColumn(name = "CONEXIONRUTACTRL_ID", referencedColumnName = "CONEXIONRUTACTRL_ID")
|
||||||
|
@ManyToOne
|
||||||
|
private ConexionRutaCtrl conexionRutaCtrl;
|
||||||
|
|
||||||
|
public ConexionRutaExcepcionPtoVta() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getConexionRutaPtovtaId() {
|
||||||
|
return conexionRutaPtovtaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConexionRutaPtovtaId(Integer conexionRutaPtovtaId) {
|
||||||
|
this.conexionRutaPtovtaId = conexionRutaPtovtaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getActivo() {
|
||||||
|
return activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivo(Boolean activo) {
|
||||||
|
this.activo = activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFecmodif() {
|
||||||
|
return fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFecmodif(Date fecmodif) {
|
||||||
|
this.fecmodif = fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUsuarioId() {
|
||||||
|
return usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
|
this.usuarioId = usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PuntoVenta getPuntoVenta() {
|
||||||
|
return puntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPuntoVenta(PuntoVenta puntoVenta) {
|
||||||
|
this.puntoVenta = puntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConexionRutaCtrl getConexionRutaCtrl() {
|
||||||
|
return conexionRutaCtrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConexionRutaCtrl(ConexionRutaCtrl conexionRutaCtrl) {
|
||||||
|
this.conexionRutaCtrl = conexionRutaCtrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = 0;
|
||||||
|
hash += (conexionRutaPtovtaId != null ? conexionRutaPtovtaId.hashCode() : 0);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object object) {
|
||||||
|
if (!(object instanceof ConexionRutaExcepcionPtoVta)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ConexionRutaExcepcionPtoVta other = (ConexionRutaExcepcionPtoVta) object;
|
||||||
|
if ((this.conexionRutaPtovtaId == null && other.conexionRutaPtovtaId != null) || (this.conexionRutaPtovtaId != null && !this.conexionRutaPtovtaId.equals(other.conexionRutaPtovtaId))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return puntoVenta.getNombpuntoventa();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,130 @@
|
||||||
|
/*
|
||||||
|
* To change this template, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
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.ManyToOne;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author wallace
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@SequenceGenerator(name = "CONEXIORUTAEXCEPCIOTIPOPTA_SEQ", sequenceName = "CONEXIORUTAEXCEPCIOTIPOPTA_SEQ", allocationSize = 1)
|
||||||
|
@Table(name = "CONEXION_RUTAEXCEPCIONTIPOPTA")
|
||||||
|
public class ConexionRutaExcepcionTipoPtoVta implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@Id
|
||||||
|
@Basic(optional = false)
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "CONEXIORUTAEXCEPCIOTIPOPTA_SEQ")
|
||||||
|
@Column(name = "CONEXIONRUTATIPOPTOVTA_ID")
|
||||||
|
private Integer conexionRutatipoptovtaId;
|
||||||
|
@Column(name = "ACTIVO")
|
||||||
|
private Boolean activo;
|
||||||
|
@Column(name = "FECMODIF")
|
||||||
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
|
private Date fecmodif;
|
||||||
|
@Column(name = "USUARIO_ID")
|
||||||
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name = "TIPOPTOVTA_ID", referencedColumnName = "TIPOPTOVTA_ID")
|
||||||
|
private TipoPuntoVenta tipoPtovta;
|
||||||
|
|
||||||
|
@JoinColumn(name = "CONEXIONRUTACTRL_ID", referencedColumnName = "CONEXIONRUTACTRL_ID")
|
||||||
|
@ManyToOne
|
||||||
|
private ConexionRutaCtrl conexionRutaCtrl;
|
||||||
|
|
||||||
|
public ConexionRutaExcepcionTipoPtoVta() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getConexionRutatipoptovtaId() {
|
||||||
|
return conexionRutatipoptovtaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConexionRutatipoptovtaId(Integer conexionRutatipoptovtaId) {
|
||||||
|
this.conexionRutatipoptovtaId = conexionRutatipoptovtaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getActivo() {
|
||||||
|
return activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivo(Boolean activo) {
|
||||||
|
this.activo = activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFecmodif() {
|
||||||
|
return fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFecmodif(Date fecmodif) {
|
||||||
|
this.fecmodif = fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUsuarioId() {
|
||||||
|
return usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
|
this.usuarioId = usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TipoPuntoVenta getTipoPtovta() {
|
||||||
|
return tipoPtovta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTipoPtovta(TipoPuntoVenta tipoPtovta) {
|
||||||
|
this.tipoPtovta = tipoPtovta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConexionRutaCtrl getConexionRutaCtrl() {
|
||||||
|
return conexionRutaCtrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConexionRutaCtrl(ConexionRutaCtrl conexionRutaCtrl) {
|
||||||
|
this.conexionRutaCtrl = conexionRutaCtrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
int hash = 0;
|
||||||
|
hash += (conexionRutatipoptovtaId != null ? conexionRutatipoptovtaId.hashCode() : 0);
|
||||||
|
return hash;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object object) {
|
||||||
|
if (!(object instanceof ConexionRutaExcepcionTipoPtoVta)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
ConexionRutaExcepcionTipoPtoVta other = (ConexionRutaExcepcionTipoPtoVta) object;
|
||||||
|
if ((this.conexionRutatipoptovtaId == null && other.conexionRutatipoptovtaId != null) || (this.conexionRutatipoptovtaId != null && !this.conexionRutatipoptovtaId.equals(other.conexionRutatipoptovtaId))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return tipoPtovta.getDesctipo();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,115 @@
|
||||||
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
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.ManyToOne;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author wallace
|
||||||
|
*/
|
||||||
|
@Entity
|
||||||
|
@SequenceGenerator(name = "CONEXION_RUTA_TRAMO_CTRL_SEQ", sequenceName = "CONEXION_RUTA_TRAMO_CTRL_SEQ", allocationSize = 1)
|
||||||
|
@Table(name = "CONEXION_RUTA_TRAMO_CTRL")
|
||||||
|
public class ConexionRutaTramoCtrl implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
@Id
|
||||||
|
@Basic(optional = false)
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "CONEXION_RUTA_TRAMO_CTRL_SEQ")
|
||||||
|
@Column(name = "CONEXIONRUTATRAMOCTRL_ID")
|
||||||
|
private Integer conexionRutaTramoId;
|
||||||
|
@Column(name = "ACTIVO")
|
||||||
|
private Boolean activo;
|
||||||
|
@Column(name = "FECMODIF")
|
||||||
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
|
private Date fecmodif;
|
||||||
|
@Column(name = "USUARIO_ID")
|
||||||
|
private Integer usuarioId;
|
||||||
|
@Column(name = "ORIGEN_ID")
|
||||||
|
private Integer origenId;
|
||||||
|
@Column(name = "DESTINO_ID")
|
||||||
|
private Integer destinoId;
|
||||||
|
|
||||||
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
|
@JoinColumn(name = "CONEXIONRUTACTRL_ID")
|
||||||
|
private ConexionRutaCtrl conexionRutaCtrl;
|
||||||
|
|
||||||
|
public Boolean getActivo() {
|
||||||
|
return activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getConexionRutaTramoId() {
|
||||||
|
return conexionRutaTramoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConexionRutaTramoId(Integer conexionRutaTramoId) {
|
||||||
|
this.conexionRutaTramoId = conexionRutaTramoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getOrigenId() {
|
||||||
|
return origenId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivo(Boolean activo) {
|
||||||
|
this.activo = activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFecmodif() {
|
||||||
|
return fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFecmodif(Date fecmodif) {
|
||||||
|
this.fecmodif = fecmodif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUsuarioId() {
|
||||||
|
return usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
|
this.usuarioId = usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOrigenId(Integer origenId) {
|
||||||
|
this.origenId = origenId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDestinoId() {
|
||||||
|
return destinoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDestinoId(Integer destinoId) {
|
||||||
|
this.destinoId = destinoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ConexionRutaCtrl getConexionRutaCtrl() {
|
||||||
|
return conexionRutaCtrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setConexionRutaCtrl(ConexionRutaCtrl conexionRutaCtrl) {
|
||||||
|
this.conexionRutaCtrl = conexionRutaCtrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Integer getConexionRutaTramoConexionId(List<Conexion> conexiones) {
|
||||||
|
if(conexiones != null && !conexiones.isEmpty()) {
|
||||||
|
Conexion conexionRutaTramoCtrl = conexiones.get(0);
|
||||||
|
return conexionRutaTramoCtrl.getConexionRutaTramoId();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
|
||||||
|
public interface ConexionRutaCtrlService {
|
||||||
|
|
||||||
|
public void gerarConexiones();
|
||||||
|
|
||||||
|
|
||||||
|
public ConexionRutaCtrl suscribir(ConexionRutaCtrl conexion);
|
||||||
|
|
||||||
|
public ConexionRutaCtrl actualizacion(ConexionRutaCtrl conexion);
|
||||||
|
|
||||||
|
public void borrar(ConexionRutaCtrl conexion);
|
||||||
|
|
||||||
|
public List<ConexionRutaCtrl> buscarPorConexionCtrl(Long conexcionCtrlId);
|
||||||
|
|
||||||
|
|
||||||
|
public void borrar(List<ConexionRutaCtrl> lsConexion);
|
||||||
|
|
||||||
|
public void suscribirTodos(List<ConexionRutaCtrl> conexiones);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaExcepcionPtoVta;
|
||||||
|
|
||||||
|
public interface ConexionRutaExcepcionPtoVtaService {
|
||||||
|
|
||||||
|
public void gerarConexiones();
|
||||||
|
|
||||||
|
public ConexionRutaExcepcionPtoVta suscribir(ConexionRutaExcepcionPtoVta conexion);
|
||||||
|
|
||||||
|
public ConexionRutaExcepcionPtoVta actualizacion(ConexionRutaExcepcionPtoVta conexion);
|
||||||
|
|
||||||
|
public void borrar(ConexionRutaExcepcionPtoVta conexion);
|
||||||
|
|
||||||
|
public List<ConexionRutaExcepcionPtoVta> buscarPorConexionCtrl(Long conexcionCtrlId);
|
||||||
|
|
||||||
|
public void borrar(List<ConexionRutaExcepcionPtoVta> lsConexion);
|
||||||
|
|
||||||
|
public void suscribirTodos(List<ConexionRutaExcepcionPtoVta> conexiones);
|
||||||
|
|
||||||
|
public List<ConexionRutaExcepcionPtoVta> obtenerConexionRutaExcepcionPtoVtasActivo(ConexionRutaCtrl conexionRutaCtrl);
|
||||||
|
}
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaExcepcionTipoPtoVta;
|
||||||
|
|
||||||
|
public interface ConexionRutaExcepcionTipoPtoVtaService {
|
||||||
|
|
||||||
|
public void gerarConexiones();
|
||||||
|
|
||||||
|
public ConexionRutaExcepcionTipoPtoVta suscribir(ConexionRutaExcepcionTipoPtoVta conexion);
|
||||||
|
|
||||||
|
public ConexionRutaExcepcionTipoPtoVta actualizacion(ConexionRutaExcepcionTipoPtoVta conexion);
|
||||||
|
|
||||||
|
public void borrar(ConexionRutaExcepcionTipoPtoVta conexion);
|
||||||
|
|
||||||
|
public List<ConexionRutaExcepcionTipoPtoVta> buscarPorConexionCtrl(Long conexcionCtrlId);
|
||||||
|
|
||||||
|
public void borrar(List<ConexionRutaExcepcionTipoPtoVta> lsConexion);
|
||||||
|
|
||||||
|
public void suscribirTodos(List<ConexionRutaExcepcionTipoPtoVta> conexiones);
|
||||||
|
|
||||||
|
public List<ConexionRutaExcepcionTipoPtoVta> obtenerConexionRutaExcepcionPtoVtasActivo(ConexionRutaCtrl conexionRutaCtrl);
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaTramoCtrl;
|
||||||
|
|
||||||
|
public interface ConexionRutaTramoCtrlService {
|
||||||
|
|
||||||
|
public void gerarConexiones();
|
||||||
|
|
||||||
|
|
||||||
|
public ConexionRutaTramoCtrl suscribir(ConexionRutaTramoCtrl conexion);
|
||||||
|
|
||||||
|
public ConexionRutaTramoCtrl actualizacion(ConexionRutaTramoCtrl conexion);
|
||||||
|
|
||||||
|
public void borrar(ConexionRutaTramoCtrl conexion);
|
||||||
|
|
||||||
|
public List<ConexionRutaTramoCtrl> buscarPorConexionCtrl(Long conexcionCtrlId);
|
||||||
|
|
||||||
|
|
||||||
|
public void borrar(List<ConexionRutaTramoCtrl> lsConexion);
|
||||||
|
|
||||||
|
public void suscribirTodos(List<ConexionRutaTramoCtrl> conexiones);
|
||||||
|
|
||||||
|
|
||||||
|
public ConexionRutaTramoCtrl buscarPorId(Integer conexionRutaTramoId);
|
||||||
|
|
||||||
|
|
||||||
|
public boolean validarConexioneRutasExistentes(Integer rutaOrigenId, Integer rutaDestinoId, Integer paradaOrigenId, Integer paradaDestinoId, Integer origemTrechoId, Integer destinoTrechoId);
|
||||||
|
}
|
|
@ -8,9 +8,17 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.ConexionCtrlDAO;
|
import com.rjconsultores.ventaboletos.dao.ConexionCtrlDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.dao.ConexionRutaCtrlDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.dao.ConexionRutaExcepcionPtoVtaDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.dao.ConexionRutaExcepcionTipoPtoVtaDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.dao.ConexionRutaTramoCtrlDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Conexion;
|
import com.rjconsultores.ventaboletos.entidad.Conexion;
|
||||||
import com.rjconsultores.ventaboletos.entidad.ConexionConf;
|
import com.rjconsultores.ventaboletos.entidad.ConexionConf;
|
||||||
import com.rjconsultores.ventaboletos.entidad.ConexionCtrl;
|
import com.rjconsultores.ventaboletos.entidad.ConexionCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaExcepcionPtoVta;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaExcepcionTipoPtoVta;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaTramoCtrl;
|
||||||
import com.rjconsultores.ventaboletos.service.ConexionConfService;
|
import com.rjconsultores.ventaboletos.service.ConexionConfService;
|
||||||
import com.rjconsultores.ventaboletos.service.ConexionCtrlService;
|
import com.rjconsultores.ventaboletos.service.ConexionCtrlService;
|
||||||
import com.rjconsultores.ventaboletos.service.ConexionService;
|
import com.rjconsultores.ventaboletos.service.ConexionService;
|
||||||
|
@ -24,6 +32,14 @@ public class ConexionCtrlServiceImpl implements ConexionCtrlService {
|
||||||
private ConexionService conexionService;
|
private ConexionService conexionService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ConexionConfService conexionConfDAO;
|
private ConexionConfService conexionConfDAO;
|
||||||
|
@Autowired
|
||||||
|
private ConexionRutaTramoCtrlDAO conexionRutaTramoCtrlDAO;
|
||||||
|
@Autowired
|
||||||
|
private ConexionRutaCtrlDAO conexionRutaCtrlDAO;
|
||||||
|
@Autowired
|
||||||
|
private ConexionRutaExcepcionPtoVtaDAO conexionRutaExcepcionPtoVtaDAO;
|
||||||
|
@Autowired
|
||||||
|
private ConexionRutaExcepcionTipoPtoVtaDAO conexionRutaExcepcionTipoPtoVtaDAO;
|
||||||
|
|
||||||
public List<ConexionCtrl> obtenerTodos() {
|
public List<ConexionCtrl> obtenerTodos() {
|
||||||
return conexionCtrlDAO.obtenerTodos();
|
return conexionCtrlDAO.obtenerTodos();
|
||||||
|
@ -60,6 +76,10 @@ public class ConexionCtrlServiceImpl implements ConexionCtrlService {
|
||||||
List<Conexion> lsConexion = conexionService.buscarPorConexionCtrl(entidad.getConexionctrlId());
|
List<Conexion> lsConexion = conexionService.buscarPorConexionCtrl(entidad.getConexionctrlId());
|
||||||
for (Conexion conexion : lsConexion) {
|
for (Conexion conexion : lsConexion) {
|
||||||
conexionService.borrar(conexion);
|
conexionService.borrar(conexion);
|
||||||
|
|
||||||
|
if(conexion.getRutaId() != null) {
|
||||||
|
borrarConexionRuta(conexion);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
List<ConexionConf> lsConexionConf = conexionConfDAO.buscarPorConexionCtrl(entidad);
|
List<ConexionConf> lsConexionConf = conexionConfDAO.buscarPorConexionCtrl(entidad);
|
||||||
|
@ -70,6 +90,46 @@ public class ConexionCtrlServiceImpl implements ConexionCtrlService {
|
||||||
conexionCtrlDAO.actualizacion(entidad);
|
conexionCtrlDAO.actualizacion(entidad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
private void borrarConexionRuta(Conexion conexion) {
|
||||||
|
|
||||||
|
ConexionRutaCtrl conexionRutaCtrl = null;
|
||||||
|
|
||||||
|
if(conexion.getConexionRutaTramoId() != null) {
|
||||||
|
ConexionRutaTramoCtrl conexionRutaTramoCtrl = conexionRutaTramoCtrlDAO.obtenerID(conexion.getConexionRutaTramoId());
|
||||||
|
conexionRutaTramoCtrl.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
conexionRutaTramoCtrl.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
conexionRutaTramoCtrl.setActivo(Boolean.FALSE);
|
||||||
|
conexionRutaTramoCtrlDAO.actualizacion(conexionRutaTramoCtrl);
|
||||||
|
|
||||||
|
conexionRutaCtrl = conexionRutaTramoCtrl.getConexionRutaCtrl();
|
||||||
|
conexionRutaCtrl.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
conexionRutaCtrl.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
conexionRutaCtrl.setActivo(Boolean.FALSE);
|
||||||
|
conexionRutaCtrlDAO.actualizacion(conexionRutaCtrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(conexionRutaCtrl != null) {
|
||||||
|
List<ConexionRutaExcepcionPtoVta> conexionRutaExcepcionPtoVtas = conexionRutaCtrl.getConexionRutaPuntoVendaList();
|
||||||
|
for (ConexionRutaExcepcionPtoVta conexionRutaExcepcionPtoVta : conexionRutaExcepcionPtoVtas) {
|
||||||
|
conexionRutaExcepcionPtoVta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
conexionRutaExcepcionPtoVta.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
conexionRutaExcepcionPtoVta.setActivo(Boolean.FALSE);
|
||||||
|
conexionRutaExcepcionPtoVtaDAO.actualizacion(conexionRutaExcepcionPtoVta);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<ConexionRutaExcepcionTipoPtoVta> conexionRutaExcepcionTipoPtoVtas = conexionRutaCtrl.getConexionRutaCanalVendasList();
|
||||||
|
for (ConexionRutaExcepcionTipoPtoVta conexionRutaExcepcionTipoPtoVta : conexionRutaExcepcionTipoPtoVtas) {
|
||||||
|
conexionRutaExcepcionTipoPtoVta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
conexionRutaExcepcionTipoPtoVta.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
conexionRutaExcepcionTipoPtoVta.setActivo(Boolean.FALSE);
|
||||||
|
conexionRutaExcepcionTipoPtoVtaDAO.actualizacion(conexionRutaExcepcionTipoPtoVta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ConexionCtrl> buscarConexionesCtrl(Integer origenId, Integer destinoId) {
|
public List<ConexionCtrl> buscarConexionesCtrl(Integer origenId, Integer destinoId) {
|
||||||
return conexionCtrlDAO.buscarConexionesCtrl(origenId, destinoId);
|
return conexionCtrlDAO.buscarConexionesCtrl(origenId, destinoId);
|
||||||
|
|
|
@ -0,0 +1,73 @@
|
||||||
|
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.ConexionRutaCtrlDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.service.ConexionRutaCtrlService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
|
@Service("conexionServiceRutaCtrl")
|
||||||
|
public class ConexionRutaCtrlServiceImpl implements ConexionRutaCtrlService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConexionRutaCtrlDAO conexionRutaCtrlDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void gerarConexiones() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public ConexionRutaCtrl suscribir(ConexionRutaCtrl conexionRutaCtrl) {
|
||||||
|
|
||||||
|
conexionRutaCtrl.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
conexionRutaCtrl.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
conexionRutaCtrl.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
|
return conexionRutaCtrlDAO.suscribir(conexionRutaCtrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConexionRutaCtrl actualizacion(ConexionRutaCtrl conexion) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void borrar(ConexionRutaCtrl conexionRutaCtrl) {
|
||||||
|
|
||||||
|
conexionRutaCtrl.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
conexionRutaCtrl.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
conexionRutaCtrl.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
|
conexionRutaCtrlDAO.borrar(conexionRutaCtrl);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ConexionRutaCtrl> buscarPorConexionCtrl(Long conexcionCtrlId) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void borrar(List<ConexionRutaCtrl> lsConexion) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void suscribirTodos(List<ConexionRutaCtrl> conexiones) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,86 @@
|
||||||
|
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.ConexionRutaExcepcionPtoVtaDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaExcepcionPtoVta;
|
||||||
|
import com.rjconsultores.ventaboletos.service.ConexionRutaExcepcionPtoVtaService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
|
@Service("conexionRutaExcepcionPtoVtaService")
|
||||||
|
public class ConexionRutaExcepcionPtoVtaServiceImpl implements ConexionRutaExcepcionPtoVtaService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConexionRutaExcepcionPtoVtaDAO conexionRutaExcepcionPtoVtaDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void gerarConexiones() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public ConexionRutaExcepcionPtoVta suscribir(ConexionRutaExcepcionPtoVta conexionRutaPtoVta) {
|
||||||
|
|
||||||
|
conexionRutaPtoVta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
conexionRutaPtoVta.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
conexionRutaPtoVta.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
|
return conexionRutaExcepcionPtoVtaDAO.suscribir(conexionRutaPtoVta);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConexionRutaExcepcionPtoVta actualizacion(ConexionRutaExcepcionPtoVta conexion) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void borrar(ConexionRutaExcepcionPtoVta entidad) {
|
||||||
|
|
||||||
|
|
||||||
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
entidad.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
|
conexionRutaExcepcionPtoVtaDAO.actualizacion(entidad);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ConexionRutaExcepcionPtoVta> buscarPorConexionCtrl(Long conexcionCtrlId) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void borrar(List<ConexionRutaExcepcionPtoVta> lsConexion) {
|
||||||
|
for (ConexionRutaExcepcionPtoVta conexionRutaExcepcionPtoVta : lsConexion) {
|
||||||
|
borrar(conexionRutaExcepcionPtoVta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void suscribirTodos(List<ConexionRutaExcepcionPtoVta> conexionRutaExcepcionPtoVtas) {
|
||||||
|
|
||||||
|
for (ConexionRutaExcepcionPtoVta conexion : conexionRutaExcepcionPtoVtas) {
|
||||||
|
suscribir(conexion);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ConexionRutaExcepcionPtoVta> obtenerConexionRutaExcepcionPtoVtasActivo(ConexionRutaCtrl conexionRutaCtrl) {
|
||||||
|
return conexionRutaExcepcionPtoVtaDAO.obtenerConexionRutaExcepcionPtoVtasActivo(conexionRutaCtrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,86 @@
|
||||||
|
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.ConexionRutaExcepcionTipoPtoVtaDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaExcepcionTipoPtoVta;
|
||||||
|
import com.rjconsultores.ventaboletos.service.ConexionRutaExcepcionTipoPtoVtaService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
|
@Service("conexionRutaExcepcionTipoPtoVtaService")
|
||||||
|
public class ConexionRutaTipoPtoVtaServiceImpl implements ConexionRutaExcepcionTipoPtoVtaService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConexionRutaExcepcionTipoPtoVtaDAO conexionRutaExcepcionTipoPtoVtaDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void gerarConexiones() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public ConexionRutaExcepcionTipoPtoVta suscribir(ConexionRutaExcepcionTipoPtoVta conexionRutaExcepcionTipoPtoVta) {
|
||||||
|
|
||||||
|
conexionRutaExcepcionTipoPtoVta.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
conexionRutaExcepcionTipoPtoVta.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
conexionRutaExcepcionTipoPtoVta.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
|
return conexionRutaExcepcionTipoPtoVtaDAO.suscribir(conexionRutaExcepcionTipoPtoVta);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConexionRutaExcepcionTipoPtoVta actualizacion(ConexionRutaExcepcionTipoPtoVta conexion) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void borrar(ConexionRutaExcepcionTipoPtoVta entidad) {
|
||||||
|
|
||||||
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
entidad.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
|
conexionRutaExcepcionTipoPtoVtaDAO.actualizacion(entidad);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ConexionRutaExcepcionTipoPtoVta> buscarPorConexionCtrl(Long conexcionCtrlId) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void borrar(List<ConexionRutaExcepcionTipoPtoVta> lsConexion) {
|
||||||
|
for (ConexionRutaExcepcionTipoPtoVta conexionRutaExcepcionTipoPtoVta : lsConexion) {
|
||||||
|
borrar(conexionRutaExcepcionTipoPtoVta);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void suscribirTodos(List<ConexionRutaExcepcionTipoPtoVta> cnexionRutaExcepcionTipoPtoVtas) {
|
||||||
|
|
||||||
|
for (ConexionRutaExcepcionTipoPtoVta conexion : cnexionRutaExcepcionTipoPtoVtas) {
|
||||||
|
suscribir(conexion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ConexionRutaExcepcionTipoPtoVta> obtenerConexionRutaExcepcionPtoVtasActivo(ConexionRutaCtrl conexionRutaCtrl) {
|
||||||
|
return conexionRutaExcepcionTipoPtoVtaDAO.obtenerConexionRutaExcepcionTipoPtoVtaActivo(conexionRutaCtrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,88 @@
|
||||||
|
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.ConexionRutaTramoCtrlDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ConexionRutaTramoCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.service.ConexionRutaTramoCtrlService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
|
@Service("conexionRutaTramoCtrlService")
|
||||||
|
public class ConexionRutaTramoCtrlServiceImpl implements ConexionRutaTramoCtrlService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ConexionRutaTramoCtrlDAO conexionRutaTramoCtrlDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void gerarConexiones() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public ConexionRutaTramoCtrl suscribir(ConexionRutaTramoCtrl conexionRutaTramoCtrl) {
|
||||||
|
|
||||||
|
conexionRutaTramoCtrl.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
conexionRutaTramoCtrl.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
conexionRutaTramoCtrl.setActivo(Boolean.TRUE);
|
||||||
|
|
||||||
|
return conexionRutaTramoCtrlDAO.suscribir(conexionRutaTramoCtrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConexionRutaTramoCtrl actualizacion(ConexionRutaTramoCtrl conexion) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void borrar(ConexionRutaTramoCtrl conexionRutaTramoCtrl) {
|
||||||
|
|
||||||
|
conexionRutaTramoCtrl.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
conexionRutaTramoCtrl.setFecmodif(Calendar.getInstance().getTime());
|
||||||
|
conexionRutaTramoCtrl.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
|
conexionRutaTramoCtrlDAO.borrar(conexionRutaTramoCtrl);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ConexionRutaTramoCtrl> buscarPorConexionCtrl(Long conexcionCtrlId) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
@Override
|
||||||
|
public void borrar(List<ConexionRutaTramoCtrl> lsConexionRutaTramoCtrl) {
|
||||||
|
for (ConexionRutaTramoCtrl conexion : lsConexionRutaTramoCtrl) {
|
||||||
|
borrar(conexion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void suscribirTodos(List<ConexionRutaTramoCtrl> lsConexionRutaTramoCtrl) {
|
||||||
|
for (ConexionRutaTramoCtrl conexion : lsConexionRutaTramoCtrl) {
|
||||||
|
suscribir(conexion);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConexionRutaTramoCtrl buscarPorId(Integer conexionRutaTramoId) {
|
||||||
|
return conexionRutaTramoCtrlDAO.obtenerID(conexionRutaTramoId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean validarConexioneRutasExistentes(Integer rutaOrigenId, Integer rutaDestinoId, Integer paradaOrigenId, Integer paradaDestinoId, Integer origemTrechoId, Integer destinoTrechoId) {
|
||||||
|
return conexionRutaTramoCtrlDAO.validarConexioneRutasExistentes(rutaOrigenId, rutaDestinoId, paradaOrigenId, paradaDestinoId, origemTrechoId, destinoTrechoId);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,89 @@
|
||||||
|
package com.rjconsultores.ventaboletos.vo.parada;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
|
|
||||||
|
public class ParadaVOConexionRuta {
|
||||||
|
|
||||||
|
private Parada paradaOrigem;
|
||||||
|
private Parada paradaDestino;
|
||||||
|
private Parada paradaOrigemTrecho;
|
||||||
|
private Parada paradaDestinoTrecho;
|
||||||
|
private Integer rutaId;
|
||||||
|
private Short secuencia;
|
||||||
|
private boolean valido;
|
||||||
|
|
||||||
|
public ParadaVOConexionRuta(Parada paradaOrigem, Parada paradaDestino, Integer rutaId, Short secuencia, boolean valido, Parada paradaOrigemTrecho, Parada paradaDestinoTrecho) {
|
||||||
|
super();
|
||||||
|
this.paradaOrigem = paradaOrigem;
|
||||||
|
this.paradaDestino = paradaDestino;
|
||||||
|
this.rutaId = rutaId;
|
||||||
|
this.secuencia = secuencia;
|
||||||
|
this.valido = valido;
|
||||||
|
this.paradaOrigemTrecho = paradaOrigemTrecho;
|
||||||
|
this.paradaDestinoTrecho = paradaDestinoTrecho;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Parada getParadaOrigem() {
|
||||||
|
return paradaOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParadaOrigem(Parada paradaOrigem) {
|
||||||
|
this.paradaOrigem = paradaOrigem;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Parada getParadaDestino() {
|
||||||
|
return paradaDestino;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParadaDestino(Parada paradaDestino) {
|
||||||
|
this.paradaDestino = paradaDestino;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getRutaId() {
|
||||||
|
return rutaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRutaId(Integer rutaId) {
|
||||||
|
this.rutaId = rutaId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Short getSecuencia() {
|
||||||
|
return secuencia;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSecuencia(Short secuencia) {
|
||||||
|
this.secuencia = secuencia;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isValido() {
|
||||||
|
return valido;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValido(boolean valido) {
|
||||||
|
this.valido = valido;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Parada getParadaOrigemTrecho() {
|
||||||
|
return paradaOrigemTrecho;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParadaOrigemTrecho(Parada paradaOrigemTrecho) {
|
||||||
|
this.paradaOrigemTrecho = paradaOrigemTrecho;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Parada getParadaDestinoTrecho() {
|
||||||
|
return paradaDestinoTrecho;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParadaDestinoTrecho(Parada paradaDestinoTrecho) {
|
||||||
|
this.paradaDestinoTrecho = paradaDestinoTrecho;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "ParadaVOConexionRuta [paradaOrigem=" + paradaOrigem + ", paradaDestino=" + paradaDestino + ", paradaOrigemTrecho=" + paradaOrigemTrecho + ", paradaDestinoTrecho=" + paradaDestinoTrecho + ", rutaId=" + rutaId + ", secuencia=" + secuencia + ", valido=" + valido + "]";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue