Package ecar.pojo

Examples of ecar.pojo.ConfigMailCfgm


      s.append("          <td valign=\"middle\" class=\"form_label\" align=\"center\">&nbsp;</td>");
      s.append("        </tr>");
      s.append("        -->");
     
      PontocriticoCorPtccor ptcCor = null;
      ConfigMailCfgm configMailVencto = (ConfigMailCfgm) new ConfigMailCfgmDAO(request).buscar(ConfigMailCfgm.class, Dominios.CFG_MAIL_VENCIMENTO_LIMITE_PONTO_CRITICO);
      List setCores = new CorDao(request).listar(Cor.class, new String[]{"ordemCor","asc"});
      Cor cor = null;
      PontocriticoCorPtccorPK id = null;
      Iterator itCores = null;
      if (setCores != null)
        itCores = setCores.iterator();
     
      String imagePath = "";
      CorDao cDao = new CorDao(request);
     
      while (itCores.hasNext())
      {
        cor = (Cor) itCores.next();      
        id = new PontocriticoCorPtccorPK(pontoCritico.getCodPtc(), cor.getCodCor());
        ptcCor = (PontocriticoCorPtccor)new PontocriticoCorPtccorDAO(request).buscar(cor, pontoCritico);
       
        if(cor.getIndPontoCriticoCor().equals("S")){
          s.append("<tr>");
          s.append("<td valign=\"middle\"  class=\"form_label\" align=\"center\">");
          // Por Rog�rio (06/03/2007)
          // Modificada a forma de obten��o da imagem.
          // Referente ao Mantis #7442
          imagePath = cDao.getImagemPersonalizada(cor, null, null);
          if( imagePath != null ) {
            /* -- As tags do CSS "max-width" e "max-height" n�o funcionam no IE6 ou menor -- */
            s.append("<!--<img border=\"0\" src=\""+request.getContextPath()+"/DownloadFile?tipo=open&RemoteFile="+imagePath+"\" style=\"width: 23px; height: 23px;\" title=\""+cor.getSignificadoCor()+"\"> -->");
              s.append("<img border=\"0\" src=\""+request.getContextPath()+"/DownloadFile?tipo=open&RemoteFile="+imagePath+"\" title=\""+cor.getSignificadoCor()+"\">");
          } else {
            if( cor.getCodCor() != null ) {
              s.append("<img src=\"../../images/pc"+cor.getNomeCor()+"1.png\" title=\""+cor.getSignificadoCor()+"\">");
            }
          }
          s.append("</td>");
          s.append("<td valign=\"middle\" class=\"form_label\" align=\"center\">");
          String idInputCont = "";
          if(idInput != null && !idInput.equals(""))
            idInputCont = idInput + "i";
          s.append("  <input type=\"text\" name=\"ant_"+idInputCont+cor.getCodCor()+"\" id=\"ant_"+idInputCont+cor.getCodCor()+"\" value=\""+Pagina.trocaNull(ptcCor.getAntecedenciaPrimEmailPtccor())+"\" size=\"4\" "+disabled + " >");
          if ( !disabled.equals("disabled") && !disabledCampo.equals("disabled")) { 
            if(getIndice() != null && !getIndice().equals("")) {
              s.append("<img class=\"posicao\" title=\"Selecione a data\" src=\"../../images/icone_calendar.gif\" onclick=\"open_calendar('difDias', document.forms[1].ant_"+idInputCont+cor.getCodCor()+", document.forms[1].dataLimitePtc"+getIndice()+".value)\">");
            } else {
              s.append("<img class=\"posicao\" title=\"Selecione a data\" src=\"../../images/icone_calendar.gif\" onclick=\"open_calendar('difDias', document.forms[0].ant_"+cor.getCodCor()+", document.forms[0].dataLimitePtc.value)\">");             
            }
          }
          s.append("</td>");
          s.append("<td valign=\"middle\" class=\"form_label\" align=\"center\">");
          s.append("<input type=\"text\" name=\"freq_"+idInputCont+cor.getCodCor()+"\" id=\"freq_"+idInputCont+cor.getCodCor()+"\" value=\""+Pagina.trocaNull(ptcCor.getFrequenciaEnvioEmailPtccor())+"\" size=\"4\" " + disabled + ">");
          s.append("</td>");
          s.append("<td valign=\"middle\" class=\"form_label\" align=\"center\">");
          s.append("<input type=\"checkBox\" class=\"form_check_radio\" value=\"S\" name=\"ativo"+idInput+"["+cor.getCodCor()+"]\" id=\"ativo"+idInput+"["+cor.getCodCor()+"]\"");
//          if (!"N".equals(ptcCor.getIndAtivoEnvioEmailPtccor())) {
//            s.append(" checked");
//          }
          s.append(" " + disabled+">");
          s.append("</td>");
          s.append("</tr>");
        }     
      }
     
      s.append("<!--<tr>");
      s.append("  <td valign=\"middle\" class=\"form_label\" align=\"center\">");
      s.append("    <img src=\"../../images/pcChecked1.png\">");
      s.append("  </td>");
      s.append("  <td valign=\"middle\" class=\"form_label\" align=\"center\" colspan=\"2\">Conclu�do</td>");
      s.append("  <td valign=\"middle\" class=\"form_label\" align=\"center\">&nbsp;</td>");
      s.append("</tr>");
      s.append("<tr>");
      s.append("  <td valign=\"middle\" class=\"form_label\" align=\"center\">");
      s.append("    <img src=\"../../images/pcPretoFixo1.png\">");
      s.append("  </td>");
      s.append("  <td valign=\"middle\" class=\"form_label\" align=\"center\" colspan=\"2\">Limite Ultrapassado</td>");
      s.append("  <td valign=\"middle\" class=\"form_label\" align=\"center\">");
      s.append("    <input type=\"checkBox\" class=\"form_check_radio\" name=\"ativoPreto"+idInput+"\" id=\"ativoPreto"+idInput+"\" ");
      if ("S".equals(configMailVencto.getAtivoCfgm())) {
        s.append(" checked");
      }
      s.append("disabled >");         
      s.append("  </td>");
      s.append("</tr>")
View Full Code Here


    TextosSiteDao textoSiteDao = new TextosSiteDao(request);

    int indice = 0;

    while (itConfigMail.hasNext()) {
      ConfigMailCfgm configMail = (ConfigMailCfgm) itConfigMail.next();
      configMail.setAtivoCfgm(String.valueOf("N"));
      configMail.setIndEnvioObrigatorio(String.valueOf("N"));

      // teste para setar como ativo/ inativo
      if (listCfgMail != null) {
        for (int i = 0; i < listCfgMail.length; i++) {
          if (configMail.getCodCfgm().equals(
              Integer.valueOf(listCfgMail[i]))) {
            configMail.setAtivoCfgm(String.valueOf("S"));
          }
        }
      }

      // luana: incluindo o campo obrigatorio
      if (listCfgObrigatorio != null) {
        for (int i = 0; i < listCfgObrigatorio.length; i++) {
          if (configMail.getCodCfgm().equals(
              Integer.valueOf(listCfgObrigatorio[i]))) {
            configMail.setIndEnvioObrigatorio(String.valueOf("S"));
          }
        }
      }

      // teste para atribuir o texto e-mail
      if (listCboEmail != null) {
        if (!"0".equals(listCboEmail[indice])) {
          configMail.setTextosSiteMail((TextosSiteTxt) textoSiteDao
              .buscar(TextosSiteTxt.class, Long
                  .valueOf(listCboEmail[indice])));
        } else {
          configMail.setTextosSiteMail(null);
        }
      }

      // teste para atribuir o texto sms
      if (listCboSMS != null) {
        if (!"0".equals(listCboSMS[indice])) {
          configMail.setTextosSiteSms((TextosSiteTxt) textoSiteDao
              .buscar(TextosSiteTxt.class, Long
                  .valueOf(listCboSMS[indice])));
        } else {
          configMail.setTextosSiteSms(null);
        }
      }

      indice++;
View Full Code Here

   
   
    List list = this.listar();
   
    for (Iterator it = list.iterator(); it.hasNext();) {
      ConfigMailCfgm configMailCfgm = (ConfigMailCfgm) it.next();
         
      if( !"S".equals(configMailCfgm.getAtivoCfgm()) )  {
        it.remove();
      }
    }
   
    return list;
View Full Code Here

      s.append("          <td valign=\"middle\" class=\"form_label\" align=\"center\">&nbsp;</td>");
      s.append("        </tr>");
      s.append("        -->");
     
      PontocriticoCorPtccor ptcCor = null;
      ConfigMailCfgm configMailVencto = (ConfigMailCfgm) new ConfigMailCfgmDAO(getRequest()).buscar(ConfigMailCfgm.class, Dominios.CFG_MAIL_VENCIMENTO_LIMITE_PONTO_CRITICO);
      List setCores = new CorDao(getRequest()).listar(Cor.class, new String[]{"ordemCor","asc"});
      Cor cor = null;
      PontocriticoCorPtccorPK id = null;
      Iterator itCores = null;
      if (setCores != null)
        itCores = setCores.iterator();
     
      String imagePath = "";
      CorDao cDao = new CorDao(getRequest());
     
      while (itCores.hasNext())
      {
        cor = (Cor) itCores.next();      
        id = new PontocriticoCorPtccorPK(getPontoCriticoPtc().getCodPtc(), cor.getCodCor());
        ptcCor = (PontocriticoCorPtccor)new PontocriticoCorPtccorDAO(getRequest()).buscar(cor, getPontoCriticoPtc());
       
        if(cor.getIndPontoCriticoCor().equals("S")){
          s.append("<tr>");
          s.append("<td valign=\"middle\"  class=\"form_label\" align=\"center\">");
          // Por Rog�rio (06/03/2007)
          // Modificada a forma de obten��o da imagem.
          // Referente ao Mantis #7442
          imagePath = cDao.getImagemPersonalizada(cor, null, null);
          if( imagePath != null ) {
           
               String hashNomeArquivo = null;
               UsuarioUsu usuarioImagem = null;
              
               String pathRaiz = new ecar.dao.ConfiguracaoDao(request).getConfiguracao().getRaizUpload();
               imagePath = imagePath.substring(pathRaiz.length());
           
               hashNomeArquivo = Util.calcularHashNomeArquivo(pathRaiz, imagePath);
            usuarioImagem = ((ecar.login.SegurancaECAR)request.getSession().getAttribute("seguranca")).getUsuario()
            Util.adicionarMapArquivosAtuaisUsuarios(usuarioImagem, hashNomeArquivo, pathRaiz, imagePath);
           
            /* -- As tags do CSS "max-width" e "max-height" n�o funcionam no IE6 ou menor -- */
              s.append("<img border=\"0\" src=\""+getRequest().getContextPath()+"/DownloadFile?tipo=open&RemoteFile="+hashNomeArquivo+"\" title=\""+cor.getSignificadoCor()+"\">");
          } else {
            if( cor.getCodCor() != null ) {
              s.append("<img src=\"../../images/pc"+cor.getNomeCor()+"1.png\" title=\""+cor.getSignificadoCor()+"\">");
            }
          }
          s.append("</td>");
          s.append("<td valign=\"middle\" class=\"form_label\" align=\"center\">");
         
          s.append("  <input type=\"text\" onkeypress=\"javascript:return(digitaNumero(this, event));\" maxlength=\"5\" name=\"ant_"+cor.getCodCor()+"\" id=\"ant_"+cor.getCodCor()+"\" value=\""+Pagina.trocaNull(ptcCor.getAntecedenciaPrimEmailPtccor())+"\" size=\"4\" "+ (getBloquearCampo() ? "disabled":"") + " >");
          if ( !getBloquearCampo()) { 
            //s.append("<img class=\"posicao\" title=\"Selecione a data\" src=\"../../images/icone_calendar.gif\" onclick=\"alert ('teste');open_calendar('difDias', document.forms[0].ant_"+cor.getCodCor()+", document.forms[0].dataLimitePtc.value)\">");             
            s.append("<img class=\"posicao\" title=\"Selecione a data\" src=\"../../images/icone_calendar.gif\" onclick=\"javascript:return(validarCampo('difDias',document.forms[0].ant_"+cor.getCodCor()+", document.forms[0].ativo_"+cor.getCodCor()+"));\">");
          }
          s.append("</td>");
          s.append("<td valign=\"middle\" class=\"form_label\" align=\"center\">");
          s.append("<input type=\"text\" onkeypress=\"javascript:return(digitaNumero(this, event));\" maxlength=\"5\" name=\"freq_"+cor.getCodCor()+"\" id=\"freq_"+cor.getCodCor()+"\" value=\""+Pagina.trocaNull(ptcCor.getFrequenciaEnvioEmailPtccor())+"\" size=\"4\" " + (getBloquearCampo() ? "disabled":"") + ">");
          s.append("</td>");
          s.append("<td valign=\"middle\" class=\"form_label\" align=\"center\">");
          s.append("<input type=\"checkBox\" class=\"form_check_radio\" value=\"S\" name=\"ativo_"+cor.getCodCor()+"\" id=\"ativo_"+cor.getCodCor()+"\"   onclick=\"validaPontoCritico("+cor.getCodCor()+");\"  ");

          if (!"N".equals(ptcCor.getIndAtivoEnvioEmailPtccor()) && getNovoPontoCritico() == false) {
            s.append(" checked");
          }

          s.append(" " + (getBloquearCampo() ? "disabled=\"true\"":"") + ">");
          s.append("</td>");
         
          s.append("</tr>");
        }     
      }
     
      s.append("<!--<tr>");
      s.append("  <td valign=\"middle\" class=\"form_label\" align=\"center\">");
      s.append("    <img src=\"../../images/pcChecked1.png\">");
      s.append("  </td>");
      s.append("  <td valign=\"middle\" class=\"form_label\" align=\"center\" colspan=\"2\">Conclu�do</td>");
      s.append("  <td valign=\"middle\" class=\"form_label\" align=\"center\">&nbsp;</td>");
      s.append("</tr>");
      s.append("<tr>");
      s.append("  <td valign=\"middle\" class=\"form_label\" align=\"center\">");
      s.append("    <img src=\"../../images/pcPretoFixo1.png\">");
      s.append("  </td>");
      s.append("  <td valign=\"middle\" class=\"form_label\" align=\"center\" colspan=\"2\">Limite Ultrapassado</td>");
      s.append("  <td valign=\"middle\" class=\"form_label\" align=\"center\">");
      s.append("    <input type=\"checkBox\" class=\"form_check_radio\" name=\"ativoPreto\" id=\"ativoPreto\" ");
      if ("S".equals(configMailVencto.getAtivoCfgm())) {
        s.append(" checked");
      }
      s.append("disabled >");         
      s.append("  </td>");
      s.append("</tr>")
View Full Code Here

      Iterator it = listConfigMailCfgm.iterator();
   
      String dataLimStr = null;
           
      while( it.hasNext() ) {
        ConfigMailCfgm configMailCfgm = (ConfigMailCfgm) it.next();
        Date dataCorr = Data.addDias(0, configuracao.getUltimoEnvioEmailCfg());
       
        if ((configuracao.getDiasAntecedenciaMailCfg().intValue() <= 0)
            || ("".equals(configuracao.getDiasAntecedenciaMailCfg().toString()))
            || (configuracao.getDiasAntecedenciaMailCfg() == null))
        {
          diasAnt = Long.valueOf("1");
        }
        else
        {
          diasAnt = configMailCfgm.getConfiguracaoCfg().getDiasAntecedenciaMailCfg();
        }
           
        Date data = Data.parseDateHour(Data.parseDateHour(Data.getDataAtual()).substring(0,10) + " 00:00:00:000");
       
        while (dataCorr.compareTo(data) < 0)
        {
          dataCorr = Data.addDias(1, dataCorr);
          Date dataLim = Data.addDias(diasAnt.intValue(), dataCorr);
          dataLimStr = Data.parseDate(dataLim);
         
          switch( configMailCfgm.getCodCfgm().intValue() ) {
            case 4: // vcto limite fisico         
              eMailVenctoLimiteFisico(dataLimStr, configMailCfgm, dataLim);
              break;
            case 5: // vcto limite parecer                   
              eMailVenctoParecer(dataLimStr, configMailCfgm, dataLim);
              break;
            case 6: // vcto limite ponto critico     
              eMailVenctoPontoCritico(dataCorr, configMailCfgm, dataLimStr);
              break;
            //case 27: // status indicador resultado  -> Falta defini��es    
              //eMailStatusIndicadorResultado(dataCorr, configMailCfgm);
            //  break; 
             
          } // fim switch
         
          /* -- Trata dos tipo de 7 a 13 -- */
          if( configMailCfgm.getCodCfgm().intValue() > 6 && configMailCfgm.getCodCfgm().intValue() < 14 ) {
            eMailDataItem(dataLimStr, configMailCfgm);
          }

        } // fim do while (dias)
      }
View Full Code Here

TOP

Related Classes of ecar.pojo.ConfigMailCfgm

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.