Merge pull request 'AL-4280' (!205) from AL-4280 into master
Reviewed-on: adm/ModelWeb#205 Reviewed-by: fabio <fabio.faria@rjconsultores.com.br>master
commit
9a18abc4d2
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ModelWeb</artifactId>
|
||||
<version>1.68.1</version>
|
||||
<version>1.69.0</version>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.AsistenciaDeViajeEmpresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
|
||||
public interface AsistenciaDeViajeEmpresaDAO extends GenericDAO<AsistenciaDeViajeEmpresa, Integer> {
|
||||
public boolean existe(Empresa empresa);
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
|
||||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.ImpresionLayoutConfig;
|
||||
|
||||
public interface ImpresionLayoutConfigDAO extends GenericDAO<ImpresionLayoutConfig, Integer> {
|
||||
|
||||
List<ImpresionLayoutConfig> buscar(String descricao);
|
||||
|
||||
List<ImpresionLayoutConfig> buscarLike(String descricao);
|
||||
|
||||
}
|
|
@ -8,4 +8,6 @@ public interface TipoEventoExtraDAO extends
|
|||
GenericDAO<TipoEventoExtra, Integer> {
|
||||
|
||||
public List<TipoEventoExtra> buscar(String descingreso);
|
||||
|
||||
public List<TipoEventoExtra> buscarLike(String descingreso);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
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.AsistenciaDeViajeEmpresaDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.AsistenciaDeViajeEmpresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
|
||||
@Repository("asistenciaDeViajeEmpresaDAO")
|
||||
public class AsistenciaDeViajeEmpresaHibernateDAO extends GenericHibernateDAO<AsistenciaDeViajeEmpresa, Integer> implements AsistenciaDeViajeEmpresaDAO {
|
||||
|
||||
@Autowired
|
||||
public AsistenciaDeViajeEmpresaHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
public List<AsistenciaDeViajeEmpresa> obtenerTodos() {
|
||||
Criteria c = makeCriteria();
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public boolean existe(Empresa empresa){
|
||||
Criteria c = makeCriteria();
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("empresa", empresa));
|
||||
return !c.list().isEmpty();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
|
||||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.MatchMode;
|
||||
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.ImpresionLayoutConfigDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.ImpresionLayoutConfig;
|
||||
|
||||
@Repository("impresionLayoutConfigDAO")
|
||||
public class ImpresionLayoutConfigHibernateDAO extends GenericHibernateDAO<ImpresionLayoutConfig, Integer>
|
||||
implements ImpresionLayoutConfigDAO {
|
||||
|
||||
@Autowired
|
||||
public ImpresionLayoutConfigHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ImpresionLayoutConfig> obtenerTodos() {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<ImpresionLayoutConfig> buscar(String descricao) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
|
||||
c.add(Restrictions.eq("descricao", descricao));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<ImpresionLayoutConfig> buscarLike(String descricao) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
|
||||
c.add(Restrictions.like("descricao", descricao, MatchMode.ANYWHERE));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.hibernate.criterion.MatchMode;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
|
@ -39,4 +40,13 @@ public class TipoEventoExtraHibernateDAO extends
|
|||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TipoEventoExtra> buscarLike(String nombIngreso) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.like("descTipoEvento", nombIngreso, MatchMode.ANYWHERE));
|
||||
|
||||
return c.list();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Basic;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.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;
|
||||
|
||||
@Entity
|
||||
@SequenceGenerator(name = "ASISTVIAJE_EMPRESA_SEQ", sequenceName = "ASISTVIAJE_EMPRESA_SEQ", allocationSize = 1)
|
||||
@Table(name = "ASISTVIAJE_EMPRESA")
|
||||
public class AsistenciaDeViajeEmpresa implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "ASISTVIAJE_EMPRESA_SEQ")
|
||||
@Column(name = "ASISTVIAJEEMPRESA_ID ")
|
||||
private Integer asistenciaDeViajeEmpresaId;
|
||||
@JoinColumn(name = "EMPRESA_ID", referencedColumnName = "EMPRESA_ID")
|
||||
@ManyToOne
|
||||
private Empresa empresa;
|
||||
@Column(name = "TARIFA")
|
||||
private BigDecimal tarifa;
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
|
||||
public Integer getAsistenciaDeViajeEmpresaId() {
|
||||
return asistenciaDeViajeEmpresaId;
|
||||
}
|
||||
|
||||
public void setAsistenciaDeViajeEmpresaId(Integer asistenciaDeViajeEmpresaId) {
|
||||
this.asistenciaDeViajeEmpresaId = asistenciaDeViajeEmpresaId;
|
||||
}
|
||||
|
||||
public Empresa getEmpresa() {
|
||||
return empresa;
|
||||
}
|
||||
|
||||
public void setEmpresa(Empresa empresa) {
|
||||
this.empresa = empresa;
|
||||
}
|
||||
|
||||
public BigDecimal getTarifa() {
|
||||
return tarifa;
|
||||
}
|
||||
|
||||
public void setTarifa(BigDecimal tarifa) {
|
||||
this.tarifa = tarifa;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((asistenciaDeViajeEmpresaId == null) ? 0 : asistenciaDeViajeEmpresaId.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
AsistenciaDeViajeEmpresa other = (AsistenciaDeViajeEmpresa) obj;
|
||||
if (asistenciaDeViajeEmpresaId == null) {
|
||||
if (other.asistenciaDeViajeEmpresaId != null)
|
||||
return false;
|
||||
} else if (!asistenciaDeViajeEmpresaId.equals(other.asistenciaDeViajeEmpresaId))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.valueOf(this.getAsistenciaDeViajeEmpresaId());
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,140 @@
|
|||
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.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
import org.hibernate.annotations.Parameter;
|
||||
import org.hibernate.annotations.Type;
|
||||
|
||||
import com.rjconsultores.ventaboletos.enums.EnumLinguagemImpresion;
|
||||
|
||||
@Entity
|
||||
@SequenceGenerator(name = "IMPRESION_LAYOUT_CONFIG_SEQ", sequenceName = "IMPRESION_LAYOUT_CONFIG_SEQ", allocationSize = 1)
|
||||
@Table(name = "IMPRESION_LAYOUT_CONFIG")
|
||||
public class ImpresionLayoutConfig implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Id
|
||||
@Basic(optional = false)
|
||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "IMPRESION_LAYOUT_CONFIG_SEQ")
|
||||
@Column(name = "IMPRESIONLAYOUTCONFIG_ID")
|
||||
private Integer impresionLayoutConfigId;
|
||||
@Column(name = "DESCRICAO")
|
||||
private String descricao;
|
||||
@Column(name = "TEXTO")
|
||||
private String texto;
|
||||
@Type(type = "com.rjconsultores.ventaboletos.constantes.CustomEnumTypeHibernate", parameters = {
|
||||
@Parameter(name = "type", value = "com.rjconsultores.ventaboletos.constantes.CustomEnumTypeHibernate"),
|
||||
@Parameter(name = "class", value = "com.rjconsultores.ventaboletos.enums.EnumLinguagemImpresion"),
|
||||
@Parameter(name = "sqlType", value = "4")/* Types.INTEGER */,
|
||||
@Parameter(name = "enumName", value = "false"), @Parameter(name = "enumMethod", value = "getLinguagemImpresionByValor") })
|
||||
@Column(name = "LINGUAGEM")
|
||||
private EnumLinguagemImpresion linguagem;
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
@Column(name = "FECMODIF")
|
||||
@Temporal(TemporalType.TIMESTAMP)
|
||||
private Date fecmodif;
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
|
||||
public ImpresionLayoutConfig() {
|
||||
}
|
||||
|
||||
public Integer getImpresionLayoutConfigId() {
|
||||
return impresionLayoutConfigId;
|
||||
}
|
||||
|
||||
public void setImpresionLayoutConfigId(Integer impresionLayoutConfigId) {
|
||||
this.impresionLayoutConfigId = impresionLayoutConfigId;
|
||||
}
|
||||
|
||||
public String getDescricao() {
|
||||
return descricao;
|
||||
}
|
||||
|
||||
public void setDescricao(String descricao) {
|
||||
this.descricao = descricao;
|
||||
}
|
||||
|
||||
public String getTexto() {
|
||||
return texto;
|
||||
}
|
||||
|
||||
public void setTexto(String texto) {
|
||||
this.texto = texto;
|
||||
}
|
||||
|
||||
public EnumLinguagemImpresion getLinguagem() {
|
||||
return linguagem;
|
||||
}
|
||||
|
||||
public void setLinguagem(EnumLinguagemImpresion linguagem) {
|
||||
this.linguagem = linguagem;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 0;
|
||||
hash += (impresionLayoutConfigId != null ? impresionLayoutConfigId.hashCode() : 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object object) {
|
||||
if (!(object instanceof ImpresionLayoutConfig)) {
|
||||
return false;
|
||||
}
|
||||
ImpresionLayoutConfig other = (ImpresionLayoutConfig) object;
|
||||
if ((this.impresionLayoutConfigId == null && other.impresionLayoutConfigId != null)
|
||||
|| (this.impresionLayoutConfigId != null
|
||||
&& !this.impresionLayoutConfigId.equals(other.impresionLayoutConfigId))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (getDescricao() != null || getImpresionLayoutConfigId() != null) {
|
||||
return this.getDescricao() + " - " + this.getLinguagem();
|
||||
}
|
||||
return getDescricao();
|
||||
}
|
||||
|
||||
}
|
|
@ -108,6 +108,14 @@ public class PtoVtaSeguro implements Serializable, Auditavel<PtoVtaSeguro>{
|
|||
@Column(name = "INDTAXAEMBARQUEEMBARCADA")
|
||||
private Boolean indTaxaEmbarqueEmbarcada;
|
||||
|
||||
@Basic(optional = false)
|
||||
@Column(name = "INDVENDASISTVIAJE")
|
||||
private Boolean indVendeAsistenciaDeViaje;
|
||||
|
||||
@Basic(optional = false)
|
||||
@Column(name = "INDESTANASISTVIAJE")
|
||||
private Boolean indEstanAsistenciaDeViaje;
|
||||
|
||||
@Transient
|
||||
@NaoAuditar
|
||||
private PtoVtaSeguro ptoVtaSeguroClone;
|
||||
|
@ -280,6 +288,22 @@ public class PtoVtaSeguro implements Serializable, Auditavel<PtoVtaSeguro>{
|
|||
this.indTaxaEmbarqueEmbarcada = indTaxaEmbarqueEmbarcada;
|
||||
}
|
||||
|
||||
public Boolean getIndVendeAsistenciaDeViaje() {
|
||||
return indVendeAsistenciaDeViaje;
|
||||
}
|
||||
|
||||
public void setIndVendeAsistenciaDeViaje(Boolean indVendeAsistenciaDeViaje) {
|
||||
this.indVendeAsistenciaDeViaje = indVendeAsistenciaDeViaje;
|
||||
}
|
||||
|
||||
public Boolean getIndEstanAsistenciaDeViaje() {
|
||||
return indEstanAsistenciaDeViaje;
|
||||
}
|
||||
|
||||
public void setIndEstanAsistenciaDeViaje(Boolean indEstanAsistenciaDeViaje) {
|
||||
this.indEstanAsistenciaDeViaje = indEstanAsistenciaDeViaje;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clonar() throws CloneNotSupportedException {
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ import javax.persistence.Id;
|
|||
import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.SequenceGenerator;
|
||||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
|
@ -122,6 +123,10 @@ public class TipoEventoExtra implements Serializable {
|
|||
|
||||
@Column(name = "INDVALIDAESTOQUE")
|
||||
private Boolean indValidarEstoque;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "IMPRESIONLAYOUTCONFIG_ID")
|
||||
private ImpresionLayoutConfig impresionLayoutConfig;
|
||||
|
||||
public TipoEventoExtraEmpresa addEmpresa(Empresa e) {
|
||||
TipoEventoExtraEmpresa t = new TipoEventoExtraEmpresa();
|
||||
|
@ -462,7 +467,13 @@ public class TipoEventoExtra implements Serializable {
|
|||
public void setIndEnviaExcessoDeBagagemSefaz(Boolean indEnviaExcessoDeBagagemSefaz) {
|
||||
this.indEnviaExcessoDeBagagemSefaz = indEnviaExcessoDeBagagemSefaz;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ImpresionLayoutConfig getImpresionLayoutConfig() {
|
||||
return impresionLayoutConfig;
|
||||
}
|
||||
|
||||
public void setImpresionLayoutConfig(ImpresionLayoutConfig impresionLayoutConfig) {
|
||||
this.impresionLayoutConfig = impresionLayoutConfig;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
package com.rjconsultores.ventaboletos.enums;
|
||||
|
||||
public enum EnumLinguagemImpresion {
|
||||
HTML(0),
|
||||
ZPL(1),
|
||||
;
|
||||
|
||||
private Integer id;
|
||||
|
||||
private EnumLinguagemImpresion(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public static EnumLinguagemImpresion getLinguagemImpresionByValor(Integer valor) {
|
||||
|
||||
for (EnumLinguagemImpresion enumLinguagemImpresion : EnumLinguagemImpresion.values()) {
|
||||
if (enumLinguagemImpresion.getId().equals(valor)) {
|
||||
return enumLinguagemImpresion;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return this.name();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.AsistenciaDeViajeEmpresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
|
||||
public interface AsistenciaDeViajeEmpresaService extends GenericService<AsistenciaDeViajeEmpresa, Integer>{
|
||||
public boolean existe(Empresa empresa);
|
||||
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.ImpresionLayoutConfig;
|
||||
|
||||
public interface ImpresionLayoutConfigService extends GenericService<ImpresionLayoutConfig, Integer> {
|
||||
|
||||
public List<ImpresionLayoutConfig> buscar(String descricao);
|
||||
|
||||
public List<ImpresionLayoutConfig> buscarLike(String descricao);
|
||||
}
|
|
@ -9,6 +9,8 @@ import com.rjconsultores.ventaboletos.exception.ValidacionCampoException;
|
|||
public interface TipoEventoExtraService {
|
||||
|
||||
public List<TipoEventoExtra> buscar(String descingreso);
|
||||
|
||||
public List<TipoEventoExtra> buscarLike(String descingreso);
|
||||
|
||||
public List<TipoEventoExtra> obtenerTodos();
|
||||
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
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.AsistenciaDeViajeEmpresaDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.AsistenciaDeViajeEmpresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.service.AsistenciaDeViajeEmpresaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
|
||||
@Service("asistenciaDeViajeEmpresaService")
|
||||
public class AsistenciaDeViajeEmpresaServiceImpl implements AsistenciaDeViajeEmpresaService {
|
||||
|
||||
@Autowired
|
||||
private AsistenciaDeViajeEmpresaDAO asistenciaDeViajeEmpresaDAO;
|
||||
|
||||
public List<AsistenciaDeViajeEmpresa> obtenerTodos() {
|
||||
return asistenciaDeViajeEmpresaDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public AsistenciaDeViajeEmpresa obtenerID(Integer id) {
|
||||
return asistenciaDeViajeEmpresaDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
public boolean existe(Empresa empresa) {
|
||||
return asistenciaDeViajeEmpresaDAO.existe(empresa);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public AsistenciaDeViajeEmpresa suscribir(AsistenciaDeViajeEmpresa entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return asistenciaDeViajeEmpresaDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public AsistenciaDeViajeEmpresa actualizacion(AsistenciaDeViajeEmpresa entidad) {
|
||||
return asistenciaDeViajeEmpresaDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(AsistenciaDeViajeEmpresa entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
asistenciaDeViajeEmpresaDAO.borrar(entidad);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
|
||||
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.ImpresionLayoutConfigDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.ImpresionLayoutConfig;
|
||||
import com.rjconsultores.ventaboletos.service.ImpresionLayoutConfigService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
|
||||
@Service("impresionLayoutConfigService")
|
||||
public class ImpresionLayoutConfigServiceImpl implements ImpresionLayoutConfigService {
|
||||
|
||||
@Autowired
|
||||
private ImpresionLayoutConfigDAO impresionLayoutConfigDAO;
|
||||
|
||||
public List<ImpresionLayoutConfig> obtenerTodos() {
|
||||
return impresionLayoutConfigDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
public ImpresionLayoutConfig obtenerID(Integer id) {
|
||||
return impresionLayoutConfigDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public ImpresionLayoutConfig suscribir(ImpresionLayoutConfig entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return impresionLayoutConfigDAO.suscribir(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public ImpresionLayoutConfig actualizacion(ImpresionLayoutConfig entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
|
||||
return impresionLayoutConfigDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public void borrar(ImpresionLayoutConfig entidad) {
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.FALSE);
|
||||
|
||||
impresionLayoutConfigDAO.actualizacion(entidad);
|
||||
}
|
||||
|
||||
public List<ImpresionLayoutConfig> buscar(String descricao) {
|
||||
return impresionLayoutConfigDAO.buscar(descricao);
|
||||
}
|
||||
|
||||
public List<ImpresionLayoutConfig> buscarLike(String descricao) {
|
||||
return impresionLayoutConfigDAO.buscarLike(descricao);
|
||||
}
|
||||
}
|
|
@ -84,6 +84,11 @@ public class TipoEventoExtraServiceImpl implements TipoEventoExtraService {
|
|||
public List<TipoEventoExtra> buscar(String descingreso) {
|
||||
return tipoEventoExtraDAO.buscar(descingreso);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TipoEventoExtra> buscarLike(String descingreso) {
|
||||
return tipoEventoExtraDAO.buscarLike(descingreso);
|
||||
}
|
||||
|
||||
private void validaCampos(TipoEventoExtra entidad) throws ValidacionCampoException {
|
||||
|
||||
|
|
Loading…
Reference in New Issue