alteração no cadastro do usuário no combobox localidade e ponto de venda
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@24295 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
52dab8bf0e
commit
f4ebbe28f7
|
@ -4,6 +4,8 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.CategoriaCtrl;
|
||||
|
||||
/**
|
||||
|
@ -11,4 +13,5 @@ import com.rjconsultores.ventaboletos.entidad.CategoriaCtrl;
|
|||
* @author Administrador
|
||||
*/
|
||||
public interface CategoriaCtrlDAO extends GenericDAO<CategoriaCtrl, Integer> {
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -17,4 +18,5 @@ public interface PuntoVentaDAO extends GenericDAO<PuntoVenta, Integer> {
|
|||
|
||||
public List<PuntoVenta> busca(String nomPuntoVenta, Integer numPuntoVenta);
|
||||
public List<PuntoVenta> buscaPuntoVenta(Integer numPuntoVenta);
|
||||
public List<PuntoVenta> buscaPuntoVentaParada(Parada parada);
|
||||
}
|
||||
|
|
|
@ -10,5 +10,5 @@ public interface UsuarioEmpresaDAO extends GenericDAO<UsuarioEmpresa, Integer> {
|
|||
|
||||
public List<UsuarioEmpresa> obtenerPorUsuario(Usuario usuario);
|
||||
public List<Empresa> obtenerEmpresa(Usuario usuario) ;
|
||||
public List<UsuarioEmpresa> obtenerPorEmpresaUsuario(Empresa empresa, Usuario usuario);
|
||||
public Boolean obtenerPorEmpresaUsuario(Empresa empresa, Usuario usuario);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.PuntoVentaDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import java.util.List;
|
||||
import org.hibernate.criterion.Order;
|
||||
|
@ -65,4 +66,15 @@ public class PuntoVentaHibernateDAO extends GenericHibernateDAO<PuntoVenta, Inte
|
|||
|
||||
return c.list();
|
||||
}
|
||||
|
||||
public List<PuntoVenta> buscaPuntoVentaParada(Parada parada){
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("parada", parada));
|
||||
if (!c.list().isEmpty()){
|
||||
return c.list();
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,13 +42,16 @@ public class UsuarioEmpresaHibernateDAO extends GenericHibernateDAO<UsuarioEmpre
|
|||
return c.list();
|
||||
}
|
||||
|
||||
public List<UsuarioEmpresa> obtenerPorEmpresaUsuario(Empresa empresa, Usuario usuario) {
|
||||
public Boolean obtenerPorEmpresaUsuario(Empresa empresa, Usuario usuario) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
c.add(Restrictions.eq("activo", Boolean.TRUE));
|
||||
c.add(Restrictions.eq("empresa", empresa));
|
||||
c.add(Restrictions.eq("usuarioLog", usuario));
|
||||
|
||||
return c.list();
|
||||
if(!c.list().isEmpty()){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public List<Empresa> obtenerEmpresa(Usuario usuario) {
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -17,4 +18,5 @@ public interface PuntoVentaService extends GenericService<PuntoVenta, Integer> {
|
|||
|
||||
public List<PuntoVenta> buscar(String nomPuntoVenta, Integer numPuntoVenta);
|
||||
public List<PuntoVenta> buscaPuntoVenta(Integer numPuntoVenta);
|
||||
public List<PuntoVenta> buscaPuntoVentaParada(Parada paradaId);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ public interface UsuarioEmpresaService extends GenericService<UsuarioEmpresa, In
|
|||
|
||||
public List<UsuarioEmpresa> obtenerPorUsuario(Usuario usuario);
|
||||
public List<Empresa> obtenerEmpresa(Usuario usuario) ;
|
||||
public List<UsuarioEmpresa> obtenerPorEmpresaUsuario(Empresa empresa, Usuario usuario);
|
||||
public Boolean obtenerPorEmpresaUsuario(Empresa empresa, Usuario usuario);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ package com.rjconsultores.ventaboletos.service.impl;
|
|||
|
||||
import com.rjconsultores.ventaboletos.dao.PuntoVentaDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.FormaPagoDet;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaEmpresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaEstoque;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
|
@ -116,4 +117,8 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
|
|||
public List<PuntoVenta> buscaPuntoVenta(Integer numPuntoVenta) {
|
||||
return puntoVentaDAO.buscaPuntoVenta(numPuntoVenta);
|
||||
}
|
||||
|
||||
public List<PuntoVenta> buscaPuntoVentaParada(Parada paradaId) {
|
||||
return puntoVentaDAO.buscaPuntoVentaParada(paradaId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ public class UsuarioEmpresaServiceImpl implements UsuarioEmpresaService {
|
|||
return usuarioEmpresaDAO.obtenerEmpresa(usuario);
|
||||
}
|
||||
|
||||
public List<UsuarioEmpresa> obtenerPorEmpresaUsuario(Empresa empresa, Usuario usuario) {
|
||||
public Boolean obtenerPorEmpresaUsuario(Empresa empresa, Usuario usuario) {
|
||||
return usuarioEmpresaDAO.obtenerPorEmpresaUsuario( empresa, usuario);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue