Commit d0d2c44760777ec8cd2a2b4bc79a9cf901b7e751
1 parent
24f39a27
Exists in
pesquisa_SEI_3.1.0
Versão 3.1.0
- Incluído integração com o módulo de Peticionamento Eletrônico (Anatel). - Implementado a possibilidade de pesquisa em documentos restritos "parametrizável" (CADE) - Implementado a exibição de Publicaões mesmo em documentos restritos - Implementado parametrizações para a pesquisa em protocolos restritos: Interessado/Remetente, Unidade Geradora, Tipo do Processo, Tipo do Documento
Showing
11 changed files
with
550 additions
and
229 deletions
Show diff stats
sei/scripts/sei_instalar_modulo_pesquisa.php
... | ... | @@ -1,23 +0,0 @@ |
1 | -<? | |
2 | - | |
3 | - try { | |
4 | - | |
5 | - require_once dirname(__FILE__).'/../web/SEI.php'; | |
6 | - | |
7 | - session_start(); | |
8 | - | |
9 | - SessaoSEI::getInstance(false); | |
10 | - | |
11 | - $objInstaladorModuloPesquisaPublica = new MdPesqInstaladorModuloPesquisaPublicaRN(); | |
12 | - $objInstaladorModuloPesquisaPublica->AtualizarVersao(); | |
13 | - | |
14 | - exit; | |
15 | - | |
16 | - } catch (Exception $e) { | |
17 | - | |
18 | - echo(InfraException::inspecionar($e)); | |
19 | - try{LogSEI::getInstance()->gravar(InfraException::inspecionar($e)); }catch (Exception $e){} | |
20 | - } | |
21 | - | |
22 | - | |
23 | -?> |
sei/web/modulos/pesquisa/MdPesqBuscaProtocoloExterno.php
... | ... | @@ -35,9 +35,15 @@ require_once ("MdPesqCriptografia.php"); |
35 | 35 | |
36 | 36 | class MdPesqBuscaProtocoloExterno { |
37 | 37 | |
38 | - public static function executar($q, $strDescricaoPesquisa, $strObservacaoPesquisa, $inicio, $numMaxResultados, $strParticipanteSolr, $md5Captcha = null) { | |
38 | + public static function executar($q, $strDescricaoPesquisa, $strObservacaoPesquisa, $inicio, $numMaxResultados, $strParticipanteSolr, $sha1Captcha = null) { | |
39 | + | |
40 | + $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); | |
41 | + $idSerieEmail = $objInfraParametro->getValor('ID_SERIE_EMAIL'); | |
42 | + | |
43 | + | |
39 | 44 | |
40 | 45 | //carrega configurações pesquisa |
46 | + | |
41 | 47 | $objParametroPesquisaDTO = new MdPesqParametroPesquisaDTO(); |
42 | 48 | $objParametroPesquisaDTO->retStrNome(); |
43 | 49 | $objParametroPesquisaDTO->retStrValor(); |
... | ... | @@ -52,13 +58,11 @@ class MdPesqBuscaProtocoloExterno { |
52 | 58 | $bolLinkMetadadosProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_METADADOS_PROCESSO_RESTRITO] == 'S' ? true : false; |
53 | 59 | $txtDescricaoProcedimentoAcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DESCRICAO_PROCEDIMENTO_ACESSO_RESTRITO]; |
54 | 60 | $bolAutocompletarInterressado = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_AUTO_COMPLETAR_INTERESSADO] == 'S' ? true : false; |
55 | - | |
61 | + $bolPesquisaDocumentoProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DOCUMENTO_RESTRITO] == 'S' ? true : false; | |
56 | 62 | $parametros = new stdClass(); |
57 | 63 | $filtro = new stdClass(); |
58 | - $partialfields = ''; | |
59 | 64 | |
60 | - // Parametros peticionamento elerônico | |
61 | - $objInfraParametroDTO = $objParametroPesquisaRN->consultarVersaoPeticionamento(); | |
65 | + $partialfields = ''; | |
62 | 66 | |
63 | 67 | //die($_REQUEST["partialfields"]); |
64 | 68 | |
... | ... | @@ -86,9 +90,12 @@ class MdPesqBuscaProtocoloExterno { |
86 | 90 | $grupo = array(); |
87 | 91 | |
88 | 92 | // PESQUISAR EM: PROCESSOS |
93 | + | |
94 | + $bolPesquisaAtributosRestritos = MdPesqPesquisaUtil::verificaPesquisaAtributosRestritos($partialfields,$arrParametroPesquisaDTO,$q); | |
95 | + | |
89 | 96 | if (in_array("P", $checkbox)) { |
90 | 97 | |
91 | - if($bolPesquisaProcessoRestrito){ | |
98 | + if($bolPesquisaProcessoRestrito && $bolPesquisaAtributosRestritos){ | |
92 | 99 | array_push($grupo, "(sta_prot:P)"); |
93 | 100 | }else{ |
94 | 101 | array_push($grupo, "(sta_prot:P AND tipo_aces:P)"); |
... | ... | @@ -100,20 +107,33 @@ class MdPesqBuscaProtocoloExterno { |
100 | 107 | |
101 | 108 | if($bolPesquisaDocumentoProcessoPublico){ |
102 | 109 | |
103 | - if (in_array("R", $checkbox)) { | |
104 | - | |
105 | - array_push($grupo, "(sta_prot:R AND tipo_aces:P)"); | |
106 | 110 | |
111 | + if (in_array("R", $checkbox)) { | |
112 | + | |
113 | + if($bolPesquisaProcessoRestrito && $bolPesquisaAtributosRestritos && $bolPesquisaDocumentoProcessoRestrito){ | |
114 | + array_push($grupo, "(sta_prot:R)"); | |
115 | + }else{ | |
116 | + array_push($grupo, "(sta_prot:R AND tipo_aces:P)"); | |
117 | + } | |
107 | 118 | |
108 | 119 | } |
109 | 120 | |
110 | 121 | // PESQUISAR EM: DOCUMENTOS GERADOS |
111 | 122 | $filtroDocumentoInternoAssinado = ''; |
112 | 123 | if (in_array("G", $checkbox)) { |
113 | - | |
114 | - array_push($grupo, "(sta_prot:G AND tipo_aces:P)"); | |
115 | - | |
116 | - | |
124 | + | |
125 | + if($bolPesquisaProcessoRestrito && $bolPesquisaAtributosRestritos && $bolPesquisaDocumentoProcessoRestrito){ | |
126 | + //Necessario porque documentos da serie e-mail não possui assinatura | |
127 | + if($idSerieEmail > 0){ | |
128 | + array_push($grupo, "(sta_prot:G AND -id_assin:NULL) OR (sta_prot:G AND id_serie:".$idSerieEmail.")"); | |
129 | + }else{ | |
130 | + array_push($grupo, "(sta_prot:G AND -id_assin:NULL)"); | |
131 | + } | |
132 | + | |
133 | + }else{ | |
134 | + array_push($grupo, "(sta_prot:G AND tipo_aces:P)"); | |
135 | + } | |
136 | + | |
117 | 137 | } |
118 | 138 | } |
119 | 139 | |
... | ... | @@ -122,11 +142,8 @@ class MdPesqBuscaProtocoloExterno { |
122 | 142 | if (count($grupo)>0){ |
123 | 143 | //Alteração para consulta externa sem login |
124 | 144 | $staProtocolo = '('.implode(" OR ", $grupo).')'; |
125 | - //$staProtocolo = '('.implode(" OR ", $grupo).') AND tipo_acesso:P'; | |
126 | - | |
127 | - | |
128 | - | |
129 | - | |
145 | + | |
146 | + | |
130 | 147 | if (preg_match("/sta_prot:([A-Z;]+)/i", $partialfields)){ |
131 | 148 | $partialfields = preg_replace("/sta_prot:[A-Z;]+/i", $staProtocolo, $partialfields); |
132 | 149 | }else{ |
... | ... | @@ -311,7 +328,10 @@ class MdPesqBuscaProtocoloExterno { |
311 | 328 | $objProtocoloDTO->setDblIdProtocolo($idProtocolo); |
312 | 329 | $objProtocoloDTO->retDblIdProtocolo(); |
313 | 330 | $objProtocoloDTO->retStrStaProtocolo(); |
331 | + $objProtocoloDTO->retDblIdProtocoloAgrupador(); | |
314 | 332 | $objProtocoloDTO->retStrStaNivelAcessoGlobal(); |
333 | + $objProtocoloDTO->retStrStaNivelAcessoLocal(); | |
334 | + $objProtocoloDTO->retStrStaEstado(); | |
315 | 335 | $objProtocoloDTO->retStrProtocoloFormatado(); |
316 | 336 | $objProtocoloDTO->retNumIdHipoteseLegal(); |
317 | 337 | $objProtocoloDTO = $objProtocoloRN->consultarRN0186($objProtocoloDTO); |
... | ... | @@ -325,6 +345,7 @@ class MdPesqBuscaProtocoloExterno { |
325 | 345 | $objDocumentoDTO->retNumIdSerie(); |
326 | 346 | $objDocumentoDTO->retStrNomeSerie(); |
327 | 347 | $objDocumentoDTO->retStrNumero(); |
348 | + $objDocumentoDTO->retObjPublicacaoDTO(); | |
328 | 349 | $objDocumentoDTO = $objDocumentoRN->consultarRN0005($objDocumentoDTO); |
329 | 350 | $idProcedimento = $objDocumentoDTO->getDblIdProcedimento(); |
330 | 351 | |
... | ... | @@ -418,34 +439,22 @@ class MdPesqBuscaProtocoloExterno { |
418 | 439 | |
419 | 440 | if (empty($dados["protocolo_documento_formatado"]) == false) { |
420 | 441 | if($objDocumentoDTO == null){ |
421 | - print_r($idProtocolo); | |
422 | - echo ' '; | |
423 | 442 | print_r($dados["protocolo_documento_formatado"]); |
424 | 443 | die; |
425 | 444 | } |
426 | 445 | |
427 | - // Protege Intimação eletônica | |
428 | - $objMdPetIntCertidaoRN = new MdPetIntCertidaoRN(); | |
429 | - if($objInfraParametroDTO != null && $objInfraParametroDTO->getStrValor() >= '2.0.0' && $objMdPetIntCertidaoRN->verificaDocumentoEAnexoIntimacaoNaoCumprida(array($objProtocoloDTO->getDblIdProtocolo())) == false){ | |
430 | - $titulo .= " "; | |
431 | - $titulo .= $dados["identificacao_protocolo"]; | |
432 | - $snippet = 'Documento com acesso restrito provisoriamente em razão de Intimação Eletrônica ainda não cumprida'; | |
433 | - | |
434 | - | |
435 | - }else{ | |
436 | - $titulo .= " "; | |
437 | - $parametrosCriptografadosDocumentos = MdPesqCriptografia::criptografa('acao_externa=md_pesq_documento_exibir&id_orgao_acesso_externo=0&id_documento='.$objDocumentoDTO->getDblIdDocumento()); | |
438 | - $endereco = 'md_pesq_documento_consulta_externa.php?'.$parametrosCriptografadosDocumentos; | |
439 | - $titulo .= "(<a target=\"_blank\" href=\"" . PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink($endereco)) . "\""; | |
440 | - $titulo .= " class=\"protocoloNormal\""; | |
441 | - $titulo .= ">" . $dados["identificacao_protocolo"] . "</a>)"; | |
442 | - } | |
443 | - | |
446 | + $titulo .= " "; | |
447 | + $parametrosCriptografadosDocumentos = MdPesqCriptografia::criptografa('acao_externa=md_pesq_documento_exibir&id_orgao_acesso_externo=0&id_documento='.$objDocumentoDTO->getDblIdDocumento()); | |
448 | + $endereco = 'md_pesq_documento_consulta_externa.php?'.$parametrosCriptografadosDocumentos; | |
449 | + $titulo .= "(<a target=\"_blank\" href=\"" . PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink($endereco)) . "\""; | |
450 | + $titulo .= " class=\"protocoloNormal\""; | |
451 | + $titulo .= ">" . $dados["identificacao_protocolo"] . "</a>)"; | |
452 | + | |
453 | + //$tituloProtocolo = "<a target=\"_blank\" href=\"" . PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink($endereco)) . "\" class=\"protocoloNormal\" >".$dados["protocolo_documento_formatado"]. "</a>"; | |
444 | 454 | |
445 | 455 | } |
446 | 456 | |
447 | - | |
448 | - | |
457 | + | |
449 | 458 | |
450 | 459 | $tituloCompleto = "<a href=\"" . PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink(MdPesqSolrUtilExterno::prepararUrl($arvore))) . "\" target=\"_blank\" class=\"arvore\">"; |
451 | 460 | $tituloCompleto .= "<img border=\"0\" src=\"solr/img/arvore.png\" alt=\"\" title=\"Visualizar árvore\" width=\"14\" height=\"16\" class=\"arvore\" />"; |
... | ... | @@ -456,53 +465,100 @@ class MdPesqBuscaProtocoloExterno { |
456 | 465 | // REMOVE TAGS DO TÍTULO |
457 | 466 | $tituloCompleto = preg_replace("/<.*?>/", "", $tituloCompleto); |
458 | 467 | |
459 | - | |
460 | - | |
461 | - | |
462 | - if($objProtocoloDTO->getStrStaNivelAcessoGlobal() != ProtocoloRN::$NA_PUBLICO && $bolPesquisaProcessoRestrito){ | |
463 | - | |
464 | - if(!$bolLinkMetadadosProcessoRestrito || $objProtocoloDTO->getStrStaProtocolo() != ProtocoloRN::$TP_PROCEDIMENTO){ | |
465 | - $tituloCompleto = $objProtocoloDTO->getStrProtocoloFormatado(); | |
466 | - $titulo = $objProtocoloDTO->getStrProtocoloFormatado(); | |
467 | - $tituloProtocolo = $objProtocoloDTO->getStrProtocoloFormatado(); | |
468 | - //$tituloProtocolo = 'N° SEI (Documento/Processo)'; | |
469 | - | |
470 | - $objHipoteseLegalDTO = new HipoteseLegalDTO(); | |
471 | - $objHipoteseLegalDTO->retTodos(false); | |
472 | - $objHipoteseLegalDTO->setNumIdHipoteseLegal($objProtocoloDTO->getNumIdHipoteseLegal()); | |
473 | - | |
474 | - $objHipoteseLegalRN = new HipoteseLegalRN(); | |
475 | - $objHipoteseLegalDTO = $objHipoteseLegalRN->consultar($objHipoteseLegalDTO); | |
476 | - | |
477 | - if($objHipoteseLegalDTO != null){ | |
478 | - $snippet = '<b>Hipótese Legal de Restrição de Acesso: '.$objHipoteseLegalDTO->getStrNome().' ('.$objHipoteseLegalDTO->getStrBaseLegal().')</b>'; | |
479 | - $txtDescricaoProcedimentoAcessoRestrito = trim($txtDescricaoProcedimentoAcessoRestrito); | |
480 | - if( !empty($txtDescricaoProcedimentoAcessoRestrito)){ | |
481 | - $snippet .= '<br/>'; | |
482 | - $snippet .= $txtDescricaoProcedimentoAcessoRestrito; | |
483 | - } | |
484 | - }else{ | |
485 | - if( !empty($txtDescricaoProcedimentoAcessoRestrito)){ | |
486 | - $snippet = $txtDescricaoProcedimentoAcessoRestrito; | |
487 | - }else{ | |
488 | - $snippet = 'Processo de Acesso Restrito'; | |
489 | - } | |
490 | - | |
491 | - } | |
492 | - | |
493 | - unset($arrMetatags['Usuário'] ); | |
494 | - unset($arrMetatags['Unidade Geradora']); | |
495 | - unset($arrMetatags['Data']); | |
496 | - } | |
497 | - | |
498 | - | |
499 | - | |
500 | - | |
501 | - } | |
502 | - | |
503 | - | |
504 | 468 | |
505 | 469 | |
470 | + // Regras de exibicao dos protocolos de acordo com parametrizacao | |
471 | + if ($objProtocoloDTO->getStrStaNivelAcessoGlobal () != ProtocoloRN::$NA_PUBLICO && $bolPesquisaProcessoRestrito) { | |
472 | + | |
473 | + $objProtocoloProcedimentoDTO = new ProtocoloDTO (); | |
474 | + $objProtocoloProcedimentoDTO->setDblIdProtocolo ( $idProcedimento ); | |
475 | + if ($objProtocoloDTO->getStrStaProtocolo () != ProtocoloRN::$TP_PROCEDIMENTO) { | |
476 | + $objProtocoloProcedimentoDTO->retStrStaNivelAcessoLocal (); | |
477 | + $objProtocoloProcedimentoDTO->retStrStaNivelAcessoGlobal (); | |
478 | + $objProtocoloProcedimentoDTO = $objProtocoloRN->consultarRN0186 ( $objProtocoloProcedimentoDTO ); | |
479 | + } else { | |
480 | + $objProtocoloProcedimentoDTO->setStrStaNivelAcessoLocal ( $objProtocoloDTO->getStrStaNivelAcessoLocal () ); | |
481 | + $objProtocoloProcedimentoDTO->setStrStaNivelAcessoGlobal ( $objProtocoloDTO->getStrStaNivelAcessoGlobal () ); | |
482 | + } | |
483 | + | |
484 | + // Protege Intimação eletônica | |
485 | + if($objProtocoloDTO->getStrStaProtocolo() != ProtocoloRN::$TP_PROCEDIMENTO){ | |
486 | + $objInfraParametroDTO = $objParametroPesquisaRN->consultarVersaoPeticionamento('2.0.0'); | |
487 | + if( !is_null($objInfraParametroDTO) ){ | |
488 | + $objMdPetIntCertidaoRN = new MdPetIntCertidaoRN(); | |
489 | + if( !$objMdPetIntCertidaoRN->verificaDocumentoEAnexoIntimacaoNaoCumprida( array($objDocumentoDTO->getDblIdDocumento(),false,false,true)) ){ | |
490 | + $titulo = $strNomeTipoProcedimento . " N° " . $tituloLinkNumeroProcesso; | |
491 | + $tituloCompleto = "<a href=\"" . PaginaSEI::getInstance ()->formatarXHTML ( SessaoSEI::getInstance ()->assinarLink ( MdPesqSolrUtilExterno::prepararUrl ( $arvore ) ) ) . "\" target=\"_blank\" class=\"arvore\">"; | |
492 | + $tituloCompleto .= "<img border=\"0\" src=\"solr/img/arvore.png\" alt=\"\" title=\"Visualizar árvore\" width=\"14\" height=\"16\" class=\"arvore\" />"; | |
493 | + $tituloCompleto .= "</a>"; | |
494 | + $tituloCompleto .= $titulo . ' ( ' . $dados ["identificacao_protocolo"] . ' )'; | |
495 | + $snippet = 'Documento com acesso restrito provisoriamente em razão de Intimação Eletrônica ainda não cumprida'; | |
496 | + | |
497 | + } | |
498 | + } | |
499 | + } | |
500 | + | |
501 | + if ((! $bolLinkMetadadosProcessoRestrito && $objProtocoloDTO->getStrStaProtocolo () == ProtocoloRN::$TP_PROCEDIMENTO) || (! $bolLinkMetadadosProcessoRestrito && $objProtocoloDTO->getStrStaProtocolo () != ProtocoloRN::$TP_PROCEDIMENTO) || ($objProtocoloDTO->getStrStaProtocolo () != ProtocoloRN::$TP_PROCEDIMENTO && $bolPesquisaDocumentoProcessoRestrito && $objProtocoloDTO->getStrStaNivelAcessoLocal () != ProtocoloRN::$NA_PUBLICO) || ($objProtocoloDTO->getStrStaProtocolo () != ProtocoloRN::$TP_PROCEDIMENTO && $bolPesquisaDocumentoProcessoRestrito && $objProtocoloDTO->getStrStaNivelAcessoLocal () == ProtocoloRN::$NA_PUBLICO && $objProtocoloProcedimentoDTO->getStrStaNivelAcessoLocal () != ProtocoloRN::$NA_PUBLICO)) { | |
502 | + | |
503 | + if ($bolLinkMetadadosProcessoRestrito) { | |
504 | + $titulo = $strNomeTipoProcedimento . " N° " . $tituloLinkNumeroProcesso; | |
505 | + $tituloCompleto = "<a href=\"" . PaginaSEI::getInstance ()->formatarXHTML ( SessaoSEI::getInstance ()->assinarLink ( MdPesqSolrUtilExterno::prepararUrl ( $arvore ) ) ) . "\" target=\"_blank\" class=\"arvore\">"; | |
506 | + $tituloCompleto .= "<img border=\"0\" src=\"solr/img/arvore.png\" alt=\"\" title=\"Visualizar árvore\" width=\"14\" height=\"16\" class=\"arvore\" />"; | |
507 | + $tituloCompleto .= "</a>"; | |
508 | + $tituloCompleto .= $titulo . ' ( ' . $dados ["identificacao_protocolo"] . ' )'; | |
509 | + $snippet = ""; | |
510 | + | |
511 | + | |
512 | + } else { | |
513 | + | |
514 | + $tituloCompleto = $objProtocoloDTO->getStrProtocoloFormatado (); | |
515 | + $titulo = $objProtocoloDTO->getStrProtocoloFormatado (); | |
516 | + $tituloProtocolo = $objProtocoloDTO->getStrProtocoloFormatado (); | |
517 | + | |
518 | + $objHipoteseLegalDTO = new HipoteseLegalDTO (); | |
519 | + $objHipoteseLegalDTO->retTodos ( false ); | |
520 | + $objHipoteseLegalDTO->setNumIdHipoteseLegal ( $objProtocoloDTO->getNumIdHipoteseLegal () ); | |
521 | + | |
522 | + $objHipoteseLegalRN = new HipoteseLegalRN (); | |
523 | + $objHipoteseLegalDTO = $objHipoteseLegalRN->consultar ( $objHipoteseLegalDTO ); | |
524 | + | |
525 | + if ($objHipoteseLegalDTO != null) { | |
526 | + $snippet = '<b>Hipótese Legal de Restrição de Acesso: ' . $objHipoteseLegalDTO->getStrNome () . ' (' . $objHipoteseLegalDTO->getStrBaseLegal () . ')</b>'; | |
527 | + $txtDescricaoProcedimentoAcessoRestrito = trim ( $txtDescricaoProcedimentoAcessoRestrito ); | |
528 | + if (! empty ( $txtDescricaoProcedimentoAcessoRestrito )) { | |
529 | + $snippet .= '<br/>'; | |
530 | + $snippet .= $txtDescricaoProcedimentoAcessoRestrito; | |
531 | + } | |
532 | + } else { | |
533 | + if (! empty ( $txtDescricaoProcedimentoAcessoRestrito )) { | |
534 | + $snippet = $txtDescricaoProcedimentoAcessoRestrito; | |
535 | + } else { | |
536 | + $snippet = 'Processo de Acesso Restrito'; | |
537 | + } | |
538 | + } | |
539 | + unset ( $arrMetatags ['Usuário'] ); | |
540 | + unset ( $arrMetatags ['Unidade Geradora'] ); | |
541 | + unset ( $arrMetatags ['Data'] ); | |
542 | + } | |
543 | + } | |
544 | + }else{ | |
545 | + // Protege Intimação eletônica | |
546 | + if($objProtocoloDTO->getStrStaProtocolo() != ProtocoloRN::$TP_PROCEDIMENTO){ | |
547 | + $objInfraParametroDTO = $objParametroPesquisaRN->consultarVersaoPeticionamento('2.0.0'); | |
548 | + if( !is_null($objInfraParametroDTO) ){ | |
549 | + $objMdPetIntCertidaoRN = new MdPetIntCertidaoRN(); | |
550 | + if( !$objMdPetIntCertidaoRN->verificaDocumentoEAnexoIntimacaoNaoCumprida( array($objDocumentoDTO->getDblIdDocumento(),false,false,true)) ){ | |
551 | + $titulo = $strNomeTipoProcedimento . " N° " . $tituloLinkNumeroProcesso; | |
552 | + $tituloCompleto = "<a href=\"" . PaginaSEI::getInstance ()->formatarXHTML ( SessaoSEI::getInstance ()->assinarLink ( MdPesqSolrUtilExterno::prepararUrl ( $arvore ) ) ) . "\" target=\"_blank\" class=\"arvore\">"; | |
553 | + $tituloCompleto .= "<img border=\"0\" src=\"solr/img/arvore.png\" alt=\"\" title=\"Visualizar árvore\" width=\"14\" height=\"16\" class=\"arvore\" />"; | |
554 | + $tituloCompleto .= "</a>"; | |
555 | + $tituloCompleto .= $titulo . ' ( ' . $dados ["identificacao_protocolo"] . ' )'; | |
556 | + $snippet = 'Documento com acesso restrito provisoriamente em razão de Intimação Eletrônica ainda não cumprida'; | |
557 | + | |
558 | + } | |
559 | + } | |
560 | + } | |
561 | + } | |
506 | 562 | |
507 | 563 | // Protege contra a não idexação no solr quando o processo passa de público para restrito. |
508 | 564 | if(($objProtocoloDTO->getStrStaProtocolo() == ProtocoloRN::$TP_PROCEDIMENTO && $objProtocoloDTO->getStrStaNivelAcessoGlobal() != ProtocoloRN::$NA_PUBLICO && !$bolPesquisaProcessoRestrito) || ($objProtocoloDTO->getStrStaProtocolo() == ProtocoloRN::$TP_PROCEDIMENTO && $objProtocoloDTO->getStrStaNivelAcessoGlobal() == ProtocoloRN::$NA_SIGILOSO)){ |
... | ... | @@ -520,18 +576,67 @@ class MdPesqBuscaProtocoloExterno { |
520 | 576 | |
521 | 577 | // Protege contra a não idexação no solr quando o documento passa de público para restrito. |
522 | 578 | //if($objProtocoloDTO->getStrStaProtocolo() != ProtocoloRN::$TP_PROCEDIMENTO && $objProtocoloDTO->getStrStaNivelAcessoGlobal() != ProtocoloRN::$NA_PUBLICO && !$bolPesquisaDocumentoProcessoRestrito){ |
579 | + //if($objProtocoloDTO->getStrStaProtocolo() != ProtocoloRN::$TP_PROCEDIMENTO && $objProtocoloDTO->getStrStaNivelAcessoGlobal() != ProtocoloRN::$NA_PUBLICO){ | |
580 | + | |
523 | 581 | if($objProtocoloDTO->getStrStaProtocolo() != ProtocoloRN::$TP_PROCEDIMENTO && $objProtocoloDTO->getStrStaNivelAcessoGlobal() != ProtocoloRN::$NA_PUBLICO){ |
582 | + | |
583 | + // Verifica se o documento foi publicado se sim exibe link da publicação | |
584 | + if ($objDocumentoDTO->isSetObjPublicacaoDTO () && $objDocumentoDTO->getObjPublicacaoDTO () != null) { | |
585 | + if ($objDocumentoDTO->getObjPublicacaoDTO()->getStrStaEstado () == PublicacaoRN::$TE_PUBLICADO) { | |
586 | + | |
587 | + $titulo = $strNomeTipoProcedimento . " N° " . $dados["protocolo_processo_formatado"]; | |
588 | + $titulo .= " "; | |
589 | + $titulo .= "(<a href=\"".ConfiguracaoSEI::getInstance()->getValor('SEI','URL')."/publicacoes/controlador_publicacoes.php?acao=publicacao_visualizar&id_documento=".$objDocumentoDTO->getDblIdDocumento()."&id_orgao_publicacao=0\" target=\"_blank\" class=\"protocoloNormal\">"; | |
590 | + $titulo .= $dados["identificacao_protocolo"] . "</a>)"; | |
591 | + | |
592 | + $tituloCompleto = "<a href=\"".ConfiguracaoSEI::getInstance()->getValor('SEI','URL')."/publicacoes/controlador_publicacoes.php?acao=publicacao_visualizar&id_documento=".$objDocumentoDTO->getDblIdDocumento()."&id_orgao_publicacao=0\" target=\"_blank\" class=\"arvore\">"; | |
593 | + $tituloCompleto .= "<img border=\"0\" src=\"../../imagens/sei_publicacao_pequeno.gif\" alt=\"\" title=\"Visualizar árvore\" width=\"14\" height=\"16\" class=\"arvore\" />"; | |
594 | + $tituloCompleto .= "</a>"; | |
595 | + $tituloCompleto .= $titulo; | |
596 | + $snippet = "Documento Publicado no Boletim de Publicações Eletrônico"; | |
597 | + $arrMetatags['Unidade Geradora'] = '<a alt="'.$strDescricaoUnidadeGeradora.'" title="'.$strDescricaoUnidadeGeradora.'" class="ancoraSigla">'.$strSiglaUnidadeGeradora.'</a>'; | |
598 | + $arrMetatags['Data'] = $dtaGeracao; | |
599 | + } | |
600 | + } else if(!$bolPesquisaDocumentoProcessoRestrito) { | |
601 | + $tituloCompleto = 'ACESSO RESTRITO'; | |
602 | + $titulo = 'ACESSO RESTRITO'; | |
603 | + $tituloProtocolo = 'ACESSO RESTRITO'; | |
604 | + unset ( $arrMetatags ['Usuário'] ); | |
605 | + unset ( $arrMetatags ['Unidade Geradora'] ); | |
606 | + unset ( $arrMetatags ['Data'] ); | |
607 | + $snippet = 'ACESSO RESTRITO'; | |
608 | + } | |
524 | 609 | |
525 | - $tituloCompleto = 'ACESSO RESTRITO'; | |
526 | - $titulo = 'ACESSO RESTRITO'; | |
527 | - $tituloProtocolo = 'ACESSO RESTRITO'; | |
528 | - unset($arrMetatags['Usuário'] ); | |
529 | - unset($arrMetatags['Unidade Geradora']); | |
530 | - unset($arrMetatags['Data']); | |
531 | - $snippet = 'ACESSO RESTRITO'; | |
532 | 610 | |
611 | + } | |
612 | + | |
613 | + //Protege quanto a não indexação do solr documentos que teve a ssinatura retirada. Email não possue assinatura | |
614 | + if($objProtocoloDTO->getStrStaProtocolo() == ProtocoloRN::$TP_DOCUMENTO_GERADO && $objDocumentoDTO->getNumIdSerie() != $idSerieEmail){ | |
615 | + | |
616 | + if(is_array($arrObjAssinaturaDTO) && count($arrObjAssinaturaDTO) == 0) { | |
617 | + $tituloCompleto = 'ACESSO RESTRITO'; | |
618 | + $titulo = 'ACESSO RESTRITO'; | |
619 | + $tituloProtocolo = 'ACESSO RESTRITO'; | |
620 | + unset ( $arrMetatags ['Usuário'] ); | |
621 | + unset ( $arrMetatags ['Unidade Geradora'] ); | |
622 | + unset ( $arrMetatags ['Data'] ); | |
623 | + $snippet = 'ACESSO RESTRITO'; | |
624 | + } | |
625 | + } | |
626 | + | |
627 | + //Protege quanto a não indexação do solr documentos cancelado | |
628 | + if($objProtocoloDTO->getStrStaProtocolo() != ProtocoloRN::$TP_PROCEDIMENTO && $objProtocoloDTO->getStrStaEstado() == ProtocoloRN::$TE_DOCUMENTO_CANCELADO){ | |
533 | 629 | |
630 | + $tituloCompleto = 'ACESSO RESTRITO'; | |
631 | + $titulo = 'ACESSO RESTRITO'; | |
632 | + $tituloProtocolo = 'ACESSO RESTRITO'; | |
633 | + unset ( $arrMetatags ['Usuário'] ); | |
634 | + unset ( $arrMetatags ['Unidade Geradora'] ); | |
635 | + unset ( $arrMetatags ['Data'] ); | |
636 | + $snippet = 'ACESSO RESTRITO'; | |
637 | + | |
534 | 638 | } |
639 | + | |
535 | 640 | |
536 | 641 | $html .= "<table border=\"0\" class=\"resultado\">\n"; |
537 | 642 | $html .= "<tr class=\"resTituloRegistro\">\n"; |
... | ... | @@ -577,7 +682,7 @@ class MdPesqBuscaProtocoloExterno { |
577 | 682 | } |
578 | 683 | |
579 | 684 | |
580 | - $html .= MdPesqSolrUtilExterno::criarBarraNavegacao($itens, $inicio, 10, PaginaSEIExterna::getInstance(), SessaoSEIExterna::getInstance(),$md5Captcha); | |
685 | + $html .= MdPesqSolrUtilExterno::criarBarraNavegacao($itens, $inicio, 10, PaginaSEIExterna::getInstance(), SessaoSEIExterna::getInstance(),$sha1Captcha); | |
581 | 686 | } |
582 | 687 | |
583 | 688 | return $html; | ... | ... |
sei/web/modulos/pesquisa/MdPesqPesquisaUtil.php
... | ... | @@ -110,7 +110,6 @@ class MdPesqPesquisaUtil { |
110 | 110 | |
111 | 111 | $objContatoRN = new ContatoRN(); |
112 | 112 | $arrObjContatoDTO = $objContatoRN->pesquisarRN0471($objContatoDTO); |
113 | - | |
114 | 113 | $ret = MdPesqPesquisaUtil::preparaIdParticipantes($arrObjContatoDTO); |
115 | 114 | |
116 | 115 | return $ret; |
... | ... | @@ -217,17 +216,63 @@ class MdPesqPesquisaUtil { |
217 | 216 | } |
218 | 217 | } |
219 | 218 | |
220 | -// foreach ($arrObjContatoDTO as $objContatoDTO){ | |
221 | -// $strIdParticipante = $strIdParticipante.'*'.$objContatoDTO->getNumIdContato().'*'; | |
222 | -// if(end(array_keys($arrObjContatoDTO->NumIdContato())) == $objContatoDTO->NumIdContato()){ | |
223 | -// $strIdParticipante = $strIdParticipante.' OR '; | |
224 | -// } | |
225 | -// } | |
219 | + }else{ | |
220 | + $strIdParticipante = $strIdParticipante.'id_int:null AND '; | |
226 | 221 | } |
227 | 222 | |
228 | 223 | return $strIdParticipante; |
229 | 224 | |
230 | 225 | } |
226 | + | |
227 | + public static function verificaPesquisaAtributosRestritos($partialfields,$arrParametroPesquisaDTO,$q){ | |
228 | + | |
229 | + $bolInteressadoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_INTERESSADO_RESTRITO] == 'S' ? true : false; | |
230 | + $bolUnidadeRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_UNIDADE_RESTRITO] == 'S' ? true : false; | |
231 | + $bolTipoProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_TIPO_PROCESSO_RESTRITO] == 'S' ? true : false; | |
232 | + $bolTipoDocumentoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_TIPO_DOCUMENTO_RESTRITO] == 'S' ? true : false; | |
233 | + | |
234 | + $ret = false; | |
235 | + | |
236 | + // Pesquisa por conteúdo deve sempre ser restrita | |
237 | + if(empty($q)){ | |
238 | + $ret = true; | |
239 | + }else{ | |
240 | + return false; | |
241 | + } | |
242 | + | |
243 | + if(strstr($partialfields, 'prot_pesq:')){ | |
244 | + $ret = true; | |
245 | + } | |
246 | + | |
247 | + | |
248 | + if(strstr($partialfields, 'id_int:') && $bolInteressadoRestrito){ | |
249 | + $ret = true; | |
250 | + }else if(strstr($partialfields, 'id_int:')){ | |
251 | + return false; | |
252 | + } | |
253 | + | |
254 | + if(strstr($partialfields, 'id_uni_ger:') && $bolUnidadeRestrito){ | |
255 | + $ret = true; | |
256 | + }else if(strstr($partialfields, 'id_uni_ger:')){ | |
257 | + return false; | |
258 | + } | |
259 | + | |
260 | + if(strstr($partialfields, 'id_tipo_proc:') && $bolTipoProcessoRestrito){ | |
261 | + $ret = true; | |
262 | + }else if(strstr($partialfields, 'id_tipo_proc:')) { | |
263 | + return false; | |
264 | + } | |
265 | + | |
266 | + if(strstr($partialfields, 'id_serie:') && $bolTipoDocumentoRestrito){ | |
267 | + $ret = true; | |
268 | + }else if(strstr($partialfields, 'id_serie:')){ | |
269 | + return false; | |
270 | + } | |
271 | + | |
272 | + | |
273 | + return $ret; | |
274 | + | |
275 | + } | |
231 | 276 | |
232 | 277 | } |
233 | 278 | ... | ... |
sei/web/modulos/pesquisa/MdPesqSolrUtilExterno.php
... | ... | @@ -112,7 +112,7 @@ class MdPesqSolrUtilExterno { |
112 | 112 | } |
113 | 113 | |
114 | 114 | //Cria a navegacao completa |
115 | - public static function criarBarraNavegacao($totalRes, $inicio, $numResPorPag, $objPagina, $objSessao, $md5Captcha = null, $strControlador = 'md_pesq_processo_pesquisar.php' ) | |
115 | + public static function criarBarraNavegacao($totalRes, $inicio, $numResPorPag, $objPagina, $objSessao, $sha1Captcha = null, $strControlador = 'md_pesq_processo_pesquisar.php' ) | |
116 | 116 | { |
117 | 117 | |
118 | 118 | if ($totalRes == 0) |
... | ... | @@ -124,7 +124,7 @@ class MdPesqSolrUtilExterno { |
124 | 124 | |
125 | 125 | $urlSemInicio = $strControlador.'?acao_externa='.$_GET['acao_externa']."&acao_origem_externa=protocolo_pesquisar_paginado"; |
126 | 126 | |
127 | - $hash = (!is_null($md5Captcha)) ? "&hash=".$md5Captcha : ""; | |
127 | + $hash = (!is_null($sha1Captcha)) ? "&hash=".$sha1Captcha : ""; | |
128 | 128 | |
129 | 129 | if ($inicio != null ) { |
130 | 130 | $nav .= "<span class=\"pequeno\"><a href=\"javascript:pagina.ir('" . $objPagina->formatarXHTML($objSessao->assinarLink($urlSemInicio . "&inicio=" . ($inicio - $numResPorPag) . $hash)) . "')\">Anterior</a></span>\n"; | ... | ... |
sei/web/modulos/pesquisa/dto/MdPesqProtocoloPesquisaPublicaDTO.php
... | ... | @@ -51,6 +51,7 @@ class MdPesqProtocoloPesquisaPublicaDTO extends InfraDTO { |
51 | 51 | $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'StaAssociacao'); |
52 | 52 | $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'DocumentoDTO'); |
53 | 53 | $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'ProcedimentoDTO'); |
54 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'LinhaTabela' ); | |
54 | 55 | |
55 | 56 | |
56 | 57 | ... | ... |
sei/web/modulos/pesquisa/md_pesq_documento_consulta_externa.php
... | ... | @@ -21,11 +21,13 @@ try { |
21 | 21 | //InfraDebug::getInstance()->setBolDebugInfra(false); |
22 | 22 | //InfraDebug::getInstance()->limpar(); |
23 | 23 | ////////////////////////////////////////////////////////////////////////////// |
24 | - | |
25 | - | |
26 | - MdPesqConverteURI::converterURI(); | |
27 | - MdPesqPesquisaUtil::valiadarLink(); | |
28 | - | |
24 | + MdPesqConverteURI::converterURI(); | |
25 | + MdPesqPesquisaUtil::valiadarLink(); | |
26 | +// if (isset($_GET['id_acesso_externo'])){ | |
27 | +// SessaoSEIExterna::getInstance($_GET['id_acesso_externo'])->validarLink(); | |
28 | +// }else{ | |
29 | +// // SessaoSEIExterna::getInstance()->validarLink(); | |
30 | +// } | |
29 | 31 | |
30 | 32 | $objParametroPesquisaDTO = new MdPesqParametroPesquisaDTO(); |
31 | 33 | $objParametroPesquisaDTO->retStrNome(); |
... | ... | @@ -39,9 +41,6 @@ try { |
39 | 41 | $bolListaDocumentoProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_RESTRITO] == 'S' ? true : false; |
40 | 42 | $bolListaDocumentoProcessoPublico = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO] == 'S' ? true : false; |
41 | 43 | |
42 | - // Parametros peticionamento elerônico | |
43 | - $objInfraParametroDTO = $objParametroPesquisaRN->consultarVersaoPeticionamento(); | |
44 | - | |
45 | 44 | $objDocumentoDTO = new DocumentoDTO(); |
46 | 45 | $objDocumentoDTO->retDblIdDocumento(); |
47 | 46 | $objDocumentoDTO->retDblIdProcedimento(); |
... | ... | @@ -105,12 +104,14 @@ try { |
105 | 104 | } |
106 | 105 | } |
107 | 106 | |
108 | - $objMdPetIntCertidaoRN = new MdPetIntCertidaoRN(); | |
109 | - if($objInfraParametroDTO != null && $objInfraParametroDTO->getStrValor() >= '2.0.0' && $objMdPetIntCertidaoRN->verificaDocumentoEAnexoIntimacaoNaoCumprida(array($objDocumentoDTO->getDblIdDocumento())) == false){ | |
110 | - | |
111 | - die("Documento com acesso restrito provisoriamente em razão de Intimação Eletrônica ainda não cumprida"); | |
112 | - | |
113 | - } | |
107 | + //Protege acesso à documento público de intimação eletrônica | |
108 | + $objInfraParametroDTO = $objParametroPesquisaRN->consultarVersaoPeticionamento('2.0.0'); | |
109 | + if( !is_null($objInfraParametroDTO) ){ | |
110 | + $objMdPetIntCertidaoRN = new MdPetIntCertidaoRN(); | |
111 | + if( !$objMdPetIntCertidaoRN->verificaDocumentoEAnexoIntimacaoNaoCumprida( array($objDocumentoDTO->getDblIdDocumento(),false,false,true)) ){ | |
112 | + die("Documento com acesso restrito provisoriamente em razão de Intimação Eletrônica ainda não cumprida"); | |
113 | + } | |
114 | + } | |
114 | 115 | |
115 | 116 | // Exibe apenas documentos de processos públicos. |
116 | 117 | ... | ... |
sei/web/modulos/pesquisa/md_pesq_parametro_pesquisa_lista.php
... | ... | @@ -46,7 +46,13 @@ try { |
46 | 46 | array('Nome' => MdPesqParametroPesquisaRN::$TA_AUTO_COMPLETAR_INTERESSADO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkAutoCompletarInteressado'])), |
47 | 47 | array('Nome' => MdPesqParametroPesquisaRN::$TA_MENU_USUARIO_EXTERNO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkMenuUsuarioExterno'])), |
48 | 48 | array('Nome' => MdPesqParametroPesquisaRN::$TA_CHAVE_CRIPTOGRAFIA , 'Valor' => trim($_POST['txtChaveCriptografia'])), |
49 | - | |
49 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_PAGINACAO_DOCUMENTOS , 'Valor' => trim($_POST['txtNumPagProtocolo'])), | |
50 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_PAGINACAO_ANDAMENTOS , 'Valor' => trim($_POST['txtNumPagAndamento'])), | |
51 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_INTERESSADO_RESTRITO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkListaInteressadoProcessoRestrito'])), | |
52 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_UNIDADE_RESTRITO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkListaUnidadeProcessoRestrito'])), | |
53 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_TIPO_PROCESSO_RESTRITO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkListaTipoProcessoRestrito'])), | |
54 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_TIPO_DOCUMENTO_RESTRITO , 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkListaTipoDocumentoProcessoRestrito'])), | |
55 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_DOCUMENTO_RESTRITO, 'Valor' => PaginaSEI::getInstance()->getCheckbox($_POST['chkDocumentoRestrito'])), | |
50 | 56 | |
51 | 57 | ); |
52 | 58 | |
... | ... | @@ -105,9 +111,11 @@ PaginaSEI::getInstance()->abrirJavaScript(); |
105 | 111 | ?> |
106 | 112 | |
107 | 113 | function inicializar(){ |
108 | - | |
114 | + habilitarParametrosRestritos(); | |
109 | 115 | } |
110 | 116 | |
117 | + | |
118 | + | |
111 | 119 | function validarCadastro() { |
112 | 120 | |
113 | 121 | if (infraTrim(document.getElementById('txtChaveCriptografia').value)=='') { |
... | ... | @@ -123,6 +131,23 @@ function OnSubmitForm() { |
123 | 131 | return validarCadastro(); |
124 | 132 | } |
125 | 133 | |
134 | +function habilitarParametrosRestritos() { | |
135 | + | |
136 | + if($('#chkProcessoRestrito').prop('checked') ){ | |
137 | + $("#divHabilitarCamposPesquisaRestrito").show(); | |
138 | + }else{ | |
139 | + $("#chkDocumentoRestrito").prop('checked',false); | |
140 | + $("#chkListaAndamentoProcessoRestrito").prop('checked',false); | |
141 | + $("#chkMetaDadosProcessoRestrito").prop('checked',false); | |
142 | + $("#chkListaInteressadoProcessoRestrito").prop('checked',false); | |
143 | + $("#chkListaUnidadeProcessoRestrito").prop('checked',false); | |
144 | + $("#chkListaTipoProcessoRestrito").prop('checked',false); | |
145 | + $("#chkListaTipoDocumentoProcessoRestrito").prop('checked',false); | |
146 | + $("#divHabilitarCamposPesquisaRestrito").hide(); | |
147 | + | |
148 | + } | |
149 | + | |
150 | +} | |
126 | 151 | |
127 | 152 | <? |
128 | 153 | PaginaSEI::getInstance()->fecharJavaScript(); |
... | ... | @@ -154,18 +179,42 @@ PaginaSEI::getInstance()->abrirAreaDados(null); |
154 | 179 | <input id="chkListaAndamentoProcessoPublico" name="chkListaAndamentoProcessoPublico" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_PUBLICO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> |
155 | 180 | <label id="lblListaAndamentoProcessoPublico" for="chkListaAndamentoProcessoPublico" class="infraLabelCheckBox">Sim</label> |
156 | 181 | |
157 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar a pesquisa em processos com nível de acesso global "Restrito":</h3> | |
158 | - <input id="chkProcessoRestrito" name="chkProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
182 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar a pesquisa em processos com nível de acesso "Restrito":</h3> | |
183 | + <input id="chkProcessoRestrito" name="chkProcessoRestrito" type="checkbox" class="infraCheckBox" onchange="habilitarParametrosRestritos()" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
159 | 184 | <label id="lblProcessoRestrito" for="chkProcessoRestrito" class="infraLabelCheckBox">Sim</label> |
160 | 185 | |
161 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar o acesso aos metadados dos Processos com nível de acesso global "Restrito"</h3> | |
162 | - <input id="chkMetaDadosProcessoRestrito" name="chkMetaDadosProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_METADADOS_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
163 | - <label id="lblMetaDadosProcessoRestrito" for="chkMetaDadosProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
164 | - | |
165 | - <h3 style='font-weight:bold; font-style: italic;'>Habilitar a exibição dos Andamentos nos processos com nível de acesso global "Restrito":</h3> | |
166 | - <input id="chkListaAndamentoProcessoRestrito" name="chkListaAndamentoProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
167 | - <label id="lblListaAndamentoProcessoRestrito" for="chkListaAndamentoProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
186 | + <div style='margin-left: 50px' id="divHabilitarCamposPesquisaRestrito"> | |
187 | + | |
188 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar o acesso aos metadados dos Processos com nível de acesso "Restrito": </h3> | |
189 | + <input id="chkMetaDadosProcessoRestrito" name="chkMetaDadosProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_METADADOS_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
190 | + <label id="lblMetaDadosProcessoRestrito" for="chkMetaDadosProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
191 | + | |
192 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar a exibição dos Andamentos nos processos com nível de acesso "Restrito":</h3> | |
193 | + <input id="chkListaAndamentoProcessoRestrito" name="chkListaAndamentoProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
194 | + <label id="lblListaAndamentoProcessoRestrito" for="chkListaAndamentoProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
195 | + | |
196 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar a pesquisa em documentos com nível de acesso "Restrito" (Obs. Quando o usuário utiliza a Pesquisa Livre, o módulo só permitirá a pesquisa em protocos públicos)</h3> | |
197 | + <input id="chkDocumentoRestrito" name="chkDocumentoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DOCUMENTO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
198 | + <label id="lblDocumentoRestrito" for="chkDocumentoRestrito" class="infraLabelCheckBox">Sim</label> | |
199 | + | |
200 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar a pesquisa de interessados nos processos com nível de acesso "Restrito"</h3> | |
201 | + <input id="chkListaInteressadoProcessoRestrito" name="chkListaInteressadoProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_INTERESSADO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
202 | + <label id="lblListaInteressadoProcessoRestrito" for="chkListaInteressadoProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
203 | + | |
204 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar a pesquisa de unidades nos processos com nível de acesso "Restrito"</h3> | |
205 | + <input id="chkListaUnidadeProcessoRestrito" name="chkListaUnidadeProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_UNIDADE_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
206 | + <label id="lblListaUnidadeProcessoRestrito" for="chkListaUnidadeProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
207 | + | |
208 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar a pesquisa de tipos de processos nos processos com nível de acesso "Restrito"</h3> | |
209 | + <input id="chkListaTipoProcessoRestrito" name="chkListaTipoProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_TIPO_PROCESSO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
210 | + <label id="lblListaTipoProcessoRestrito" for="chkListaTipoProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
211 | + | |
212 | + <h3 style='font-weight:bold; font-style: italic;'>Habilitar a pesquisa de tipos de documentos nos processos com nível de acesso "Restrito"</h3> | |
213 | + <input id="chkListaTipoDocumentoProcessoRestrito" name="chkListaTipoDocumentoProcessoRestrito" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_TIPO_DOCUMENTO_RESTRITO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
214 | + <label id="lblListaTipoDocumentoProcessoRestrito" for="chkListaTipoDocumentoProcessoRestrito" class="infraLabelCheckBox">Sim</label> | |
215 | + </div> | |
168 | 216 | |
217 | + | |
169 | 218 | <h3 style='font-weight:bold; font-style: italic;'>Descrição de justificativa de restrição de acesso e orientações para meios alternativos de solicitação de acesso:</h3> |
170 | 219 | <textarea id="txtDescricaoProcessoAcessoRestrito" name="txtDescricaoProcessoAcessoRestrito" class="infraTextarea" rows="5" style="width: 90%" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" ><?=$arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DESCRICAO_PROCEDIMENTO_ACESSO_RESTRITO]?></textarea> |
171 | 220 | <hr> |
... | ... | @@ -196,6 +245,13 @@ PaginaSEI::getInstance()->abrirAreaDados(null); |
196 | 245 | <input id="chkMenuUsuarioExterno" name="chkMenuUsuarioExterno" type="checkbox" class="infraCheckBox" <?=($arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_MENU_USUARIO_EXTERNO] == 'S') ? "checked" : ""?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> |
197 | 246 | <label id="lblMenuUsuarioExterno" for="chkMenuUsuarioExterno" class="infraLabelCheckBox">Sim</label> |
198 | 247 | |
248 | + <h3 style='font-weight:bold; font-style: italic;'>Número de Paginação na Lista de Protocolos:</h3> | |
249 | + <input id="txtNumPagProtocolo" name="txtNumPagProtocolo" type="text" class="infraText" maxlength="5" style="width: 5%" onkeypress= "return infraMascaraNumero(this,event,5);" value="<?=$arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PAGINACAO_DOCUMENTOS]?>" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
250 | + | |
251 | + <h3 style='font-weight:bold; font-style: italic;'>Número de Paginação na Lista de Andamentos</h3> | |
252 | + <input id="txtNumPagAndamento" name="txtNumPagAndamento" type="text" class="infraText" maxlength="5" style="width: 5%" onkeypress= "return infraMascaraNumero(this,event,5);" value="<?=$arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PAGINACAO_ANDAMENTOS]?>" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
253 | + | |
254 | + | |
199 | 255 | <h3 style='font-weight:bold; font-style: italic;'>Chave para criptografia dos links de processos e documentos:</h3> |
200 | 256 | <input id="txtChaveCriptografia" name="txtChaveCriptografia" type="text" class="infraText" maxlength="100" style="width: 40%" value="<?=$arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_CHAVE_CRIPTOGRAFIA]?>" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> |
201 | 257 | ... | ... |
sei/web/modulos/pesquisa/md_pesq_processo_exibir.php
... | ... | @@ -35,11 +35,8 @@ try { |
35 | 35 | |
36 | 36 | $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); |
37 | 37 | $arrObjParametroPesquisaDTO = $objParametroPesquisaRN->listar($objParametroPesquisaDTO); |
38 | + | |
38 | 39 | $arrParametroPesquisaDTO = InfraArray::converterArrInfraDTO($arrObjParametroPesquisaDTO,'Valor','Nome'); |
39 | - | |
40 | - // Parametros peticionamento elerônico | |
41 | - $objInfraParametroDTO = $objParametroPesquisaRN->consultarVersaoPeticionamento(); | |
42 | - | |
43 | 40 | |
44 | 41 | $bolPesquisaProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PROCESSO_RESTRITO] == 'S' ? true : false; |
45 | 42 | $bolListaDocumentoProcessoPublico = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_PUBLICO] == 'S' ? true : false; |
... | ... | @@ -49,6 +46,9 @@ try { |
49 | 46 | $bolListaAndamentoProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_ANDAMENTO_PROCESSO_RESTRITO] == 'S' ? true : false; |
50 | 47 | $bolListaDocumentoProcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_LISTA_DOCUMENTO_PROCESSO_RESTRITO] == 'S' ? true : false; |
51 | 48 | $txtDescricaoProcessoAcessoRestrito = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_DESCRICAO_PROCEDIMENTO_ACESSO_RESTRITO]; |
49 | + $numPaginacaoAndamentos = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PAGINACAO_ANDAMENTOS]; | |
50 | + $numPaginacaoDocumentos = $arrParametroPesquisaDTO[MdPesqParametroPesquisaRN::$TA_PAGINACAO_DOCUMENTOS]; | |
51 | + | |
52 | 52 | |
53 | 53 | if($bolCaptchaGerarPdf) { |
54 | 54 | $strCodigoParaGeracaoCaptcha = InfraCaptcha::obterCodigo(); |
... | ... | @@ -175,13 +175,13 @@ try { |
175 | 175 | $arrObjRelProtocoloProtocoloDTO = $objProcedimentoDTO->getArrObjRelProtocoloProtocoloDTO(); |
176 | 176 | } |
177 | 177 | |
178 | - // Objeto Fake para paginação. | |
178 | + // Objeto Fake para ordenação. | |
179 | 179 | $objProtocoloPesquisaPublicaPaginacaoDTO = new MdPesqProtocoloPesquisaPublicaDTO(); |
180 | 180 | $objProtocoloPesquisaPublicaPaginacaoDTO->retTodos(true); |
181 | - PaginaSEIExterna::getInstance()->prepararOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO, 'Registro', InfraDTO::$TIPO_ORDENACAO_ASC); | |
182 | - //PaginaSEIExterna::getInstance()->prepararPaginacao($objProtocoloPesquisaPublicaPaginacaoDTO,4); | |
183 | - //PaginaSEIExterna::getInstance()->processarPaginacao($objProtocoloPesquisaPublicaPaginacaoDTO); | |
181 | + PaginaSEIExterna::getInstance()->prepararOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO, 'Registro', InfraDTO::$TIPO_ORDENACAO_ASC,true); | |
184 | 182 | $arrObjProtocoloPesquisaPublicaDTO = array(); |
183 | + | |
184 | + | |
185 | 185 | |
186 | 186 | $objDocumentoRN = new DocumentoRN(); |
187 | 187 | |
... | ... | @@ -190,6 +190,7 @@ try { |
190 | 190 | $strCssMostrarAcoes = '.colunaAcoes {display:none;}'."\n"; |
191 | 191 | |
192 | 192 | $strThCheck = PaginaSEIExterna::getInstance()->getThCheck(); |
193 | + | |
193 | 194 | |
194 | 195 | foreach($arrObjRelProtocoloProtocoloDTO as $objRelProtocoloProtocoloDTO){ |
195 | 196 | |
... | ... | @@ -297,25 +298,48 @@ try { |
297 | 298 | } |
298 | 299 | |
299 | 300 | |
301 | + | |
300 | 302 | if ($numProtocolos > 0){ |
301 | 303 | |
302 | - | |
303 | - | |
304 | + | |
305 | + $inicioRegistro = 0; | |
306 | + $fimRegistro = $numProtocolos; | |
307 | + | |
308 | + if($numPaginacaoDocumentos > 0){ | |
309 | + $objProtocoloPesquisaPublicaPaginacaoDTO = new MdPesqProtocoloPesquisaPublicaDTO(); | |
310 | + PaginaSEIExterna::getInstance()->prepararPaginacao($objProtocoloPesquisaPublicaPaginacaoDTO,$numPaginacaoDocumentos,true,null); | |
311 | + $objProtocoloPesquisaPublicaPaginacaoDTO->setNumTotalRegistros($numProtocolos); | |
312 | + | |
313 | + $inicioRegistro = $objProtocoloPesquisaPublicaPaginacaoDTO->getNumMaxRegistrosRetorno() * $objProtocoloPesquisaPublicaPaginacaoDTO->getNumPaginaAtual(); | |
314 | + | |
315 | + if($objProtocoloPesquisaPublicaPaginacaoDTO->getNumMaxRegistrosRetorno() + $inicioRegistro < $numProtocolos && $numPaginacaoDocumentos > 0){ | |
316 | + $fimRegistro = $objProtocoloPesquisaPublicaPaginacaoDTO->getNumMaxRegistrosRetorno() + $inicioRegistro; | |
317 | + } | |
318 | + | |
319 | + $objProtocoloPesquisaPublicaPaginacaoDTO->setNumRegistrosPaginaAtual($fimRegistro - $inicioRegistro); | |
320 | + PaginaSEIExterna::getInstance()->processarPaginacao($objProtocoloPesquisaPublicaPaginacaoDTO); | |
321 | + | |
322 | + } | |
323 | + | |
324 | + | |
304 | 325 | $strResultado = '<table id="tblDocumentos" width="99.3%" class="infraTable" summary="Lista de Documentos" > |
305 | - <caption class="infraCaption" >'.PaginaSEIExterna::getInstance()->gerarCaptionTabela("Protocolos",$numProtocolos).'</caption> | |
326 | + <caption class="infraCaption" >'.PaginaSEIExterna::getInstance()->gerarCaptionTabela("Protocolos",$numProtocolos).'</caption> | |
306 | 327 | <tr> |
307 | - <th class="infraTh" width="1%">'.$strThCheck.'</th> | |
328 | + <th class="infraTh" width="1%">'.$strThCheck.'</th> | |
308 | 329 | <th class="infraTh" width="15%">'.PaginaSEIExterna::getInstance()->getThOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO,'Documento / Processo','NumeroSEI',$arrObjProtocoloPesquisaPublicaDTO,true).'</th> |
309 | 330 | <th class="infraTh" width="15%">'.PaginaSEIExterna::getInstance()->getThOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO,'Tipo de Documento','TipoDocumento',$arrObjProtocoloPesquisaPublicaDTO,true).'</th> |
310 | 331 | <th class="infraTh" width="15%">'.PaginaSEIExterna::getInstance()->getThOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO,'Data do Documento','Documento',$arrObjProtocoloPesquisaPublicaDTO,true).'</th> |
311 | 332 | <th class="infraTh" width="15%">'.PaginaSEIExterna::getInstance()->getThOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO,'Data de Registro','Registro',$arrObjProtocoloPesquisaPublicaDTO,true).'</th> |
312 | 333 | <th class="infraTh" width="15%">'.PaginaSEIExterna::getInstance()->getThOrdenacao($objProtocoloPesquisaPublicaPaginacaoDTO,'Unidade','Unidade',$arrObjProtocoloPesquisaPublicaDTO,true).'</th> |
313 | - | |
334 | + | |
314 | 335 | </tr>'; |
315 | 336 | |
337 | + | |
338 | + | |
316 | 339 | // monta tabela documentos |
317 | - foreach ($arrObjProtocoloPesquisaPublicaDTO as $objProtocoloPesquisaPublicaDTO){ | |
318 | - | |
340 | + for ($i=$inicioRegistro; $i < $fimRegistro; $i++){ | |
341 | + | |
342 | + $objProtocoloPesquisaPublicaDTO = $arrObjProtocoloPesquisaPublicaDTO[$i]; | |
319 | 343 | if($objProtocoloPesquisaPublicaDTO->getStrStaAssociacao() == RelProtocoloProtocoloRN::$TA_DOCUMENTO_ASSOCIADO){ |
320 | 344 | |
321 | 345 | $objDocumentoDTO = $objProtocoloPesquisaPublicaDTO->getObjDocumentoDTO(); |
... | ... | @@ -323,17 +347,21 @@ try { |
323 | 347 | $strLinkDocumento = PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('md_pesq_documento_consulta_externa.php?'.$urlCripografadaDocumeto)); |
324 | 348 | |
325 | 349 | //Protege acesso à documento público de intimação eletrônica |
326 | - $objMdPetIntCertidaoRN = new MdPetIntCertidaoRN(); | |
327 | - $bolValidaIntimacaoEletronica = false; | |
328 | - if($objInfraParametroDTO != null && $objInfraParametroDTO->getStrValor() >= '2.0.0' && $objMdPetIntCertidaoRN->verificaDocumentoEAnexoIntimacaoNaoCumprida(array($objDocumentoDTO->getDblIdDocumento())) == false){ | |
329 | - $bolValidaIntimacaoEletronica = true; | |
350 | + $bolValidaIntimacaoEletronica = true; | |
351 | + | |
352 | + $objInfraParametroDTO = $objParametroPesquisaRN->consultarVersaoPeticionamento('2.0.0'); | |
353 | + if( !is_null($objInfraParametroDTO) ){ | |
354 | + $objMdPetIntCertidaoRN = new MdPetIntCertidaoRN(); | |
355 | + if( !$objMdPetIntCertidaoRN->verificaDocumentoEAnexoIntimacaoNaoCumprida( array($objDocumentoDTO->getDblIdDocumento(),false,false,true) ) ){ | |
356 | + $bolValidaIntimacaoEletronica = false; | |
357 | + } | |
330 | 358 | } |
331 | 359 | |
332 | 360 | $strResultado .= '<tr class="infraTrClara">'; |
333 | - | |
361 | + | |
334 | 362 | //Cria checkbox para gerar PDF, verifica se o Processo é público e o Acesso Local do Protocolo é Público |
335 | 363 | if($objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO && $objProcedimentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO){ |
336 | - if($objDocumentoRN->verificarSelecaoGeracaoPdf($objDocumentoDTO) && !$bolValidaIntimacaoEletronica){ | |
364 | + if($objDocumentoRN->verificarSelecaoGeracaoPdf($objDocumentoDTO) && $bolValidaIntimacaoEletronica){ | |
337 | 365 | $strResultado .= '<td align="center">'.PaginaSEIExterna::getInstance()->getTrCheck($numDocumentosPdf++, $objDocumentoDTO->getDblIdDocumento(), $objDocumentoDTO->getStrNomeSerie()).'</td>'; |
338 | 366 | }else{ |
339 | 367 | $strResultado .= '<td> </td>'; |
... | ... | @@ -345,16 +373,14 @@ try { |
345 | 373 | |
346 | 374 | //Exibe link de documentos com nivel de acesso local Público de processo público |
347 | 375 | if($objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO && $objProcedimentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_PUBLICO ){ |
348 | - | |
349 | 376 | if($bolValidaIntimacaoEletronica){ |
377 | + $strResultado .= '<td align="center" style="padding-right:22px"><a href="javascript:void(0);" onclick="window.open(\''.$strLinkDocumento.'\');" alt="'.PaginaSEIExterna::getInstance()->formatarXHTML($objDocumentoDTO->getStrNomeSerie()).'" title="'.PaginaSEIExterna::getInstance()->formatarXHTML($objDocumentoDTO->getStrNomeSerie()).'" class="ancoraPadraoAzul">'.$objDocumentoDTO->getStrProtocoloDocumentoFormatado().'</a></td>'; | |
378 | + }else{ | |
350 | 379 | $strResultado .= '<td align="center"><span class="retiraAncoraPadraoAzul">'.$objDocumentoDTO->getStrProtocoloDocumentoFormatado().'</span>'; |
351 | 380 | $strResultado .= '<img src="/infra_css/imagens/espaco.gif">'; |
352 | - $strResultado .= '<img src="../peticionamento/imagens/intimacao_nao_cumprida_doc_anexo.png" align="absbottom" title="Acesso Restrito.
'.'Documento com acesso restrito provisoriamente em razão de Intimação Eletrônica ainda não cumprida">'; | |
353 | - }else{ | |
354 | - $strResultado .= '<td align="center" style="padding-right:22px"><a href="javascript:void(0);" onclick="window.open(\''.$strLinkDocumento.'\');" alt="'.PaginaSEIExterna::getInstance()->formatarXHTML($objDocumentoDTO->getStrNomeSerie()).'" title="'.PaginaSEIExterna::getInstance()->formatarXHTML($objDocumentoDTO->getStrNomeSerie()).'" class="ancoraPadraoAzul">'.$objDocumentoDTO->getStrProtocoloDocumentoFormatado().'</a></td>'; | |
381 | + $strResultado .= '<img src="../peticionamento/imagens/intimacao_nao_cumprida_doc_anexo.png" align="absbottom" title="Acesso Restrito.
'.'Documento com acesso restrito provisoriamente em razão de Intimação Eletrônica ainda não cumprida">'; | |
355 | 382 | } |
356 | 383 | |
357 | - | |
358 | 384 | }else{ |
359 | 385 | if($objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_RESTRITO){ |
360 | 386 | |
... | ... | @@ -477,6 +503,7 @@ try { |
477 | 503 | |
478 | 504 | } |
479 | 505 | |
506 | + | |
480 | 507 | |
481 | 508 | $arrComandos = array(); |
482 | 509 | if ($numDocumentosPdf > 0){ |
... | ... | @@ -508,35 +535,54 @@ try { |
508 | 535 | $arrObjAtividadeDTO = $objProcedimentoDTORet->getArrObjAtividadeDTO(); |
509 | 536 | |
510 | 537 | $numRegistrosAtividades = count($arrObjAtividadeDTO); |
538 | + | |
539 | + | |
511 | 540 | } |
512 | 541 | |
513 | - | |
514 | - | |
542 | + | |
515 | 543 | |
516 | 544 | if ($numRegistrosAtividades > 0){ |
517 | 545 | |
518 | 546 | $bolCheck = false; |
519 | 547 | |
520 | - $strResultadoAndamentos = ''; | |
521 | - | |
522 | - $strResultadoAndamentos .= '<table id="tblHistorico" width="99.3%" class="infraTable" summary="Histórico de Andamentos">'."\n"; | |
523 | - $strResultadoAndamentos .= '<caption class="infraCaption">'.PaginaSEIExterna::getInstance()->gerarCaptionTabela('Andamentos',$numRegistrosAtividades).'</caption>'; | |
524 | - $strResultadoAndamentos .= '<tr>'; | |
525 | - $strResultadoAndamentos .= '<th class="infraTh" width="20%">Data/Hora</th>'; | |
526 | - $strResultadoAndamentos .= '<th class="infraTh" width="10%">Unidade</th>'; | |
527 | - $strResultadoAndamentos .= '<th class="infraTh">Descrição</th>'; | |
528 | - $strResultadoAndamentos .= '</tr>'."\n"; | |
529 | - | |
530 | - $strQuebraLinha = '<span style="line-height:.5em"><br /></span>'; | |
531 | - | |
548 | + $inicioRegistroAtividade = 0; | |
549 | + $fimRegistroAtividade = $numRegistrosAtividades; | |
550 | + if($numPaginacaoAndamentos > 0){ | |
551 | + $objAtividadeDTO = new AtividadeDTO(); | |
552 | + PaginaSEIExterna::getInstance()->prepararPaginacao($objAtividadeDTO,$numPaginacaoAndamentos,false,null,'infraAndamento'); | |
553 | + $objAtividadeDTO->setNumTotalRegistros($numRegistrosAtividades); | |
554 | + $inicioRegistroAtividade = $objAtividadeDTO->getNumMaxRegistrosRetorno() * $objAtividadeDTO->getNumPaginaAtual(); | |
532 | 555 | |
533 | - foreach($arrObjAtividadeDTO as $objAtividadeDTO){ | |
534 | - | |
556 | + if($objAtividadeDTO->getNumMaxRegistrosRetorno() + $inicioRegistroAtividade < $numRegistrosAtividades && $numPaginacaoAndamentos > 0){ | |
557 | + $fimRegistroAtividade = $objAtividadeDTO->getNumMaxRegistrosRetorno() + $inicioRegistroAtividade; | |
558 | + } | |
559 | + | |
560 | + $objAtividadeDTO->setNumRegistrosPaginaAtual($fimRegistroAtividade - $inicioRegistroAtividade); | |
561 | + | |
562 | + PaginaSEIExterna::getInstance()->processarPaginacao($objAtividadeDTO,'infraAndamento'); | |
563 | + } | |
564 | + | |
565 | + | |
566 | + | |
567 | + $strResultadoAndamentos = ''; | |
568 | + | |
569 | + $strResultadoAndamentos .= '<table id="tblHistorico" width="99.3%" class="infraTable" summary="Histórico de Andamentos">'."\n"; | |
570 | + $strResultadoAndamentos .= '<caption class="infraCaption">'.PaginaSEIExterna::getInstance()->gerarCaptionTabela('Andamentos',$numRegistrosAtividades,'Lista de ','infraAndamento').'</caption>'; | |
571 | + $strResultadoAndamentos .= '<tr>'; | |
572 | + $strResultadoAndamentos .= '<th class="infraTh" width="20%">Data/Hora</th>'; | |
573 | + $strResultadoAndamentos .= '<th class="infraTh" width="10%">Unidade</th>'; | |
574 | + $strResultadoAndamentos .= '<th class="infraTh">Descrição</th>'; | |
575 | + $strResultadoAndamentos .= '</tr>'."\n"; | |
576 | + | |
577 | + $strQuebraLinha = '<span style="line-height:.5em"><br /></span>'; | |
578 | + | |
579 | + | |
580 | + for ($i=$inicioRegistroAtividade; $i < $fimRegistroAtividade; $i++){ | |
535 | 581 | //InfraDebug::getInstance()->gravar($objAtividadeDTO->getNumIdAtividade()); |
536 | 582 | |
537 | - $strResultadoAndamentos .= "\n\n".'<!-- '.$objAtividadeDTO->getNumIdAtividade().' -->'."\n"; | |
583 | + $strResultadoAndamentos .= "\n\n".'<!-- '.$arrObjAtividadeDTO[$i]->getNumIdAtividade().' -->'."\n"; | |
538 | 584 | |
539 | - if ($objAtividadeDTO->getStrSinUltimaUnidadeHistorico() == 'S'){ | |
585 | + if ($arrObjAtividadeDTO[$i]->getStrSinUltimaUnidadeHistorico() == 'S'){ | |
540 | 586 | $strAbertas = 'class="andamentoAberto"'; |
541 | 587 | }else{ |
542 | 588 | $strAbertas = 'class="andamentoConcluido"'; |
... | ... | @@ -544,18 +590,18 @@ try { |
544 | 590 | |
545 | 591 | $strResultadoAndamentos .= '<tr '.$strAbertas.'>'; |
546 | 592 | $strResultadoAndamentos .= "\n".'<td align="center">'; |
547 | - $strResultadoAndamentos .= substr($objAtividadeDTO->getDthAbertura(),0,16); | |
593 | + $strResultadoAndamentos .= substr($arrObjAtividadeDTO[$i]->getDthAbertura(),0,16); | |
548 | 594 | $strResultadoAndamentos .= '</td>'; |
549 | 595 | |
550 | 596 | $strResultadoAndamentos .= "\n".'<td align="center">'; |
551 | - $strResultadoAndamentos .= '<a alt="'.$objAtividadeDTO->getStrDescricaoUnidade().'" title="'.$objAtividadeDTO->getStrDescricaoUnidade().'" class="ancoraSigla">'.$objAtividadeDTO->getStrSiglaUnidade().'</a>'; | |
597 | + $strResultadoAndamentos .= '<a alt="'.$arrObjAtividadeDTO[$i]->getStrDescricaoUnidade().'" title="'.$arrObjAtividadeDTO[$i]->getStrDescricaoUnidade().'" class="ancoraSigla">'.$arrObjAtividadeDTO[$i]->getStrSiglaUnidade().'</a>'; | |
552 | 598 | $strResultadoAndamentos .= '</td>'; |
553 | 599 | |
554 | 600 | $strResultadoAndamentos .= "\n"; |
555 | 601 | $strResultadoAndamentos .= "\n".'<td>'; |
556 | 602 | |
557 | - if (!InfraString::isBolVazia($objAtividadeDTO->getStrNomeTarefa())){ | |
558 | - $strResultadoAndamentos .= nl2br($objAtividadeDTO->getStrNomeTarefa()).$strQuebraLinha; | |
603 | + if (!InfraString::isBolVazia($arrObjAtividadeDTO[$i]->getStrNomeTarefa())){ | |
604 | + $strResultadoAndamentos .= nl2br($arrObjAtividadeDTO[$i]->getStrNomeTarefa()).$strQuebraLinha; | |
559 | 605 | } |
560 | 606 | |
561 | 607 | $strResultadoAndamentos .= '</td>'; |
... | ... | @@ -595,6 +641,15 @@ try { |
595 | 641 | if($objDocumentoDTO->getDblIdProcedimento() != $dblIdProcedimento || $objDocumentoDTO->getStrStaNivelAcessoLocalProtocolo() != ProtocoloRN::$NA_PUBLICO || $objProcedimentoDTO->getStrStaNivelAcessoLocalProtocolo() != ProtocoloRN::$NA_PUBLICO){ |
596 | 642 | die ("Erro ao Gerar Pdf"); |
597 | 643 | } |
644 | + //Protege acesso à documento público de intimação eletrônica | |
645 | + $objInfraParametroDTO = $objParametroPesquisaRN->consultarVersaoPeticionamento('2.0.0'); | |
646 | + if( !is_null($objInfraParametroDTO) ){ | |
647 | + $objMdPetIntCertidaoRN = new MdPetIntCertidaoRN(); | |
648 | + if( !$objMdPetIntCertidaoRN->verificaDocumentoEAnexoIntimacaoNaoCumprida( array($objDocumentoDTO->getDblIdDocumento(),false,false,true) ) ){ | |
649 | + $idx_documento = array_search($objDocumentoDTO->getDblIdDocumento(), $arrSelecionados); | |
650 | + unset($arrSelecionados[$idx_documento]); | |
651 | + } | |
652 | + } | |
598 | 653 | }else if($bolListaDocumentoProcessoPublico){ |
599 | 654 | if($objDocumentoDTO->getDblIdProcedimento() != $dblIdProcedimento || $objDocumentoDTO->getStrStaNivelAcessoGlobalProtocolo() != ProtocoloRN::$NA_PUBLICO){ |
600 | 655 | die ("Erro ao Gerar Pdf"); |
... | ... | @@ -653,6 +708,8 @@ table caption { |
653 | 708 | #tblCabecalho{margin-top:1;} |
654 | 709 | #tblDocumentos {margin-top:1.5em;} |
655 | 710 | #tblHistorico {margin-top:1.5em;} |
711 | +#divInfraAreaPaginacaoSuperior {display: none;} | |
712 | +#divinfraAndamentoAreaPaginacaoSuperior {display: none;} | |
656 | 713 | |
657 | 714 | <? if($bolCaptchaGerarPdf) { ?> |
658 | 715 | #lblCaptcha {position: absolute; top:30%; left: 20%; width: 80%} |
... | ... | @@ -829,8 +886,9 @@ if($bolCaptchaGerarPdf){ |
829 | 886 | PaginaSEIExterna::getInstance()->montarBarraComandosSuperior($arrComandos); |
830 | 887 | echo $strResultadoCabecalho; |
831 | 888 | echo $strMensagemProcessoRestrito; |
832 | -PaginaSEIExterna::getInstance()->montarAreaTabela($strResultado,$numProtocolos); | |
833 | -echo $strResultadoAndamentos; | |
889 | +PaginaSEIExterna::getInstance()->montarAreaTabela($strResultado,$numProtocolos,false,'',null); | |
890 | +PaginaSEIExterna::getInstance()->montarAreaTabela($strResultadoAndamentos,$numRegistrosAtividades,false,'',null,'infraAndamento'); | |
891 | +//echo $strResultadoAndamentos; | |
834 | 892 | ?> |
835 | 893 | <input type="hidden" id="hdnFlagGerar" name="hdnFlagGerar" value="0" /> |
836 | 894 | <?if($bolCaptchaGerarPdf) { ?> | ... | ... |
sei/web/modulos/pesquisa/md_pesq_processo_pesquisar.php
... | ... | @@ -33,11 +33,11 @@ try { |
33 | 33 | require_once dirname(__FILE__).'/../../SEI.php'; |
34 | 34 | require_once dirname(__FILE__).'/MdPesqBuscaProtocoloExterno.php'; |
35 | 35 | require_once ("MdPesqConverteURI.php"); |
36 | - | |
37 | -// session_start(); | |
38 | - | |
36 | + | |
37 | + session_start(); | |
38 | + | |
39 | 39 | SessaoSEIExterna::getInstance()->validarSessao(); |
40 | - | |
40 | + | |
41 | 41 | // InfraDebug::getInstance()->setBolLigado(false); |
42 | 42 | // InfraDebug::getInstance()->setBolDebugInfra(false); |
43 | 43 | // InfraDebug::getInstance()->limpar(); |
... | ... | @@ -59,13 +59,19 @@ try { |
59 | 59 | MdPesqPesquisaUtil::valiadarLink(); |
60 | 60 | |
61 | 61 | PaginaSEIExterna::getInstance()->setBolXHTML(false); |
62 | - | |
62 | + | |
63 | + $captchaPesquisa = PaginaSEIExterna::getInstance()->recuperarCampo('captchaPesquisa'); | |
64 | + | |
65 | + | |
63 | 66 | if($bolCaptcha) { |
64 | 67 | $strCodigoParaGeracaoCaptcha = InfraCaptcha::obterCodigo(); |
65 | - $md5Captcha = md5(InfraCaptcha::gerar($strCodigoParaGeracaoCaptcha)); | |
68 | + $sha1Captcha = sha1(InfraCaptcha::gerar($strCodigoParaGeracaoCaptcha)); | |
66 | 69 | }else { |
67 | - $md5Captcha = null; | |
70 | + $sha1Captcha = null; | |
68 | 71 | } |
72 | + PaginaSEIExterna::getInstance()->salvarCampo('captchaPesquisa', $sha1Captcha); | |
73 | + | |
74 | + | |
69 | 75 | if (isset($_POST['hdnFlagPesquisa']) || isset($_POST['sbmLimpar'])){ |
70 | 76 | |
71 | 77 | if(isset($_POST['sbmLimpar'])){ |
... | ... | @@ -138,6 +144,7 @@ try { |
138 | 144 | PaginaSEIExterna::getInstance()->salvarCampo('txtSiglaUsuario3', ''); |
139 | 145 | PaginaSEIExterna::getInstance()->salvarCampo('txtSiglaUsuario4', ''); |
140 | 146 | PaginaSEIExterna::getInstance()->salvarCampo('hdnSiglasUsuarios', ''); |
147 | + | |
141 | 148 | } |
142 | 149 | |
143 | 150 | |
... | ... | @@ -178,12 +185,13 @@ try { |
178 | 185 | $strSiglaUsuario4 = PaginaSEIExterna::getInstance()->recuperarCampo('txtSiglaUsuario4'); |
179 | 186 | $strUsuarios = PaginaSEIExterna::getInstance()->recuperarCampo('hdnSiglasUsuarios'); |
180 | 187 | $strParticipanteSolr = ''; |
188 | + | |
181 | 189 | |
182 | 190 | //Opção de Auto Completar Interressado |
183 | 191 | if(!$bolAutocompletarInterressado){ |
184 | 192 | |
185 | 193 | if(!InfraString::isBolVazia($strNomeParticipante)){ |
186 | - $strParticipanteSolr = MdPesqPesquisaUtil::buscaParticipantes($strNomeParticipante); | |
194 | + $strParticipanteSolr = MdPesqPesquisaUtil::buscaParticipantes(InfraString::prepararIndexacao($strNomeParticipante)); | |
187 | 195 | } |
188 | 196 | |
189 | 197 | } |
... | ... | @@ -220,14 +228,15 @@ try { |
220 | 228 | |
221 | 229 | if (isset($_POST['sbmPesquisar']) || ($_GET['acao_origem_externa'] == "protocolo_pesquisar_paginado")){ |
222 | 230 | |
223 | - if(md5($_POST['txtCaptcha']) != $_POST['hdnCaptchaMd5'] && $_GET['hash'] != $_POST['hdnCaptchaMd5'] && $bolCaptcha == true){ | |
231 | + | |
232 | + if(sha1($_POST['txtCaptcha']) != $captchaPesquisa && $_GET['hash'] != $captchaPesquisa && $bolCaptcha == true){ | |
224 | 233 | PaginaSEIExterna::getInstance()->setStrMensagem('Código de confirmação inválido.'); |
225 | 234 | }else{ |
226 | 235 | //preencheu palavra de busca ou alguma opção avançada |
227 | 236 | if (!InfraString::isBolVazia($q) || $bolPreencheuAvancado) { |
228 | 237 | |
229 | 238 | try{ |
230 | - $strResultado = MdPesqBuscaProtocoloExterno::executar($q, $strDescricaoPesquisa, $strObservacaoPesquisa, $inicio, 100, $strParticipanteSolr,$md5Captcha); | |
239 | + $strResultado = MdPesqBuscaProtocoloExterno::executar($q, $strDescricaoPesquisa, $strObservacaoPesquisa, $inicio, 100, $strParticipanteSolr,$sha1Captcha); | |
231 | 240 | }catch(Exception $e){ |
232 | 241 | LogSEI::getInstance()->gravar(InfraException::inspecionar($e)); |
233 | 242 | throw new InfraException('Erro realizando pesquisa.',$e); |
... | ... | @@ -258,7 +267,7 @@ try { |
258 | 267 | } |
259 | 268 | |
260 | 269 | $strItensSelTipoProcedimento = TipoProcedimentoINT::montarSelectNome('null',' ',$numIdTipoProcedimento); |
261 | - $strItensSelSerie = SerieINT::montarSelectNomeRI0802('null',' ',$numIdSerie); | |
270 | + $strItensSelSerie = SerieINT::montarSelectNomeRI0802('null',' ',$numIdSerie); | |
262 | 271 | |
263 | 272 | $strLinkAjaxContatos = SessaoSEIExterna::getInstance()->assinarLink('md_pesq_controlador_ajax_externo.php?acao_ajax_externo=contato_auto_completar_contexto_pesquisa&id_orgao_acesso_externo=0'); |
264 | 273 | $strLinkAjaxUnidade = SessaoSEIExterna::getInstance()->assinarLink('md_pesq_controlador_ajax_externo.php?acao_ajax_externo=unidade_auto_completar_todas&id_orgao_acesso_externo=0'); |
... | ... | @@ -281,6 +290,17 @@ try { |
281 | 290 | PaginaSEIExterna::getInstance()->montarDocType(); |
282 | 291 | PaginaSEIExterna::getInstance()->abrirHtml(); |
283 | 292 | PaginaSEIExterna::getInstance()->abrirHead(); |
293 | +?> | |
294 | +<!-- Global site tag (gtag.js) - Google Analytics --> | |
295 | +<script async src="https://www.googletagmanager.com/gtag/js?id=UA-102781659-1"></script> | |
296 | +<script> | |
297 | + window.dataLayer = window.dataLayer || []; | |
298 | + function gtag(){dataLayer.push(arguments);} | |
299 | + gtag('js', new Date()); | |
300 | + | |
301 | + gtag('config', 'UA-102781659-1'); | |
302 | +</script> | |
303 | +<? | |
284 | 304 | PaginaSEIExterna::getInstance()->montarMeta(); |
285 | 305 | PaginaSEIExterna::getInstance()->montarTitle(':: '.PaginaSEIExterna::getInstance()->getStrNomeSistema().' - '.$strTitulo.' ::'); |
286 | 306 | PaginaSEIExterna::getInstance()->montarStyle(); |
... | ... | @@ -674,9 +694,7 @@ PaginaSEIExterna::getInstance()->abrirBody($strTitulo,'onload="inicializar();"') |
674 | 694 | <input type="hidden" id="txtSiglaUsuario4" name="txtSiglaUsuario4" class="infraText" value="<?=PaginaSEIExterna::tratarHTML($strSiglaUsuario4);?>" tabindex="<?=PaginaSEIExterna::getInstance()->getProxTabDados()?>" /> |
675 | 695 | <input type="hidden" id="hdnSiglasUsuarios" name="hdnSiglasUsuarios" class="infraText" value="<?=PaginaSEIExterna::tratarHTML($strUsuarios)?>" /> |
676 | 696 | <input type="hidden" id="hdnSiglasUsuarios" name="hdnSiglasUsuarios" class="infraText" value="<?=PaginaSEIExterna::tratarHTML($strUsuarios)?>" /> |
677 | - <?if($bolCaptcha) { ?> | |
678 | - <input type="hidden" id="hdnCaptchaMd5" name="hdnCaptchaMd5" class="infraText" value="<?=md5(InfraCaptcha::gerar(PaginaSEIExterna::tratarHTML($strCodigoParaGeracaoCaptcha)));?>" /> | |
679 | - <?} ?> | |
697 | + | |
680 | 698 | <input id="partialfields" name="partialfields" type="hidden" value="" /> |
681 | 699 | <input id="requiredfields" name="requiredfields" type="hidden" value="" /> |
682 | 700 | <input id="as_q" name="as_q" type="hidden" value="" /> | ... | ... |
sei/web/modulos/pesquisa/rn/MdPesqInstaladorModuloPesquisaPublicaRN.php
... | ... | @@ -12,7 +12,7 @@ require_once dirname(__FILE__).'/../../../SEI.php'; |
12 | 12 | class MdPesqInstaladorModuloPesquisaPublicaRN extends InfraRN{ |
13 | 13 | |
14 | 14 | private $numSeg = 0; |
15 | - private $versaoAtualDesteModulo = '3.0.0'; | |
15 | + private $versaoAtualDesteModulo = '3.1.0'; | |
16 | 16 | private $nomeDesteModulo = 'Pesquisa Pública'; |
17 | 17 | private $nomeParametroModulo = 'VERSAO_MODULO_PESQUISA_PUBLICA'; |
18 | 18 | |
... | ... | @@ -117,6 +117,38 @@ class MdPesqInstaladorModuloPesquisaPublicaRN extends InfraRN{ |
117 | 117 | |
118 | 118 | } |
119 | 119 | |
120 | + private function instalarv310(){ | |
121 | + | |
122 | + | |
123 | + | |
124 | + $objInfraMetaBD = new InfraMetaBD(BancoSEI::getInstance()); | |
125 | + | |
126 | + $this->logar('EXECUTANDO A ATUALIZACAO DA VERSAO 3.1.0 DO MÓDULO DE PESQUISA PUBLICA NA BASE DO SEI'); | |
127 | + | |
128 | + $this->logar('INSERINDO DADOS NA TABELA md_pesq_parametro'); | |
129 | + | |
130 | + $arrParametroPesquisaDTO = array( | |
131 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_PAGINACAO_ANDAMENTOS , 'Valor' => '0'), | |
132 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_PAGINACAO_DOCUMENTOS , 'Valor' => '0'), | |
133 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_INTERESSADO_RESTRITO , 'Valor' => 'N'), | |
134 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_UNIDADE_RESTRITO, 'Valor' => 'N'), | |
135 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_TIPO_PROCESSO_RESTRITO, 'Valor' => 'N'), | |
136 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_TIPO_DOCUMENTO_RESTRITO, 'Valor' => 'N'), | |
137 | + array('Nome' => MdPesqParametroPesquisaRN::$TA_DOCUMENTO_RESTRITO, 'Valor' => 'N'), | |
138 | + ); | |
139 | + | |
140 | + $arrObjParametroPesquisaDTO = InfraArray::gerarArrInfraDTOMultiAtributos('MdPesqParametroPesquisaDTO', $arrParametroPesquisaDTO); | |
141 | + | |
142 | + $objParametroPesquisaRN = new MdPesqParametroPesquisaRN(); | |
143 | + | |
144 | + foreach ($arrObjParametroPesquisaDTO as $objParametroPesquisaDTO){ | |
145 | + | |
146 | + $objParametroPesquisaRN->cadastrar($objParametroPesquisaDTO); | |
147 | + } | |
148 | + | |
149 | + | |
150 | + } | |
151 | + | |
120 | 152 | protected function AtualizarVersaoConectado(){ |
121 | 153 | |
122 | 154 | $this->inicializar('INICIANDO ATUALIZACAO DO MODULO DE PESQUISA PUBLICA NO SEI VERSAO '.SEI_VERSAO); |
... | ... | @@ -146,8 +178,13 @@ class MdPesqInstaladorModuloPesquisaPublicaRN extends InfraRN{ |
146 | 178 | |
147 | 179 | if (InfraString::isBolVazia($strVersaoModuloPesquisa)){ |
148 | 180 | $this->instalarv300(); |
181 | + $this->instalarv310(); | |
149 | 182 | //adicionando parametro para controlar versao do modulo |
150 | 183 | BancoSei::getInstance()->executarSql('insert into infra_parametro (valor, nome ) VALUES( \''. $this->versaoAtualDesteModulo .'\', \''. $this->nomeParametroModulo .'\' )' ); |
184 | + $this->finalizar('FIM', false); | |
185 | + }else if($strVersaoModuloPesquisa == '3.0.0'){ | |
186 | + $this->instalarv310(); | |
187 | + BancoSei::getInstance()->executarSql('UPDATE infra_parametro SET valor =\''.$this->versaoAtualDesteModulo .'\' WHERE nome =\''.$this->nomeParametroModulo.'\';' ); | |
151 | 188 | $this->logar('ATUALIZAÇÔES DA VERSÃO ' . $this->versaoAtualDesteModulo .' DO MÓDULO PESQUISA PÚBLICA INSTALADAS COM SUCESSO NA BASE DO SEI'); |
152 | 189 | $this->finalizar('FIM', false); |
153 | 190 | }else{ | ... | ... |
sei/web/modulos/pesquisa/rn/MdPesqParametroPesquisaRN.php
... | ... | @@ -23,7 +23,14 @@ class MdPesqParametroPesquisaRN extends InfraRN { |
23 | 23 | public static $TA_LISTA_DOCUMENTO_PROCESSO_RESTRITO = 'LISTA_DOCUMENTO_PROCESSO_RESTRITO'; |
24 | 24 | public static $TA_MENU_USUARIO_EXTERNO = 'MENU_USUARIO_EXTERNO'; |
25 | 25 | public static $TA_METADADOS_PROCESSO_RESTRITO = 'METADADOS_PROCESSO_RESTRITO'; |
26 | + public static $TA_INTERESSADO_RESTRITO = 'INTERESSADO_RESTRITO'; | |
27 | + public static $TA_UNIDADE_RESTRITO = 'UNIDADE_RESTRITO'; | |
28 | + public static $TA_TIPO_PROCESSO_RESTRITO = 'TIPO_PROCESSO_RESTRITO'; | |
29 | + public static $TA_TIPO_DOCUMENTO_RESTRITO = 'TIPO_DOCUMENTO_RESTRITO'; | |
26 | 30 | public static $TA_PROCESSO_RESTRITO = 'PROCESSO_RESTRITO'; |
31 | + public static $TA_DOCUMENTO_RESTRITO = 'DOCUMENTO_RESTRITO'; | |
32 | + public static $TA_PAGINACAO_DOCUMENTOS = 'PAGINACAO DOCUMENTOS'; | |
33 | + public static $TA_PAGINACAO_ANDAMENTOS = 'PAGINACAO ANDAMENTOS'; | |
27 | 34 | |
28 | 35 | public function __construct(){ |
29 | 36 | parent::__construct(); |
... | ... | @@ -122,22 +129,38 @@ class MdPesqParametroPesquisaRN extends InfraRN { |
122 | 129 | throw new InfraException('Erro listando Parâmetro da Pesquisas.',$e); |
123 | 130 | } |
124 | 131 | } |
125 | - | |
126 | - | |
127 | - protected function consultarVersaoPeticionamentoConectado(){ | |
128 | - | |
129 | - $objInfraParametroDTO = new InfraParametroDTO(); | |
130 | - $objInfraParametroDTO->setStrNome('VERSAO_MODULO_PETICIONAMENTO'); | |
131 | - $objInfraParametroDTO->retStrValor(); | |
132 | - | |
133 | - $objInfraParametroBD = new InfraParametroBD($this->getObjInfraIBanco()); | |
134 | - $objInfraParametroDTO = $objInfraParametroBD->consultar($objInfraParametroDTO); | |
135 | - | |
136 | - return $objInfraParametroDTO; | |
137 | - } | |
138 | - | |
139 | - | |
140 | 132 | |
133 | + protected function consultarVersaoPeticionamentoConectado($versao = null) { | |
134 | + $arrModulos = ConfiguracaoSEI::getInstance ()->getValor ( 'SEI', 'Modulos' ); | |
135 | + if (is_array ( $arrModulos ) && array_key_exists ( 'PeticionamentoIntegracao', $arrModulos )) { | |
136 | + $objInfraParametroDTO = new InfraParametroDTO (); | |
137 | + $objInfraParametroDTO->setStrNome ( 'VERSAO_MODULO_PETICIONAMENTO' ); | |
138 | + $objInfraParametroDTO->retStrValor (); | |
139 | + | |
140 | + $objInfraParametroBD = new InfraParametroBD ( $this->getObjInfraIBanco () ); | |
141 | + $arrObjInfraParametroDTO = $objInfraParametroBD->consultar ( $objInfraParametroDTO ); | |
142 | + | |
143 | + // versão do parametro é igual ou maior que a enviada | |
144 | + if (! is_null ( $versao )) { | |
145 | + if (count ( $arrObjInfraParametroDTO ) > 0) { | |
146 | + $arr_versao_parametro = explode ( '.', $arrObjInfraParametroDTO->getStrValor () ); | |
147 | + $arr_versao = explode ( '.', $versao ); | |
148 | + for($i = 0; $i < count ( $arr_versao_parametro ); $i ++) { | |
149 | + if (isset ( $arr_versao [$i] )) { | |
150 | + if (intval ( $arr_versao_parametro [$i] ) < intval ( $arr_versao [$i] )) { | |
151 | + return null; | |
152 | + } else if (intval ( $arr_versao_parametro [$i] ) > intval ( $arr_versao [$i] )) { | |
153 | + return $arrObjInfraParametroDTO; | |
154 | + } | |
155 | + } | |
156 | + } | |
157 | + } | |
158 | + } | |
159 | + return $arrObjInfraParametroDTO; | |
160 | + } else { | |
161 | + return null; | |
162 | + } | |
163 | + } | |
141 | 164 | |
142 | 165 | |
143 | 166 | private function validarStrNome(MdPesqParametroPesquisaDTO $objParametroPesquisaDTO, InfraException $objInfraException){ | ... | ... |