Exemple #1
0
  public void iniciarTelaFiltro(AcessoFormBean formulario, HttpServletRequest request)
      throws Exception {
    SiteHelper siteHelper = SiteHelper.create();
    FluxoHelper fluxoHelper = FluxoHelper.create();

    List<SiteTO> listaSites =
        siteHelper.procuraSitesMinPorContrato(
            String.valueOf(fluxoHelper.getPedidoFromSession(request).getIdContrato()));
    formulario.setSitesOcorrs(
        siteHelper.getPermicoesEdicao(listaSites, fluxoHelper.getPedidoFromSession(request)));

    formulario.setSitesOcorrsQuant("" + formulario.getSitesOcorrs().size());
    formulario.setCdContrato(
        String.valueOf(fluxoHelper.getPedidoFromSession(request).getIdContrato()));
  }
Exemple #2
0
  public boolean permiteTrocaAcesso(AcessoFormBean formulario, HttpServletRequest request)
      throws Exception {

    FluxoHelper fluxoHelper = FluxoHelper.create();
    OfertaHelper oferta = OfertaHelper.create();

    if (this.possuiTarefaOferta(fluxoHelper.getPedidoFromSession(request).getId())) {
      return true;
    } else {
      // verifica se possui oferta predial no site
      if ("S".equals(oferta.buscarOfertaBySite(formulario.getCodigoSite()).getInPredial())) {
        return false;

      } else {
        return true;
      }
    }
  }