Examples of ProdutoBean


Examples of ecar.servlet.relatorio.PPA.bean.ProdutoBean

  // ordenar produto por descricao
  private TreeSet<ProdutoBean> reordenarProduto(ArrayList<ProdutoBean> colecao){
    TreeSet<ProdutoBean> novaColecao = new TreeSet<ProdutoBean>( new ProdutoBeanComparatorDescricao() );
    for (Iterator iter = colecao.iterator(); iter.hasNext();) {
      ProdutoBean prod = (ProdutoBean) iter.next();     
      novaColecao.add( prod );
    }   
    return novaColecao;
  }
View Full Code Here

Examples of ecar.servlet.relatorio.PPA.bean.ProdutoBean

 
  // linha corsim cor nao
  private TreeSet<ProdutoBean> contadorProduto(TreeSet<ProdutoBean> colecao){
    int cont = 0;
    for (Iterator iter = colecao.iterator(); iter.hasNext();) {
      ProdutoBean prod = (ProdutoBean) iter.next();
      prod.setIndice( new Integer(cont) );     
      cont++;
    }   
    return colecao;
  }
View Full Code Here

Examples of ecar.servlet.relatorio.PPA.bean.ProdutoBean

         * @return
         */
        public ArrayList<ProdutoBean> generateProdutoPPA(Set produtos){

    ArrayList<ProdutoBean> retorno = new ArrayList<ProdutoBean>();
    ProdutoBean bean = null;
    final ItemEstrtIndResultLocalIettirlDao indResultDao = new ItemEstrtIndResultLocalIettirlDao(request);
    final AcompRealFisicoDao acompDao = new AcompRealFisicoDao(request);
    indicadorMetaFisicaDao = new ItemEstrtIndResulIettrDao(request);

    // percorre produtos
    for (Iterator iter = produtos.iterator(); iter.hasNext();) {
      ItemEstruturaIettPPA prod = (ItemEstruturaIettPPA) iter.next();
     
      bean = new ProdutoBean();
     
      if( prod.getIndAtivoIett()!=null && "S".equalsIgnoreCase( prod.getIndAtivoIett() ) ){

/*        if (  "2380".equalsIgnoreCase(prod.getItemEstruturaIett().getSiglaIett()) ){
          logger.info(  "Produto: " + prod.getCodIett() );         
        }
*/
       
        // recebe indicadores do produto
        ArrayList<ItemEstrtIndResulIettr> indicadores = indicadorMetaFisicaDao.getIndicadoresMetaFisicaPPA( prod.getCodIett() );
       
        bean.setDescricao( prod.getNomeIett() );
       
        if ( indicadores !=null && (!indicadores.isEmpty()) ){
         
          // percorre indicadores
          for (Iterator iterator = indicadores.iterator(); iterator
              .hasNext();) {
            ItemEstrtIndResulIettr ind = (ItemEstrtIndResulIettr) iterator.next();
           
            if ( ind.getIndAtivoIettr()!=null &&  "S".equalsIgnoreCase(ind.getIndAtivoIettr())) {
             
              bean.setProduto( ind.getNomeIettir() );
              if ( ind.getIndAcumulavelIettr()!=null ){
                if ( "N".equalsIgnoreCase( ind.getIndAcumulavelIettr() ) ){
                 
                  List<Double> qtdePrevista = indResultDao.getListQtdePrevistaByLocal(ind.getCodIettir(),LOCAL_ITEM_CENTRO_EXPANDIDO);
                  Double qtdeCentroExpandido = acompDao.getSomaValoresArfs(ind,  qtdePrevista );
                  bean.setCentroExpandido( qtdeCentroExpandido );
                 
                  List<Double> qtdeLesteList = indResultDao.getListQtdePrevistaByLocal(ind.getCodIettir(),LOCAL_ITEM_LESTE);
                  Double qtdeLeste = acompDao.getSomaValoresArfs(ind,  qtdeLesteList );
                  bean.setLeste( qtdeLeste );
                 
                  List<Double> qtdeNorteList = indResultDao.getListQtdePrevistaByLocal(ind.getCodIettir(),LOCAL_ITEM_NORTE);
                  Double qtdeNorte = acompDao.getSomaValoresArfs(ind,  qtdeNorteList );
                  bean.setNorte( qtdeNorte );
 
                  List<Double> qtdeNoroesteList = indResultDao.getListQtdePrevistaByLocal(ind.getCodIettir(),LOCAL_ITEM_NOROESTE);
                  Double qtdeNoroeste = acompDao.getSomaValoresArfs(ind,  qtdeNoroesteList );
                  bean.setNoroeste( qtdeNoroeste );
 
                  List<Double> setOesteList = indResultDao.getListQtdePrevistaByLocal(ind.getCodIettir(),LOCAL_ITEM_OESTE);
                  Double qtdeOeste = acompDao.getSomaValoresArfs(ind,  setOesteList );
                  bean.setOeste( qtdeOeste );               
                 
                  List<Double> setSudoesteList = indResultDao.getListQtdePrevistaByLocal(ind.getCodIettir(),LOCAL_ITEM_SUDOESTE);
                  Double qtdeSudoeste = acompDao.getSomaValoresArfs(ind,  setSudoesteList );
                  bean.setSudoeste( qtdeSudoeste );                 
 
                  List<Double> qtdeEstadoList = indResultDao.getListQtdePrevistaByLocal(ind.getCodIettir(),LOCAL_ITEM_ESTADO);
                  Double qtdeEstado = acompDao.getSomaValoresArfs(ind,  qtdeEstadoList );
                  bean.setEstado( qtdeEstado );                 
                 
                  Double qtdeTotal = qtdeCentroExpandido + qtdeLeste + qtdeNorte + qtdeNoroeste + qtdeOeste + qtdeSudoeste + qtdeEstado;
                  bean.setTotal( qtdeTotal );               
                 
                }else {
                 
                  Double qtdeCentroExpandido = calcularPrevisaoService.calcularPrevisaoByLocal( ind.getCodIettir() , LOCAL_ITEM_CENTRO_EXPANDIDO );
                  bean.setCentroExpandido( qtdeCentroExpandido );
   
                  Double qtdeLeste = calcularPrevisaoService.calcularPrevisaoByLocal( ind.getCodIettir() , LOCAL_ITEM_LESTE );
                  bean.setLeste( qtdeLeste );
                 
                  Double qtdeNorte = calcularPrevisaoService.calcularPrevisaoByLocal( ind.getCodIettir() , LOCAL_ITEM_NORTE );
                  bean.setNorte( qtdeNorte );
                 
                  Double qtdeNoroeste = calcularPrevisaoService.calcularPrevisaoByLocal( ind.getCodIettir() , LOCAL_ITEM_NOROESTE );
                  bean.setNoroeste( qtdeNoroeste );
                 
                  Double qtdeOeste = calcularPrevisaoService.calcularPrevisaoByLocal( ind.getCodIettir() , LOCAL_ITEM_OESTE );
                  bean.setOeste( qtdeOeste );
   
                  Double qtdeSudoeste = calcularPrevisaoService.calcularPrevisaoByLocal( ind.getCodIettir() , LOCAL_ITEM_SUDOESTE );
                  bean.setSudoeste( qtdeSudoeste );
   
                  Double qtdeEstado = calcularPrevisaoService.calcularPrevisaoByLocal( ind.getCodIettir() , LOCAL_ITEM_ESTADO );
                  bean.setEstado( qtdeEstado );
   
                  Double qtdeTotal = qtdeCentroExpandido + qtdeLeste + qtdeNorte + qtdeNoroeste + qtdeOeste + qtdeSudoeste + qtdeEstado;
                  bean.setTotal( qtdeTotal );
                                 
                }
              }else{

              }
             
              bean.setUnidMedidaind.getUnidMedidaIettr() );
                               
            } // indicador ativo
           
          } // percorre indicadores
         
        }else{           // if indicadores != null
          bean.setProduto( "" );
          bean.setUnidMedida"" );
          bean.setTotal(0D);
          bean.setEstado(0D);
          bean.setLeste(0D);
          bean.setOeste(0D);
          bean.setSudoeste(0D);
          bean.setNoroeste(0D);
          bean.setLeste(0D);
          bean.setCentroExpandido(0D);

        }

        retorno.add(bean);       
       
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.