- alteração tipo campo numpuntoventa

- adição validação da descrição da estacion
- validação ao adicionar empresa ao usuario

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@24301 d1611594-4594-4d17-8e1d-87c2c4800839
master
gleimar 2013-02-14 19:22:46 +00:00
parent f4ebbe28f7
commit 298c855471
6 changed files with 12 additions and 13 deletions

View File

@ -16,7 +16,7 @@ public interface PuntoVentaDAO extends GenericDAO<PuntoVenta, Integer> {
public List<PuntoVenta> buscaLike(String strEstacion);
public List<PuntoVenta> busca(String nomPuntoVenta, Integer numPuntoVenta);
public List<PuntoVenta> buscaPuntoVenta(Integer numPuntoVenta);
public List<PuntoVenta> busca(String nomPuntoVenta, String numPuntoVenta);
public List<PuntoVenta> buscaPuntoVenta(String numPuntoVenta);
public List<PuntoVenta> buscaPuntoVentaParada(Parada parada);
}

View File

@ -49,7 +49,7 @@ public class PuntoVentaHibernateDAO extends GenericHibernateDAO<PuntoVenta, Inte
return c.list();
}
public List<PuntoVenta> busca(String nomPuntoVenta, Integer numPuntoVenta) {
public List<PuntoVenta> 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<PuntoVenta, Inte
return c.list();
}
public List<PuntoVenta> buscaPuntoVenta(Integer numPuntoVenta) {
public List<PuntoVenta> buscaPuntoVenta(String numPuntoVenta) {
Criteria c = getSession().createCriteria(getPersistentClass());
c.add(Restrictions.eq("activo", Boolean.TRUE));
c.add(Restrictions.eq("numPuntoVenta", numPuntoVenta));

View File

@ -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;
}

View File

@ -16,7 +16,7 @@ public interface PuntoVentaService extends GenericService<PuntoVenta, Integer> {
public List<PuntoVenta> buscaLike(String strEstacion);
public List<PuntoVenta> buscar(String nomPuntoVenta, Integer numPuntoVenta);
public List<PuntoVenta> buscaPuntoVenta(Integer numPuntoVenta);
public List<PuntoVenta> buscar(String nomPuntoVenta, String numPuntoVenta);
public List<PuntoVenta> buscaPuntoVenta(String numPuntoVenta);
public List<PuntoVenta> buscaPuntoVentaParada(Parada paradaId);
}

View File

@ -39,10 +39,9 @@ public class EstacionServiceImpl implements EstacionService {
@Transactional(rollbackFor = BusinessException.class)
public Estacion suscribirActualizar(Estacion estacion) throws BusinessException {
List<Estacion> lsEstacion = estacionDAO.buscar(estacion.getDescmac());
boolean esCajaDuplicado = false;
lsEstacion = estacionDAO.buscar(estacion.getNumcaja(), estacion.getPuntoVenta());
List<Estacion> lsEstacion = estacionDAO.buscar(estacion.getNumcaja(), estacion.getPuntoVenta());
if (!lsEstacion.isEmpty()) {
if (estacion.getEstacionId() == null) {

View File

@ -110,11 +110,11 @@ public class PuntoVentaServiceImpl implements PuntoVentaService {
return puntoVentaDAO.buscaLike(strEstacion);
}
public List<PuntoVenta> buscar(String nomPuntoVenta, Integer numPuntoVenta) {
public List<PuntoVenta> buscar(String nomPuntoVenta, String numPuntoVenta) {
return puntoVentaDAO.busca(nomPuntoVenta, numPuntoVenta);
}
public List<PuntoVenta> buscaPuntoVenta(Integer numPuntoVenta) {
public List<PuntoVenta> buscaPuntoVenta(String numPuntoVenta) {
return puntoVentaDAO.buscaPuntoVenta(numPuntoVenta);
}