Package ecar.pojo

Examples of ecar.pojo.AcompRelatorioArel


                        if ( itRelatorios != null )
                        {
                            while ( itRelatorios.hasNext(  ) )
                            {
                                AcompRelatorioArel relatorio = (AcompRelatorioArel) itRelatorios.next(  );

                                ItemEstUsutpfuacIettutfa itemEstUsu =
                                    itemEstUsuDao.buscar( item.getCodIett(  ),
                                                          relatorio.getTipoFuncAcompTpfa(  ).getCodTpfa(  ) );

                                //Verifica se a permiss�o � de grupo ou usu�rio
                                if ( ( itemEstUsu != null ) && ( usuario != null ) )
                                {
                                    if ( itemEstUsu.getUsuarioUsu(  ) != null )
View Full Code Here


                        if ( itRelatorios != null )
                        {
                            while ( itRelatorios.hasNext(  ) )
                            {
                                AcompRelatorioArel relatorio = (AcompRelatorioArel) itRelatorios.next(  );

                                ItemEstUsutpfuacIettutfa itemEstUsu =
                                    itemEstUsuDao.buscar( item.getCodIett(  ),
                                                          relatorio.getTipoFuncAcompTpfa(  ).getCodTpfa(  ) );

                                //Verifica se a permiss�o � de grupo ou usu�rio
                                if ( ( itemEstUsu != null ) && ( usuario != null ) )
                                {
                                    if ( itemEstUsu.getUsuarioUsu(  ) != null )
View Full Code Here

            return OPERACAO_NEGADA_ACOMPANHAMENTO_REFERENCIA_LIBERADO;
        }       
        /* item j� possui algum status. deve validar para recuperar */
        if(acompRelatorio.getIndLiberadoArel() != null && "S".equals(acompRelatorio.getIndLiberadoArel())){
            /* procura o acompanhamento do antecedente */
            AcompRelatorioArel acompPai = acompRelatorio;
            /* antecedente n�o foi liberado, pode recuperar*/
            int intRetorno = OPERACAO_PERMITIDA;
            do{
              TipoFuncAcompTpfa tipoFuncao = acompPai.getTipoFuncAcompTpfa();
                if(tipoFuncao.getTipoFuncAcompTpfa() == null){
                    /* fun��o n�o possui pai, pode recuperar a qualquer hora */
                  break;
                }
              acompPai = getAcompRelatorio(tipoFuncao.getTipoFuncAcompTpfa(), acompPai.getAcompReferenciaItemAri());
              if (acompPai != null)
                    if(acompPai.getIndLiberadoArel() != null && "S".equals(acompPai.getIndLiberadoArel())){
                            /* antecedente j� foi liberado, n�o pode recuperar */
                        intRetorno = OPERACAO_NEGADA_FUNCAO_SUPERIOR_LIBERADA;
                        break;
                      }
              }while(acompPai != null);
View Full Code Here

     * @param campos
     * @return
     * @throws ECARException
     */
    public String alterar(AcompRelatorioArel acompRelatorio, HttpServletRequest request, List campos) throws ECARException{
        AcompRelatorioArel acompAtual = (AcompRelatorioArel) this.buscar(AcompRelatorioArel.class, acompRelatorio.getCodArel());
        String indLiberadoAcompAtual = acompAtual.getIndLiberadoArel();
        setAcompRelatorioArel(acompRelatorio, request, campos);               
        acompRelatorio.setDataUltManutArel(Data.getDataAtual());
        super.alterar(acompRelatorio);
        if("S".equals(acompRelatorio.getIndLiberadoArel()))
            return "acompanhamento.acompRelatorio.liberacao.sucesso";
View Full Code Here

     * @throws ECARException
     */
    public AcompRelatorioArel getAcompRelatorio (TipoFuncAcompTpfa tipoFuncao,
                AcompReferenciaItemAri acompRefItem) throws ECARException{
             
        AcompRelatorioArel acompRelatorio = new AcompRelatorioArel();
                   
      acompRelatorio.setAcompReferenciaItemAri(acompRefItem);
      acompRelatorio.setTipoFuncAcompTpfa(tipoFuncao);
     
    /* buscar em AcompRelatorio a partir de ItemEstUsu e de AcompReferenciaItem*/
    List lista = pesquisar(acompRelatorio, new String[] {"codArel","asc"});
   
    for (Iterator it = lista.iterator(); it.hasNext();) {
View Full Code Here

     * @param funcAcomp
     * @return
     * @throws ECARException
     */
    public AcompRelatorioArel criaNovoAcompRelatorio(AcompReferenciaItemAri acompReferenciaItem, UsuarioUsu usuario, TipoFuncAcompTpfa funcAcomp) throws ECARException{
        AcompRelatorioArel acompRelatorio = new AcompRelatorioArel();
        acompRelatorio.setAcompReferenciaItemAri(acompReferenciaItem);
        acompRelatorio.setDataInclusaoArel(Data.getDataAtual());                  
        acompRelatorio.setTipoFuncAcompTpfa(funcAcomp);
        acompRelatorio.setUsuarioUsu(usuario);      
        return acompRelatorio;                   
    }
View Full Code Here

    public List getListaAcessoRelatorio(UsuarioUsu usuario, List listTipoFuncAcompTpfa, List listAcompRelatorioArel, List listTipoAcompFuncAcomp) throws ECARException{
      List retorno = new ArrayList();
      ItemEstUsutpfuacDao itemEstUsutpfuacDao = new ItemEstUsutpfuacDao(request);
     
      for (Iterator itArel = listAcompRelatorioArel.iterator(); itArel.hasNext();) {
        AcompRelatorioArel arel = (AcompRelatorioArel)itArel.next();

        List usuariosPermitidos = itemEstUsutpfuacDao.getUsuariosAcompanhamento(arel.getAcompReferenciaItemAri().getItemEstruturaIett());

        for (Iterator itTpfa = listTipoFuncAcompTpfa.iterator(); itTpfa.hasNext();) {
            TipoFuncAcompTpfa tpfa = (TipoFuncAcompTpfa)itTpfa.next();
           
          AcessoRelatorio acessoRelatorio = new AcessoRelatorio();
          acessoRelatorio.setArel(arel);
          acessoRelatorio.setTpfa(tpfa);
       
          if(!usuariosPermitidos.contains(usuario)) {
            acessoRelatorio.setPermissao(OPERACAO_NEGADA_USUARIO_SEM_PERMISSAO);
          } else {
          if(arel != null && Dominios.SIM.equals(arel.getIndLiberadoArel())) {
              acessoRelatorio.setPermissao(OPERACAO_PERMITIDA);
          } else {
           
            TipoAcompFuncAcompTafc tafc = null;
            for(Iterator it = listTipoAcompFuncAcomp.iterator(); it.hasNext();){
              TipoAcompFuncAcompTafc tafcTemp = (TipoAcompFuncAcompTafc) it.next();
              if(tafcTemp.getTipoFuncAcompTpfa().equals(tpfa)){
                tafc = tafcTemp;
                break;
              }
            }
           
              try {
              if(tafc != null){
                /*
                 * Nova regra (mantis 11289):
                 * Ao exibir as abas de tipos de fun��es de acompanhamento:
                 * Para registro de posi��o OBRIGAT�RIO continua com est� atualmente.
                 */
                if(Dominios.OBRIGATORIO.equals(tafc.getIndRegistroPosicaoTafc())){
                 
                  boolean usuarioSemPermissao = true;
                      ItemEstUsutpfuacIettutfa itemEstUsutpfuacIettutfa = new ItemEstUsutpfuacDao(request).buscar(arel.getAcompReferenciaItemAri().getItemEstruturaIett().getCodIett(), tpfa.getCodTpfa());
                   
                      if (itemEstUsutpfuacIettutfa != null){
                        if (itemEstUsutpfuacIettutfa.getUsuarioUsu() != null && itemEstUsutpfuacIettutfa.getUsuarioUsu().equals(usuario)){
                          usuarioSemPermissao = false;
                        } else if (itemEstUsutpfuacIettutfa.getSisAtributoSatb() != null){
View Full Code Here

            for (Iterator itTafc = aref.getTipoAcompanhamentoTa().getTipoAcompFuncAcompTafcs().iterator(); itTafc.hasNext();) {
              TipoAcompFuncAcompTafc tafc = (TipoAcompFuncAcompTafc) itTafc.next();
              if(tafc.getTipoFuncAcompTpfa().equals(funcAcomp)){
                boolean existeArelParaFuncao = false;
                for (Iterator itArelsGravados = arelsGravados.iterator(); itArelsGravados.hasNext();) {
                  AcompRelatorioArel arel = (AcompRelatorioArel)itArelsGravados.next();
                  if(arel.getTipoFuncAcompTpfa().equals(funcAcomp)) {
                        existeArelParaFuncao = true;
                  }
                }
                if(!existeArelParaFuncao) {
                  return true;
View Full Code Here

     
      boolean emiterelatorio = false;
 
        if (listAcompRef != null)
         for (Iterator<AcompRelatorioArel> it = listAcompRef.iterator(); it.hasNext();) {
           AcompRelatorioArel arel = (AcompRelatorioArel) it.next();
           TipoFuncAcompTpfa tpfa = arel.getTipoFuncAcompTpfa();
          
               if (arelDao.podeGravarRelatorio(usuario, tpfa, ari , arel ) == AcompRelatorioDao.OPERACAO_PERMITIDA){
                 emiterelatorio  = true;
              break;
               }
View Full Code Here

              List relatorios = acompReferenciaItemDao.getAcompRelatorioArelOrderByFuncaoAcomp(ariAcao, tpfaOrdenadosPorEstrutura);
              Iterator itRelatorios = relatorios.iterator();
             
              if(itRelatorios != null) {
                while(itRelatorios.hasNext()){                       
                  AcompRelatorioArel relatorio = (AcompRelatorioArel) itRelatorios.next();                   
                         
                  ItemEstUsutpfuacIettutfa itemEstUsu
                            = itemEstUsuDao.buscar(item.getCodIett(), relatorio.getTipoFuncAcompTpfa().getCodTpfa());
                          
                  //Verifica se a permiss�o � de grupo ou usu�rio
                  if(itemEstUsu!=null && usuario != null) {                            
                    if (itemEstUsu.getUsuarioUsu() != null) {
                      usuarioLogadoEmiteParecer = itemEstUsu.getUsuarioUsu().getCodUsu().equals(usuario.getCodUsu());
View Full Code Here

TOP

Related Classes of ecar.pojo.AcompRelatorioArel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.