Configuração de Bloqueio por Agência - colocar como default o campo todos (fixed bug #5064)
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@34460 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
4e69777fc9
commit
6d250e4c2d
|
@ -2,5 +2,7 @@ package com.rjconsultores.ventaboletos.service;
|
|||
|
||||
import com.rjconsultores.ventaboletos.entidad.ConfRestricaoPtovta;
|
||||
|
||||
public interface ConfRestricaoPtovtaService extends GenericService<ConfRestricaoPtovta, Integer> {
|
||||
public interface ConfRestricaoPtovtaService extends GenericService<ConfRestricaoPtovta, Integer> {
|
||||
|
||||
public ConfRestricaoPtovta obtenerPtovtaTodos();
|
||||
}
|
||||
|
|
|
@ -9,7 +9,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import com.rjconsultores.ventaboletos.dao.ConfRestricaoPtovtaDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.ConfRestricaoPtovta;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.service.ConfRestricaoPtovtaService;
|
||||
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
|
||||
@Service("confRestricaoPtovtaService")
|
||||
|
@ -17,6 +19,8 @@ public class ConfRestricaoPtovtaServiceImpl implements ConfRestricaoPtovtaServic
|
|||
|
||||
@Autowired
|
||||
ConfRestricaoPtovtaDAO confRestricaoPtovtaDAO;
|
||||
@Autowired
|
||||
private PuntoVentaService puntoVentaService;
|
||||
|
||||
@Override
|
||||
public List<ConfRestricaoPtovta> obtenerTodos() {
|
||||
|
@ -28,6 +32,20 @@ public class ConfRestricaoPtovtaServiceImpl implements ConfRestricaoPtovtaServic
|
|||
return confRestricaoPtovtaDAO.obtenerID(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfRestricaoPtovta obtenerPtovtaTodos() {
|
||||
|
||||
ConfRestricaoPtovta entidad = new ConfRestricaoPtovta();
|
||||
|
||||
entidad.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
entidad.setFecmodif(Calendar.getInstance().getTime());
|
||||
entidad.setActivo(Boolean.TRUE);
|
||||
PuntoVenta puntoVenta = puntoVentaService.obtenerID(-1);
|
||||
entidad.setPuntoVenta(puntoVenta);
|
||||
|
||||
return entidad;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public ConfRestricaoPtovta suscribir(ConfRestricaoPtovta entidad) {
|
||||
|
|
Loading…
Reference in New Issue