Examples of FuncaoAreaAreBean


Examples of ecar.servlet.relatorio.PPA_funcao.bean.FuncaoAreaAreBean

        ItemEstruturaIett itemAcao = (ItemEstruturaIett) iter.next();
       
        AreaAre areaAre = itemAcao.getAreaAre();
        SubAreaSare subAreaSare = itemAcao.getSubAreaSare();
       
        FuncaoAreaAreBean tmpAreBean = new FuncaoAreaAreBean();
        tmpAreBean.setAreaAre( areaAre );
        tmpAreBean.setCodigoIdentAre( areaAre.getCodigoIdentAre() );
        tmpAreBean.setNomeAre( areaAre.getNomeAre() );
       
        FuncaoSubAreaSareBean tmpSareBean = new FuncaoSubAreaSareBean();
        tmpSareBean.setSubAreaSare(subAreaSare);         
        tmpSareBean.setCodigoIdentSare( subAreaSare.getCodigoIdentSare() );
        tmpSareBean.setNomeSare( subAreaSare.getNomeSare() );
       
        TreeSet<FuncaoSubAreaSareBean> tmpSubAreaSet = new TreeSet<FuncaoSubAreaSareBean>( new FuncaoComparatorSubAreaSare() );
        tmpSubAreaSet.add(tmpSareBean);         
        tmpAreBean.setSubAreaList( tmpSubAreaSet );
       
        ArrayList<Long> codIettList = new ArrayList<Long>();
        codIettList.add( itemAcao.getCodIett() );
        tmpAreBean.setCodIettList( codIettList );
       
        BigDecimal[] totais = getPrevisao(itemAcao);
       
        tmpAreBean.setValor1( totais[0]==null?ZERO:totais[0] );
        tmpAreBean.setValor2( totais[1]==null?ZERO:totais[1] );
        tmpAreBean.setValor3( totais[2]==null?ZERO:totais[2] );
        tmpAreBean.setValor4( totais[3]==null?ZERO:totais[3] );
        BigDecimal total = new BigDecimal(0D);
        total = total.add( tmpAreBean.getValor1() );
        total = total.add( tmpAreBean.getValor2() );
        total = total.add( tmpAreBean.getValor3() );
        total = total.add( tmpAreBean.getValor4() );         
        tmpAreBean.setTotal( total );
       
        tmpSareBean.setValor1( totais[0]==null?ZERO:totais[0] );
        tmpSareBean.setValor2( totais[1]==null?ZERO:totais[1] );
        tmpSareBean.setValor3( totais[2]==null?ZERO:totais[2] );
        tmpSareBean.setValor4( totais[3]==null?ZERO:totais[3] );
        BigDecimal totalSare = new BigDecimal(0D);
        totalSare = totalSare.add( tmpSareBean.getValor1() );
        totalSare = totalSare.add( tmpSareBean.getValor2() );
        totalSare = totalSare.add( tmpSareBean.getValor3() );
        totalSare = totalSare.add( tmpSareBean.getValor4() );         
        tmpSareBean.setTotal( totalSare );
       
        boolean jaExisteAre = colecao.contains( tmpAreBean );
        if ( jaExisteAre ){
          for (Iterator iterator = colecao.iterator(); iterator
              .hasNext();) {
            FuncaoAreaAreBean itemAreaAre = (FuncaoAreaAreBean) iterator.next();
           
            if tmpAreBean.equals( itemAreaAre ) ){
              itemAreaAre.setValor1itemAreaAre.getValor1().addtmpAreBean.getValor1() ) );
              itemAreaAre.setValor2itemAreaAre.getValor2().addtmpAreBean.getValor2() ) );
              itemAreaAre.setValor3itemAreaAre.getValor3().addtmpAreBean.getValor3() ) );
              itemAreaAre.setValor4itemAreaAre.getValor4().addtmpAreBean.getValor4() ) );
              itemAreaAre.setTotalitemAreaAre.getTotal().addtmpAreBean.getTotal() ) );
             
              TreeSet<FuncaoSubAreaSareBean> itemSubAreaSet = itemAreaAre.getSubAreaList();
              boolean naoExisteSare = (!itemSubAreaSet.contains( tmpSareBean ));
              if(naoExisteSare){
                itemSubAreaSet.add( tmpSareBean );
              }
             
              ArrayList<Long> itemCodIettList = itemAreaAre.getCodIettList();
              itemCodIettList.addAll( tmpAreBean.getCodIettList() );
             
            }
           
          }
View Full Code Here

Examples of ecar.servlet.relatorio.PPA_funcao.bean.FuncaoAreaAreBean

    BigDecimal localTotalGeral3 = new BigDecimal(0);
    BigDecimal localTotalGeral4 = new BigDecimal(0);
    BigDecimal localTotalGeral = new BigDecimal(0);   
   
    for (Iterator iter = dados.iterator(); iter.hasNext();) {
      FuncaoAreaAreBean tmp = (FuncaoAreaAreBean) iter.next();
     
      BigDecimal vlr1 = new BigDecimal(0);
      BigDecimal vlr2 = new BigDecimal(0);
      BigDecimal vlr3 = new BigDecimal(0);
      BigDecimal vlr4 = new BigDecimal(0);
      BigDecimal total = new BigDecimal(0);
     
      int cont = 0;
      for (Iterator iter2 = tmp.getSubAreaList().iterator(); iter2.hasNext();) {
        FuncaoSubAreaSareBean tmp2 = (FuncaoSubAreaSareBean) iter2.next();
       
        vlr1 = vlr1.add( tmp2.getValor1() );
        vlr2 = vlr2.add( tmp2.getValor2() );
        vlr3 = vlr3.add( tmp2.getValor3() );
        vlr4 = vlr4.add( tmp2.getValor4() );
        total = total.add( tmp2.getTotal() );
        tmp2.setIndice(new Integer(cont));
        cont++;
      }
     
      tmp.setValor1( vlr1 );
      tmp.setValor2( vlr2 );
      tmp.setValor3( vlr3 );
      tmp.setValor4( vlr4 );
      tmp.setTotal( total );     
     
      localTotalGeral1 = localTotalGeral1.add( vlr1 );
      localTotalGeral2 = localTotalGeral2.add( vlr2 );
      localTotalGeral3 = localTotalGeral3.add( vlr3 );
      localTotalGeral4 = localTotalGeral4.add( vlr4 );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.