Package ecar.bean

Examples of ecar.bean.IndResulExercicioBean


            Iterator itEstRev = metaRevisao.getItemEstFisicoRevIettfrs().iterator();
            while(itEstRev.hasNext()){
              ItemEstFisicoRevIettfr estRev = (ItemEstFisicoRevIettfr) itEstRev.next();
              if(exe.equals(estRev.getExercicioExe()) && "S".equals(estRev.getIndAtivoIettfr())){
                possuiExercicioNaRevisao = true;
                IndResulExercicioBean indResulExeBean = new IndResulExercicioBean();
                indResulExeBean.setCodExe(estRev.getExercicioExe().getCodExe());
                indResulExeBean.setValor(estRev.getQtdPrevistaIettfr());
               
                qtdesPrevistas.add(indResulExeBean);
                break;
              }
            }
          }
         
          if(!possuiExercicioNaRevisao){
            //Procura valor do exerc�cio nas metas f�sicas do item
            Iterator itEstItem = metaRevisao.getItemEstrtIndResulIettr().getItemEstrutFisicoIettfs().iterator();
            while(itEstItem.hasNext()){
              ItemEstrutFisicoIettf estItem = (ItemEstrutFisicoIettf) itEstItem.next();
              //Mantis 0010128 - Qtd prevista n�o � mais informado por exerc�cio
              /*
              if(exe.equals(estItem.getExercicioExe()) && "S".equals(estItem.getIndAtivoIettf())){
                IndResulExercicioBean indResulExeBean = new IndResulExercicioBean();
                indResulExeBean.setCodExe(estItem.getExercicioExe().getCodExe());
                indResulExeBean.setValor(estItem.getQtdPrevistaIettf());
               
                qtdesPrevistas.add(indResulExeBean);
                break;
              }
              */
            }
          }
         
        }//if validacao periodo exe
        } //if validacao exe
      } //while exe
     
      //Verificar na lista de totais as regras do indicador...
      String retorno = "0";
      String indAcumulavel = metaRevisao.getItemEstrtIndResulIettr().getIndAcumulavelIettr();
      String indValorFinal = metaRevisao.getItemEstrtIndResulIettr().getIndValorFinalIettr();
     
      /* =========== Verifica��o das regras de totaliza��o ============== */
        double total = 0;
       
        if ("S".equals(indAcumulavel)){
            Iterator it = qtdesPrevistas.iterator();
            while (it.hasNext()) {
              IndResulExercicioBean valor = (IndResulExercicioBean) it.next();
               total += valor.getValor().doubleValue();
            }
            retorno = Util.formataNumeroSemDecimal(total);
        }else{
         
          /*
           * Anota��o ref. Mantis 5016:
           * - Maior: obter o maior valor de ItemEstrutFisicoIettf
           * - �ltimo: obter valor do �ltimo exerc�cio informado de ItemEstrutFisicoIettf
           * - N�o se aplica: soma total ItemEstrutFisicoIettf
           */
         
          if("M".equals(indValorFinal)){ //Maior
                 Iterator it = qtdesPrevistas.iterator();
              double maior = 0;
              while (it.hasNext()) {
                IndResulExercicioBean valor = (IndResulExercicioBean) it.next();
                if(valor.getValor().doubleValue() > maior){
                  maior = valor.getValor().doubleValue();
                }
                total = maior;
              }
              retorno = Util.formataNumeroSemDecimal(total);
          }
          else if("U".equals(indValorFinal)){ //Ultimo
              double ultimo = 0;
            ExercicioExe ultimoExe = indResulDao.getMaiorExercicioIndicador(metaRevisao.getItemEstrtIndResulIettr());
           
                 Iterator it = qtdesPrevistas.iterator();
              while (it.hasNext()) {
                IndResulExercicioBean valor = (IndResulExercicioBean) it.next();
                if(valor.getCodExe().equals(ultimoExe.getCodExe())){
                  ultimo = valor.getValor().doubleValue();
                  break;
                }
              }
              retorno = Util.formataNumeroSemDecimal(ultimo);
          }
View Full Code Here

TOP

Related Classes of ecar.bean.IndResulExercicioBean

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.