Package ecar.pojo

Examples of ecar.pojo.TipoFuncAcompTpfa


            {
                for ( int i = 0; i < strLibTipoFuncAcomp.length; i++ )
                {
                    codTpfa = Long.parseLong( strLibTipoFuncAcomp[i] );

                    TipoFuncAcompTpfa tipoFuncAcomp =
                        (TipoFuncAcompTpfa) this.buscar( TipoFuncAcompTpfa.class, codTpfa );

                    set.add( tipoFuncAcomp );
                } //fim for
            } catch ( ECARException e )
View Full Code Here


            {
                for ( int i = 0; i < strLibTipoFuncAcomp.length; i++ )
                {
                    codTpfa = Long.parseLong( strLibTipoFuncAcomp[i] );

                    TipoFuncAcompTpfa tipoFuncAcomp =
                        (TipoFuncAcompTpfa) this.buscar( TipoFuncAcompTpfa.class, codTpfa );

                    set.add( tipoFuncAcomp );
                } //fim for
            } catch ( ECARException e )
View Full Code Here

      throws ECARException {
       
        List lResultado = new ArrayList();
        List lFuncAcomp = new TipoFuncAcompDao(request).getTipoFuncAcompEmitePosicao();
       
        TipoFuncAcompTpfa funcao;
        AcompRefLimitesArl acompRefLimite;
       
        if (acomp != null && acomp.getAcompRefLimitesArls() != null) {
            /* loop nas funcoes em ordem de filho para pai */
         
          for (Iterator itFunc = lFuncAcomp.iterator(); itFunc.hasNext();) {
                funcao = (TipoFuncAcompTpfa) itFunc.next();
               
                for (Iterator itAcomp = acomp.getAcompRefLimitesArls().iterator(); itAcomp.hasNext();) {
                    acompRefLimite = (AcompRefLimitesArl) itAcomp.next();
                    if (acompRefLimite.getTipoFuncAcompTpfa().getCodTpfa().longValue() == funcao.getCodTpfa().longValue()) {
                        lResultado.add(acompRefLimite);
                        break;
                    }
                }
            }
View Full Code Here

    public void setAcompLimites(HttpServletRequest request, AcompReferenciaAref acompReferencia) throws ECARException {
           
      Set limites = new HashSet();
 
      for (Iterator it = new TipoFuncAcompDao(request).getTipoFuncAcompEmitePosicao().iterator(); it.hasNext();) {
        TipoFuncAcompTpfa funcao = (TipoFuncAcompTpfa) it.next();
       
        if (!"".equals(Pagina.getParamStr(request, "prazoFinalPara" + funcao.getCodTpfa().toString()))) {
          AcompRefLimitesArl acompLimite;

          // busca um ARL para alterar a data
          acompLimite = this.getAcompRefLimitesByFuncaoAcomp(acompReferencia, funcao);
          if(acompLimite != null){
              acompLimite.setDataLimiteArl(Data.parseDate(Pagina.getParamStr(request, "prazoFinalPara" + funcao.getCodTpfa().toString())));
             
          } else {
              // senao insere um novo ARL
              acompLimite = new AcompRefLimitesArl();
              acompLimite.setAcompReferenciaAref(acompReferencia);
              acompLimite.setTipoFuncAcompTpfa(funcao);
              acompLimite.setDataLimiteArl(Data.parseDate(Pagina.getParamStr(request, "prazoFinalPara" + funcao.getCodTpfa().toString())));
          }
          limites.add(acompLimite)
        }
       
      }
View Full Code Here

            /* 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;
View Full Code Here

     
        if(!"".equals(cor)){
            acompRelatorio.setCor((Cor)this.buscar(Cor.class, Long.valueOf(cor)));
        }
       
        TipoFuncAcompTpfa funcaoAcomp = (TipoFuncAcompTpfa) this.buscar(TipoFuncAcompTpfa.class, Long.valueOf(codTpfa));
        AcompReferenciaItemAri acompReferenciaItem = (AcompReferenciaItemAri) this.buscar(AcompReferenciaItemAri.class, Long.valueOf(codAri));
       
        if(!"".equals(situacaoSit)){
          SituacaoSit s = (SituacaoSit)this.buscar(SituacaoSit.class, Long.valueOf(situacaoSit));
            acompRelatorio.setSituacaoSit(s);
            if(funcaoAcomp.getIndAtualizaSituacaoCadastro().equals(Dominios.SIM)) {
              acompReferenciaItem.getItemEstruturaIett().setSituacaoSit(s);
              System.out.println("Mudar situa��o em Cadastro");
            }
        }       
       
View Full Code Here

        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

          AcompReferenciaItemAri acompReferenciaItemAlterar = acompReferenciaItemDao.getAcompReferenciaItemByItemEstruturaIett(aref, iett);
          Set arelsGravados = acompReferenciaItemAlterar.getAcompRelatorioArels();
         
          // obtem as fun��es de acompanhamento do item que emitem posi��o
          for (Iterator itFuac = itemEstUsutpfuacDao.getFuacEmitePosicaoOrderByFuncAcomp(iett).iterator(); itFuac.hasNext();) {
            TipoFuncAcompTpfa funcAcomp = ((ItemEstUsutpfuacIettutfa)itFuac.next()).getTipoFuncAcompTpfa();
           
            for (Iterator itTafc = aref.getTipoAcompanhamentoTa().getTipoAcompFuncAcompTafcs().iterator(); itTafc.hasNext();) {
              TipoAcompFuncAcompTafc tafc = (TipoAcompFuncAcompTafc) itTafc.next();
              if(tafc.getTipoFuncAcompTpfa().equals(funcAcomp)){
                boolean existeArelParaFuncao = false;
View Full Code Here

     * @param arel
     * @return boolean - se houve mudan�a retorna true.
     */
    public boolean verificaMudancaFuncaoAcomp(AcompRelatorioArel arel){
     
      TipoFuncAcompTpfa funcaoArel = arel.getTipoFuncAcompTpfa();
     
      Set listaFuncoesItem = arel.getAcompReferenciaItemAri().getItemEstruturaIett().getItemEstUsutpfuacIettutfas();
     
      List listaFuncoes = new ArrayList();
     
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

TOP

Related Classes of ecar.pojo.TipoFuncAcompTpfa

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.