Portar os métodos utilizados pela Agência Digital para a API
bug#18864 dev: trevezani qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@101093 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
75123928ff
commit
d9d5b1dfd7
|
@ -18,4 +18,6 @@ public interface TipoVentaDAO extends GenericDAO<TipoVenta, Integer>{
|
||||||
|
|
||||||
public TipoVenta obtenerID(Short tipoventaId);
|
public TipoVenta obtenerID(Short tipoventaId);
|
||||||
|
|
||||||
|
public List<TipoVenta> obterTiposVentaIntegracao();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,11 @@ package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.dao.TipoVentaDAO;
|
import com.rjconsultores.ventaboletos.dao.TipoVentaDAO;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TipoVenta;
|
import com.rjconsultores.ventaboletos.entidad.TipoVenta;
|
||||||
|
import com.rjconsultores.ventaboletos.vo.segurida.PerfilJerarquia;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import org.hibernate.Criteria;
|
import org.hibernate.Criteria;
|
||||||
|
import org.hibernate.Query;
|
||||||
import org.hibernate.SessionFactory;
|
import org.hibernate.SessionFactory;
|
||||||
import org.hibernate.criterion.Order;
|
import org.hibernate.criterion.Order;
|
||||||
import org.hibernate.criterion.Restrictions;
|
import org.hibernate.criterion.Restrictions;
|
||||||
|
@ -52,4 +55,16 @@ public class TipoVentaHibernateDAO extends GenericHibernateDAO<TipoVenta, Intege
|
||||||
|
|
||||||
return (TipoVenta) c.uniqueResult();
|
return (TipoVenta) c.uniqueResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public List<TipoVenta> obterTiposVentaIntegracao() {
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(" from TipoVenta x ");
|
||||||
|
sb.append(" where x.activo = 1 and x.tipoventaId in (12,99)");
|
||||||
|
sb.append(" order by x.desctipoventa ");
|
||||||
|
|
||||||
|
Query query = getSession().createQuery(sb.toString());
|
||||||
|
|
||||||
|
return query.list();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,6 +111,6 @@ public class TipoVenta implements Serializable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "com.rjconsultores.ventaboletos.entidad.TipoVenta[tipoventaId=" + tipoventaId + "]";
|
return getDesctipoventa();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,6 +109,9 @@ public class Usuario implements Serializable, UserDetails/*, Authentication*/ {
|
||||||
@Column(name = "ESTACIONINTERNET_ID")
|
@Column(name = "ESTACIONINTERNET_ID")
|
||||||
private Long estacionInternetId;
|
private Long estacionInternetId;
|
||||||
|
|
||||||
|
@Column(name = "TIPOVENTAINTEGRACAO_ID")
|
||||||
|
private Long tipoVentaIntegracaoId;
|
||||||
|
|
||||||
/* Lista de permissoes do usuario */
|
/* Lista de permissoes do usuario */
|
||||||
@Transient
|
@Transient
|
||||||
private List<String> listClavesPermisos;
|
private List<String> listClavesPermisos;
|
||||||
|
@ -469,4 +472,12 @@ public class Usuario implements Serializable, UserDetails/*, Authentication*/ {
|
||||||
public void setEstacionInternetId(Long estacionInternetId) {
|
public void setEstacionInternetId(Long estacionInternetId) {
|
||||||
this.estacionInternetId = estacionInternetId;
|
this.estacionInternetId = estacionInternetId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Long getTipoVentaIntegracaoId() {
|
||||||
|
return tipoVentaIntegracaoId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTipoVentaIntegracaoId(Long tipoVentaIntegracaoId) {
|
||||||
|
this.tipoVentaIntegracaoId = tipoVentaIntegracaoId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,4 +18,6 @@ public interface TipoVentaService extends GenericService<TipoVenta,Integer>{
|
||||||
|
|
||||||
public TipoVenta obtenerID(Short tipoventaId);
|
public TipoVenta obtenerID(Short tipoventaId);
|
||||||
|
|
||||||
|
public List<TipoVenta> obterTiposVentaIntegracao();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,4 +66,8 @@ public class TipoVentaServiceImpl implements TipoVentaService {
|
||||||
public TipoVenta obtenerID(Short tipoventaId) {
|
public TipoVenta obtenerID(Short tipoventaId) {
|
||||||
return tipoVentaDAO.obtenerID(tipoventaId);
|
return tipoVentaDAO.obtenerID(tipoventaId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<TipoVenta> obterTiposVentaIntegracao() {
|
||||||
|
return tipoVentaDAO.obterTiposVentaIntegracao();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue