Package ecar.pojo

Examples of ecar.pojo.LocalItemLit


       
        String linha ="";
       
        // Cria o localItem e o grupo do local a ser inserido
        // O grupo do local �: Munic�pio
        LocalItemLit localItem = new LocalItemLit();
        LocalGrupoLgp localGrupoLgp = new LocalGrupoLgp();
        localGrupoLgp.setCodLgp(new Long(8));// tem que ver qual o codigo para Municipio no banco presidencia
       
        // Pega as celulas da linha
        int numeroColunas = 4;
        Long codUF = null;
       
        // Para cada celula da linha pega o valor e cria:
        // 1 - o objeto referente a linha que dever� ser inserido na tabela tb_local_item_lit
        // 2 - o objeto referente a linha que dever� ser inserido na tabela tb_local_item_hierarquia_lith
        for(int j = 0; j < numeroColunas; j++) {
 
          cell = row.getCell(Short.parseShort(""+j));
 
          // S� pega a c�lula diferente de vazia
          if(cell != null && cell.getCellType() != HSSFCell.CELL_TYPE_BLANK) { 
 
            // S� pega a c�lula que n�o for mesclada
            if(!cell.getCellStyle().getWrapText()) {
              switch (j) {
               
                // Pega sigla uf
                case 0:
                  linha += "-" + cell.toString();
                  break;
 
                // Pega cod uf
                case 1:
                  Double db = new Double(cell.toString());
                  codUF = new Long(db.longValue());
                  linha += "-" + cell.toString();
                  break;
               
                // Pega cod municipio ibge
                case 2:
                  linha += "-" + cell.toString();
                  localItem.setCodIbgeLit(cell.toString());
                  break;
                 
                // Pega identificacao (nome) do municipio
                case 3:
                  if(cell.toString().endsWith("*")) {
                    linha += "-" + cell.toString().substring(0,cell.toString().indexOf('*')-1);
                    localItem.setIdentificacaoLit(cell.toString().substring(0,cell.toString().indexOf('*')));
                  } else {
                    linha += "-" + cell.toString();
                    localItem.setIdentificacaoLit(cell.toString());
                  }
                  break;
              }
            }
           
          }
        } // FIM: for das colunas da linha
       
        // Se existir localItem com identifica��o e c�digo IBGE coloca na cole��o de locais a ser salva
        if( localItem.getIdentificacaoLit() != null && !localItem.getIdentificacaoLit().equals("") &&
          localItem.getCodIbgeLit() != null && !localItem.getCodIbgeLit().equals("") ) {
         
          // Seta demais atributos
          localItem.setLocalGrupoLgp(localGrupoLgp); // grupo: munic�pio
          localItem.setIndAtivoLit(Dominios.ATIVO); // indAtivo: S
          localItem.setDataInclusaoLit(new Date()); // Data inclusao: data atual
         
          // Para cada UF, associa-se uma lista de municipios
          if(mapLocais.containsKey(codUF)) {
            listaLocais = mapLocais.get(codUF);
            listaLocais.add(localItem); // adiciona localItem a lista de municipios
View Full Code Here


     
      if ( !localList.isEmpty() ){
        responseHTML.append( "<table align=\"left\" width='100%' border='0' >");
        for (Iterator iter = localList.iterator(); iter.hasNext();) {
          responseHTML.append( "<tr>");
          LocalItemLit local = (LocalItemLit) iter.next();
          responseHTML.append("<td width='30%' align='left' height='25px' valign='top' >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
          responseHTML.append("<img src='../../images/icon_seta_ident.gif'/>&nbsp;")
          responseHTML.append( local.getIdentificacaoLit() +"</td>");

          for (Iterator iterator = listaExercicios.iterator(); iterator.hasNext();) {
            ExercicioExe exe = (ExercicioExe) iterator.next();

            ItemEstrtIndResulLocalIettirl item = dao.getQtdePrevistaByLocal( codIettir, exe.getCodExe(), local.getCodLit() );
           
            responseHTML.append( "<td width='14%' align=\"center\" >");
            responseHTML.append( "<input type=\"text\"  onblur=\"calcularTotalLocal('" );
            responseHTML.append( local.getCodLit().toString() );
            responseHTML.append"');calcularTotalExercicio('"+exe.getCodExe().toString()+"');\"    onmouseover=\"calcularTotalExercicio('"+exe.getCodExe().toString()+"');calcularTotalLocal('" +local.getCodLit().toString() + "');\" " );               
            responseHTML.append( " id=\"" );
            responseHTML.append( "cmp|" + local.getCodLit().toString() + "|" + exe.getCodExe().toString() );
            responseHTML.append( "\" name=\"" );
            responseHTML.append( "cmp|" + local.getCodLit().toString() + "|" + exe.getCodExe().toString() );
            responseHTML.append( "\" value=\"" + formatBrasil.format(item.getQtdPrevistaIettirl().doubleValue()) + "\"" );           
            responseHTML.append( "\" />" );

            responseHTML.append( "<label class=\"dica\" onmouseover=\"montaTooltipMouseOver(this,\'"+ exe.getCodExe().toString() "\',\'" + exe.getDescricaoExe() +"\',\'"+ local.getCodLit().toString() "\',\'" + local.getIdentificacaoLit() +"\');\"   onmouseout=\"montaTooltipMouseOut(\'"+ exe.getCodExe().toString() "\',\'" + local.getCodLit().toString() +"\');\"  >" );
            responseHTML.append( "<img src=\"" + request.getContextPath() + "/images/dica.png\" align=\"absmiddle\" border=\"0\" onclick=\"montaTooltipMouseClick(\'"+ exe.getCodExe().toString() "\',\'" + exe.getDescricaoExe() +"\',\'"+ local.getCodLit().toString() "\',\'" + local.getIdentificacaoLit() +"\');\" > " );
            responseHTML.append( "<span id=\"" + local.getCodLit().toString() + "|" + exe.getCodExe().toString() + "\" ></span></label>" );
            responseHTML.append( "</td>");         
       
          }
     
          responseHTML.append( "<td width='14%' align=\"center\" >");
          responseHTML.append( "<input type=\"text\" id=\"" );
          responseHTML.append( "cmp|" + local.getCodLit().toString() + "|total");
          responseHTML.append( "\" name=\"" );
          responseHTML.append( "cmp|" + local.getCodLit().toString() + "|total");
          responseHTML.append( "\" value=\"0,00\" />" );
          responseHTML.append( "</td>");
             
          responseHTML.append( "</tr>");
         
View Full Code Here

        for ( int i = 1; i <= numLocais; i++ )
        {
            if ( "S".equals( Pagina.getParamStr( request, "adicionaLocal" + i ) ) )
            {
                LocalItemLit local = new LocalItemLit(  );
                local =
                    (LocalItemLit) super.buscar( LocalItemLit.class,
                                                 Long.valueOf( Pagina.getParamStr( request, "codLit" + i ) ) );

                if ( entidade.getLocalEntidadeLents(  ) == null )
View Full Code Here

      Dao dao = new Dao();
      AcompRealFisicoDao arfDao = new AcompRealFisicoDao(null);
      Iterator it = listTempBean.iterator();
      while(it.hasNext()) {
        TempBean bean = (TempBean)it.next();
        LocalItemLit lit = (LocalItemLit)dao.buscar(LocalItemLit.class, bean.getCodLit());
        AcompRealFisicoArf arf = arfDao.buscarPorIettir(Long.valueOf(bean.getMes()), Long.valueOf(bean.getAno()), Long.valueOf("1186"));
       
        if(lit == null || arf == null) {
          throw new Exception("lit == null || arf == null");
        }
View Full Code Here

      Dao dao = new Dao();
      AcompRealFisicoDao arfDao = new AcompRealFisicoDao(null);
      Iterator it = listTempBean.iterator();
      while(it.hasNext()) {
        TempBean bean = (TempBean)it.next();
        LocalItemLit lit = (LocalItemLit)dao.buscar(LocalItemLit.class, bean.getCodLit());
        AcompRealFisicoArf arf = arfDao.buscarPorIettir(Long.valueOf(bean.getMes()), Long.valueOf(bean.getAno()), Long.valueOf("1187"));
       
        if(lit == null || arf == null) {
          throw new Exception("lit == null || arf == null");
        }
View Full Code Here

      Dao dao = new Dao();
      AcompRealFisicoDao arfDao = new AcompRealFisicoDao(null);
      Iterator it = listTempBean.iterator();
      while(it.hasNext()) {
        TempBean bean = (TempBean)it.next();
        LocalItemLit lit = (LocalItemLit)dao.buscar(LocalItemLit.class, bean.getCodLit());
        AcompRealFisicoArf arf = arfDao.buscarPorIettir(Long.valueOf(bean.getMes()), Long.valueOf(bean.getAno()), Long.valueOf("1186"));
       
        if(lit == null || arf == null) {
          throw new Exception("lit == null || arf == null");
        }
View Full Code Here

      Dao dao = new Dao();
      AcompRealFisicoDao arfDao = new AcompRealFisicoDao(null);
      Iterator it = listTempBean.iterator();
      while(it.hasNext()) {
        TempBean bean = (TempBean)it.next();
        LocalItemLit lit = (LocalItemLit)dao.buscar(LocalItemLit.class, bean.getCodLit());
        AcompRealFisicoArf arf = arfDao.buscarPorIettir(Long.valueOf(bean.getMes()), Long.valueOf(bean.getAno()), Long.valueOf("1186"));
       
        if(lit == null || arf == null) {
          throw new Exception("lit == null || arf == null");
        }
View Full Code Here

      Dao dao = new Dao();
      AcompRealFisicoDao arfDao = new AcompRealFisicoDao(null);
      Iterator it = listTempBean.iterator();
      while(it.hasNext()) {
        TempBean bean = (TempBean)it.next();
        LocalItemLit lit = (LocalItemLit)dao.buscar(LocalItemLit.class, bean.getCodLit());
        AcompRealFisicoArf arf = arfDao.buscarPorIettir(Long.valueOf(bean.getMes()), Long.valueOf(bean.getAno()), Long.valueOf("1189"));
       
        if(lit == null || arf == null) {
          throw new Exception("lit == null || arf == null");
        }
View Full Code Here

      Dao dao = new Dao();
      AcompRealFisicoDao arfDao = new AcompRealFisicoDao(null);
      Iterator it = listTempBean.iterator();
      while(it.hasNext()) {
        TempBean bean = (TempBean)it.next();
        LocalItemLit lit = (LocalItemLit)dao.buscar(LocalItemLit.class, bean.getCodLit());
        AcompRealFisicoArf arf = arfDao.buscarPorIettir(Long.valueOf(bean.getMes()), Long.valueOf(bean.getAno()), Long.valueOf("1187"));
       
        if(lit == null || arf == null) {
          throw new Exception("lit == null || arf == null");
        }
View Full Code Here

      Dao dao = new Dao();
      AcompRealFisicoDao arfDao = new AcompRealFisicoDao(null);
      Iterator it = listTempBean.iterator();
      while(it.hasNext()) {
        TempBean bean = (TempBean)it.next();
        LocalItemLit lit = (LocalItemLit)dao.buscar(LocalItemLit.class, bean.getCodLit());
        AcompRealFisicoArf arf = arfDao.buscarPorIettir(Long.valueOf(bean.getMes()), Long.valueOf(bean.getAno()), Long.valueOf("1187"));
       
        if(lit == null || arf == null) {
          throw new Exception("lit == null || arf == null");
        }
View Full Code Here

TOP

Related Classes of ecar.pojo.LocalItemLit

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.