diff --git a/src/com/rjconsultores/ventaboletos/dao/PuntoVentaDAO.java b/src/com/rjconsultores/ventaboletos/dao/PuntoVentaDAO.java index 789c7c956..26f806efa 100644 --- a/src/com/rjconsultores/ventaboletos/dao/PuntoVentaDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/PuntoVentaDAO.java @@ -16,7 +16,7 @@ public interface PuntoVentaDAO extends GenericDAO { public List buscaLike(String strEstacion); - public List busca(String nomPuntoVenta, Integer numPuntoVenta); - public List buscaPuntoVenta(Integer numPuntoVenta); + public List busca(String nomPuntoVenta, String numPuntoVenta); + public List buscaPuntoVenta(String numPuntoVenta); public List buscaPuntoVentaParada(Parada parada); } diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/PuntoVentaHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/PuntoVentaHibernateDAO.java index 44428bbb2..0abc70cd8 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/PuntoVentaHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/PuntoVentaHibernateDAO.java @@ -49,7 +49,7 @@ public class PuntoVentaHibernateDAO extends GenericHibernateDAO busca(String nomPuntoVenta, Integer numPuntoVenta) { + public List busca(String nomPuntoVenta, String numPuntoVenta) { Criteria c = getSession().createCriteria(getPersistentClass()); c.add(Restrictions.eq("activo", Boolean.TRUE)); @@ -59,7 +59,7 @@ public class PuntoVentaHibernateDAO extends GenericHibernateDAO buscaPuntoVenta(Integer numPuntoVenta) { + public List buscaPuntoVenta(String numPuntoVenta) { Criteria c = getSession().createCriteria(getPersistentClass()); c.add(Restrictions.eq("activo", Boolean.TRUE)); c.add(Restrictions.eq("numPuntoVenta", numPuntoVenta)); diff --git a/src/com/rjconsultores/ventaboletos/entidad/PuntoVenta.java b/src/com/rjconsultores/ventaboletos/entidad/PuntoVenta.java index 6e39f4b1d..33aa5ad02 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/PuntoVenta.java +++ b/src/com/rjconsultores/ventaboletos/entidad/PuntoVenta.java @@ -127,7 +127,7 @@ public class PuntoVenta implements Serializable { @OneToOne(cascade=CascadeType.ALL) private PtovtaTitular titularId; @Column(name = "NUMPUNTOVENTA") - private Integer numPuntoVenta; + private String numPuntoVenta; @Column(name = "INDVALIDASTOCK") private Boolean indValidaStock; @@ -561,11 +561,11 @@ public class PuntoVenta implements Serializable { this.dscUsuarioInternet = dscUsuarioInternet; } - public Integer getNumPuntoVenta() { + public String getNumPuntoVenta() { return numPuntoVenta; } - public void setNumPuntoVenta(Integer numPuntoVenta) { + public void setNumPuntoVenta(String numPuntoVenta) { this.numPuntoVenta = numPuntoVenta; } diff --git a/src/com/rjconsultores/ventaboletos/service/PuntoVentaService.java b/src/com/rjconsultores/ventaboletos/service/PuntoVentaService.java index 0691bf4ef..de1bd6ded 100644 --- a/src/com/rjconsultores/ventaboletos/service/PuntoVentaService.java +++ b/src/com/rjconsultores/ventaboletos/service/PuntoVentaService.java @@ -16,7 +16,7 @@ public interface PuntoVentaService extends GenericService { public List buscaLike(String strEstacion); - public List buscar(String nomPuntoVenta, Integer numPuntoVenta); - public List buscaPuntoVenta(Integer numPuntoVenta); + public List buscar(String nomPuntoVenta, String numPuntoVenta); + public List buscaPuntoVenta(String numPuntoVenta); public List buscaPuntoVentaParada(Parada paradaId); } diff --git a/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java index 1383447ec..3c4e74a50 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/EstacionServiceImpl.java @@ -39,10 +39,9 @@ public class EstacionServiceImpl implements EstacionService { @Transactional(rollbackFor = BusinessException.class) public Estacion suscribirActualizar(Estacion estacion) throws BusinessException { - List lsEstacion = estacionDAO.buscar(estacion.getDescmac()); boolean esCajaDuplicado = false; - lsEstacion = estacionDAO.buscar(estacion.getNumcaja(), estacion.getPuntoVenta()); + List lsEstacion = estacionDAO.buscar(estacion.getNumcaja(), estacion.getPuntoVenta()); if (!lsEstacion.isEmpty()) { if (estacion.getEstacionId() == null) { diff --git a/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java index 480872559..b3f22521f 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/PuntoVentaServiceImpl.java @@ -110,11 +110,11 @@ public class PuntoVentaServiceImpl implements PuntoVentaService { return puntoVentaDAO.buscaLike(strEstacion); } - public List buscar(String nomPuntoVenta, Integer numPuntoVenta) { + public List buscar(String nomPuntoVenta, String numPuntoVenta) { return puntoVentaDAO.busca(nomPuntoVenta, numPuntoVenta); } - public List buscaPuntoVenta(Integer numPuntoVenta) { + public List buscaPuntoVenta(String numPuntoVenta) { return puntoVentaDAO.buscaPuntoVenta(numPuntoVenta); }