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