fixes bug#15038
dev: Lucas Silvério qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@95913 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
8bb0d1c5cd
commit
72d6a5b7d1
|
@ -30,6 +30,7 @@ import com.rjconsultores.ventaboletos.entidad.Usuario;
|
|||
* @author Administrador
|
||||
*/
|
||||
@Repository("estacionDAO")
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public class EstacionHibernateDAO extends GenericHibernateDAO<Estacion, Integer> implements EstacionDAO {
|
||||
|
||||
@Autowired
|
||||
|
@ -187,7 +188,6 @@ public class EstacionHibernateDAO extends GenericHibernateDAO<Estacion, Integer>
|
|||
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<Estacion> buscarEstaciones(List<PuntoVenta> lsPuntoVenta) {
|
||||
|
||||
|
@ -214,7 +214,6 @@ public class EstacionHibernateDAO extends GenericHibernateDAO<Estacion, Integer>
|
|||
return c.list();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Estacion buscarEstacionDuplicada(String descMac, Integer estacionId) {
|
||||
StringBuilder sQuery = new StringBuilder();
|
||||
sQuery.append("SELECT e ")
|
||||
|
|
|
@ -62,9 +62,17 @@ public class EstacionServiceImpl implements EstacionService {
|
|||
esMacDuplicado = Boolean.TRUE;
|
||||
}
|
||||
if (esMacDuplicado) {
|
||||
throw new BusinessException(Labels.getLabel("estacionServiceImpl.msg.macDuplicado") + "\n"
|
||||
+ Labels.getLabel("estacionServiceImpl.msg.macDuplicado.descricaoEstacao") + nomeEstacao + "\n"
|
||||
+ Labels.getLabel("estacionServiceImpl.msg.macDuplicado.numeroCaixa") + numeroCaixa, Boolean.TRUE);
|
||||
|
||||
StringBuilder msg = new StringBuilder();
|
||||
msg.append( Labels.getLabel("estacionServiceImpl.msg.macDuplicado") );
|
||||
msg.append( "\n" );
|
||||
msg.append( Labels.getLabel("estacionServiceImpl.msg.macDuplicado.descricaoEstacao") );
|
||||
msg.append( nomeEstacao );
|
||||
msg.append( "\n" );
|
||||
msg.append( Labels.getLabel("estacionServiceImpl.msg.macDuplicado.numeroCaixa") );
|
||||
msg.append( numeroCaixa.toString() );
|
||||
|
||||
throw new BusinessException( msg.toString());
|
||||
}
|
||||
|
||||
boolean esCajaDuplicado = false;
|
||||
|
|
Loading…
Reference in New Issue