Merge pull request 'AL-4549' (!241) from AL-4549 into master
Reviewed-on: adm/ModelWeb#241 Reviewed-by: aristides <aristides@rjconsultores.com.br>master
commit
b971dff43d
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ModelWeb</artifactId>
|
<artifactId>ModelWeb</artifactId>
|
||||||
<version>1.90.0</version>
|
<version>1.90.1</version>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||||
|
|
||||||
|
public interface SolicitudExpresosDAO extends GenericDAO<SolicitudExpreso, Integer>{
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TarjetaViaje;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||||
|
|
||||||
|
public interface TrayectosExpresosDAO extends GenericDAO<TrayectosExpresos, Integer>{
|
||||||
|
|
||||||
|
List<TrayectosExpresos> obtenerTrayectosPorServicioId(SolicitudExpreso expreso);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,19 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||||
|
|
||||||
|
import org.hibernate.SessionFactory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.SolicitudExpresosDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.dao.TrayectosExpresosDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||||
|
|
||||||
|
@Repository("solicitudExpresosDAO")
|
||||||
|
public class SolicitudExpresosHibernateDAO extends GenericHibernateDAO<SolicitudExpreso, Integer> implements SolicitudExpresosDAO{
|
||||||
|
@Autowired
|
||||||
|
public SolicitudExpresosHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||||
|
setSessionFactory(factory);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.hibernate.Criteria;
|
||||||
|
import org.hibernate.SessionFactory;
|
||||||
|
import org.hibernate.criterion.Restrictions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.TarjetaViajeDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.dao.TrayectosExpresosDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TarjetaViaje;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||||
|
|
||||||
|
@Repository("trayectosExpresosDAO")
|
||||||
|
public class TrayectosExpresosHibernateDAO extends GenericHibernateDAO<TrayectosExpresos, Integer> implements TrayectosExpresosDAO{
|
||||||
|
@Autowired
|
||||||
|
public TrayectosExpresosHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||||
|
setSessionFactory(factory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TrayectosExpresos> obtenerTrayectosPorServicioId(SolicitudExpreso expreso) {
|
||||||
|
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||||
|
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||||
|
c.add(Restrictions.eq("SOLICITUDEXPRESO_ID", expreso.getSolicitudExpresoId()));
|
||||||
|
|
||||||
|
return c.list();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,426 @@
|
||||||
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.sql.Blob;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.persistence.Basic;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.Lob;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
import org.hibernate.type.LobType;
|
||||||
|
|
||||||
|
import oracle.sql.BLOB;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@SequenceGenerator(name = "SOLICITUD_EXPRESO_SEQ", sequenceName = "SOLICITUD_EXPRESO_SEQ", allocationSize = 1)
|
||||||
|
@Table(name = "SOLICITUD_EXPRESO")
|
||||||
|
public class SolicitudExpreso implements Serializable{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Basic(optional = false)
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "SOLICITUD_EXPRESO_SEQ")
|
||||||
|
@Column(name = "SOLICITUDEXPRESO_ID")
|
||||||
|
private Integer solicitudExpresoId;
|
||||||
|
|
||||||
|
@JoinColumn(name = "CIUDADORIGEN_ID")
|
||||||
|
@OneToOne
|
||||||
|
private Ciudad ciudadOrigen;
|
||||||
|
|
||||||
|
@JoinColumn(name = "CIUDADDESTINO_ID")
|
||||||
|
@OneToOne
|
||||||
|
private Ciudad ciudadDestino;
|
||||||
|
|
||||||
|
@Column(name = "CANTPASAJEROS")
|
||||||
|
private Integer cantidadPasajeros;
|
||||||
|
|
||||||
|
@Column(name = "FECSOLICITUD")
|
||||||
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
|
private Date fechaSolicitud;
|
||||||
|
|
||||||
|
@JoinColumn(name = "TIPOIDENTIFICACION_ID")
|
||||||
|
@OneToOne
|
||||||
|
private TipoIdentificacion tipoIdentificacion;
|
||||||
|
|
||||||
|
@Column(name = "NUMIDENTIFICACION")
|
||||||
|
private String numIdentidicacion;
|
||||||
|
|
||||||
|
@Column(name = "DESCNOMBRE")
|
||||||
|
private String descNombre;
|
||||||
|
|
||||||
|
@Column(name = "DESCAPELLIDOS")
|
||||||
|
private String descApellidos;
|
||||||
|
|
||||||
|
@Column(name = "DESCDIRECCION")
|
||||||
|
private String descDireccion;
|
||||||
|
|
||||||
|
@Column(name = "DESCTELEFONO")
|
||||||
|
private String descTelefono;
|
||||||
|
|
||||||
|
@Column(name = "DESCEMAIL")
|
||||||
|
private String descEmail;
|
||||||
|
|
||||||
|
@Column(name = "INDVIAJEREDONDO")
|
||||||
|
private Boolean indViajeRedondo;
|
||||||
|
|
||||||
|
@Column(name = "FECHORIDA")
|
||||||
|
private Date fechaHoraIda;
|
||||||
|
|
||||||
|
@Column(name = "DESCOBSERVACIONIDA")
|
||||||
|
private String descObservacionIda;
|
||||||
|
|
||||||
|
@Column(name = "DESCSITIOPARTIDAIDA")
|
||||||
|
private String descSitioPartidaIda;
|
||||||
|
|
||||||
|
@Column(name = "DESCSITIOLLEGADAIDA")
|
||||||
|
private String descSitioLlegadaIda;
|
||||||
|
|
||||||
|
@Column(name = "FECHORREGRESO")
|
||||||
|
private Date fechaHoraRegreso;
|
||||||
|
|
||||||
|
@Column(name = "DESCOBSERVACIONREGRESO")
|
||||||
|
private String descObservacionRegreso;
|
||||||
|
|
||||||
|
@Column(name = "DESCSITIOPARTIDAREGRESO")
|
||||||
|
private String descSitioPartidaRegreso;
|
||||||
|
|
||||||
|
@Column(name = "DESCSITIOLLEGADAREGRESO")
|
||||||
|
private String descSitioLlegadaRegreso;
|
||||||
|
|
||||||
|
@Column(name = "INDREQUIEREDISPVEHICULO")
|
||||||
|
private Integer indRequiereDispVehiculo;
|
||||||
|
|
||||||
|
@Column(name = "INDREQUIERERECORRIDOSINTERNOS")
|
||||||
|
private Integer indRequiereRecorridosInternos;
|
||||||
|
|
||||||
|
@Column(name = "STATUSSOLICITUDEXPRESO_ID")
|
||||||
|
private Integer statusSolicitudExpresoId;
|
||||||
|
|
||||||
|
@Lob
|
||||||
|
@Column(name = "DOCCOTIZACION", columnDefinition="BLOB")
|
||||||
|
private byte[] docCotizacion;
|
||||||
|
|
||||||
|
@Lob
|
||||||
|
@Column(name = "DOCCONTRATO", columnDefinition="BLOB")
|
||||||
|
private byte[] docContrato;
|
||||||
|
|
||||||
|
@Column(name = "VALORCOTIZACION")
|
||||||
|
private Integer valorCotizacion;
|
||||||
|
|
||||||
|
@Column(name = "FORMAPAGO_ID")
|
||||||
|
private Integer formaPagoId;
|
||||||
|
|
||||||
|
@Column(name = "USUARIOAUTORIZACREDITO")
|
||||||
|
private Integer usuarioAutorizaCredito;
|
||||||
|
|
||||||
|
@Column(name = "FECHORAUTORIZACREDITO")
|
||||||
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
|
private Date fechaHoraAutorizaCredito;
|
||||||
|
|
||||||
|
@Column(name = "ACTIVO")
|
||||||
|
private Boolean activo;
|
||||||
|
|
||||||
|
@Column(name = "FECMODIF")
|
||||||
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
|
private Date fechaHoraModif;
|
||||||
|
|
||||||
|
@Column(name = "USUARIO_ID")
|
||||||
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
public Integer getSolicitudExpresoId() {
|
||||||
|
return solicitudExpresoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSolicitudExpresoId(Integer solicitudExpresoId) {
|
||||||
|
this.solicitudExpresoId = solicitudExpresoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Ciudad getCiudadOrigen() {
|
||||||
|
return ciudadOrigen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCiudadOrigen(Ciudad ciudadOrigen) {
|
||||||
|
this.ciudadOrigen = ciudadOrigen;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Ciudad getCiudadDestino() {
|
||||||
|
return ciudadDestino;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCiudadDestino(Ciudad ciudadDestino) {
|
||||||
|
this.ciudadDestino = ciudadDestino;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCantidadPasajeros() {
|
||||||
|
return cantidadPasajeros;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCantidadPasajeros(Integer cantidadPasajeros) {
|
||||||
|
this.cantidadPasajeros = cantidadPasajeros;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFechaSolicitud() {
|
||||||
|
return fechaSolicitud;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaSolicitud(Date fechaSolicitud) {
|
||||||
|
this.fechaSolicitud = fechaSolicitud;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TipoIdentificacion getTipoIdentificacion() {
|
||||||
|
return tipoIdentificacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTipoIdentificacion(TipoIdentificacion tipoIdentificacion) {
|
||||||
|
this.tipoIdentificacion = tipoIdentificacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumIdentidicacion() {
|
||||||
|
return numIdentidicacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumIdentidicacion(String numIdentidicacion) {
|
||||||
|
this.numIdentidicacion = numIdentidicacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescNombre() {
|
||||||
|
return descNombre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescNombre(String descNombre) {
|
||||||
|
this.descNombre = descNombre;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescApellidos() {
|
||||||
|
return descApellidos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescApellidos(String descApellidos) {
|
||||||
|
this.descApellidos = descApellidos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescDireccion() {
|
||||||
|
return descDireccion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescDireccion(String descDireccion) {
|
||||||
|
this.descDireccion = descDireccion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescTelefono() {
|
||||||
|
return descTelefono;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescTelefono(String descTelefono) {
|
||||||
|
this.descTelefono = descTelefono;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescEmail() {
|
||||||
|
return descEmail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescEmail(String descEmail) {
|
||||||
|
this.descEmail = descEmail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getIndViajeRedondo() {
|
||||||
|
return indViajeRedondo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndViajeRedondo(Boolean indViajeRedondo) {
|
||||||
|
this.indViajeRedondo = indViajeRedondo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFechaHoraIda() {
|
||||||
|
return fechaHoraIda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaHoraIda(Date fechaHoraIda) {
|
||||||
|
this.fechaHoraIda = fechaHoraIda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescObservacionIda() {
|
||||||
|
return descObservacionIda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescObservacionIda(String descObservacionIda) {
|
||||||
|
this.descObservacionIda = descObservacionIda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescSitioPartidaIda() {
|
||||||
|
return descSitioPartidaIda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescSitioPartidaIda(String descSitioPartidaIda) {
|
||||||
|
this.descSitioPartidaIda = descSitioPartidaIda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescSitioLlegadaIda() {
|
||||||
|
return descSitioLlegadaIda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescSitioLlegadaIda(String descSitioLlegadaIda) {
|
||||||
|
this.descSitioLlegadaIda = descSitioLlegadaIda;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFechaHoraRegreso() {
|
||||||
|
return fechaHoraRegreso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaHoraRegreso(Date fechaHoraRegreso) {
|
||||||
|
this.fechaHoraRegreso = fechaHoraRegreso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescObservacionRegreso() {
|
||||||
|
return descObservacionRegreso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescObservacionRegreso(String descObservacionRegreso) {
|
||||||
|
this.descObservacionRegreso = descObservacionRegreso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescSitioPartidaRegreso() {
|
||||||
|
return descSitioPartidaRegreso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescSitioPartidaRegreso(String descSitioPartidaRegreso) {
|
||||||
|
this.descSitioPartidaRegreso = descSitioPartidaRegreso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescSitioLlegadaRegreso() {
|
||||||
|
return descSitioLlegadaRegreso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescSitioLlegadaRegreso(String descSitioLlegadaRegreso) {
|
||||||
|
this.descSitioLlegadaRegreso = descSitioLlegadaRegreso;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIndRequiereDispVehiculo() {
|
||||||
|
return indRequiereDispVehiculo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndRequiereDispVehiculo(Integer indRequiereDispVehiculo) {
|
||||||
|
this.indRequiereDispVehiculo = indRequiereDispVehiculo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getIndRequiereRecorridosInternos() {
|
||||||
|
return indRequiereRecorridosInternos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndRequiereRecorridosInternos(Integer indRequiereRecorridosInternos) {
|
||||||
|
this.indRequiereRecorridosInternos = indRequiereRecorridosInternos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatusSolicitudExpresoId() {
|
||||||
|
return statusSolicitudExpresoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatusSolicitudExpresoId(Integer statusSolicitudExpresoId) {
|
||||||
|
this.statusSolicitudExpresoId = statusSolicitudExpresoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] getDocCotizacion() {
|
||||||
|
return docCotizacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocCotizacion(byte[] docCotizacion) {
|
||||||
|
this.docCotizacion = docCotizacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] getDocContrato() {
|
||||||
|
return docContrato;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocContrato(byte[] docContrato) {
|
||||||
|
this.docContrato = docContrato;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getValorCotizacion() {
|
||||||
|
return valorCotizacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValorCotizacion(Integer valorCotizacion) {
|
||||||
|
this.valorCotizacion = valorCotizacion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getFormaPagoId() {
|
||||||
|
return formaPagoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormaPagoId(Integer formaPagoId) {
|
||||||
|
this.formaPagoId = formaPagoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUsuarioAutorizaCredito() {
|
||||||
|
return usuarioAutorizaCredito;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsuarioAutorizaCredito(Integer usuarioAutorizaCredito) {
|
||||||
|
this.usuarioAutorizaCredito = usuarioAutorizaCredito;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFechaHoraAutorizaCredito() {
|
||||||
|
return fechaHoraAutorizaCredito;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaHoraAutorizaCredito(Date fechaHoraAutorizaCredito) {
|
||||||
|
this.fechaHoraAutorizaCredito = fechaHoraAutorizaCredito;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getActivo() {
|
||||||
|
return activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivo(Boolean activo) {
|
||||||
|
this.activo = activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFechaHoraModif() {
|
||||||
|
return fechaHoraModif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaHoraModif(Date fechaHoraModif) {
|
||||||
|
this.fechaHoraModif = fechaHoraModif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUsuarioId() {
|
||||||
|
return usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
|
this.usuarioId = usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "SolicitudExpreso [solicitudExpresoId=" + solicitudExpresoId + ", ciudadOrigen=" + ciudadOrigen
|
||||||
|
+ ", ciudadDestino=" + ciudadDestino + ", cantidadPasajeros=" + cantidadPasajeros + ", fechaSolicitud="
|
||||||
|
+ fechaSolicitud + ", tipoIdentificacion=" + tipoIdentificacion + ", numIdentidicacion="
|
||||||
|
+ numIdentidicacion + ", descNombre=" + descNombre + ", descApellidos=" + descApellidos
|
||||||
|
+ ", descDireccion=" + descDireccion + ", descTelefono=" + descTelefono + ", descEmail=" + descEmail
|
||||||
|
+ ", indViajeRedondo=" + indViajeRedondo + ", fechaHoraIda=" + fechaHoraIda + ", descObservacionIda="
|
||||||
|
+ descObservacionIda + ", descSitioPartidaIda=" + descSitioPartidaIda + ", descSitioLlegadaIda="
|
||||||
|
+ descSitioLlegadaIda + ", fechaHoraRegreso=" + fechaHoraRegreso + ", descObservacionRegreso="
|
||||||
|
+ descObservacionRegreso + ", descSitioPartidaRegreso=" + descSitioPartidaRegreso
|
||||||
|
+ ", descSitioLlegadaRegreso=" + descSitioLlegadaRegreso + ", indRequiereDispVehiculo="
|
||||||
|
+ indRequiereDispVehiculo + ", indRequiereRecorridosInternos=" + indRequiereRecorridosInternos
|
||||||
|
+ ", statusSolicitudExpresoId=" + statusSolicitudExpresoId + ", docCotizacion="
|
||||||
|
+ Arrays.toString(docCotizacion) + ", docContrato=" + Arrays.toString(docContrato)
|
||||||
|
+ ", valorCotizacion=" + valorCotizacion + ", formaPagoId=" + formaPagoId + ", usuarioAutorizaCredito="
|
||||||
|
+ usuarioAutorizaCredito + ", fechaHoraAutorizaCredito=" + fechaHoraAutorizaCredito + ", activo="
|
||||||
|
+ activo + ", fechaHoraModif=" + fechaHoraModif + ", usuarioId=" + usuarioId + "]";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,152 @@
|
||||||
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import javax.persistence.Basic;
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.GenerationType;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.Lob;
|
||||||
|
import javax.persistence.OneToOne;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.persistence.Temporal;
|
||||||
|
import javax.persistence.TemporalType;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@SequenceGenerator(name = "TRAYECTOS_EXPRESO_SEQ", sequenceName = "TRAYECTOS_EXPRESO_SEQ", allocationSize = 1)
|
||||||
|
@Table(name = "TRAYECTOS_EXPRESOS")
|
||||||
|
public class TrayectosExpresos implements Serializable{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id
|
||||||
|
@Basic(optional = false)
|
||||||
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "TRAYECTOS_EXPRESO_SEQ")
|
||||||
|
@Column(name = "TRAYECTOSEXPRESOS_ID")
|
||||||
|
private Integer trayectoExpresoId;
|
||||||
|
|
||||||
|
@JoinColumn(name = "SOLICITUDEXPRESO_ID")
|
||||||
|
@OneToOne
|
||||||
|
private SolicitudExpreso solicitudExpresoId;
|
||||||
|
|
||||||
|
@Column(name = "DESCTRAYECTO")
|
||||||
|
private String descTrayecto;
|
||||||
|
|
||||||
|
@Column(name = "VALORTRAYECTO")
|
||||||
|
private Integer valorTrayecto;
|
||||||
|
|
||||||
|
@Column(name = "CANTVEHICULOS")
|
||||||
|
private Integer cantVehiculos;
|
||||||
|
|
||||||
|
@Column(name = "NUMPLACA")
|
||||||
|
private String numPlaca;
|
||||||
|
|
||||||
|
@Lob
|
||||||
|
@Column(name = "DOCFLUEC", columnDefinition="BLOB")
|
||||||
|
private byte[] docFluec;
|
||||||
|
|
||||||
|
@Column(name = "ACTIVO")
|
||||||
|
private Boolean activo;
|
||||||
|
|
||||||
|
@Column(name = "FECMODIF")
|
||||||
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
|
private Date fechaHoraModif;
|
||||||
|
|
||||||
|
@Column(name = "USUARIO_ID")
|
||||||
|
private Integer usuarioId;
|
||||||
|
|
||||||
|
public Integer getTrayectoExpresoId() {
|
||||||
|
return trayectoExpresoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTrayectoExpresoId(Integer trayectoExpresoId) {
|
||||||
|
this.trayectoExpresoId = trayectoExpresoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SolicitudExpreso getSolicitudExpresoId() {
|
||||||
|
return solicitudExpresoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSolicitudExpresoId(SolicitudExpreso solicitudExpresoId) {
|
||||||
|
this.solicitudExpresoId = solicitudExpresoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescTrayecto() {
|
||||||
|
return descTrayecto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescTrayecto(String descTrayecto) {
|
||||||
|
this.descTrayecto = descTrayecto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getValorTrayecto() {
|
||||||
|
return valorTrayecto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValorTrayecto(Integer valorTrayecto) {
|
||||||
|
this.valorTrayecto = valorTrayecto;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCantVehiculos() {
|
||||||
|
return cantVehiculos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCantVehiculos(Integer cantVehiculos) {
|
||||||
|
this.cantVehiculos = cantVehiculos;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNumPlaca() {
|
||||||
|
return numPlaca;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setNumPlaca(String numPlaca) {
|
||||||
|
this.numPlaca = numPlaca;
|
||||||
|
}
|
||||||
|
|
||||||
|
public byte[] getDocFluec() {
|
||||||
|
return docFluec;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDocFluec(byte[] docFluec) {
|
||||||
|
this.docFluec = docFluec;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Boolean getActivo() {
|
||||||
|
return activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setActivo(Boolean activo) {
|
||||||
|
this.activo = activo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getFechaHoraModif() {
|
||||||
|
return fechaHoraModif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFechaHoraModif(Date fechaHoraModif) {
|
||||||
|
this.fechaHoraModif = fechaHoraModif;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUsuarioId() {
|
||||||
|
return usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
|
this.usuarioId = usuarioId;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "TrayectosExpresos [trayectoExpresoId=" + trayectoExpresoId + ", solicitudExpresoId="
|
||||||
|
+ solicitudExpresoId + ", descTrayecto=" + descTrayecto + ", valorTrayecto=" + valorTrayecto
|
||||||
|
+ ", cantVehiculos=" + cantVehiculos + ", numPlaca=" + numPlaca + ", docFluec="
|
||||||
|
+ Arrays.toString(docFluec) + ", activo=" + activo + ", fechaHoraModif=" + fechaHoraModif
|
||||||
|
+ ", usuarioId=" + usuarioId + "]";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||||
|
|
||||||
|
public interface SolicitudExpresosService extends GenericService<SolicitudExpreso, Integer>{
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.CorridaTramo;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||||
|
|
||||||
|
public interface TrayectosExpresosService extends GenericService<TrayectosExpresos, Integer>{
|
||||||
|
|
||||||
|
List<TrayectosExpresos> obtenerTrayectosPorServicioId(SolicitudExpreso expreso);
|
||||||
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service.impl;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.SolicitudExpresosDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.dao.TrayectosExpresosDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||||
|
import com.rjconsultores.ventaboletos.service.SolicitudExpresosService;
|
||||||
|
|
||||||
|
@Service("solicitudExpresosService")
|
||||||
|
public class SolicitudExpresosServiceImpl implements SolicitudExpresosService{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SolicitudExpresosDAO solicitudExpresosDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SolicitudExpreso> obtenerTodos() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SolicitudExpreso obtenerID(Integer id) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SolicitudExpreso suscribir(SolicitudExpreso entidad) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public SolicitudExpreso actualizacion(SolicitudExpreso entidad) {
|
||||||
|
|
||||||
|
entidad.setFechaHoraModif(Calendar.getInstance().getTime());
|
||||||
|
return solicitudExpresosDAO.actualizacion(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void borrar(SolicitudExpreso entidad) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service.impl;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.TarjetaViajeDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.dao.TrayectosExpresosDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.SolicitudExpreso;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.TrayectosExpresos;
|
||||||
|
import com.rjconsultores.ventaboletos.service.TrayectosExpresosService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
|
||||||
|
@Service("trayectosExpresosService")
|
||||||
|
public class TrayectosExpresosServiceImpl implements TrayectosExpresosService{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private TrayectosExpresosDAO trayectosExpresosDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TrayectosExpresos> obtenerTodos() {
|
||||||
|
return trayectosExpresosDAO.obtenerTodos();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TrayectosExpresos obtenerID(Integer id) {
|
||||||
|
return trayectosExpresosDAO.obtenerID(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public TrayectosExpresos suscribir(TrayectosExpresos entidad) {
|
||||||
|
entidad.setActivo(true);
|
||||||
|
entidad.setFechaHoraModif(Calendar.getInstance().getTime());
|
||||||
|
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
return trayectosExpresosDAO.suscribir(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public TrayectosExpresos actualizacion(TrayectosExpresos entidad) {
|
||||||
|
entidad.setFechaHoraModif(Calendar.getInstance().getTime());
|
||||||
|
return trayectosExpresosDAO.actualizacion(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void borrar(TrayectosExpresos entidad) {
|
||||||
|
entidad.setFechaHoraModif(Calendar.getInstance().getTime());
|
||||||
|
entidad.setActivo(false);
|
||||||
|
trayectosExpresosDAO.actualizacion(entidad);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<TrayectosExpresos> obtenerTrayectosPorServicioId(SolicitudExpreso expreso) {
|
||||||
|
return trayectosExpresosDAO.obtenerTrayectosPorServicioId(expreso);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue