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/Web/trunk/ventaboletos@34460 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
def50d552b
commit
89f2ce162e
|
@ -27,6 +27,7 @@ import com.rjconsultores.ventaboletos.exception.BusinessException;
|
|||
import com.rjconsultores.ventaboletos.service.ConfRestricaoCanalVentaService;
|
||||
import com.rjconsultores.ventaboletos.service.ConfRestricaoExcecaoService;
|
||||
import com.rjconsultores.ventaboletos.service.ConfRestricaoPtovtaService;
|
||||
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
|
@ -49,9 +50,8 @@ public class EditarConfRestricaoCanalVentaController extends MyGenericForwardCom
|
|||
private RutaService rutaService;
|
||||
@Autowired
|
||||
private ConfRestricaoExcecaoService confRestricaoExcecaoServide;
|
||||
|
||||
@Autowired
|
||||
ConfRestricaoPtovtaService confRestricaoPtovtaService;
|
||||
private ConfRestricaoPtovtaService confRestricaoPtovtaService;
|
||||
|
||||
private ConfRestricaoCanalVenta confRestricaoCanalVenta;
|
||||
private List<TipoPuntoVenta> lsTipoPtoVta;
|
||||
|
@ -96,6 +96,12 @@ public class EditarConfRestricaoCanalVentaController extends MyGenericForwardCom
|
|||
|
||||
if (confRestricaoCanalVenta.getConfRestricaoCanalVentaId() == null) {
|
||||
btnApagar.setVisible(Boolean.FALSE);
|
||||
|
||||
List<ConfRestricaoPtovta> lsPtovta = new ArrayList<ConfRestricaoPtovta>();
|
||||
lsPtovta.add(confRestricaoPtovtaService.obtenerPtovtaTodos());
|
||||
confRestricaoCanalVenta.setLsConfRestricaoPtovta(lsPtovta);
|
||||
confRestricaoPtovtaDataList.setData(lsPtovta);
|
||||
|
||||
} else {
|
||||
confRestricaoCanalVenta = confRestricaoCanalVentaService.obtenerID(confRestricaoCanalVenta.getConfRestricaoCanalVentaId());
|
||||
excecaoDataList.setData(confRestricaoCanalVenta.getLsConfRestricaoExcecao());
|
||||
|
@ -132,12 +138,16 @@ public class EditarConfRestricaoCanalVentaController extends MyGenericForwardCom
|
|||
confRestricaoCanalVenta.setTipoPuntoVenta(null);
|
||||
}
|
||||
|
||||
if (cmbPuntoVenta.getSelectedItem() == null) {
|
||||
if (confRestricaoCanalVenta.getLsConfRestricaoPtovta().isEmpty()) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarConfRestricaoCanalVentaController.MSG.restricaoPtovta"),
|
||||
Labels.getLabel("editarConfRestricaoCanalVentaController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
return;
|
||||
} else {
|
||||
for (ConfRestricaoPtovta cre : confRestricaoCanalVenta.getLsConfRestricaoPtovta()) {
|
||||
cre.setConfRestricaoCanalVenta(confRestricaoCanalVenta);
|
||||
}
|
||||
}
|
||||
|
||||
confRestricaoCanalVentaService.suscribirActualizar(confRestricaoCanalVenta);
|
||||
|
|
Loading…
Reference in New Issue