Commit 6981533d474e5766285fa9dd5f755cf15207e3a9
1 parent
12cdd42d
Exists in
master
Adicionando Solr
Showing
32 changed files
with
32 additions
and
6661 deletions
Show diff stats
README.md
... | ... | @@ -0,0 +1,23 @@ |
1 | + | |
2 | + | |
3 | +# Conteiner de Aplicação para o SEI | |
4 | + | |
5 | +Versão inicial do conteiner de aplicação | |
6 | + | |
7 | +Como o codigo fonte do SEI é restrito não poderá ficar exposto aqui nesse projeto público. | |
8 | + | |
9 | +Aqui ficam os conteineres: | |
10 | +- com o Apache de aplicação | |
11 | +- bem como um segundo conteiner com o Apache mais o supervisor para rodar as rotinas do barramento PEN | |
12 | + | |
13 | +Adicione à pasta "sei-docker/containeres/sei-app/fontes" os arquivos com o código fonte do SEI na versão desejada e também adicione o código fonte na respectiva pasta "sei-docker/containeres/sei-app/fontes/sei/web/modulos" | |
14 | + | |
15 | +Os módulos são (e devem estar respectivamente com o seguinte nome): | |
16 | + | |
17 | +- barramento (mod-sei-barramento') | |
18 | +- Aplicativo SEI (mod-wssei) | |
19 | +- Protocolo Integrado (mp/protocolo_integrado) | |
20 | +- Peticionamento Eletronico (peticionamento) | |
21 | + | |
22 | + | |
23 | + Por favor sugerir correções e melhorias. | |
0 | 24 | \ No newline at end of file | ... | ... |
containeres/sei-app/Dockerfile
... | ... | @@ -29,14 +29,14 @@ COPY files/externo/ /opt/sei/web/externo/ |
29 | 29 | COPY files/publicacao/ /opt/sei/web/publicacao/ |
30 | 30 | |
31 | 31 | # Instalação do Modulo Barramento |
32 | -COPY mod-sei-barramento/ /opt/sei/web/modulos/mod-sei-barramento | |
33 | -RUN mv /opt/sei/web/modulos/mod-sei-barramento/sei_atualizar_versao_modulo_pen.php /opt/sei/scripts/sei_atualizar_versao_modulo_pen.php && \ | |
34 | - mv /opt/sei/web/modulos/mod-sei-barramento/sip_atualizar_versao_modulo_pen.php /opt/sip/scripts/sip_atualizar_versao_modulo_pen.php | |
32 | +#COPY mod-sei-barramento/ /opt/sei/web/modulos/mod-sei-barramento | |
33 | +#RUN mv /opt/sei/web/modulos/mod-sei-barramento/sei_atualizar_versao_modulo_pen.php /opt/sei/scripts/sei_atualizar_versao_modulo_pen.php && \ | |
34 | +# mv /opt/sei/web/modulos/mod-sei-barramento/sip_atualizar_versao_modulo_pen.php /opt/sip/scripts/sip_atualizar_versao_modulo_pen.php | |
35 | 35 | |
36 | 36 | # Instalação do Modulo INCOM |
37 | -COPY incom/ /opt/sei/web/modulos/incom | |
38 | -RUN mv /opt/sei/web/modulos/incom/scripts/sei_atualizar_versao_modulo_incom.php /opt/sei/scripts/sei_atualizar_versao_modulo_incom.php && \ | |
39 | - mv /opt/sei/web/modulos/incom/scripts/sip_atualizar_versao_modulo_incom.php /opt/sip/scripts/sip_atualizar_versao_modulo_incom.php | |
37 | +#COPY incom/ /opt/sei/web/modulos/incom | |
38 | +#RUN mv /opt/sei/web/modulos/incom/scripts/sei_atualizar_versao_modulo_incom.php /opt/sei/scripts/sei_atualizar_versao_modulo_incom.php && \ | |
39 | +# mv /opt/sei/web/modulos/incom/scripts/sip_atualizar_versao_modulo_incom.php /opt/sip/scripts/sip_atualizar_versao_modulo_incom.php | |
40 | 40 | |
41 | 41 | # Instalação do Modulo Peticionamento Eletronico |
42 | 42 | # Copy feito via job |
... | ... | @@ -44,10 +44,10 @@ RUN mv /opt/sei/web/modulos/incom/scripts/sei_atualizar_versao_modulo_incom.php |
44 | 44 | #RUN mv /opt/sei/web/modulos/peticionamento/scripts/sei_atualizar_versao_modulo_peticionamento.php /opt/sei/scripts/sei_atualizar_versao_modulo_peticionamento.php && \ |
45 | 45 | # mv /opt/sei/web/modulos/peticionamento/scripts/sip_atualizar_versao_modulo_peticionamento.php /opt/sip/scripts/sip_atualizar_versao_modulo_peticionamento.php |
46 | 46 | |
47 | -COPY mod-wssei/ /opt/sei/web/modulos/mod-wssei | |
47 | +#COPY mod-wssei/ /opt/sei/web/modulos/mod-wssei | |
48 | 48 | |
49 | 49 | RUN mkdir -p /opt/sei/web/modulos/mp/ |
50 | -COPY protocolo_integrado /opt/sei/web/modulos/mp/protocolo_integrado | |
50 | +#COPY protocolo_integrado /opt/sei/web/modulos/mp/protocolo_integrado | |
51 | 51 | |
52 | 52 | # Correção da permissao e dono do arquivo para geracao de PDF |
53 | 53 | RUN chown -R 0:48 /opt/ && \ | ... | ... |
containeres/sei-app/protocolo_integrado/.DS_Store
No preview for this file type
containeres/sei-app/protocolo_integrado/Crypt.php
... | ... | @@ -1,28 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -require_once dirname(__FILE__).'/../../../SEI.php'; | |
4 | - | |
5 | -class Crypt { | |
6 | - | |
7 | - static $chave = "xy"; | |
8 | - | |
9 | - static function StringXor($a,$b) { | |
10 | - if ($a=='') return ''; | |
11 | - $retorno = ""; $i = strlen($a)-1; $j = strlen($b); | |
12 | - do { | |
13 | - $retorno .= ($a{$i} ^ $b{$i % $j}); | |
14 | - } while ($i--); | |
15 | - return strrev($retorno); | |
16 | - } | |
17 | - | |
18 | - static function Encrypt($string) { | |
19 | - return base64_encode(Crypt::StringXor($string, Crypt::$chave)); | |
20 | - } | |
21 | - | |
22 | - static function Decrypt($string) { | |
23 | - return Crypt::StringXor(base64_decode($string), Crypt::$chave); | |
24 | - } | |
25 | - | |
26 | -} | |
27 | - | |
28 | -?> | |
29 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/ProtocoloIntegradoIntegracao.php
... | ... | @@ -1,82 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -class ProtocoloIntegradoIntegracao extends SeiIntegracao { | |
4 | - | |
5 | - public function __construct() { | |
6 | - //infraAdicionarPath(dirname(__FILE__) . 'rn'); | |
7 | - //infraAdicionarPath(dirname(__FILE__) . 'dto'); | |
8 | - //infraAdicionarPath(dirname(__FILE__) . 'bd'); | |
9 | - //infraAdicionarPath(dirname(__FILE__) . 'ws'); | |
10 | - } | |
11 | - | |
12 | - public function getNome() { | |
13 | - return 'Módulo do Protocolo Integrado'; | |
14 | - } | |
15 | - | |
16 | - public function getVersao() { | |
17 | - return '2.0.0'; | |
18 | - } | |
19 | - | |
20 | - public function getInstituicao() { | |
21 | - return 'MP - Ministério do Planejamento'; | |
22 | - } | |
23 | - | |
24 | - public function processarControlador($strAcao) { | |
25 | - switch($strAcao) { | |
26 | - case 'protocolo_integrado_configurar_publicacao': | |
27 | - case 'protocolo_integrado_mensagens_listar': | |
28 | - require_once 'protocolo_integrado_mensagens_listar.php'; | |
29 | - return true; | |
30 | - | |
31 | - case 'protocolo_integrado_mensagens_alterar': | |
32 | - require_once 'protocolo_integrado_mensagens_cadastro.php'; | |
33 | - return true; | |
34 | - | |
35 | - case 'protocolo_integrado_configurar_parametros': | |
36 | - require_once 'protocolo_integrado_configurar_parametros.php'; | |
37 | - return true; | |
38 | - | |
39 | - case 'protocolo_integrado_monitoramento': | |
40 | - case'protocolo_integrado_forcar_reenvio': | |
41 | - require_once 'protocolo_integrado_monitoramento.php'; | |
42 | - return true; | |
43 | - | |
44 | - case 'protocolo_integrado_visualizar_metadados': | |
45 | - case 'protocolo_integrado_visualizar_erro_envio_metadados': | |
46 | - require_once 'protocolo_integrado_acesso_arquivo_metadados.php'; | |
47 | - return true; | |
48 | - } | |
49 | - return false; | |
50 | - } | |
51 | - | |
52 | - public function processarControladorAjax($strAcaoAjax) { | |
53 | - $xml = null; | |
54 | - /* | |
55 | - switch ($strAcaoAjax) { | |
56 | - case 'protooclo_integrado_xxxxxxx': | |
57 | - $xml = ProtocoloIntegradoXxxxxxxINT....; | |
58 | - break; | |
59 | - } | |
60 | - */ | |
61 | - return $xml; | |
62 | - } | |
63 | - | |
64 | - public function processarControladorWebServices($strServico) { | |
65 | - $strArq = null; | |
66 | - /* | |
67 | - switch ($strServico) { | |
68 | - case 'cvm_xxxxxx': | |
69 | - $strArq = 'cvm_xxxxxx.wsdl'; | |
70 | - break; | |
71 | - } | |
72 | - | |
73 | - if ($strArq!=null){ | |
74 | - $strArq = dirname(__FILE__).'/ws/'.$strArq; | |
75 | - } | |
76 | - */ | |
77 | - return $strArq; | |
78 | - } | |
79 | - | |
80 | -} | |
81 | - | |
82 | -?> |
containeres/sei-app/protocolo_integrado/bd/ProtocoloIntegradoBD.php
... | ... | @@ -1,42 +0,0 @@ |
1 | -<?php | |
2 | -/** | |
3 | - * TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
4 | - * | |
5 | - * 02/05/2011 - criado por mga | |
6 | - * | |
7 | - * Versão do Gerador de Código: 1.31.0 | |
8 | - * | |
9 | - * Versão no CVS: $Id$ | |
10 | - */ | |
11 | - | |
12 | -require_once dirname ( __FILE__ ) . '/../../../../SEI.php'; | |
13 | - | |
14 | -class ProtocoloIntegradoBD extends InfraBD { | |
15 | - | |
16 | - public function __construct(InfraIBanco $objInfraIBanco) { | |
17 | - parent::__construct( $objInfraIBanco ); | |
18 | - } | |
19 | - /** | |
20 | - ** Função Criada para recuperar o nome chaves estrangeiras em base Mysql da tabela de pacote | |
21 | - ** Dependendo da versão a rodar o script de atualização para 1.1.3,a foreign key terá nomes diferentes. | |
22 | - ** | |
23 | - **/ | |
24 | - public function recuperarChavesEstrangeirasv112(){ | |
25 | - | |
26 | - $objPacoteDTO = new ProtocoloIntegradoDTO(); | |
27 | - $chaveEstrangeira = ""; | |
28 | - if (BancoSEI::getInstance() instanceof InfraMySql || BancoSEI::getInstance() instanceof InfraSqlServer){ | |
29 | - | |
30 | - $sql = "SELECT constraint_name FROM information_schema.TABLE_CONSTRAINTS WHERE information_schema.TABLE_CONSTRAINTS.CONSTRAINT_TYPE = 'FOREIGN KEY' AND information_schema.TABLE_CONSTRAINTS.TABLE_SCHEMA = 'sei' AND information_schema.TABLE_CONSTRAINTS.TABLE_NAME = 'protocolo_integrado';"; | |
31 | - $rs = $this->getObjInfraIBanco()->consultarSql($sql); | |
32 | - //var_dump($rs); | |
33 | - return $rs; | |
34 | - | |
35 | - | |
36 | - } | |
37 | - | |
38 | - } | |
39 | - | |
40 | -} | |
41 | - | |
42 | -?> | |
43 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/bd/ProtocoloIntegradoMonitoramentoProcessosBD.php
... | ... | @@ -1,291 +0,0 @@ |
1 | -<?php | |
2 | -/** | |
3 | -* TRIBUNAL REGIONAL FEDERAL DA 4º REGIÃO | |
4 | -* | |
5 | -* 02/05/2011 - criado por mga | |
6 | -* | |
7 | -* Versão do Gerador de Código: 1.31.0 | |
8 | -* | |
9 | -* Versão no CVS: $Id$ | |
10 | -*/ | |
11 | - | |
12 | -require_once dirname(__FILE__).'/../../../../SEI.php'; | |
13 | - | |
14 | -class ProtocoloIntegradoMonitoramentoProcessosBD extends InfraBD { | |
15 | - | |
16 | - private $maxIdAtividadeMonitorada; | |
17 | - | |
18 | - public function __construct(InfraIBanco $objInfraIBanco){ | |
19 | - parent::__construct($objInfraIBanco); | |
20 | - } | |
21 | - | |
22 | - public function consultarNovasOperacoesProcessosNaoEnviados($maxIdAtividade, $limit, $numUnidadeTeste=null){ | |
23 | - | |
24 | - try { | |
25 | - | |
26 | - $topSQLServer = ""; | |
27 | - $restricaoMaxAtividade = ""; | |
28 | - if ($this->getObjInfraIBanco() instanceof InfraSQLServer) { | |
29 | - $topSQLServer = "top ".$limit; | |
30 | - } | |
31 | - | |
32 | - if ($maxIdAtividade!=null && $maxIdAtividade>0) { | |
33 | - $restricaoMaxAtividade = "AND a.id_atividade<".$maxIdAtividade . " "; | |
34 | - } | |
35 | - | |
36 | - $sql = "select " . $topSQLServer. " a.* FROM atividade a ". | |
37 | - "INNER JOIN protocolo p on a.id_protocolo=p.id_protocolo ". | |
38 | - "INNER JOIN md_pi_mensagem pi on a.id_tarefa = pi.id_tarefa ". | |
39 | - "WHERE NOT EXISTS (select id_protocolo from md_pi_pacote_envio mppe where mppe.id_protocolo=p.id_protocolo) ".$restricaoMaxAtividade. | |
40 | - "AND sin_publicar = 'S' ". | |
41 | - "AND (sta_protocolo = 'P' AND (sta_nivel_acesso_global = 0 or (sta_nivel_acesso_global=1 and exists (select * from md_pi_parametros where sin_publicacao_restritos='S'))) ) ". | |
42 | - "AND exists (select * from documento d inner join protocolo p2 on p2.id_protocolo_agrupador=d.id_documento inner join rel_protocolo_protocolo rpp on rpp.id_protocolo_2 = p2.id_protocolo where rpp.id_protocolo_1 = p.id_protocolo and d.sin_bloqueado='S' )"; | |
43 | - | |
44 | - if ($numUnidadeTeste!=null) { | |
45 | - $sql = $sql." AND p.id_unidade_geradora NOT IN (".$numUnidadeTeste.") "; | |
46 | - } | |
47 | - | |
48 | - $sql = $sql." order by a.dth_abertura "; | |
49 | - | |
50 | - //MYSQL, monta clausula LIMIT no final | |
51 | - if ($this->getObjInfraIBanco() instanceof InfraMySQL) { | |
52 | - $sql = $sql." limit ".$limit; | |
53 | - } else if ($this->getObjInfraIBanco() instanceof InfraOracle) { | |
54 | - //Oracle, monta clasusula especifica | |
55 | - $sql = "select * from (". $sql. ") where rownum <= ".$limit; | |
56 | - } | |
57 | - | |
58 | - $rs = $this->getObjInfraIBanco()->consultarSql($sql); | |
59 | - | |
60 | - $arrObjAtividadeMonitoradas = array(); | |
61 | - $arrPacotes = array(); | |
62 | - | |
63 | - return $this->formataAtividadesMonitoradasParaDTO($rs); | |
64 | - | |
65 | - } catch(Exception $e) { | |
66 | - throw new InfraException('Erro ao carregar atividades.',$e); | |
67 | - } | |
68 | - | |
69 | - } | |
70 | - | |
71 | - public function consultaMaxAtividadeMonitorada() { | |
72 | - | |
73 | - $maxIdAtividade = 0; | |
74 | - $sqlAtividade = "select max(id_atividade) id_atividade from md_pi_monitora_processos"; | |
75 | - $rs = $this->getObjInfraIBanco()->consultarSql($sqlAtividade); | |
76 | - | |
77 | - foreach ($rs as $item) { | |
78 | - $maxIdAtividade = $this->getObjInfraIBanco()->formatarLeituraNum($item ['id_atividade']); | |
79 | - } | |
80 | - | |
81 | - if (is_null($maxIdAtividade)) { | |
82 | - $maxIdAtividade = 0; | |
83 | - } | |
84 | - | |
85 | - return $maxIdAtividade; | |
86 | - } | |
87 | - | |
88 | - public function consultarNovasOperacoesProcesso($limit, $numUnidadeTeste=null) { | |
89 | - | |
90 | - try { | |
91 | - | |
92 | - //SQL Server usa top para limitar numero de registros retornados | |
93 | - $topSQLServer = ""; | |
94 | - | |
95 | - $this->maxIdAtividadeMonitorada = $this->consultaMaxAtividadeMonitorada(); | |
96 | - $atividadesProcessosIneditos = $this->consultarNovasOperacoesProcessosNaoEnviados($this->maxIdAtividadeMonitorada,$limit,$numUnidadeTeste); | |
97 | - | |
98 | - if (count($atividadesProcessosIneditos) >= $limit) { | |
99 | - return $atividadesProcessosIneditos; | |
100 | - } | |
101 | - | |
102 | - if ($this->getObjInfraIBanco() instanceof InfraSQLServer) { | |
103 | - $topSQLServer = "top ".($limit - count($atividadesProcessosIneditos)); | |
104 | - } | |
105 | - | |
106 | - $restricaoAtividade = "a.id_atividade > " . $this->maxIdAtividadeMonitorada; | |
107 | - $sql = "select " . $topSQLServer. " a.* FROM atividade a ". | |
108 | - "INNER JOIN protocolo p on a.id_protocolo=p.id_protocolo ". | |
109 | - "INNER JOIN md_pi_mensagem pi on a.id_tarefa = pi.id_tarefa ". | |
110 | - "WHERE ".$restricaoAtividade." AND (sta_protocolo = 'P' AND (sta_nivel_acesso_global = 0 or (sta_nivel_acesso_global=1 and exists (select * from md_pi_parametros where sin_publicacao_restritos='S'))) ) ". | |
111 | - "AND sin_publicar = 'S' ". | |
112 | - "AND exists (select * from documento d inner join protocolo p2 on p2.id_protocolo_agrupador=d.id_documento inner join rel_protocolo_protocolo rpp on rpp.id_protocolo_2 = p2.id_protocolo where rpp.id_protocolo_1 = p.id_protocolo and d.sin_bloqueado='S' )"; | |
113 | - // "AND not exists(select * from md_pi_monitora_processos pimp where pimp.id_atividade=a.id_atividade)"; | |
114 | - | |
115 | - if ($numUnidadeTeste!=null) { | |
116 | - $sql = $sql." AND p.id_unidade_geradora NOT IN (".$numUnidadeTeste.") "; | |
117 | - } | |
118 | - | |
119 | - $sql = $sql." order by a.dth_abertura "; | |
120 | - | |
121 | - // Monta clausula LIMIT de acordo com banco do sistema | |
122 | - if ($this->getObjInfraIBanco() instanceof InfraMySQL) { | |
123 | - $sql = $sql." limit ".($limit - count($atividadesProcessosIneditos)); | |
124 | - } else if ($this->getObjInfraIBanco() instanceof InfraOracle) { | |
125 | - $sql = "select * from (". $sql. ") where rownum <= ".($limit - count($atividadesProcessosIneditos)); | |
126 | - } | |
127 | - | |
128 | - $rs = $this->getObjInfraIBanco()->consultarSql($sql); | |
129 | - | |
130 | - $arrObjAtividadeMonitoradas = $this->formataAtividadesMonitoradasParaDTO($rs,$atividadesProcessosIneditos); | |
131 | - $arrPacotes = array(); | |
132 | - | |
133 | - return $arrObjAtividadeMonitoradas; | |
134 | - | |
135 | - } catch (Exception $e) { | |
136 | - throw new InfraException('Erro ao carregar atividades.',$e); | |
137 | - } | |
138 | - | |
139 | - } | |
140 | - | |
141 | - public function formataAtividadesMonitoradasParaDTO($resultadoAtividades,$arrAtividadesMonitoradasPrevias=array()){ | |
142 | - | |
143 | - $i=count($arrAtividadesMonitoradasPrevias); | |
144 | - | |
145 | - foreach ($resultadoAtividades as $item) { | |
146 | - $objProtocoloIntegradoMonitoramentoDTO = new ProtocoloIntegradoMonitoramentoProcessosDTO(); | |
147 | - $objProtocoloIntegradoMonitoramentoDTO->setNumIdAtividade($this->getObjInfraIBanco()->formatarLeituraNum($item['id_atividade'])); | |
148 | - $objProtocoloIntegradoMonitoramentoDTO->setDthDataCadastro(date('d/m/Y H:i:s')); | |
149 | - $objProtocoloIntegradoMonitoramentoDTO->setNumIdProtocolo($item['id_protocolo']); | |
150 | - | |
151 | - $arrAtividadesMonitoradasPrevias[$i] = $objProtocoloIntegradoMonitoramentoDTO; | |
152 | - | |
153 | - if($this->getObjInfraIBanco()->formatarLeituraNum($item['id_atividade'])>$this->maxIdAtividadeMonitorada){ | |
154 | - $this->maxIdAtividadeMonitorada = $this->getObjInfraIBanco()->formatarLeituraNum($item['id_atividade']); | |
155 | - } | |
156 | - | |
157 | - $i++; | |
158 | - } | |
159 | - | |
160 | - return $arrAtividadesMonitoradasPrevias; | |
161 | - } | |
162 | - | |
163 | - public function recuperarChavePrimaria(){ | |
164 | - | |
165 | - $objMonitoramentoDTO = new ProtocoloIntegradoMonitoramentoProcessosDTO(); | |
166 | - $chavePrimaria = ""; | |
167 | - | |
168 | - if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
169 | - $sql = "SELECT constraint_name FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME ='".$objMonitoramentoDTO->getStrNomeTabela()."' and constraint_type ='PRIMARY KEY'"; | |
170 | - $rs = $this->getObjInfraIBanco()->consultarSql($sql); | |
171 | - | |
172 | - //var_dump($rs); | |
173 | - foreach($rs as $item){ | |
174 | - if($item[0] != null){ | |
175 | - $chavePrimaria = $item[0]; | |
176 | - } | |
177 | - } | |
178 | - | |
179 | - return $chavePrimaria; | |
180 | - } | |
181 | - } | |
182 | - /** | |
183 | - ** Função Criada para recuperar o nome chaves estrangeiras em base Mysql da tabela de pacote | |
184 | - ** Dependendo da versão a rodar o script de atualização para 1.1.3,a foreign key terá nomes diferentes. | |
185 | - ** | |
186 | - **/ | |
187 | - public function recuperarChavesEstrangeirasv112(){ | |
188 | - | |
189 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
190 | - $chaveEstrangeira = ""; | |
191 | - if (BancoSEI::getInstance() instanceof InfraMySql || BancoSEI::getInstance() instanceof InfraSqlServer){ | |
192 | - | |
193 | - $sql = "SELECT constraint_name FROM information_schema.TABLE_CONSTRAINTS WHERE information_schema.TABLE_CONSTRAINTS.CONSTRAINT_TYPE = 'FOREIGN KEY' AND information_schema.TABLE_CONSTRAINTS.TABLE_SCHEMA = 'sei' AND information_schema.TABLE_CONSTRAINTS.TABLE_NAME = 'protocolo_integrado_monitoramento_processos';"; | |
194 | - $rs = $this->getObjInfraIBanco()->consultarSql($sql); | |
195 | - //var_dump($rs); | |
196 | - return $rs; | |
197 | - | |
198 | - | |
199 | - } | |
200 | - | |
201 | - } | |
202 | - public function consultarParticipantesDocumentosAssinadosProcesso($idProtocolo) { | |
203 | - | |
204 | - $sql = "select distinct con.id_contato,con.nome,con.sigla". | |
205 | - " from rel_protocolo_protocolo rpp". | |
206 | - " inner join participante par on par.id_protocolo=rpp.id_protocolo_2". | |
207 | - " inner join contato con on con.id_contato=par.id_contato". | |
208 | - " inner join documento d on d.id_documento=par.id_protocolo". | |
209 | - " where rpp.id_protocolo_1=".$idProtocolo. | |
210 | - " and par.sta_participacao = '".ParticipanteRN::$TP_INTERESSADO."' ". | |
211 | - " and (d.sin_bloqueado='S' or id_tipo_conferencia is not null)"; | |
212 | - | |
213 | - $resultadoDocumentos = $this->getObjInfraIBanco()->consultarSql($sql); | |
214 | - $objParticipanteDTO = new ProtocoloDTO(); | |
215 | - $arrParticipanteDTO = array(); | |
216 | - | |
217 | - foreach($resultadoDocumentos as $item) { | |
218 | - $objParticipanteDTO = new ParticipanteDTO(); | |
219 | - $objParticipanteDTO->setStrNomeContato($item['nome']); | |
220 | - $objParticipanteDTO->setNumIdContato($item['id_contato']); | |
221 | - $objParticipanteDTO->setStrSiglaContato($item['sigla']); | |
222 | - array_push($arrParticipanteDTO,$objParticipanteDTO); | |
223 | - } | |
224 | - | |
225 | - return $arrParticipanteDTO; | |
226 | - } | |
227 | - | |
228 | - public function consultarAtividadesPublicacao($idPacote) { | |
229 | - | |
230 | - //Adriano MPOG - ajustando para identificadores de ate 30 posicoes | |
231 | - $sql = "select a.id_atividade,a.id_tarefa,a.id_protocolo,a.dth_abertura,a.id_unidade,pi.mensagem_publicacao from md_pi_pacote_envio pepi ". | |
232 | - " inner join md_pi_monitora_processos pimp on pimp.id_md_pi_pacote_envio = pepi.id_md_pi_pacote_envio ". | |
233 | - " inner join atividade a on pimp.id_atividade = a.id_atividade ". | |
234 | - " inner join md_pi_mensagem pi on pi.id_tarefa=a.id_tarefa ". | |
235 | - " where pepi.id_md_pi_pacote_envio = ".$idPacote. | |
236 | - " and pi.sin_publicar='S'". | |
237 | - " order by a.dth_abertura"; | |
238 | - $arrProtocoloIntegradoMonitoramentoProcessosDTO = array(); | |
239 | - $resultadoDocumentos = $this->getObjInfraIBanco()->consultarSql($sql); | |
240 | - | |
241 | - foreach ($resultadoDocumentos as $item) { | |
242 | - $objProtocoloIntegradoMonitoramentoProcessosDTO = new ProtocoloIntegradoMonitoramentoProcessosDTO(); | |
243 | - $objProtocoloIntegradoMonitoramentoProcessosDTO->setNumIdAtividade($item['id_atividade']); | |
244 | - $objProtocoloIntegradoMonitoramentoProcessosDTO->setNumIdTarefa($item['id_tarefa']); | |
245 | - $objProtocoloIntegradoMonitoramentoProcessosDTO->setNumIdProtocolo($item['id_protocolo']); | |
246 | - $objProtocoloIntegradoMonitoramentoProcessosDTO->setStrMensagemPublicacao($item['mensagem_publicacao']); | |
247 | - $objProtocoloIntegradoMonitoramentoProcessosDTO->setDthDataAbertura($item['dth_abertura']); | |
248 | - $objProtocoloIntegradoMonitoramentoProcessosDTO->setNumIdUnidade($item['id_unidade']); | |
249 | - array_push($arrProtocoloIntegradoMonitoramentoProcessosDTO,$objProtocoloIntegradoMonitoramentoProcessosDTO); | |
250 | - } | |
251 | - | |
252 | - return $arrProtocoloIntegradoMonitoramentoProcessosDTO; | |
253 | - } | |
254 | - | |
255 | - // Função que recebe a data no formato dd/mm/yyyy hh:mm:ss e retorna uma funcao correspondente ao banco do sistema | |
256 | - public function retornarFormatoData ($strData) { | |
257 | - | |
258 | - if (($this->getObjInfraIBanco() instanceof InfraMySQL)) { | |
259 | - return "STR_TO_DATE('". $strData ."', '%d/%m/%Y %H:%i:%s')"; | |
260 | - } else if ($this->getObjInfraIBanco() instanceof InfraOracle) { | |
261 | - return "TO_DATE('". $strData ."', 'dd/mm/yyyy hh24:mi:ss')"; | |
262 | - } | |
263 | - | |
264 | - //SQL Server, monta clasusula dele | |
265 | - else if ( $this->getObjInfraIBanco() instanceof InfraSQLServer) { | |
266 | - // Remove espaços e substitui barras por hifem | |
267 | - $strNovaData = trim($strData); | |
268 | - $strNovaData = str_replace("/","-",$strNovaData); | |
269 | - | |
270 | - return " convert(datetime, '". substr($strNovaData, 6, 4) . "-". substr($strNovaData, 3, 2) . "-". substr($strNovaData, 0, 2) . " " . substr($strNovaData, 11, 8) . "', 120)"; | |
271 | - } | |
272 | - } | |
273 | - | |
274 | - public function recuperarIdsTabelaMonitoramentov112() { | |
275 | - | |
276 | - $sql = 'select id_protocolo_integrado_monitoramento_processos from protocolo_integrado_monitoramento_processos'; | |
277 | - $rs = $this->getObjInfraIBanco()->consultarSql($sql); | |
278 | - | |
279 | - $arrMonitoramentoProcessosDTO = array(); | |
280 | - foreach ($rs as $item) { | |
281 | - $objMonitoramentoProcessosDTO = new ProtocoloIntegradoMonitoramentoProcessosDTO(); | |
282 | - $objMonitoramentoProcessosDTO->setNumIdProtocoloIntegradoMonitoramentoProcessos($item[0]); | |
283 | - array_push($arrMonitoramentoProcessosDTO,$objMonitoramentoProcessosDTO); | |
284 | - } | |
285 | - | |
286 | - return $arrMonitoramentoProcessosDTO; | |
287 | - } | |
288 | - | |
289 | -} | |
290 | - | |
291 | -?> |
containeres/sei-app/protocolo_integrado/bd/ProtocoloIntegradoPacoteEnvioBD.php
... | ... | @@ -1,79 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -require_once dirname ( __FILE__ ) . '/../../../../SEI.php'; | |
4 | - | |
5 | -class ProtocoloIntegradoPacoteEnvioBD extends InfraBD { | |
6 | - | |
7 | - public function __construct(InfraIBanco $objInfraIBanco) { | |
8 | - parent::__construct($objInfraIBanco); | |
9 | - } | |
10 | - | |
11 | - /* | |
12 | - * * Função retorna dados de uma coluna da tabela de pacotes que é passada por parâmetro | |
13 | - * | |
14 | - */ | |
15 | - public function recuperarColunaTabelaPacote($coluna) { | |
16 | - | |
17 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
18 | - $sql = 'select ' . $coluna . ' from ' . $objPacoteDTO->getStrNomeTabela(); | |
19 | - $rs = $this->getObjInfraIBanco()->consultarSql($sql); | |
20 | - | |
21 | - $arrPacotesDTO = array(); | |
22 | - foreach ($rs as $item) { | |
23 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
24 | - $objPacoteDTO->setNumIdProtocoloIntegradoPacoteEnvio($item[0]); | |
25 | - array_push($arrPacotesDTO, $objPacoteDTO); | |
26 | - } | |
27 | - | |
28 | - return $arrPacotesDTO; | |
29 | - | |
30 | - } | |
31 | - | |
32 | - /* | |
33 | - * Função utilizada para recuperar nome da chave primária no Sql Server na tabela de pacotes | |
34 | - * | |
35 | - */ | |
36 | - public function recuperarChavePrimaria() { | |
37 | - | |
38 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
39 | - $chavePrimaria = ""; | |
40 | - if (BancoSEI::getInstance() instanceof InfraSqlServer) { | |
41 | - $sql = "SELECT constraint_name FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS WHERE TABLE_NAME ='" . $objPacoteDTO->getStrNomeTabela() . "' and constraint_type ='PRIMARY KEY'"; | |
42 | - $rs = $this->getObjInfraIBanco()->consultarSql( $sql ); | |
43 | - | |
44 | - // var_dump($rs); | |
45 | - foreach ($rs as $item) { | |
46 | - if ($item [0] != null) { | |
47 | - $chavePrimaria = $item[0]; | |
48 | - } | |
49 | - } | |
50 | - | |
51 | - return $chavePrimaria; | |
52 | - } | |
53 | - | |
54 | - } | |
55 | - | |
56 | - /** | |
57 | - ** Função Criada para recuperar o nome chaves estrangeiras em base Mysql da tabela de pacote | |
58 | - ** Dependendo da versão a rodar o script de atualização para 1.1.3,a foreign key terá nomes diferentes. | |
59 | - ** | |
60 | - **/ | |
61 | - public function recuperarChavesEstrangeirasv112(){ | |
62 | - | |
63 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
64 | - $chaveEstrangeira = ""; | |
65 | - if (BancoSEI::getInstance() instanceof InfraMySql || BancoSEI::getInstance() instanceof InfraSqlServer){ | |
66 | - | |
67 | - $sql = "SELECT constraint_name FROM information_schema.TABLE_CONSTRAINTS WHERE information_schema.TABLE_CONSTRAINTS.CONSTRAINT_TYPE = 'FOREIGN KEY' AND information_schema.TABLE_CONSTRAINTS.TABLE_SCHEMA = 'sei' AND information_schema.TABLE_CONSTRAINTS.TABLE_NAME = 'protocolo_integrado_pacote_envio';"; | |
68 | - $rs = $this->getObjInfraIBanco()->consultarSql($sql); | |
69 | - //var_dump($rs); | |
70 | - return $rs; | |
71 | - | |
72 | - | |
73 | - } | |
74 | - | |
75 | - } | |
76 | - | |
77 | -} | |
78 | - | |
79 | -?> | |
80 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/bd/ProtocoloIntegradoParametrosBD.php
... | ... | @@ -1,22 +0,0 @@ |
1 | -<?php | |
2 | -/** | |
3 | - * TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
4 | - * | |
5 | - * 02/05/2011 - criado por mga | |
6 | - * | |
7 | - * Versão do Gerador de Código: 1.31.0 | |
8 | - * | |
9 | - * Versão no CVS: $Id$ | |
10 | - */ | |
11 | - | |
12 | -require_once dirname ( __FILE__ ) . '/../../../../SEI.php'; | |
13 | - | |
14 | -class ProtocoloIntegradoParametrosBD extends InfraBD { | |
15 | - | |
16 | - public function __construct(InfraIBanco $objInfraIBanco) { | |
17 | - parent::__construct( $objInfraIBanco ); | |
18 | - } | |
19 | - | |
20 | -} | |
21 | - | |
22 | -?> | |
23 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/dto/ProtocoloIntegradoDTO.php
... | ... | @@ -1,23 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -require_once dirname(__FILE__).'/../../../../SEI.php'; | |
4 | - | |
5 | -class ProtocoloIntegradoDTO extends InfraDTO { | |
6 | - | |
7 | - public function getStrNomeTabela() { | |
8 | - return 'md_pi_mensagem'; | |
9 | - } | |
10 | - | |
11 | - public function montar() { | |
12 | - //Adriano - MPOG - tratamento para identificadores de campos ficarem com até 30 posições. | |
13 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdProtocoloIntegrado', 'id_md_pi_mensagem'); | |
14 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdTarefa', 'id_tarefa'); | |
15 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'SinPublicar', 'sin_publicar'); | |
16 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'MensagemPublicacao', 'mensagem_publicacao'); | |
17 | - $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,'NomeTarefa','nome','tarefa'); | |
18 | - $this->configurarPK('IdProtocoloIntegrado',InfraDTO::$TIPO_PK_INFORMADO); | |
19 | - $this->configurarFK('IdTarefa', 'tarefa', 'id_tarefa', InfraDTO::$TIPO_FK_OBRIGATORIA); | |
20 | - } | |
21 | -} | |
22 | - | |
23 | -?> |
containeres/sei-app/protocolo_integrado/dto/ProtocoloIntegradoMonitoramentoProcessosDTO.php
... | ... | @@ -1,32 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -require_once dirname(__FILE__).'/../../../../SEI.php'; | |
4 | - | |
5 | -class ProtocoloIntegradoMonitoramentoProcessosDTO extends InfraDTO { | |
6 | - | |
7 | - public function getStrNomeTabela() { | |
8 | - //ADRIANO - MPOG - Adequando nome de identificadores para ate 30 posicoes | |
9 | - return 'md_pi_monitora_processos'; | |
10 | - } | |
11 | - | |
12 | - public function montar() { | |
13 | - //ADRIANO - MPOG - Adequando nome de identificadores para ate 30 posicoes | |
14 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdProtocoloIntegradoMonitoramentoProcessos', 'id_md_pi_monitora_processos'); | |
15 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdAtividade', 'id_atividade'); | |
16 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_DTH, 'DataCadastro', 'dth_cadastro'); | |
17 | - $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdProtocolo','id_protocolo','atividade'); | |
18 | - $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdUnidade','id_unidade','atividade'); | |
19 | - $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdTarefa','id_tarefa','atividade'); | |
20 | - $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTH,'DataAbertura','dth_abertura','atividade'); | |
21 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdPacote', 'id_md_pi_pacote_envio'); | |
22 | - $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,'MensagemPublicacao','id_tarefa','md_pi_mensagem'); | |
23 | - $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,'IdProtocolo','id_protocolo','md_pi_pacote_envio'); | |
24 | - $this->configurarPK('IdProtocoloIntegradoMonitoramentoProcessos',InfraDTO::$TIPO_PK_NATIVA); | |
25 | - $this->configurarFK('IdAtividade', 'atividade', 'id_atividade', InfraDTO::$TIPO_FK_OBRIGATORIA); | |
26 | - $this->configurarFK('IdTarefa', 'md_pi_mensagem', 'id_tarefa', InfraDTO::$TIPO_FK_OBRIGATORIA); | |
27 | - $this->configurarFK('IdPacote', 'md_pi_pacote_envio', 'id_md_pi_pacote_envio', InfraDTO::$TIPO_FK_OBRIGATORIA); | |
28 | - } | |
29 | - | |
30 | -} | |
31 | - | |
32 | -?> |
containeres/sei-app/protocolo_integrado/dto/ProtocoloIntegradoPacoteEnvioDTO.php
... | ... | @@ -1,31 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -require_once dirname(__FILE__).'/../../../../SEI.php'; | |
4 | - | |
5 | -class ProtocoloIntegradoPacoteEnvioDTO extends InfraDTO { | |
6 | - | |
7 | - public function getStrNomeTabela() { | |
8 | - //ADRIANO - MPOG - Adequando nome de identificadores para ate 30 posicoes | |
9 | - return 'md_pi_pacote_envio'; | |
10 | - } | |
11 | - | |
12 | - public function montar() { | |
13 | - //ADRIANO - MPOG - Adequando nome de identificadores para ate 30 posicoes | |
14 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdProtocoloIntegradoPacoteEnvio', 'id_md_pi_pacote_envio'); | |
15 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'StaIntegracao', 'sta_integracao'); | |
16 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_DTH, 'DataSituacao', 'dth_situacao'); | |
17 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_DTH, 'DataMetadados', 'dth_metadados'); | |
18 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdProtocolo', 'id_protocolo'); | |
19 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'TentativasEnvio', 'num_tentativas_envio'); | |
20 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'ArquivoMetadados', 'arquivo_metadados'); | |
21 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'ArquivoErro', 'arquivo_erro'); | |
22 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_DTH, 'DataAgendamentoExecutado', 'dth_agendamento_executado'); | |
23 | - $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,'ProtocoloFormatado','protocolo_formatado','protocolo'); | |
24 | - $this->configurarPK('IdProtocoloIntegradoPacoteEnvio',InfraDTO::$TIPO_PK_NATIVA); | |
25 | - $this->configurarFK('IdProtocolo', 'protocolo', 'id_protocolo', InfraDTO::$TIPO_FK_OBRIGATORIA); | |
26 | - $this->setOrd('IdProtocoloIntegradoPacoteEnvio', InfraDTO::$TIPO_ORDENACAO_ASC); | |
27 | - } | |
28 | - | |
29 | -} | |
30 | - | |
31 | -?> |
containeres/sei-app/protocolo_integrado/dto/ProtocoloIntegradoParametrosDTO.php
... | ... | @@ -1,29 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -require_once dirname(__FILE__).'/../../../../SEI.php'; | |
4 | - | |
5 | -class ProtocoloIntegradoParametrosDTO extends InfraDTO { | |
6 | - | |
7 | - public function getStrNomeTabela() { | |
8 | - //ADRIANO - MPOG - Adequando nome de identificadores para ate 30 posicoes | |
9 | - return 'md_pi_parametros'; | |
10 | - } | |
11 | - | |
12 | - public function montar() { | |
13 | - //ADRIANO - MPOG - Adequando nome de identificadores para ate 30 posicoes | |
14 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdProtocoloIntegradoParametros', 'id_md_pi_parametros'); | |
15 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'UrlWebservice', 'url_webservice'); | |
16 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'LoginWebservice', 'login_webservice'); | |
17 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'SenhaWebservice', 'senha_webservice'); | |
18 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'SinExecutandoPublicacao', 'sin_executando_publicacao'); | |
19 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'QuantidadeTentativas', 'quantidade_tentativas'); | |
20 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'EmailAdministrador', 'email_administrador'); | |
21 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_DTH, 'DataUltimoProcessamento', 'dth_ultimo_processamento'); | |
22 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'SinPublicacaoRestritos', 'sin_publicacao_restritos'); | |
23 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'AtividadesCarregar', 'num_atividades_carregar'); | |
24 | - $this->configurarPK('IdProtocoloIntegradoParametros',InfraDTO::$TIPO_PK_INFORMADO); | |
25 | - } | |
26 | - | |
27 | -} | |
28 | - | |
29 | -?> |
containeres/sei-app/protocolo_integrado/protocolo_integrado_acesso_arquivo_metadados.php
... | ... | @@ -1,56 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -try { | |
4 | - | |
5 | - require_once dirname(__FILE__).'/../../../SEI.php'; | |
6 | - | |
7 | - session_start(); | |
8 | - SessaoSEI::getInstance()->validarLink(); | |
9 | - SessaoSEI::getInstance()->validarPermissao('protocolo_integrado_acesso_arquivo_metadados'); | |
10 | - | |
11 | - ////////////////////////////////////////////////////////////////////////////// | |
12 | - //InfraDebug::getInstance()->setBolLigado(false); | |
13 | - //InfraDebug::getInstance()->setBolDebugInfra(true); | |
14 | - //InfraDebug::getInstance()->limpar(); | |
15 | - ////////////////////////////////////////////////////////////////////////////// | |
16 | - | |
17 | - switch($_GET['acao']){ | |
18 | - | |
19 | - case 'protocolo_integrado_visualizar_metadados': | |
20 | - $idPacote = $_REQUEST['id_pacote']; | |
21 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
22 | - $objPacoteRN = new ProtocoloIntegradoPacoteEnvioRN(); | |
23 | - $objPacoteDTO->setNumIdProtocoloIntegradoPacoteEnvio($idPacote); | |
24 | - | |
25 | - $objPacoteDTO->retStrArquivoMetadados(); | |
26 | - | |
27 | - $objRetornoPacote = $objPacoteRN->consultar($objPacoteDTO); | |
28 | - header("Content-Type: text/xml"); | |
29 | - print($objRetornoPacote->getStrArquivoMetadados()); | |
30 | - die; | |
31 | - break; | |
32 | - | |
33 | - case 'protocolo_integrado_visualizar_erro_envio_metadados': | |
34 | - $idPacote = $_REQUEST['id_pacote']; | |
35 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
36 | - $objPacoteRN = new ProtocoloIntegradoPacoteEnvioRN(); | |
37 | - $objPacoteDTO->setNumIdProtocoloIntegradoPacoteEnvio($idPacote); | |
38 | - | |
39 | - $objPacoteDTO->retStrArquivoErro(); | |
40 | - | |
41 | - $objRetornoPacote = $objPacoteRN->consultar($objPacoteDTO); | |
42 | - header("Content-Type: text/xml"); | |
43 | - print ($objRetornoPacote->getStrArquivoErro()); | |
44 | - die; | |
45 | - break; | |
46 | - | |
47 | - default: | |
48 | - throw new InfraException("Ação '".$_GET['acao']."' não reconhecida."); | |
49 | - | |
50 | - } | |
51 | - | |
52 | -} catch(Exception $e) { | |
53 | - PaginaSEI::getInstance()->processarExcecao($e); | |
54 | -} | |
55 | - | |
56 | -?> | |
57 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/protocolo_integrado_configurar_parametros.php
... | ... | @@ -1,245 +0,0 @@ |
1 | -<?php | |
2 | -try { | |
3 | - require_once dirname(__FILE__).'/../../../SEI.php'; | |
4 | - | |
5 | - session_start(); | |
6 | - | |
7 | - ////////////////////////////////////////////////////////////////////////////// | |
8 | - //InfraDebug::getInstance()->setBolLigado(false); | |
9 | - //InfraDebug::getInstance()->setBolDebugInfra(true); | |
10 | - //InfraDebug::getInstance()->limpar(); | |
11 | - ////////////////////////////////////////////////////////////////////////////// | |
12 | - | |
13 | - SessaoSEI::getInstance()->validarLink(); | |
14 | - | |
15 | - | |
16 | - SessaoSEI::getInstance()->validarPermissao($_GET['acao']); | |
17 | - | |
18 | - $objOrgaoDTO = new OrgaoDTO(); | |
19 | - | |
20 | - $strDesabilitar = ''; | |
21 | - | |
22 | - $arrComandos = array(); | |
23 | - | |
24 | - $objProtocoloIntegradoParametrosDTO = new ProtocoloIntegradoParametrosDTO(); | |
25 | - $objProtocoloIntegradoParametrosDTO->retTodos(); | |
26 | - | |
27 | - $objProtocoloIntegradoParametrosRN = new ProtocoloIntegradoParametrosRN(); | |
28 | - $objRetornoProtocoloIntegradoParametrosDTO = $objProtocoloIntegradoParametrosRN->consultar($objProtocoloIntegradoParametrosDTO); | |
29 | - $senhaWebService = ''; | |
30 | - | |
31 | - if(isset($_POST['txtSenhaServico'])){ | |
32 | - | |
33 | - $senhaWebService = $_POST['txtSenhaServico']; | |
34 | - } | |
35 | - else if(strlen(trim($objRetornoProtocoloIntegradoParametrosDTO->getStrSenhaWebservice()))>0){ | |
36 | - | |
37 | - $senhaWebService = $objProtocoloIntegradoParametrosRN->encriptaSenha(rawurldecode(trim($objRetornoProtocoloIntegradoParametrosDTO->getStrSenhaWebservice()))); | |
38 | - | |
39 | - } | |
40 | - | |
41 | - switch($_GET['acao']){ | |
42 | - | |
43 | - case 'protocolo_integrado_configurar_parametros': | |
44 | - | |
45 | - $strTitulo = 'Parâmetros de Integração'; | |
46 | - $arrComandos[] = '<button type="submit" accesskey="S" name="sbmAlterarOrgao" value="Salvar" class="infraButton"><span class="infraTeclaAtalho">S</span>alvar</button>'; | |
47 | - $strDesabilitar = 'disabled="disabled"'; | |
48 | - | |
49 | - if(isset($_POST['hdnFomularioSubmetido'])){ | |
50 | - | |
51 | - $strValorSinPublicacaoRestritos='N'; | |
52 | - if ($_POST['chkEnviarInformacoesProcessosRestritos']=='on'){ | |
53 | - $strValorSinPublicacaoRestritos='S'; | |
54 | - } | |
55 | - $objProtocoloIntegradoParametrosDTO->setNumIdProtocoloIntegradoParametros($_POST['hdnIdProtocoloIntegradoParametros']); | |
56 | - $objProtocoloIntegradoParametrosDTO->setStrUrlWebservice($_POST['txtUrlServico']); | |
57 | - | |
58 | - $objProtocoloIntegradoParametrosDTO->setStrLoginWebservice($_POST['txtLoginServico']); | |
59 | - | |
60 | - $senha = rawurlencode($objProtocoloIntegradoParametrosRN->encriptaSenha($_POST['txtSenhaServico'])); | |
61 | - $objProtocoloIntegradoParametrosDTO->setStrSenhaWebservice($senha); | |
62 | - $objProtocoloIntegradoParametrosDTO->setNumQuantidadeTentativas($_POST['txtQuantidadeTentativas']); | |
63 | - $objProtocoloIntegradoParametrosDTO->setNumAtividadesCarregar($_POST['txtQuantidadeAtividades']); | |
64 | - $objProtocoloIntegradoParametrosDTO->setStrEmailAdministrador($_POST['txtEmailAdministrador']); | |
65 | - $objProtocoloIntegradoParametrosDTO->setStrSinPublicacaoRestritos($strValorSinPublicacaoRestritos); | |
66 | - | |
67 | - $objProtocoloIntegradoParametrosRN->alterar($objProtocoloIntegradoParametrosDTO); | |
68 | - $objRetornoProtocoloIntegradoParametrosDTO = $objProtocoloIntegradoParametrosRN->consultar($objProtocoloIntegradoParametrosDTO); | |
69 | - //var_dump($objRetornoProtocoloIntegradoParametrosDTO); | |
70 | - | |
71 | - } | |
72 | - | |
73 | - break; | |
74 | - default: | |
75 | - throw new InfraException("Ação '".$_GET['acao']."' não reconhecida."); | |
76 | - | |
77 | - } | |
78 | - $chkEnviarInformacoesProcessosRestritos = ""; | |
79 | - if ($objRetornoProtocoloIntegradoParametrosDTO->getStrSinPublicacaoRestritos()!=null && $objRetornoProtocoloIntegradoParametrosDTO->getStrSinPublicacaoRestritos()=='S'){ | |
80 | - $chkEnviarInformacoesProcessosRestritos = "checked='checked'"; | |
81 | - } | |
82 | - | |
83 | -} catch(Exception $e){ | |
84 | - PaginaSEI::getInstance()->processarExcecao($e); | |
85 | -} | |
86 | - | |
87 | -PaginaSEI::getInstance()->montarDocType(); | |
88 | -PaginaSEI::getInstance()->abrirHtml(); | |
89 | -PaginaSEI::getInstance()->abrirHead(); | |
90 | -PaginaSEI::getInstance()->montarMeta(); | |
91 | -PaginaSEI::getInstance()->montarTitle(':: '.PaginaSEI::getInstance()->getStrNomeSistema().' - '.$strTitulo.' ::'); | |
92 | -PaginaSEI::getInstance()->montarStyle(); | |
93 | -PaginaSEI::getInstance()->abrirStyle(); | |
94 | -?> | |
95 | - | |
96 | -<? | |
97 | - | |
98 | -PaginaSEI::getInstance()->fecharStyle(); | |
99 | -PaginaSEI::getInstance()->montarJavaScript(); | |
100 | -PaginaSEI::getInstance()->abrirJavaScript(); | |
101 | -?> | |
102 | -function inicializar(){ | |
103 | -} | |
104 | -function OnSubmitForm() { | |
105 | - return validarCadastroProtocololIntegradoParametros(); | |
106 | - | |
107 | -} | |
108 | -function validarCadastroProtocololIntegradoParametros(){ | |
109 | - | |
110 | - if (infraTrim(document.getElementById('txtLoginServico').value)=='') { | |
111 | - alert('Informe o Usuário de Acesso ao Webservice'); | |
112 | - document.getElementById('txtLoginServico').focus(); | |
113 | - return false; | |
114 | - } | |
115 | - | |
116 | - if (infraTrim(document.getElementById('txtLoginServico').value).length >10) { | |
117 | - alert('O campo Usuário deve ter no máximo 10 caracteres'); | |
118 | - document.getElementById('txtLoginServico').focus(); | |
119 | - return false; | |
120 | - } | |
121 | - if (infraTrim(document.getElementById('txtSenhaServico').value).length!=16) { | |
122 | - alert('O campo Senha deve possuir 16 caracteres'); | |
123 | - document.getElementById('txtSenhaServico').focus(); | |
124 | - return false; | |
125 | - } | |
126 | - if (infraTrim(document.getElementById('txtSenhaServico').value)=='') { | |
127 | - alert('Informe o Senha de Acesso ao Webservice'); | |
128 | - document.getElementById('txtSenhaServico').focus(); | |
129 | - return false; | |
130 | - } | |
131 | - if (infraTrim(document.getElementById('txtUrlServico').value)=='') { | |
132 | - alert('Informe a URL do WebService'); | |
133 | - document.getElementById('txtUrlServico').focus(); | |
134 | - return false; | |
135 | - } | |
136 | - /*if (infraTrim(document.getElementById('txtDataCorte').value)=='') { | |
137 | - alert('Informe a Data de Corte'); | |
138 | - document.getElementById('txtDataCorte').focus(); | |
139 | - return false; | |
140 | - } | |
141 | - if (infraTrim(document.getElementById('txtDataCorteFinal').value)=='') { | |
142 | - alert('Informe a Data de Corte Final'); | |
143 | - document.getElementById('txtDataCorteFinal').focus(); | |
144 | - return false; | |
145 | - }*/ | |
146 | - if(!infraValidarData(infraTrim(document.getElementById('txtDataCorte')))){ | |
147 | - alert('A Data de Corte deve ser uma data válida'); | |
148 | - document.getElementById('txtDataCorte').focus(); | |
149 | - return false; | |
150 | - } | |
151 | - if (infraTrim(document.getElementById('txtQuantidadeTentativas').value)=='') { | |
152 | - alert('Informe a Quantidade de tentativas'); | |
153 | - document.getElementById('txtQuantidadeTentativas').focus(); | |
154 | - return false; | |
155 | - } | |
156 | - | |
157 | - if (isNaN(document.getElementById('txtQuantidadeTentativas').value)) { | |
158 | - alert('A Quantidade de tentativas deve ser um número inteiro'); | |
159 | - document.getElementById('txtQuantidadeTentativas').focus(); | |
160 | - return false; | |
161 | - } | |
162 | - if (infraTrim(document.getElementById('txtQuantidadeAtividades').value)=='') { | |
163 | - alert('Informe a quantidade máxima de andamentos a enviar por vez'); | |
164 | - document.getElementById('txtQuantidadeTentativas').focus(); | |
165 | - return false; | |
166 | - } | |
167 | - | |
168 | - if (isNaN(document.getElementById('txtQuantidadeAtividades').value)) { | |
169 | - alert('A quantidade máxima de andamentos deve ser um número inteiro'); | |
170 | - document.getElementById('txtQuantidadeTentativas').focus(); | |
171 | - return false; | |
172 | - }else if(document.getElementById('txtQuantidadeAtividades').value>500000){ | |
173 | - | |
174 | - alert('A quantidade de máxima de andamentos não deve ultrapassar o valor 500000'); | |
175 | - document.getElementById('txtQuantidadeAtividades').focus(); | |
176 | - return false; | |
177 | - } | |
178 | - if (infraTrim(document.getElementById('txtEmailAdministrador').value)=='') { | |
179 | - alert('Informe o Email do Administrator'); | |
180 | - document.getElementById('txtEmailAdministrador').focus(); | |
181 | - return false; | |
182 | - } | |
183 | - return true; | |
184 | -} | |
185 | -<? | |
186 | -PaginaSEI::getInstance()->fecharJavaScript(); | |
187 | -PaginaSEI::getInstance()->fecharHead(); | |
188 | -PaginaSEI::getInstance()->abrirBody($strTitulo,'onload="inicializar();"'); | |
189 | -?> | |
190 | -<form id="frmProtocoloIntegrado" method="post" onsubmit="return OnSubmitForm();" action="<?=PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao'].'&acao_origem='.$_GET['acao']))?>"> | |
191 | -<input type="hidden" id="hdnFomularioSubmetido" name="hdnFomularioSubmetido" value="true" /> | |
192 | -<input type='hidden' id'hdnIdProtocoloIntegradoParametros' name='hdnIdProtocoloIntegradoParametros' value='<?=$objRetornoProtocoloIntegradoParametrosDTO->getNumIdProtocoloIntegradoParametros()?>'/> | |
193 | -<? | |
194 | -//PaginaSEI::getInstance()->montarBarraComandosSuperior($arrComandos); | |
195 | -//PaginaSEI::getInstance()->montarAreaValidacao(); | |
196 | -PaginaSEI::getInstance()->abrirAreaDados(null); | |
197 | -?> | |
198 | - | |
199 | - <h2 style='font-weight:bold;text-decoration: underline;'>Endereço do Serviço</h2> | |
200 | - <label id="lblUrlServico" for="txtUrlServico" accesskey="" class="infraLabelObrigatorio">URL referente ao webservice do Protocolo Integrado que será utilizado:</label><br/><br/> | |
201 | - <input type="text" id="txtUrlServico" name="txtUrlServico" class="infraText" size="80" value="<?=$objRetornoProtocoloIntegradoParametrosDTO->getStrUrlWebservice()?>" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /><br/><br/><br/> | |
202 | - <label id="lblLoginServico" for="txtLoginServico" accesskey="" class="infraLabelObrigatorio">Usuário</label><br/> | |
203 | - <input type="text" id="txtLoginServico" name="txtLoginServico" class="infraText" size="10" value="<?=$objRetornoProtocoloIntegradoParametrosDTO->getStrLoginWebservice()?>" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /><br/><br/><br/> | |
204 | - <label id="lblSenhaServico" for="txtSenhaServico" accesskey="" class="infraLabelObrigatorio">Senha</label><br/> | |
205 | - <input type="password" id="txtSenhaServico" name="txtSenhaServico" class="infraText" size="20" value="<?=$senhaWebService?>" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /><br/><br/><br/> | |
206 | - | |
207 | - <hr> | |
208 | - <h2 style='font-weight:bold;text-decoration: underline;'>Tentativas de Reenvio</h2> | |
209 | - <h3 style='font-weight:bold; font-style: italic;'>Quantidade de Tentativas para Reenvio dos Metadados:</h3><br/> | |
210 | - <label id="lblQuantidadeTentativas" for="txtQuantidadeTentativas" accesskey=""> | |
211 | - Quando o envio de processos para o Protocolo Integrado for malsucedido, o SEI tentará reenviá-los respeitando a quantidade de vezes especificada abaixo. | |
212 | - </label><br/><br/> | |
213 | - <input type="text" id="txtQuantidadeTentativas" name="txtQuantidadeTentativas" class="infraText" size="3" value="<?=$objRetornoProtocoloIntegradoParametrosDTO->getNumQuantidadeTentativas()?>" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> vezes<br/><br/><br/> | |
214 | - | |
215 | - <hr> | |
216 | - <h2 style='font-weight:bold;text-decoration: underline;'>Andamentos a Enviar</h2> | |
217 | - <h3 style='font-weight:bold; font-style: italic;'>Enviar Informações de Processos Restritos:</h3> | |
218 | - <input id="chkEnviarInformacoesProcessosRestritos" name="chkEnviarInformacoesProcessosRestritos" type="checkbox" <?=$chkEnviarInformacoesProcessosRestritos?> tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" />Sim | |
219 | - | |
220 | - <h3 style='font-weight:bold; font-style: italic;'>Quantidade máxima de andamentos a enviar por vez:</h3><br/> | |
221 | - <label id="lblQuantidadeTentativas" for="txtQuantidadeTentativas" accesskey=""> | |
222 | - Quando o agendamento for executado, este parâmetro será utilizado como número máximo de andamentos de processos a ser enviado. | |
223 | - </label><br/><br/> | |
224 | - <input type="text" id="txtQuantidadeAtividades" name="txtQuantidadeAtividades" class="infraText" size="8" value="<?=$objRetornoProtocoloIntegradoParametrosDTO->getNumAtividadesCarregar()?>" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> atividades<br/><br/><br/> | |
225 | - | |
226 | - <hr> | |
227 | - <h2 style='font-weight:bold;text-decoration: underline;'>Administrador da Integração</h2> | |
228 | - <h3 style='font-weight:bold; font-style: italic;'>Endereço de e-mail:</h3><br/> | |
229 | - <label id="lblEmailAdministrador" for="txtEmailAdministrador" accesskey=""> | |
230 | - Contato para questões relacionadas à integração do SEI com o Protocolo Integrado.<br/> | |
231 | - </label><br/> | |
232 | - <input type="text" id="txtEmailAdministrador" name="txtEmailAdministrador" class="infraText" size="80" value="<?=$objRetornoProtocoloIntegradoParametrosDTO->getStrEmailAdministrador()?>" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> <br/><br/><br/> | |
233 | - | |
234 | - <button type="submit" accesskey="S" name="sbmAlterarOrgao" value="Salvar" class="infraButton"><span class="infraTeclaAtalho">S</span>alvar</button> | |
235 | - <? | |
236 | - PaginaSEI::getInstance()->fecharAreaDados(); | |
237 | - //PaginaSEI::getInstance()->montarAreaDebug(); | |
238 | - //PaginaSEI::getInstance()->montarBarraComandosInferior($arrComandos); | |
239 | - ?> | |
240 | -</form> | |
241 | - | |
242 | -<? | |
243 | -PaginaSEI::getInstance()->fecharBody(); | |
244 | -PaginaSEI::getInstance()->fecharHtml(); | |
245 | -?> | |
246 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/protocolo_integrado_mensagens_cadastro.php
... | ... | @@ -1,117 +0,0 @@ |
1 | -<?php | |
2 | -try { | |
3 | - require_once dirname(__FILE__).'/../../../SEI.php'; | |
4 | - | |
5 | - session_start(); | |
6 | - | |
7 | - ////////////////////////////////////////////////////////////////////////////// | |
8 | - //InfraDebug::getInstance()->setBolLigado(false); | |
9 | - //InfraDebug::getInstance()->setBolDebugInfra(true); | |
10 | - //InfraDebug::getInstance()->limpar(); | |
11 | - ////////////////////////////////////////////////////////////////////////////// | |
12 | - | |
13 | - SessaoSEI::getInstance()->validarLink(); | |
14 | - | |
15 | - PaginaSEI::getInstance()->verificarSelecao('tarefa_selecionar'); | |
16 | - | |
17 | - SessaoSEI::getInstance()->validarPermissao($_GET['acao']); | |
18 | - | |
19 | - $arrComandos = array(); | |
20 | - | |
21 | - $objProtocoloIntegradoDTO = new ProtocoloIntegradoDTO(); | |
22 | - $objProtocoloIntegradoDTO->retNumIdProtocoloIntegrado(); | |
23 | - $objProtocoloIntegradoDTO->retStrNomeTarefa(); | |
24 | - $objProtocoloIntegradoDTO->retStrSinPublicar(); | |
25 | - $objProtocoloIntegradoDTO->retStrMensagemPublicacao(); | |
26 | - | |
27 | - $objProtocoloIntegradoRN = new ProtocoloIntegradoRN(); | |
28 | - | |
29 | - if (isset($_REQUEST['id_mensagem_protocolo_integrado'])){ | |
30 | - $idProtocolo = $_REQUEST['id_mensagem_protocolo_integrado']; | |
31 | - } | |
32 | - $objRetornoProtocoloIntegradoDTO = new ProtocoloIntegradoDTO(); | |
33 | - | |
34 | - switch($_GET['acao']){ | |
35 | - | |
36 | - case 'protocolo_integrado_mensagens_alterar': | |
37 | - $strTitulo = 'Editar Publicação no Protocolo Integrado'; | |
38 | - $arrComandos[] = '<button type="submit" accesskey="S" name="sbmAlterarOrgao" value="Salvar" class="infraButton"><span class="infraTeclaAtalho">S</span>alvar</button>'; | |
39 | - $strDesabilitar = 'disabled="disabled"'; | |
40 | - | |
41 | - if (isset($_REQUEST['id_mensagem_protocolo_integrado'])){ | |
42 | - | |
43 | - $objProtocoloIntegradoDTO->setNumIdProtocoloIntegrado($idProtocolo); | |
44 | - $objRetornoProtocoloIntegradoDTO = $objProtocoloIntegradoRN->consultar($objProtocoloIntegradoDTO); | |
45 | - if(isset($_POST['hdnFomularioSubmetido']) ){ | |
46 | - | |
47 | - if($objRetornoProtocoloIntegradoDTO->getStrSinPublicar()=='S'){ | |
48 | - | |
49 | - $objProtocoloIntegradoDTO->setStrMensagemPublicacao($_POST['txtMensagemPublicacao']); | |
50 | - $objProtocoloIntegradoRN->alterar($objProtocoloIntegradoDTO); | |
51 | - header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao=protocolo_integrado_mensagens_listar')); | |
52 | - die; | |
53 | - | |
54 | - } | |
55 | - | |
56 | - } | |
57 | - | |
58 | - } | |
59 | - break; | |
60 | - default: | |
61 | - throw new InfraException("Ação '".$_GET['acao']."' não reconhecida."); | |
62 | - | |
63 | - } | |
64 | - | |
65 | -} catch(Exception $e){ | |
66 | - PaginaSEI::getInstance()->processarExcecao($e); | |
67 | -} | |
68 | - | |
69 | -PaginaSEI::getInstance()->montarDocType(); | |
70 | -PaginaSEI::getInstance()->abrirHtml(); | |
71 | -PaginaSEI::getInstance()->abrirHead(); | |
72 | -PaginaSEI::getInstance()->montarMeta(); | |
73 | -PaginaSEI::getInstance()->montarTitle(':: '.PaginaSEI::getInstance()->getStrNomeSistema().' - '.$strTitulo.' ::'); | |
74 | -PaginaSEI::getInstance()->montarStyle(); | |
75 | -PaginaSEI::getInstance()->abrirStyle(); | |
76 | -?> | |
77 | - | |
78 | -<? | |
79 | - | |
80 | -PaginaSEI::getInstance()->fecharStyle(); | |
81 | -PaginaSEI::getInstance()->montarJavaScript(); | |
82 | -PaginaSEI::getInstance()->abrirJavaScript(); | |
83 | -?> | |
84 | -function inicializar(){ | |
85 | -} | |
86 | -<? | |
87 | -PaginaSEI::getInstance()->fecharJavaScript(); | |
88 | -PaginaSEI::getInstance()->fecharHead(); | |
89 | -PaginaSEI::getInstance()->abrirBody($strTitulo,'onload="inicializar();"'); | |
90 | -?> | |
91 | -<form id="frmProtocoloIntegrado" method="post" onsubmit="return OnSubmitForm();" action="<?=PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao'].'&acao_origem='.$_GET['acao']))?>"> | |
92 | -<input type="hidden" id="hdnFomularioSubmetido" name="hdnFomularioSubmetido" value="true" /> | |
93 | -<input type="hidden" id="id_mensagem_protocolo_integrado" name="id_mensagem_protocolo_integrado" value="<?=$idProtocolo?>" /> | |
94 | -<? | |
95 | -//PaginaSEI::getInstance()->montarBarraComandosSuperior($arrComandos); | |
96 | -//PaginaSEI::getInstance()->montarAreaValidacao(); | |
97 | -PaginaSEI::getInstance()->abrirAreaDados('55em'); | |
98 | -?> | |
99 | - <br/><br/><br/><br/> | |
100 | - <label id="lblTarefa" for="txtTarefa" accesskey="a" class="infraLabelOpcional">Texto Original da Publicação:</label><br/> | |
101 | - <textarea id="txtTarefa" rows="4" cols="50" name="txtTarefa" class="infraText" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" readonly="true" /><?=$objRetornoProtocoloIntegradoDTO->getStrNomeTarefa()?></textarea><br/><br/><br/> | |
102 | - | |
103 | - <label id="lblMensagemPublicacao" for="txtMensagemPublicacao" accesskey="" class="infraLabelOpcional">Texto para Publicação:</label><br/> | |
104 | - <textarea id="txtMensagemPublicacao" rows="4" cols="50" name="txtMensagemPublicacao" class="infraText" onkeypress="infraMascaraTexto(this,event,500);" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /><?=$objRetornoProtocoloIntegradoDTO->getStrMensagemPublicacao()?></textarea><br/> | |
105 | - <button type="submit" accesskey="S" name="sbmAlterarOrgao" value="Salvar" class="infraButton"><span class="infraTeclaAtalho">S</span>alvar</button> | |
106 | - <button type="button" accesskey="F" id="btnFecharSelecao" value="Fechar" onclick="location.href='<?=SessaoSEI::getInstance()->assinarLink('controlador.php?acao=protocolo_integrado_mensagens_listar')?>';" class="infraButton"><span class="infraTeclaAtalho">C</span>ancelar</button> | |
107 | - <? | |
108 | - PaginaSEI::getInstance()->fecharAreaDados(); | |
109 | - | |
110 | - //PaginaSEI::getInstance()->montarAreaDebug(); | |
111 | - //PaginaSEI::getInstance()->montarBarraComandosInferior($arrComandos); | |
112 | - ?> | |
113 | -</form> | |
114 | -<? | |
115 | -PaginaSEI::getInstance()->fecharBody(); | |
116 | -PaginaSEI::getInstance()->fecharHtml(); | |
117 | -?> |
containeres/sei-app/protocolo_integrado/protocolo_integrado_mensagens_listar.php
... | ... | @@ -1,267 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -try { | |
4 | - require_once dirname(__FILE__).'/../../../SEI.php'; | |
5 | - | |
6 | - session_start(); | |
7 | - | |
8 | - ////////////////////////////////////////////////////////////////////////////// | |
9 | - //InfraDebug::getInstance()->setBolLigado(false); | |
10 | - //InfraDebug::getInstance()->setBolDebugInfra(true); | |
11 | - //InfraDebug::getInstance()->limpar(); | |
12 | - ////////////////////////////////////////////////////////////////////////////// | |
13 | - | |
14 | - SessaoSEI::getInstance()->validarLink(); | |
15 | - | |
16 | - | |
17 | - SessaoSEI::getInstance()->validarPermissao($_GET['acao']); | |
18 | - | |
19 | - $objProtocoloIntegradoDTO = new ProtocoloIntegradoDTO(); | |
20 | - $objProtocoloIntegradoDTO->retNumIdProtocoloIntegrado(); | |
21 | - //$objProtocoloIntegradoDTO->retNumIdTarefa(); | |
22 | - $objProtocoloIntegradoDTO->retStrSinPublicar(); | |
23 | - $objProtocoloIntegradoDTO->retStrMensagemPublicacao(); | |
24 | - | |
25 | - PaginaSEI::getInstance()->prepararOrdenacao($objProtocoloIntegradoDTO, 'MensagemPublicacao', InfraDTO::$TIPO_ORDENACAO_ASC); | |
26 | - | |
27 | - $objProtocoloIntegradoRN = new ProtocoloIntegradoRN(); | |
28 | - $arrObjProtocoloIntegradoDTO = $objProtocoloIntegradoRN->listar($objProtocoloIntegradoDTO); | |
29 | - | |
30 | - switch($_GET['acao']){ | |
31 | - | |
32 | - case 'protocolo_integrado_configurar_publicacao': | |
33 | - | |
34 | - $arrStrIds = explode(',',$_REQUEST['hdnPublicarItensSelecionados']); | |
35 | - | |
36 | - $arrStrItensModificados = explode(',',$_REQUEST['chkPublicarItemAlterados']); | |
37 | - $arrStrItensModificados = array_unique($arrStrItensModificados); | |
38 | - $ConfiguracaoProtocoloIntegradoDTO = new ProtocoloIntegradoDTO(); | |
39 | - for($i = 0;$i < count($arrStrItensModificados)-1; $i++){ | |
40 | - | |
41 | - if(in_array($arrStrItensModificados[$i],$arrStrIds)){ | |
42 | - | |
43 | - $ConfiguracaoProtocoloIntegradoDTO->setNumIdProtocoloIntegrado($arrStrItensModificados[$i]); | |
44 | - $ConfiguracaoProtocoloIntegradoDTO->setStrSinPublicar('S'); | |
45 | - $objProtocoloIntegradoRN->alterarOperacoesPublicacao($ConfiguracaoProtocoloIntegradoDTO); | |
46 | - | |
47 | - }else{ | |
48 | - | |
49 | - $ConfiguracaoProtocoloIntegradoDTO->setNumIdProtocoloIntegrado($arrStrItensModificados[$i]); | |
50 | - $ConfiguracaoProtocoloIntegradoDTO->setStrSinPublicar('N'); | |
51 | - $objProtocoloIntegradoRN->alterarOperacoesPublicacao($ConfiguracaoProtocoloIntegradoDTO); | |
52 | - } | |
53 | - PaginaSEI::getInstance()->adicionarMensagem('Operação realizada com sucesso.'); | |
54 | - } | |
55 | - header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao_origem'])); | |
56 | - die; | |
57 | - break; | |
58 | - case 'protocolo_integrado_mensagens_alterar': | |
59 | - | |
60 | - break; | |
61 | - | |
62 | - case 'protocolo_integrado_mensagens_listar': | |
63 | - $strTitulo = 'Configuração de Publicação no Protocolo Integrado'; | |
64 | - break; | |
65 | - | |
66 | - default: | |
67 | - throw new InfraException("Ação '".$_GET['acao']."' não reconhecida."); | |
68 | - } | |
69 | - | |
70 | - $arrComandos = array(); | |
71 | - | |
72 | - $bolAcaoConfigurarPublicacao = SessaoSEI::getInstance()->verificarPermissao('protocolo_integrado_configurar_publicacao'); | |
73 | - | |
74 | - if ($bolAcaoConfigurarPublicacao){ | |
75 | - $arrComandos[] = '<input type="button" onclick="configurarHistorico()" name="btnSalvar" id="btnSalvar" value="Salvar" class="infraButton" />'; | |
76 | - $strLinkConfigurarHistorico = SessaoSEI::getInstance()->assinarLink('controlador.php?acao=protocolo_integrado_configurar_publicacao&acao_origem='.$_GET['acao']); | |
77 | - } | |
78 | - | |
79 | - $numRegistros = count($arrObjProtocoloIntegradoDTO); | |
80 | - | |
81 | - if ($numRegistros > 0){ | |
82 | - | |
83 | - $bolCheck = false; | |
84 | - | |
85 | - if ($_GET['acao']=='protocolo_integrado_mensagens_listar'){ | |
86 | - $bolAcaoReativar = false; | |
87 | - $bolAcaoConsultar = SessaoSEI::getInstance()->verificarPermissao('protocolo_integrado_mensagens_listar'); | |
88 | - $bolAcaoAlterar = SessaoSEI::getInstance()->verificarPermissao('protocolo_integrado_mensagens_alterar'); | |
89 | - $bolAcaoImprimir = false; | |
90 | - //$bolAcaoGerarPlanilha = false; | |
91 | - $bolCheck = true; | |
92 | - }else{ | |
93 | - $bolAcaoReativar = false; | |
94 | - $bolAcaoConsultar = SessaoSEI::getInstance()->verificarPermissao('protocolo_integrado_mensagens_listar'); | |
95 | - $bolAcaoAlterar = SessaoSEI::getInstance()->verificarPermissao('protocolo_integrado_mensagens_alterar'); | |
96 | - | |
97 | - } | |
98 | - | |
99 | - | |
100 | - $strResultado = ''; | |
101 | - $strSumarioTabela = 'Tabela de Mensagens.'; | |
102 | - $strCaptionTabela = 'Mensagens'; | |
103 | - | |
104 | - $strResultado .= '<table width="99%" class="infraTable" summary="'.$strSumarioTabela.'">'."\n"; | |
105 | - $strResultado .= '<caption class="infraCaption">'.PaginaSEI::getInstance()->gerarCaptionTabela($strCaptionTabela,$numRegistros).'</caption>'; | |
106 | - $strResultado .= '<tr>'; | |
107 | - if($bolAcaoConfigurarPublicacao){ | |
108 | - $strResultado .= '<th class="infraTh" width="7%">'.PaginaSEI::getInstance()->getThCheck('Publicar','Publicar','onClick="mudaEstadoTodosLinkEditar(\'Publicar\');"').'</th>'."\n"; | |
109 | - } | |
110 | - $strResultado .= '<th class="infraTh" width="90%">'.PaginaSEI::getInstance()->getThOrdenacao($objProtocoloIntegradoDTO,'Mensagem para Publicação','MensagemPublicacao',$arrObjProtocoloIntegradoDTO).'</th>'; | |
111 | - if($bolAcaoAlterar){ | |
112 | - $strResultado .= '<th class="infraTh" width="7%"> Ação </th>'."\n"; | |
113 | - } | |
114 | - $strResultado .= '</tr>'."\n"; | |
115 | - $strCssTr=''; | |
116 | - | |
117 | - for($i = 0;$i < $numRegistros; $i++){ | |
118 | - | |
119 | - $strCssTr = ($strCssTr=='<tr class="infraTrClara">')?'<tr class="infraTrEscura">':'<tr class="infraTrClara">'; | |
120 | - //$strResultado .= $strCssTr; | |
121 | - $strResultado .= $strCssTr; | |
122 | - | |
123 | - if($bolAcaoConfigurarPublicacao){ | |
124 | - $strResultado .= '<td>'.PaginaSEI::getInstance()->getTrCheck($i,$arrObjProtocoloIntegradoDTO[$i]->getNumIdProtocoloIntegrado(),$arrObjProtocoloIntegradoDTO[$i]->getStrMensagemPublicacao(),$arrObjProtocoloIntegradoDTO[$i]->getStrSinPublicar(),'Publicar','onChange="mudaEstadoLinkEditar('.$i.');"').'</td>'; | |
125 | - } | |
126 | - | |
127 | - $strTagId = 'chkPublicarItem'.$i; | |
128 | - $strTagName = $strTagId; | |
129 | - $strResultado .= '<td width="10%">'.$arrObjProtocoloIntegradoDTO[$i]->getStrMensagemPublicacao().'</td>'; | |
130 | - if($bolAcaoAlterar){ | |
131 | - $strResultado .= '<td align="center">'; | |
132 | - | |
133 | - $strResultado .= PaginaSEI::getInstance()->getAcaoTransportarItem($i,$arrObjProtocoloIntegradoDTO[$i]->getNumIdProtocoloIntegrado()); | |
134 | - | |
135 | - if ($arrObjProtocoloIntegradoDTO[$i]->getStrSinPublicar()=='S'){ | |
136 | - $strResultado .= '<a class="enabled" id="linkEditarMensagem_'.$i.'" href="'.PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=protocolo_integrado_mensagens_alterar&acao_origem='.$_GET['acao'].'&acao_retorno='.$_GET['acao'].'&id_mensagem_protocolo_integrado='.$arrObjProtocoloIntegradoDTO[$i]->getNumIdProtocoloIntegrado())).'" tabindex="'.PaginaSEI::getInstance()->getProxTabTabela().'"><img src="'.PaginaSEI::getInstance()->getDiretorioImagensGlobal().'/alterar.gif" title="Alterar Tipo de Andamento" alt="Alterar Tipo de Andamento" class="infraImg" /></a> '; | |
137 | - }else { | |
138 | - | |
139 | - $strResultado .= '<a class="disabled" id="linkEditarMensagem_'.$i.'" href="'.PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=protocolo_integrado_mensagens_alterar&acao_origem='.$_GET['acao'].'&acao_retorno='.$_GET['acao'].'&id_mensagem_protocolo_integrado='.$arrObjProtocoloIntegradoDTO[$i]->getNumIdProtocoloIntegrado())).'" tabindex="'.PaginaSEI::getInstance()->getProxTabTabela().'"><img src="'.PaginaSEI::getInstance()->getDiretorioImagensGlobal().'/alterar.gif" title="Alterar Tipo de Andamento" alt="Alterar Tipo de Andamento" class="infraImg" /></a> '; | |
140 | - | |
141 | - } | |
142 | - $strResultado .= '</td>'; | |
143 | - } | |
144 | - | |
145 | - $strResultado .= '</tr>'."\n"; | |
146 | - $strResultado .= "</tr>\n"; | |
147 | - } | |
148 | - $strResultado .= '</table>'; | |
149 | - } | |
150 | - if ($_GET['acao'] == 'tarefa_selecionar'){ | |
151 | - $arrComandos[] = '<button type="button" accesskey="F" id="btnFecharSelecao" value="Fechar" onclick="window.close();" class="infraButton"><span class="infraTeclaAtalho">F</span>echar</button>'; | |
152 | - }else{ | |
153 | - $arrComandos[] = '<button type="button" accesskey="F" id="btnFechar" value="Fechar" onclick="location.href=\''.PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.PaginaSEI::getInstance()->getAcaoRetorno().'&acao_origem='.$_GET['acao'])).'\'" class="infraButton"><span class="infraTeclaAtalho">F</span>echar</button>'; | |
154 | - } | |
155 | - | |
156 | -}catch(Exception $e){ | |
157 | - PaginaSEI::getInstance()->processarExcecao($e); | |
158 | -} | |
159 | - | |
160 | -PaginaSEI::getInstance()->montarDocType(); | |
161 | -PaginaSEI::getInstance()->abrirHtml(); | |
162 | -PaginaSEI::getInstance()->abrirHead(); | |
163 | -PaginaSEI::getInstance()->montarMeta(); | |
164 | -PaginaSEI::getInstance()->montarTitle(':: '.PaginaSEI::getInstance()->getStrNomeSistema().' - '.$strTitulo.' ::'); | |
165 | -PaginaSEI::getInstance()->montarStyle(); | |
166 | -PaginaSEI::getInstance()->abrirStyle(); | |
167 | - | |
168 | -?> | |
169 | -a.disabled { | |
170 | - pointer-events: none; | |
171 | - cursor: default; | |
172 | -} | |
173 | -a.enabled { | |
174 | - cursor: default; | |
175 | -} | |
176 | -<? | |
177 | -PaginaSEI::getInstance()->fecharStyle(); | |
178 | -PaginaSEI::getInstance()->montarJavaScript(); | |
179 | -PaginaSEI::getInstance()->abrirJavaScript(); | |
180 | -?> | |
181 | - | |
182 | -function inicializar(){ | |
183 | - if ('<?=$_GET['acao']?>'=='tarefa_selecionar'){ | |
184 | - infraReceberSelecao(); | |
185 | - document.getElementById('btnFecharSelecao').focus(); | |
186 | - }else{ | |
187 | - document.getElementById('btnFechar').focus(); | |
188 | - } | |
189 | - infraEfeitoTabelas(); | |
190 | -} | |
191 | -function mudaEstadoTodosLinkEditar(nomeSelecao){ | |
192 | - | |
193 | - var nomeHdnNroItens = 'hdn'+nomeSelecao+'NroItens'; | |
194 | - infraCheck = document.getElementById('img'+nomeSelecao+'Check'); | |
195 | - infraNroItens = document.getElementById(nomeHdnNroItens); | |
196 | - document.getElementById('chkPublicarItemAlterados').value = ''; | |
197 | - if(infraCheck.title == 'Selecionar Tudo'){ | |
198 | - | |
199 | - | |
200 | - for(var i=0;i<infraNroItens.value;i++){ | |
201 | - | |
202 | - var link = document.getElementById('linkEditarMensagem_'+i); | |
203 | - if(link!=null){ | |
204 | - link.className = 'enabled'; | |
205 | - } | |
206 | - document.getElementById('chkPublicarItemAlterados').value += document.getElementById('chkPublicarItem'+i).value + ','; | |
207 | - } | |
208 | - | |
209 | - }else{ | |
210 | - | |
211 | - for(var i=0;i<infraNroItens.value;i++){ | |
212 | - | |
213 | - var link = document.getElementById('linkEditarMensagem_'+i); | |
214 | - if(link!=null){ | |
215 | - link.className = 'disabled'; | |
216 | - } | |
217 | - document.getElementById('chkPublicarItemAlterados').value += document.getElementById('chkPublicarItem'+i).value + ','; | |
218 | - } | |
219 | - } | |
220 | - infraSelecaoMultipla(nomeSelecao); | |
221 | - | |
222 | -} | |
223 | -function mudaEstadoLinkEditar(indice){ | |
224 | - | |
225 | - var link = document.getElementById('linkEditarMensagem_'+indice); | |
226 | - | |
227 | - if(link!=null){ | |
228 | - | |
229 | - if(document.getElementById('chkPublicarItem'+indice).checked==false){ | |
230 | - link.className = 'disabled'; | |
231 | - }else{ | |
232 | - | |
233 | - link.className = 'enabled'; | |
234 | - } | |
235 | - } | |
236 | - document.getElementById('chkPublicarItemAlterados').value += document.getElementById('chkPublicarItem'+indice).value + ','; | |
237 | -} | |
238 | - | |
239 | - | |
240 | -<? if ($bolAcaoConfigurarPublicacao){ ?> | |
241 | -function configurarHistorico(){ | |
242 | - | |
243 | - document.getElementById('frmMensagemLista').action='<?=$strLinkConfigurarHistorico?>'; | |
244 | - document.getElementById('frmMensagemLista').submit(); | |
245 | -} | |
246 | -<? } ?> | |
247 | - | |
248 | -<? | |
249 | -PaginaSEI::getInstance()->fecharJavaScript(); | |
250 | -PaginaSEI::getInstance()->fecharHead(); | |
251 | -PaginaSEI::getInstance()->abrirBody($strTitulo,'onload="inicializar();"'); | |
252 | -?> | |
253 | -<form id="frmMensagemLista" method="post" action="<?=PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao'].'&acao_origem='.$_GET['acao']))?>"> | |
254 | - <input type="hidden" id="chkPublicarItemAlterados" name="chkPublicarItemAlterados"/> | |
255 | - <? | |
256 | - PaginaSEI::getInstance()->montarBarraComandosSuperior($arrComandos); | |
257 | - //PaginaSEI::getInstance()->abrirAreaDados('5em'); | |
258 | - //PaginaSEI::getInstance()->fecharAreaDados(); | |
259 | - PaginaSEI::getInstance()->montarAreaTabela($strResultado,$numRegistros); | |
260 | - //PaginaSEI::getInstance()->montarAreaDebug(); | |
261 | - PaginaSEI::getInstance()->montarBarraComandosInferior($arrComandos); | |
262 | - ?> | |
263 | -</form> | |
264 | -<? | |
265 | -PaginaSEI::getInstance()->fecharBody(); | |
266 | -PaginaSEI::getInstance()->fecharHtml(); | |
267 | -?> | |
268 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/protocolo_integrado_monitoramento.php
... | ... | @@ -1,503 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -ini_set('max_execution_time','0'); | |
4 | -ini_set('memory_limit','-1'); | |
5 | -ini_set('output_buffering','On'); | |
6 | - | |
7 | -try { | |
8 | - | |
9 | - require_once dirname(__FILE__).'/../../../SEI.php'; | |
10 | - | |
11 | - session_start(); | |
12 | - SessaoSEI::getInstance()->validarLink(); | |
13 | - SessaoSEI::getInstance()->validarPermissao($_GET['acao']); | |
14 | - | |
15 | - ////////////////////////////////////////////////////////////////////////////// | |
16 | - //InfraDebug::getInstance()->setBolLigado(false); | |
17 | - //InfraDebug::getInstance()->setBolDebugInfra(true); | |
18 | - //InfraDebug::getInstance()->limpar(); | |
19 | - ////////////////////////////////////////////////////////////////////////////// | |
20 | - | |
21 | - $filtro = $_REQUEST; | |
22 | - $dtaPeriodoDe = $_REQUEST['filtroTxtPeriodoDe']; | |
23 | - $dtaPeriodoA = $_REQUEST['filtroTxtPeriodoA']; | |
24 | - if (!isset($_REQUEST['filtroTxtPeriodoGeracaoDe'])) { | |
25 | - $dtaPeriodoGeracaoDe = date("d/m/Y", time() - 60 * 60 * 24*3); | |
26 | - $filtro['filtroTxtPeriodoGeracaoDe'] = $dtaPeriodoGeracaoDe; | |
27 | - } else { | |
28 | - $dtaPeriodoGeracaoDe = $_REQUEST['filtroTxtPeriodoGeracaoDe']; | |
29 | - } | |
30 | - | |
31 | - $dtaPeriodoGeracaoA = $_REQUEST['filtroTxtPeriodoGeracaoA']; | |
32 | - $filtroProtocolo = $_REQUEST['filtroCodProtocolo']; | |
33 | - $filtroStaIntegracao = $_REQUEST['filtroSelSitucaoIntegracao']; | |
34 | - $filtroUnidadeGeradora = $_REQUEST['filtroSelUnidade']; | |
35 | - $filtroIncluirUnidadesFilhas = $_REQUEST['filtroIncluirUnidadesFilhas']; | |
36 | - if ($filtroIncluirUnidadesFilhas=='on') { | |
37 | - $filtroIncluirUnidadesFilhas="checked='checked'"; | |
38 | - } else { | |
39 | - $filtroIncluirUnidadesFilhas=""; | |
40 | - } | |
41 | - | |
42 | - if (isset($_POST['sbmPesquisar']) || isset($_POST['hdnInfraPaginaAtual'])==false || $_POST['hdnInfraPaginaAtual']=='') { | |
43 | - $_POST['hdnInfraPaginaAtual'] = '0'; | |
44 | - } | |
45 | - | |
46 | - switch($_GET['acao']){ | |
47 | - | |
48 | - case 'protocolo_integrado_forcar_reenvio': | |
49 | - $arrStrItensSelecionados = explode(',',$_REQUEST['hdnForcarReenvioItensSelecionados']); | |
50 | - $arrStrItensSelecionados = array_unique($arrStrItensSelecionados); | |
51 | - $objProtocoloIntegradoMonitoramentoProcessosRN = new ProtocoloIntegradoMonitoramentoProcessosRN(); | |
52 | - $objProtocoloIntegradoParametrosRN = new ProtocoloIntegradoParametrosRN(); | |
53 | - $objProtocoloIntegradoParametrosDTO = new ProtocoloIntegradoParametrosDTO(); | |
54 | - $objProtocoloIntegradoParametrosDTO->retTodos(); | |
55 | - $objRetornoProtocoloIntegradoParametros = $objProtocoloIntegradoParametrosRN->consultar($objProtocoloIntegradoParametrosDTO); | |
56 | - $filtro = array(); | |
57 | - $filtro['pacotes'] = array(); | |
58 | - | |
59 | - for ($i = 0;$i < count($arrStrItensSelecionados); $i++) { | |
60 | - array_push($filtro['pacotes'],$arrStrItensSelecionados[$i]); | |
61 | - PaginaSEI::getInstance()->adicionarMensagem('Operação realizada com sucesso.'); | |
62 | - } | |
63 | - $arrParam = array(); | |
64 | - $arrParam[0] = $objRetornoProtocoloIntegradoParametros; | |
65 | - $arrParam[1] = $filtro; | |
66 | - | |
67 | - $objProtocoloIntegradoMonitoramentoProcessosRN->publicarProcessosMonitorados($arrParam); | |
68 | - $parametros = ''; | |
69 | - | |
70 | - if(isset($_REQUEST['filtroCodProtocolo']) && $_REQUEST['filtroCodProtocolo']!='') { | |
71 | - $parametros .= '&filtroCodProtocolo='.$_REQUEST['filtroCodProtocolo']; | |
72 | - } | |
73 | - if(isset($_REQUEST['filtroSelSitucaoIntegracao']) && $_REQUEST['filtroSelSitucaoIntegracao']!='') { | |
74 | - $parametros .= '&filtroSelSitucaoIntegracao='.$_REQUEST['filtroSelSitucaoIntegracao']; | |
75 | - } | |
76 | - if(isset($_REQUEST['filtroSelUnidade']) && $_REQUEST['filtroSelUnidade']!='' ) { | |
77 | - $parametros .= '&filtroSelUnidade='.$_REQUEST['filtroSelUnidade']; | |
78 | - } | |
79 | - if(isset($_REQUEST['filtroIncluirUnidadesFilhas']) && $_REQUEST['filtroIncluirUnidadesFilhas']!='') { | |
80 | - $parametros .= '&filtroIncluirUnidadesFilhas='.$_REQUEST['filtroIncluirUnidadesFilhas']; | |
81 | - } | |
82 | - if(isset($_REQUEST['filtroTxtPeriodoGeracaoDe']) && $_REQUEST['filtroTxtPeriodoGeracaoDe']!='') { | |
83 | - $parametros .= '&filtroTxtPeriodoGeracaoDe='.$_REQUEST['filtroTxtPeriodoGeracaoDe']; | |
84 | - } | |
85 | - if(isset($_REQUEST['filtroTxtPeriodoGeracaoA']) && $_REQUEST['filtroTxtPeriodoGeracaoA']!='' ) { | |
86 | - $parametros .= '&filtroTxtPeriodoGeracaoA='.$_REQUEST['filtroTxtPeriodoGeracaoA']; | |
87 | - } | |
88 | - if(isset($_REQUEST['numRegistosPaginaSuperior']) && $_REQUEST['numRegistosPaginaSuperior']!='') { | |
89 | - $parametros .= '&numRegistosPaginaSuperior='.$_REQUEST['numRegistosPaginaSuperior']; | |
90 | - } | |
91 | - | |
92 | - header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao_origem'].$parametros)); | |
93 | - die; | |
94 | - | |
95 | - case 'protocolo_integrado_monitoramento': | |
96 | - $strTitulo = 'Monitoramento de Integração'; | |
97 | - break; | |
98 | - | |
99 | - default: | |
100 | - throw new InfraException("Ação '".$_GET['acao']."' não reconhecida."); | |
101 | - | |
102 | - } | |
103 | - $objProtocoloIntegradoMonitoramentoProcessosRN = new ProtocoloIntegradoMonitoramentoProcessosRN(); | |
104 | - | |
105 | - if(isset($_REQUEST['numRegistosPaginaSuperior']) && $_REQUEST['numRegistosPaginaSuperior']!='' ){ | |
106 | - $filtro['filtroNumQuantidadeRegistrosPorPagina'] = $_REQUEST['numRegistosPaginaSuperior']; | |
107 | - } | |
108 | - | |
109 | - $filtro['paginacao'] = true; | |
110 | - $arrObjPacotesMonitoradosDTO = $objProtocoloIntegradoMonitoramentoProcessosRN->listarProcessosMonitorados($filtro); | |
111 | - | |
112 | - $strItensSelSituacoesIntegracoes = $objProtocoloIntegradoMonitoramentoProcessosRN->getSituacoesIntegracao(); | |
113 | - | |
114 | - $strItensSelUnidades = $objProtocoloIntegradoMonitoramentoProcessosRN->getUnidadesGeradoras(); | |
115 | - | |
116 | - $objProtocoloIntegradoParametrosDTO = new ProtocoloIntegradoParametrosDTO(); | |
117 | - $objProtocoloIntegradoParametrosDTO->retNumIdProtocoloIntegradoParametros(); | |
118 | - $objProtocoloIntegradoParametrosDTO->retNumQuantidadeTentativas(); | |
119 | - $objProtocoloIntegradoParametrosDTO->retDthDataUltimoProcessamento(); | |
120 | - $objProtocoloIntegradoParametrosRN = new ProtocoloIntegradoParametrosRN(); | |
121 | - | |
122 | - $objParametrosDTO = $objProtocoloIntegradoParametrosRN->consultar($objProtocoloIntegradoParametrosDTO); | |
123 | - $arrComandos = array(); | |
124 | - | |
125 | - $bolAcaoForcarReenvio = SessaoSEI::getInstance()->verificarPermissao('protocolo_integrado_forcar_reenvio'); | |
126 | - | |
127 | - $numRegistros = count($arrObjPacotesMonitoradosDTO); | |
128 | - $objPacoteEnvioDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
129 | - $objPacoteEnvioDTO -> retNumIdProtocolo(); | |
130 | - $objPacoteEnvioDTO -> retStrStaIntegracao(); | |
131 | - $objPacoteEnvioDTO -> retDthDataSituacao(); | |
132 | - $objPacoteEnvioDTO -> retDthDataMetadados(); | |
133 | - $objPacoteEnvioDTO -> retNumTentativasEnvio(); | |
134 | - $objPacoteEnvioDTO -> retStrProtocoloFormatado(); | |
135 | - $objPacoteEnvioDTO -> retNumIdProtocoloIntegradoPacoteEnvio(); | |
136 | - | |
137 | - if ($numRegistros > 0) { | |
138 | - $bolCheck = false; | |
139 | - if ($_GET['acao']=='protocolo_integrado_monitoramento') { | |
140 | - $bolAcaoReativar = false; | |
141 | - $bolAcaoConsultar = SessaoSEI::getInstance()->verificarPermissao('protocolo_integrado_monitoramento'); | |
142 | - $bolAcaoAlterar = SessaoSEI::getInstance()->verificarPermissao('protocolo_integrado_monitoramento'); | |
143 | - $bolAcaoImprimir = false; | |
144 | - //$bolAcaoGerarPlanilha = false; | |
145 | - $bolAcaoExcluir = false; | |
146 | - $bolAcaoDesativar = false; | |
147 | - $bolCheck = true; | |
148 | - $bolColunaArquivo = SessaoInfra::getInstance()->verificarPermissao('protocolo_integrado_acesso_arquivo_metadados'); | |
149 | - } else { | |
150 | - $bolAcaoReativar = false; | |
151 | - $bolAcaoConsultar = SessaoSEI::getInstance()->verificarPermissao('protocolo_integrado_monitoramento'); | |
152 | - $bolAcaoAlterar = SessaoSEI::getInstance()->verificarPermissao('protocolo_integrado_monitoramento'); | |
153 | - $bolAcaoImprimir = true; | |
154 | - } | |
155 | - | |
156 | - if ($bolAcaoExcluir) { | |
157 | - $bolCheck = true; | |
158 | - $arrComandos[] = '<button type="button" accesskey="E" id="btnExcluir" value="Excluir" onclick="acaoExclusaoMultipla();" class="infraButton"><span class="infraTeclaAtalho">E</span>xcluir</button>'; | |
159 | - $strLinkExcluir = SessaoSEI::getInstance()->assinarLink('controlador.php?acao=tarefa_excluir&acao_origem='.$_GET['acao']); | |
160 | - } | |
161 | - | |
162 | - $strResultado = ''; | |
163 | - $strSumarioTabela = 'Tabela de Processos.'; | |
164 | - $strCaptionTabela = 'Pacotes'; | |
165 | - | |
166 | - | |
167 | - | |
168 | - $strResultado .= '<table width="99%" class="infraTable" summary="'.$strSumarioTabela.'">'."\n"; | |
169 | - $strResultado .= '<caption class="infraCaption">'.PaginaSEI::getInstance()->gerarCaptionTabela($strCaptionTabela,$numRegistros).'</caption>'; | |
170 | - $strResultado .= '<tr>'; | |
171 | - if ($bolCheck) { | |
172 | - // $strResultado .= '<th class="infraTh" width="1%">'.PaginaSEI::getInstance()->getThCheck().'</th>'."\n"; | |
173 | - } | |
174 | - $strResultado .= '<th class="infraTh" width="10%" align="center">'.PaginaSEI::getInstance()->getThCheck('Selecionar','ForcarReenvio').'</th>'; | |
175 | - $strResultado .= '<th class="infraTh">'.PaginaSEI::getInstance()->getThOrdenacao($objPacoteEnvioDTO,'Data do Metadado','DataMetadados',$arrObjPacotesMonitoradosDTO).'</th>'."\n"; | |
176 | - | |
177 | - | |
178 | - $strResultado .= '<th class="infraTh">'.PaginaSEI::getInstance()->getThOrdenacao($objPacoteEnvioDTO,'Processo','ProtocoloFormatado',$arrObjPacotesMonitoradosDTO).'</th>'."\n"; | |
179 | - $strResultado .= '<th class="infraTh">Situação</th>'."\n"; | |
180 | - $strResultado .= '<th class="infraTh">'.PaginaSEI::getInstance()->getThOrdenacao($objPacoteEnvioDTO,'Data da Situação','DataSituacao',$arrObjPacotesMonitoradosDTO).'</th>'."\n"; | |
181 | - if($bolColunaArquivo){ | |
182 | - $strResultado .= '<th class="infraTh">Ações</th>'."\n"; | |
183 | - } | |
184 | - $strResultado .= '</tr>'."\n"; | |
185 | - $numRegistrosRecebidos = 0; | |
186 | - $numRegistrosGerados = 0; | |
187 | - | |
188 | - $numCheckRecebidos = 0; | |
189 | - $numCheckGerados = 0; | |
190 | - | |
191 | - $strRecebidos = ''; | |
192 | - $strGerados = ''; | |
193 | - $strResultadoRecebidos = ''; | |
194 | - $strResultadoGerados = ''; | |
195 | - $strResultadoDetalhado = ''; | |
196 | - $arrRetIconeIntegracao = array(); | |
197 | - | |
198 | - | |
199 | - $i=0; | |
200 | - $maxPacotesReenvio = 0; | |
201 | - $indicePacoteComFalha = 0; | |
202 | - foreach($arrObjPacotesMonitoradosDTO as $key=>$pacote){ | |
203 | - | |
204 | - | |
205 | - $strImagemStatus = ''; | |
206 | - $strCssProcesso = ''; | |
207 | - $strLinkUsuarioAtribuicao = ' '; | |
208 | - $bolFlagGerado = false; | |
209 | - $strCssTr = ($strCssTr=='<tr class="infraTrClara">')?'<tr class="infraTrEscura">':'<tr class="infraTrClara">'; | |
210 | - | |
211 | - $strResultado .= $strCssTr ; | |
212 | - | |
213 | - $strResultado .= '<td align="center" >'; | |
214 | - | |
215 | - $strResultado .= PaginaSEI::getInstance()->getTrCheck($indicePacoteComFalha,$pacote['id_pacote'],$pacote['protocolo']->getStrProtocoloFormatado(),'N','ForcarReenvio'); | |
216 | - $maxPacotesReenvio ++; | |
217 | - $indicePacoteComFalha++; | |
218 | - | |
219 | - if($pacote['dth_metadados']=='') $pacote['dth_metadados'] = '-'; | |
220 | - $strResultado .= '<td width="7%" align="center" style="font-size:1em"> '.$pacote['dth_metadados']. ' </td>'; | |
221 | - | |
222 | - $strResultado .= '<td width="10%" align="center" style="font-size:.9em"><a onclick="abrirProcesso(\''.PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=procedimento_trabalhar&acao_origem='.$_GET['acao'].'&acao_retorno='.$_GET['acao'].'&id_procedimento='.$pacote['protocolo']->getDblIdProtocolo())).'\');" tabindex="'.PaginaSEI::getInstance()->getProxTabTabela().'">'.$pacote['protocolo']->getStrProtocoloFormatado().'</a></td>'; | |
223 | - | |
224 | - switch(trim($pacote['sta_integracao'])){ | |
225 | - | |
226 | - case ProtocoloIntegradoPacoteEnvioRN::$STA_NAO_INTEGRADO: | |
227 | - $strResultado .= '<td width="10%" style="font-size:1em"> Não Integrado </td>'; | |
228 | - break; | |
229 | - case ProtocoloIntegradoPacoteEnvioRN::$STA_INTEGRADO: | |
230 | - $strResultado .= '<td width="10%" style="font-size:1em"> Integrado </td>'; | |
231 | - break; | |
232 | - case ProtocoloIntegradoPacoteEnvioRN::$STA_FALHA_INFRA: | |
233 | - $strResultado .= '<td width="10%" style="font-size:1em"> Falha Infra </td>'; | |
234 | - break; | |
235 | - case ProtocoloIntegradoPacoteEnvioRN::$STA_ERRO_NEGOCIAL: | |
236 | - $strResultado .= '<td width="10%" style="font-size:1em"> Erro Negocial </td>'; | |
237 | - break; | |
238 | - | |
239 | - default: | |
240 | - $strResultado .= '<td width="10%" style="font-size:1em"> - </td>'; | |
241 | - break; | |
242 | - } | |
243 | - | |
244 | - if($pacote['dth_situacao']=='') $pacote['dth_situacao'] = '-'; | |
245 | - $strResultado .= '<td width="7%" align="center" style="font-size:1em">'. $pacote['dth_situacao'] . '</td>'; | |
246 | - | |
247 | - if($bolColunaArquivo){ | |
248 | - | |
249 | - if($pacote['sta_integracao']!=ProtocoloIntegradoPacoteEnvioRN::$STA_NAO_INTEGRADO){ | |
250 | - | |
251 | - $strResultado .= '<td width="3%" align="center" ><a target="_blank" id="linkArquivoMetadados" href="'.PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=protocolo_integrado_visualizar_metadados&acao_origem='.$_GET['acao'].'&acao_retorno='.$_GET['acao'].'&id_pacote='.$pacote['id_pacote'])).'" tabindex="'.PaginaSEI::getInstance()->getProxTabTabela().'"><img src="'.PaginaSEI::getInstance()->getDiretorioImagensGlobal().'/consultar.gif" title="Visualizar os Metadados Gerados" alt="Visualizar os Metadados Gerados" class="infraImg" /></a> '; | |
252 | - if($pacote['sta_integracao']==ProtocoloIntegradoPacoteEnvioRN::$STA_FALHA_INFRA||$pacote['sta_integracao']==ProtocoloIntegradoPacoteEnvioRN::$STA_ERRO_NEGOCIAL ){ | |
253 | - | |
254 | - $strResultado .= ' <a TARGET="_blank" href="'.PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=protocolo_integrado_visualizar_erro_envio_metadados&acao_origem='.$_GET['acao'].'&acao_retorno='.$_GET['acao'].'&id_pacote='.$pacote['id_pacote'])).'" tabindex="'.PaginaSEI::getInstance()->getProxTabTabela().'">'. '<img src="'.PaginaSEI::getInstance()->getDiretorioImagensGlobal().'/menos.gif" title="Visualizar XML de Erro" alt="Visualizar XML de Erro" class="infraImg" /></a>'; | |
255 | - } | |
256 | - $strResultado .= '</td>'; | |
257 | - }else if($bolColunaArquivo){ | |
258 | - | |
259 | - $strResultado .= '<td align="center"></td>'; | |
260 | - | |
261 | - } | |
262 | - | |
263 | - } | |
264 | - $strResultado .= PaginaSEI::getInstance()->getAcaoTransportarItem($i,$pacote['protocolo']->getDblIdProtocolo()); | |
265 | - | |
266 | - $i++; | |
267 | - | |
268 | - } | |
269 | - $strResultado .= '</table>'; | |
270 | - | |
271 | - } | |
272 | - | |
273 | - if ($bolAcaoForcarReenvio && $maxPacotesReenvio>0){ | |
274 | - $arrComandos[] = '<input type="button" onclick="forcarReenvio()" name="btnForcar" id="btnForcar" value="Forçar Reenvio" class="infraButton" />'; | |
275 | - $strLinkForcarReenvio = SessaoSEI::getInstance()->assinarLink('controlador.php?acao=protocolo_integrado_forcar_reenvio&acao_origem='.$_GET['acao']); | |
276 | - } | |
277 | - $arrComandos[] = '<button type="button" accesskey="F" id="btnFechar" value="Fechar" onclick="location.href=\''.PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.PaginaSEI::getInstance()->getAcaoRetorno().'&acao_origem='.$_GET['acao'])).'\'" class="infraButton"><span class="infraTeclaAtalho">F</span>echar</button>'; | |
278 | - | |
279 | - | |
280 | -}catch(Exception $e){ | |
281 | - PaginaSEI::getInstance()->processarExcecao($e); | |
282 | -} | |
283 | - | |
284 | -PaginaSEI::getInstance()->montarDocType(); | |
285 | -PaginaSEI::getInstance()->abrirHtml(); | |
286 | -PaginaSEI::getInstance()->abrirHead(); | |
287 | -PaginaSEI::getInstance()->montarMeta(); | |
288 | -PaginaSEI::getInstance()->montarTitle(':: '.PaginaSEI::getInstance()->getStrNomeSistema().' - '.$strTitulo.' ::'); | |
289 | -PaginaSEI::getInstance()->montarStyle(); | |
290 | -PaginaSEI::getInstance()->abrirStyle(); | |
291 | - | |
292 | -?> | |
293 | -a.disabled { | |
294 | - pointer-events: none; | |
295 | - cursor: default; | |
296 | -} | |
297 | -a.enabled { | |
298 | - cursor: default; | |
299 | -} | |
300 | -a:hover { | |
301 | -text-decoration: underline; | |
302 | -} | |
303 | -<? | |
304 | -PaginaSEI::getInstance()->fecharStyle(); | |
305 | -PaginaSEI::getInstance()->montarJavaScript(); | |
306 | -PaginaSEI::getInstance()->abrirJavaScript(); | |
307 | -?> | |
308 | - | |
309 | -function inicializar(){ | |
310 | - | |
311 | - infraEfeitoTabelas(); | |
312 | - infraExibirMenuSistemaEsquema(); | |
313 | - infraSelecaoLimpar('ForcarReenvio'); | |
314 | - | |
315 | - if(document.getElementById("divInfraAreaPaginacaoSuperior")!=null && document.getElementById("selInfraPaginacaoSuperior")!=null ){ | |
316 | - | |
317 | - var label = document.createElement("Label"); | |
318 | - label.innerHTML="Página"; | |
319 | - label.id = "lblInfraPaginacaoSuperior"; | |
320 | - label.style = 'padding:5px'; | |
321 | - document.getElementById("divInfraAreaPaginacaoSuperior").insertBefore(label,document.getElementById("selInfraPaginacaoSuperior")); | |
322 | - } | |
323 | - if(document.getElementById("divInfraAreaPaginacaoInferior")!=null && document.getElementById("selInfraPaginacaoInferior")!=null){ | |
324 | - | |
325 | - var label = document.createElement("Label"); | |
326 | - label.innerHTML="Página"; | |
327 | - label.style = 'padding:5px'; | |
328 | - label.id = "lblInfraPaginacaoInferior"; | |
329 | - document.getElementById("divInfraAreaPaginacaoInferior").insertBefore(label,document.getElementById("selInfraPaginacaoInferior")); | |
330 | - } | |
331 | -} | |
332 | -function abrirProcesso(link){ | |
333 | - | |
334 | - window.open(link); | |
335 | - //document.getElementById('frmMonitoramentoIntegracaoProcessosLista').action = link; | |
336 | - //document.getElementById('frmMonitoramentoIntegracaoProcessosLista').submit(); | |
337 | - //infraOcultarMenuSistemaEsquema(); | |
338 | - | |
339 | -} | |
340 | -function replicaValorNumeroRegistrosPorPagina(objValor){ | |
341 | - | |
342 | - if(objValor.name == 'numRegistosPaginaSuperior'){ | |
343 | - document.getElementById('numRegistosPaginaInferior').value = objValor.value; | |
344 | - }else{ | |
345 | - | |
346 | - document.getElementById('numRegistosPaginaSuperior').value = objValor.value; | |
347 | - | |
348 | - } | |
349 | - | |
350 | -} | |
351 | -<? if ($bolAcaoForcarReenvio){ ?> | |
352 | -function forcarReenvio(){ | |
353 | - | |
354 | - document.getElementById('frmMonitoramentoIntegracaoProcessosLista').action='<?=$strLinkForcarReenvio?>'; | |
355 | - document.getElementById('frmMonitoramentoIntegracaoProcessosLista').submit(); | |
356 | -} | |
357 | -<? } ?> | |
358 | - | |
359 | - | |
360 | -<? | |
361 | -PaginaSEI::getInstance()->fecharJavaScript(); | |
362 | -PaginaSEI::getInstance()->fecharHead(); | |
363 | -PaginaSEI::getInstance()->abrirBody($strTitulo,'onload="inicializar();"'); | |
364 | -?> | |
365 | -<form id="frmMonitoramentoIntegracaoProcessosLista" method="post" action="<?=PaginaSEI::getInstance()->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao'].'&acao_origem='.$_GET['acao']))?>"> | |
366 | - <input type="hidden" id="chkPacoteAcao" name="chkPacoteAcao"/> | |
367 | - | |
368 | - <? | |
369 | - PaginaSEI::getInstance()->montarBarraComandosSuperior($arrComandos); | |
370 | - ?> | |
371 | - <label style='font-weight:bold;'>Último Envio de Metadados:</label> <?echo $objParametrosDTO->getDthDataUltimoProcessamento();?><br/> | |
372 | - <table> | |
373 | - <tr style="height:28px;"> | |
374 | - <td style="text-align: right;"> | |
375 | - <label id="filtroCodProtocoloLabel" for="filtroCodProtocolo" accesskey="P" style="font-size: 12px;">Nº Processo:</label> | |
376 | - </td> | |
377 | - <td> | |
378 | - <input type="text" id="filtroCodProtocolo" size="35" name="filtroCodProtocolo" class="infraText" value="<?=$filtro['filtroCodProtocolo']?>" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" value="<?$filtroProtocolo?>" style="font-size: 12px;" /> | |
379 | - </td> | |
380 | - </tr> | |
381 | - <tr style="height:28px;"> | |
382 | - <td style="text-align: right;"> | |
383 | - <label id="lblPeriodoDe" for="filtroTxtPeriodoDe" accesskey="S" style="font-size: 12px;">Situação:</label> | |
384 | - </td> | |
385 | - <td> | |
386 | - <select id="filtroSelTipoProcedimentoPesquisa" name="filtroSelSitucaoIntegracao" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" style="font-size: 12px;"> | |
387 | - <? | |
388 | - foreach($strItensSelSituacoesIntegracoes as $strAtributoChave=>$strAtributoDescricao){ | |
389 | - echo '<option value="'.$strAtributoChave.'"'; | |
390 | - if($strAtributoChave==$filtroStaIntegracao){ | |
391 | - echo ' selected>'; | |
392 | - } | |
393 | - else{ | |
394 | - echo '>'; | |
395 | - } | |
396 | - echo $strAtributoDescricao; | |
397 | - echo '</option>'; | |
398 | - } | |
399 | - ?> | |
400 | - </select> | |
401 | - </td> | |
402 | - </tr> | |
403 | - <tr style="height:28px;"> | |
404 | - <td style="text-align: right;"> | |
405 | - <label id="lblPeriodoDe" for="txtPeriodoDe" accesskey="" style="font-size: 12px;">Envio para o PI:</label> | |
406 | - </td> | |
407 | - <td> | |
408 | - <input type="text" id="filtroTxtPeriodoDe" name="filtroTxtPeriodoDe" class="infraText" value="<?=$dtaPeriodoDe?>" onkeypress="return infraMascaraData(this, event)" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" style="font-size: 12px;" /> | |
409 | - <img id="imgCalPeriodoD" title="Selecionar Data Inicial" alt="Selecionar Data Inicial" src="<?=PaginaSEI::getInstance()->getDiretorioImagensGlobal()?>/calendario.gif" class="infraImg" onclick="infraCalendario('filtroTxtPeriodoDe',this);" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
410 | - <label id="lblPeriodoA" for="txtPeriodoA" accesskey="" style="font-size: 12px;" >a</label> | |
411 | - <input type="text" id="filtroTxtPeriodoA" name="filtroTxtPeriodoA" class="infraText" value="<?=$dtaPeriodoA?>" onkeypress="return infraMascaraData(this, event)" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" style="font-size: 12px;" /> | |
412 | - <img id="imgCalPeriodoA" title="Selecionar Data Final" alt="Selecionar Data Final" src="<?=PaginaSEI::getInstance()->getDiretorioImagensGlobal()?>/calendario.gif" class="infraImg" onclick="infraCalendario('filtroTxtPeriodoA',this);" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
413 | - </td> | |
414 | - </tr> | |
415 | - <tr style="height:28px;"> | |
416 | - <td style="text-align: right;"> | |
417 | - <label id="lblPeriodoGeracaoDe" for="txtPeriodoGeracaoDe" accesskey="" style="font-size: 12px;">Geração do Processo:</label> | |
418 | - </td> | |
419 | - <td> | |
420 | - <input type="text" id="filtroTxtPeriodoGeracaoDe" name="filtroTxtPeriodoGeracaoDe" class="infraText" value="<?=$dtaPeriodoGeracaoDe?>" onkeypress="return infraMascaraData(this, event)" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" style="font-size: 12px;" /> | |
421 | - <img id="imgCalPeriodoD" title="Selecionar Data Inicial" alt="Selecionar Data Inicial" src="<?=PaginaSEI::getInstance()->getDiretorioImagensGlobal()?>/calendario.gif" class="infraImg" onclick="infraCalendario('filtroTxtPeriodoGeracaoDe',this);" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
422 | - <label id="lblPeriodoGeracaoA" for="txtPeriodoGeracaoA" accesskey="" style="font-size: 12px;">a</label> | |
423 | - <input type="text" id="filtroTxtPeriodoGeracaoA" name="filtroTxtPeriodoGeracaoA" class="infraText" value="<?=$dtaPeriodoGeracaoA?>" onkeypress="return infraMascaraData(this, event)" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" style="font-size: 12px;" /> | |
424 | - <img id="imgCalPeriodoA" title="Selecionar Data Final" alt="Selecionar Data Final" src="<?=PaginaSEI::getInstance()->getDiretorioImagensGlobal()?>/calendario.gif" class="infraImg" onclick="infraCalendario('filtroTxtPeriodoGeracaoA',this);" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" /> | |
425 | - </td> | |
426 | - </tr> | |
427 | - <tr style="height:28px;background: transparent;"> | |
428 | - <td style="text-align: right;"> | |
429 | - <label id="lblPeriodoDe" for="filtroTxtPeriodoDe" accesskey="S" style="font-size: 12px;">Unidade Geradora:</label> | |
430 | - </td> | |
431 | - <td> | |
432 | - <select id="filtroSelUnidade" name="filtroSelUnidade" tabindex="<?=PaginaSEI::getInstance()->getProxTabDados()?>" style="font-size: 12px;"> | |
433 | - <? | |
434 | - foreach($strItensSelUnidades as $strAtributoChave=>$strAtributoDescricao){ | |
435 | - echo '<option value="'.$strAtributoChave.'"'; | |
436 | - if($strAtributoChave==$filtroUnidadeGeradora){ | |
437 | - echo ' selected>'; | |
438 | - } | |
439 | - else{ | |
440 | - echo '>'; | |
441 | - } | |
442 | - echo $strAtributoDescricao; | |
443 | - echo '</option>'; | |
444 | - } | |
445 | - ?> | |
446 | - </select> | |
447 | - <input type="checkbox" id="filtroIncluirUnidadesFilhas" name="filtroIncluirUnidadesFilhas" <?=$filtroIncluirUnidadesFilhas?> /> <label accesskey="" style="font-size: 12px;">Incluir Unidades Filhas</label> | |
448 | - </td> | |
449 | - </tr> | |
450 | - <tr style="height:28px;"> | |
451 | - <td> | |
452 | - </td> | |
453 | - <td> | |
454 | - <input type="submit" id="sbmPesquisar" name="sbmPesquisar" value="Pesquisar" class="infraButton" /> <br/><br/> | |
455 | - </td> | |
456 | - </tr> | |
457 | - | |
458 | - </table> | |
459 | - <? | |
460 | - if($numRegistros>0){ | |
461 | - ?> | |
462 | - <div style="float:right;padding:0 1.5em"> | |
463 | - <label style="">Quantidade de registros por página</label> | |
464 | - <input style="background-color: #FFF;border: 1px solid #333;" size="5" type='number' value="<?=$_REQUEST['numRegistosPaginaSuperior']?>" onkeyup='replicaValorNumeroRegistrosPorPagina(this)' id='numRegistosPaginaSuperior' name='numRegistosPaginaSuperior'> | |
465 | - <input size="10" value="OK" class="infraButton" style="vertical-align:top" type="submit"> | |
466 | - </div> | |
467 | - <? | |
468 | - } | |
469 | - ?> | |
470 | - | |
471 | - | |
472 | - | |
473 | - | |
474 | - | |
475 | - | |
476 | - | |
477 | - | |
478 | - <? | |
479 | - //PaginaSEI::getInstance()->abrirAreaDados('5em'); | |
480 | - //PaginaSEI::getInstance()->fecharAreaDados(); | |
481 | - PaginaSEI::getInstance()->montarAreaTabela($strResultado,$numRegistros); | |
482 | - ?> | |
483 | - <? | |
484 | - if($numRegistros>0){ | |
485 | - ?> | |
486 | - <div style="float:right;padding:0 1.5em"> | |
487 | - <label style="">Quantidade de registros por página</label> | |
488 | - <input style="background-color: #FFF;border: 1px solid #333;" size="5" type='number' id='numRegistosPaginaInferior' value="<?=$_REQUEST['numRegistosPaginaSuperior']?>" name='numRegistosPaginaInferior' onkeyup='replicaValorNumeroRegistrosPorPagina(this)'> | |
489 | - <input size="10" value="OK" class="infraButton" style="vertical-align:top" type="submit"> | |
490 | - </div> | |
491 | - <? | |
492 | - } | |
493 | - ?> | |
494 | - <? | |
495 | - //PaginaSEI::getInstance()->montarAreaDebug(); | |
496 | - PaginaSEI::getInstance()->montarBarraComandosInferior($arrComandos); | |
497 | - | |
498 | - ?> | |
499 | -</form> | |
500 | -<? | |
501 | -PaginaSEI::getInstance()->fecharBody(); | |
502 | -PaginaSEI::getInstance()->fecharHtml(); | |
503 | -?> |
containeres/sei-app/protocolo_integrado/rn/ProtocoloIntegradoAgendamentoRN.php
... | ... | @@ -1,130 +0,0 @@ |
1 | -<?php | |
2 | - | |
3 | -require_once dirname(__FILE__).'/../../../../SEI.php'; | |
4 | - | |
5 | -class ProtocoloIntegradoAgendamentoRN extends InfraRN { | |
6 | - | |
7 | - public function __construct() { | |
8 | - parent::__construct(); | |
9 | - } | |
10 | - | |
11 | - protected function inicializarObjInfraIBanco() { | |
12 | - return BancoSEI::getInstance(); | |
13 | - } | |
14 | - | |
15 | - public function publicarProtocoloIntegrado() { | |
16 | - | |
17 | - try { | |
18 | - | |
19 | - ini_set('max_execution_time','0'); | |
20 | - ini_set('memory_limit','-1'); | |
21 | - | |
22 | - InfraDebug::getInstance()->setBolLigado(true); | |
23 | - InfraDebug::getInstance()->setBolDebugInfra(false); | |
24 | - InfraDebug::getInstance()->setBolEcho(false); | |
25 | - InfraDebug::getInstance()->limpar(); | |
26 | - | |
27 | - SessaoSEI::getInstance(false)->simularLogin(SessaoSEI::$USUARIO_SEI, SessaoSEI::$UNIDADE_TESTE); | |
28 | - $numSeg = InfraUtil::verificarTempoProcessamento(); | |
29 | - | |
30 | - InfraDebug::getInstance()->gravar('Inicializando Publicações no Protocolo Integrado'); | |
31 | - $objProtocoloIntegradoMonitoramento = new ProtocoloIntegradoMonitoramentoProcessosDTO(); | |
32 | - $objProtocoloRN = new ProtocoloIntegradoMonitoramentoProcessosRN(); | |
33 | - try { | |
34 | - $objProtocoloRN->publicarProcessos($objProtocoloIntegradoMonitoramento); | |
35 | - } catch (Exception $e) { | |
36 | - throw new InfraException('Erro ao executar publicação de protocolos.',$e); | |
37 | - } | |
38 | - | |
39 | - $numSeg = InfraUtil::verificarTempoProcessamento($numSeg); | |
40 | - InfraDebug::getInstance()->gravar('TEMPO TOTAL DE EXECUCAO: '.$numSeg.' s'); | |
41 | - InfraDebug::getInstance()->gravar('FIM'); | |
42 | - | |
43 | - LogSEI::getInstance()->gravar(InfraDebug::getInstance()->getStrDebug()); | |
44 | - InfraDebug::getInstance()->limpar(); | |
45 | - | |
46 | - } catch(Exception $e) { | |
47 | - InfraDebug::getInstance()->setBolLigado(false); | |
48 | - InfraDebug::getInstance()->setBolDebugInfra(false); | |
49 | - InfraDebug::getInstance()->setBolEcho(false); | |
50 | - | |
51 | - InfraDebug::getInstance()->limpar(); | |
52 | - throw new InfraException('Erro ao publicar Metadados e Operações dos Processos no Protocolo Integrado.',$e); | |
53 | - } | |
54 | - | |
55 | - } | |
56 | - | |
57 | - public function notificarNovosPacotesNaoSendoGerados() { | |
58 | - | |
59 | - try { | |
60 | - | |
61 | - ini_set('max_execution_time','0'); | |
62 | - ini_set('memory_limit','-1'); | |
63 | - | |
64 | - InfraDebug::getInstance()->setBolLigado(true); | |
65 | - InfraDebug::getInstance()->setBolDebugInfra(false); | |
66 | - InfraDebug::getInstance()->setBolEcho(false); | |
67 | - InfraDebug::getInstance()->limpar(); | |
68 | - $numSeg = InfraUtil::verificarTempoProcessamento(); | |
69 | - InfraDebug::getInstance()->gravar('Inicializando Notificações de Novos Pacotes Não sendo gerados para enviar para oo Protocolo Integrado'); | |
70 | - | |
71 | - $objProtocoloRN = new ProtocoloIntegradoMonitoramentoProcessosRN(); | |
72 | - $objProtocoloRN->notificarPacotesSemEnvio(); | |
73 | - | |
74 | - $numSeg = InfraUtil::verificarTempoProcessamento($numSeg); | |
75 | - InfraDebug::getInstance()->gravar('TEMPO TOTAL DE EXECUCAO: '.$numSeg.' s'); | |
76 | - InfraDebug::getInstance()->gravar('FIM'); | |
77 | - LogSEI::getInstance()->gravar(InfraDebug::getInstance()->getStrDebug()); | |
78 | - InfraDebug::getInstance()->limpar(); | |
79 | - | |
80 | - } catch(Exception $e) { | |
81 | - InfraDebug::getInstance()->setBolLigado(false); | |
82 | - InfraDebug::getInstance()->setBolDebugInfra(false); | |
83 | - InfraDebug::getInstance()->setBolEcho(false); | |
84 | - | |
85 | - InfraDebug::getInstance()->limpar(); | |
86 | - throw new InfraException('Erro ao publicar Metadados e Operações dos Processos no Protocolo Integrado.',$e); | |
87 | - } | |
88 | - | |
89 | - } | |
90 | - | |
91 | - public function notificarProcessosComFalhaPublicacaoProtocoloIntegrado() { | |
92 | - | |
93 | - try { | |
94 | - | |
95 | - ini_set('max_execution_time','0'); | |
96 | - ini_set('memory_limit','-1'); | |
97 | - | |
98 | - InfraDebug::getInstance()->setBolLigado(true); | |
99 | - InfraDebug::getInstance()->setBolDebugInfra(false); | |
100 | - InfraDebug::getInstance()->setBolEcho(false); | |
101 | - InfraDebug::getInstance()->limpar(); | |
102 | - | |
103 | - //SessaoSEI::getInstance(false)->simularLogin(SessaoSEI::$USUARIO_SEI, SessaoSEI::$UNIDADE_TESTE); | |
104 | - $numSeg = InfraUtil::verificarTempoProcessamento(); | |
105 | - | |
106 | - InfraDebug::getInstance()->gravar('Inicializando Notificações de Processos Não Publicados no Protocolo Integrado'); | |
107 | - $objProtocoloIntegradoMonitoramento = new ProtocoloIntegradoMonitoramentoProcessosDTO(); | |
108 | - $objProtocoloRN = new ProtocoloIntegradoMonitoramentoProcessosRN(); | |
109 | - $objProtocoloRN->notificarProcessosComFalha($objProtocoloIntegradoMonitoramento); | |
110 | - $numSeg = InfraUtil::verificarTempoProcessamento($numSeg); | |
111 | - InfraDebug::getInstance()->gravar('TEMPO TOTAL DE EXECUCAO: '.$numSeg.' s'); | |
112 | - InfraDebug::getInstance()->gravar('FIM'); | |
113 | - | |
114 | - LogSEI::getInstance()->gravar(InfraDebug::getInstance()->getStrDebug()); | |
115 | - InfraDebug::getInstance()->limpar(); | |
116 | - | |
117 | - } catch(Exception $e) { | |
118 | - InfraDebug::getInstance()->setBolLigado(false); | |
119 | - InfraDebug::getInstance()->setBolDebugInfra(false); | |
120 | - InfraDebug::getInstance()->setBolEcho(false); | |
121 | - | |
122 | - InfraDebug::getInstance()->limpar(); | |
123 | - throw new InfraException('Erro ao publicar Metadados e Operações dos Processos no Protocolo Integrado.',$e); | |
124 | - } | |
125 | - | |
126 | - } | |
127 | - | |
128 | -} | |
129 | - | |
130 | -?> | |
131 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/rn/ProtocoloIntegradoMonitoramentoProcessosRN.php
... | ... | @@ -1,1325 +0,0 @@ |
1 | -<?php | |
2 | -/** | |
3 | - * TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
4 | - * | |
5 | - * 13/10/2009 - criado por mga | |
6 | - * | |
7 | - * Versão do Gerador de Código: 1.29.1 | |
8 | - * | |
9 | - * Versão no CVS: $Id$ | |
10 | - */ | |
11 | - | |
12 | -ini_set('max_execution_time', '0'); | |
13 | -ini_set('memory_limit', '-1'); | |
14 | -require_once dirname(__FILE__) . '/../../../../SEI.php'; | |
15 | - | |
16 | -class ProtocoloIntegradoMonitoramentoProcessosRN extends InfraRN { | |
17 | - | |
18 | - private $parametrosProtocolo; | |
19 | - | |
20 | - public function __construct() { | |
21 | - parent::__construct(); | |
22 | - } | |
23 | - | |
24 | - protected function inicializarObjInfraIBanco() { | |
25 | - return BancoSEI::getInstance(); | |
26 | - } | |
27 | - | |
28 | - protected function listarConectado(ProtocoloIntegradoMonitoramentoProcessosDTO $protocoloIntegradoMonitoramentoProcessosDTO) { | |
29 | - | |
30 | - try { | |
31 | - | |
32 | - //Valida Permissao | |
33 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento', __METHOD__, $protocoloIntegradoMonitoramentoProcessosDTO); | |
34 | - | |
35 | - //Regras de Negocio | |
36 | - //$objInfraException = new InfraException(); | |
37 | - //$objInfraException->lancarValidacoes(); | |
38 | - | |
39 | - $objBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
40 | - $ret = $objBD->listar($protocoloIntegradoMonitoramentoProcessosDTO); | |
41 | - | |
42 | - return $ret; | |
43 | - | |
44 | - } catch(Exception $e) { | |
45 | - throw new InfraException('Erro ao listar atividades monitoradas para publicação no Protocolo Integrado.', $e); | |
46 | - } | |
47 | - | |
48 | - } | |
49 | - | |
50 | - protected function listarAtividadesPublicacaoConectado(ProtocoloIntegradoMonitoramentoProcessosDTO $protocoloIntegradoMonitoramentoProcessosDTO) { | |
51 | - | |
52 | - try { | |
53 | - | |
54 | - //Valida Permissao | |
55 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento', __METHOD__, $protocoloIntegradoMonitoramentoProcessosDTO); | |
56 | - | |
57 | - //Regras de Negocio | |
58 | - //$objInfraException = new InfraException(); | |
59 | - //$objInfraException->lancarValidacoes(); | |
60 | - | |
61 | - $objBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
62 | - $ret = $objBD->consultarAtividadesPublicacao($protocoloIntegradoMonitoramentoProcessosDTO->getNumIdPacote()); | |
63 | - | |
64 | - return $ret; | |
65 | - | |
66 | - } catch(Exception $e) { | |
67 | - throw new InfraException('Erro ao listar atividades monitoradas para publicação no Protocolo Integrado.', $e); | |
68 | - } | |
69 | - | |
70 | - } | |
71 | - | |
72 | - protected function consultarConectado(ProtocoloIntegradoMonitoramentoProcessosDTO $protocoloIntegradoMonitoramentoProcessosDTO) { | |
73 | - | |
74 | - try { | |
75 | - | |
76 | - //Valida Permissao | |
77 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento', __METHOD__, $protocoloIntegradoMonitoramentoProcessosDTO); | |
78 | - | |
79 | - //Regras de Negocio | |
80 | - //$objInfraException = new InfraException(); | |
81 | - //$objInfraException->lancarValidacoes(); | |
82 | - | |
83 | - $objBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
84 | - $ret = $objBD->consultar($protocoloIntegradoMonitoramentoProcessosDTO); | |
85 | - | |
86 | - return $ret; | |
87 | - | |
88 | - } catch(Exception $e) { | |
89 | - throw new InfraException('Erro Consultando Atividades monitoradas para publicação no Protocolo Integrado.', $e); | |
90 | - } | |
91 | - | |
92 | - } | |
93 | - | |
94 | - protected function contarConectado(ProtocoloIntegradoMonitoramentoProcessosDTO $protocoloIntegradoMonitoramentoProcessosDTO) { | |
95 | - | |
96 | - try { | |
97 | - | |
98 | - //Valida Permissao | |
99 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento', __METHOD__, $protocoloIntegradoMonitoramentoProcessosDTO); | |
100 | - | |
101 | - //Regras de Negocio | |
102 | - //$objInfraException = new InfraException(); | |
103 | - //$objInfraException->lancarValidacoes(); | |
104 | - | |
105 | - $objBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
106 | - $ret = $objBD->contar($protocoloIntegradoMonitoramentoProcessosDTO); | |
107 | - | |
108 | - return $ret; | |
109 | - | |
110 | - } catch(Exception $e) { | |
111 | - throw new InfraException('Erro Consultando Atividades monitoradas para publicação no Protocolo Integrado.', $e); | |
112 | - } | |
113 | - | |
114 | - } | |
115 | - | |
116 | - protected function publicarProcessosConectado(ProtocoloIntegradoMonitoramentoProcessosDTO $objProtocoloIntegradoParametrosDTO) { | |
117 | - | |
118 | - $tempoInicial = time(); | |
119 | - try { | |
120 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento', __METHOD__, $objProtocoloIntegradoParametrosDTO); | |
121 | - | |
122 | - //Regras de Negocio | |
123 | - $objInfraException = new InfraException(); | |
124 | - $objInfraException->lancarValidacoes(); | |
125 | - | |
126 | - $objRetorno; | |
127 | - $objProtocoloIntegradoParametrosRN; | |
128 | - | |
129 | - $objProtocoloIntegradoParametrosDTO = new ProtocoloIntegradoParametrosDTO(); | |
130 | - $objProtocoloIntegradoParametrosDTO->retTodos(); | |
131 | - | |
132 | - InfraDebug::getInstance()->gravar('Buscando Configuração de Publicação no Protocolo Integrado'); | |
133 | - $objProtocoloIntegradoParametrosRN = new ProtocoloIntegradoParametrosRN(); | |
134 | - $objRetorno = $objProtocoloIntegradoParametrosRN->consultar($objProtocoloIntegradoParametrosDTO); | |
135 | - | |
136 | - $objRetorno->setStrSinExecutandoPublicacao('S'); | |
137 | - $objProtocoloIntegradoParametrosRN->alterar($objRetorno); | |
138 | - | |
139 | - $this->cadastrarAtividadesIntegracao($objRetorno->getNumAtividadesCarregar()); | |
140 | - | |
141 | - InfraDebug::getInstance()->gravar('Publicando Metadados e Operações dos Processos no Protocolo Integrado'); | |
142 | - $arr = array(); | |
143 | - $arrParam[0] = $objRetorno; | |
144 | - $arrParam[1] = null; | |
145 | - $this->publicarProcessosMonitorados($arrParam); | |
146 | - | |
147 | - $objRetorno->setDthDataUltimoProcessamento(date('d/m/Y H:i:s')); | |
148 | - $objRetorno->setStrSinExecutandoPublicacao('N'); | |
149 | - $objProtocoloIntegradoParametrosRN->alterar($objRetorno); | |
150 | - | |
151 | - $tempoFinal = time(); | |
152 | - $tempo = $tempoFinal - $tempoInicial; | |
153 | - | |
154 | - } catch (Exception $e) { | |
155 | - throw new InfraException('Erro acontecido', $e); | |
156 | - } | |
157 | - | |
158 | - } | |
159 | - | |
160 | - protected function cadastrarControlado(ProtocoloIntegradoMonitoramentoProcessosDTO $protocoloIntegradoMonitoramentoProcessosDTO) { | |
161 | - | |
162 | - try { | |
163 | - | |
164 | - //Valida Permissao | |
165 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento', __METHOD__, $protocoloIntegradoMonitoramentoProcessosDTO); | |
166 | - | |
167 | - //Regras de Negocio | |
168 | - $objInfraException = new InfraException(); | |
169 | - | |
170 | - /*if ($objTarefaDTO->isSetStrNome()) { | |
171 | - $this->validarStrNome($objTarefaDTO, $objInfraException); | |
172 | - } | |
173 | - if ($objTarefaDTO->isSetStrSinHistoricoResumido()) { | |
174 | - $this->validarStrSinHistoricoResumido($objTarefaDTO, $objInfraException); | |
175 | - } | |
176 | - */ | |
177 | - | |
178 | - $objInfraException->lancarValidacoes(); | |
179 | - $objBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
180 | - $objBD->cadastrar($protocoloIntegradoMonitoramentoProcessosDTO); | |
181 | - | |
182 | - } catch(Exception $e) { | |
183 | - throw new InfraException('Erro Cadastrando atividades monitoradas para publicação no Protocolo Integrado.', $e); | |
184 | - } | |
185 | - | |
186 | - } | |
187 | - | |
188 | - protected function consultarParticipantesDocumentosAssinadosProcessoConectado(ProtocoloDTO $protocoloDTO) { | |
189 | - try { | |
190 | - | |
191 | - //Valida Permissao | |
192 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento', __METHOD__, $protocoloDTO); | |
193 | - | |
194 | - //Regras de Negocio | |
195 | - //$objInfraException = new InfraException(); | |
196 | - | |
197 | - //$objInfraException->lancarValidacoes(); | |
198 | - | |
199 | - $objBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
200 | - $ret = $objBD->consultarParticipantesDocumentosAssinadosProcesso($protocoloDTO->getDblIdProtocolo()); | |
201 | - | |
202 | - return $ret; | |
203 | - | |
204 | - } catch(Exception $e) { | |
205 | - throw new InfraException('Erro consultando Primeiro Documento Assinadodo Processo.', $e); | |
206 | - } | |
207 | - } | |
208 | - | |
209 | - protected function cadastrarAtividadesIntegracaoConectado($numMaxAtividades) { | |
210 | - | |
211 | - $tempo1 = time(); | |
212 | - $numUnidadeTeste = null; | |
213 | - try { | |
214 | - $objInfraParametroDTO = new InfraParametroDTO(); | |
215 | - $objParametroBD = new InfraParametroBD($this->getObjInfraIBanco()); | |
216 | - $objInfraParametroDTO->setStrNome('ID_UNIDADE_TESTE'); | |
217 | - $objInfraParametroDTO->retTodos(); | |
218 | - $ret = $objParametroBD->listar($objInfraParametroDTO); | |
219 | - if (count($ret)>0) { | |
220 | - $objInfra = $ret[0]; | |
221 | - $numUnidadeTeste = $objInfra->getStrValor(); | |
222 | - } | |
223 | - } catch(Exception $e) {} | |
224 | - | |
225 | - try { | |
226 | - //Valida Permissao | |
227 | - //SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento',__METHOD__,$protocoloIntegradoMonitoramentoProcessosDTO); | |
228 | - | |
229 | - //Regras de Negocio | |
230 | - $objInfraException = new InfraException(); | |
231 | - $objInfraException->lancarValidacoes(); | |
232 | - | |
233 | - $objBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
234 | - $arrProtocolos = array(); | |
235 | - | |
236 | - $numTotal = 0; | |
237 | - $numRodada = 0; | |
238 | - $numCarregarPorRodada = 30000; | |
239 | - while (true) { | |
240 | - $numRodada = $numRodada+1; | |
241 | - | |
242 | - $qtCarregar = $numCarregarPorRodada; | |
243 | - if ($numTotal>=$numMaxAtividades) { | |
244 | - break; | |
245 | - } | |
246 | - if ($numTotal+$numCarregarPorRodada>$numMaxAtividades) { | |
247 | - $qtCarregar = $numMaxAtividades-$numTotal; | |
248 | - } | |
249 | - $arrAtividadesMonitoradasDTO = $objBD->consultarNovasOperacoesProcesso($qtCarregar, $numUnidadeTeste); | |
250 | - | |
251 | - $numTotalRodada = count($arrAtividadesMonitoradasDTO); | |
252 | - if ($numTotalRodada==0) { | |
253 | - break; | |
254 | - } | |
255 | - $numTotal = $numTotal+$numTotalRodada; | |
256 | - | |
257 | - $arrParam = array(); | |
258 | - $arrParam[0] = $numTotalRodada; | |
259 | - $arrParam[1] = $arrAtividadesMonitoradasDTO; | |
260 | - $arrParam[2] = $arrProtocolos; | |
261 | - $this->cadastrarAtividadesBatch($arrParam); | |
262 | - | |
263 | - unset($arrAtividadesMonitoradasDTO); | |
264 | - | |
265 | - if ($numTotalRodada<$numCarregarPorRodada) { | |
266 | - break; | |
267 | - } | |
268 | - } | |
269 | - | |
270 | - } catch(Exception $e) { | |
271 | - throw new InfraException('Erro ao cadastrar Atividades que serão enviadas ao Protocolo Integrado .', $e); | |
272 | - } | |
273 | - $tempo2 = time(); | |
274 | - | |
275 | - } | |
276 | - | |
277 | - protected function cadastrarAtividadesBatchControlado($arrParam) { | |
278 | - | |
279 | - $numTotalRodada = $arrParam[0]; | |
280 | - $arrAtividadesMonitoradasDTO = $arrParam[1]; | |
281 | - $arrProtocolos = $arrParam[2]; | |
282 | - | |
283 | - $objPacoteRN = new ProtocoloIntegradoPacoteEnvioRN(); | |
284 | - for ($i = 0; $i < $numTotalRodada; $i++) { | |
285 | - $objProtocoloIntegradoMonitoramentoDTO = $arrAtividadesMonitoradasDTO[$i]; | |
286 | - $idProtocolo = $objProtocoloIntegradoMonitoramentoDTO->getNumIdProtocolo(); | |
287 | - | |
288 | - if (!in_array($idProtocolo, $arrProtocolos)) { | |
289 | - | |
290 | - $objPacoteExistenteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
291 | - $objPacoteExistenteDTO->retTodos(); | |
292 | - $objPacoteExistenteDTO->setNumIdProtocolo($idProtocolo); | |
293 | - $objPacoteExistenteDTO->setStrStaIntegracao(ProtocoloIntegradoPacoteEnvioRN::$STA_NAO_INTEGRADO); | |
294 | - $objPacoteExistenteDTO->setNumMaxRegistrosRetorno(1); | |
295 | - $arrPacoteRetorno = $objPacoteRN->listar($objPacoteExistenteDTO); | |
296 | - $objPacoteRetorno = null; | |
297 | - | |
298 | - if(count($arrPacoteRetorno)>0) { | |
299 | - $objPacoteRetorno = $arrPacoteRetorno[0]; | |
300 | - } | |
301 | - if ($objPacoteRetorno == null) { | |
302 | - | |
303 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
304 | - | |
305 | - | |
306 | - $objPacoteDTO->setNumIdProtocolo($idProtocolo); | |
307 | - $objPacoteDTO->setStrStaIntegracao(ProtocoloIntegradoPacoteEnvioRN::$STA_NAO_INTEGRADO); | |
308 | - $objPacoteRN->cadastrar($objPacoteDTO); | |
309 | - | |
310 | - $objPacoteDTO->retTodos(); | |
311 | - $ret = $objPacoteRN->consultar($objPacoteDTO); | |
312 | - $idPacote = $ret->getNumIdProtocoloIntegradoPacoteEnvio(); | |
313 | - | |
314 | - $arrProtocolos[$i] = $idProtocolo; | |
315 | - $arrIdPacote[$idProtocolo] = $idPacote; | |
316 | - } else { | |
317 | - | |
318 | - $arrProtocolos[$i] = $idProtocolo; | |
319 | - $arrIdPacote[$idProtocolo] = $objPacoteRetorno->getNumIdProtocoloIntegradoPacoteEnvio(); | |
320 | - } | |
321 | - | |
322 | - } | |
323 | - | |
324 | - $objProtocoloIntegradoMonitoramentoDTO->setNumIdPacote($arrIdPacote[$idProtocolo]); | |
325 | - $this->cadastrar($objProtocoloIntegradoMonitoramentoDTO); | |
326 | - | |
327 | - } | |
328 | - } | |
329 | - | |
330 | - protected function alterarControlado($arrParam) {} | |
331 | - | |
332 | - public function getSituacoesIntegracao() { | |
333 | - $strItensSelSituacoesIntegracoes = array('' => 'Todos', ProtocoloIntegradoPacoteEnvioRN::$STA_NAO_INTEGRADO => 'Não Integrado', ProtocoloIntegradoPacoteEnvioRN::$STA_INTEGRADO => 'Integrado', ProtocoloIntegradoPacoteEnvioRN::$STA_ERRO_NEGOCIAL => 'Erro Negocial', ProtocoloIntegradoPacoteEnvioRN::$STA_FALHA_INFRA => 'Falha Infra'); | |
334 | - return $strItensSelSituacoesIntegracoes; | |
335 | - } | |
336 | - | |
337 | - public function getUnidadesGeradoras() { | |
338 | - | |
339 | - $objInfraSip = new InfraSip(SessaoSEI::getInstance()); | |
340 | - | |
341 | - $ret = $objInfraSip->carregarUnidades(SessaoSEI::getInstance()->getNumIdSistema()); | |
342 | - $arrUnidadesSip = array(); | |
343 | - | |
344 | - $srtSeparador = ":UNI:"; | |
345 | - $strItensUnidadesCompacto = array(); | |
346 | - foreach ($ret as $uni) { | |
347 | - $numIdUnidade = $uni[InfraSip::$WS_UNIDADE_ID]; | |
348 | - if ($numIdUnidade!='') { | |
349 | - $strItensUnidadesCompacto[$numIdUnidade]=$uni[InfraSip::$WS_UNIDADE_SIGLA].$srtSeparador.$numIdUnidade; | |
350 | - } | |
351 | - } | |
352 | - sort($strItensUnidadesCompacto, SORT_STRING); | |
353 | - | |
354 | - $strItensUnidades = array(); | |
355 | - $strItensUnidades[0]='*'; | |
356 | - foreach ($strItensUnidadesCompacto as $uni=>$uni2) { | |
357 | - $strFragmentos = explode($srtSeparador, $uni2); | |
358 | - $strItensUnidades[$strFragmentos[1]] = $strFragmentos[0]; | |
359 | - } | |
360 | - | |
361 | - return $strItensUnidades; | |
362 | - } | |
363 | - | |
364 | - public function listarProcessosMonitoradosControlado($filtro = array()) { | |
365 | - | |
366 | - $objPacoteRN = new ProtocoloIntegradoPacoteEnvioRN(); | |
367 | - $objProtocoloIntegradoDTO = new ProtocoloIntegradoDTO(); | |
368 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
369 | - $objPacoteDTO->retNumIdProtocolo(); | |
370 | - $objPacoteDTO->retStrStaIntegracao(); | |
371 | - $objPacoteDTO->retDthDataSituacao(); | |
372 | - $objPacoteDTO->retDthDataMetadados(); | |
373 | - $objPacoteDTO->retNumTentativasEnvio(); | |
374 | - $objPacoteDTO->retStrProtocoloFormatado(); | |
375 | - $objPacoteDTO->retNumIdProtocoloIntegradoPacoteEnvio(); | |
376 | - | |
377 | - $objPacoteDTO->retNumIdProtocoloIntegradoPacoteEnvio(); | |
378 | - $strSqlNativo = ''; | |
379 | - | |
380 | - if (isset($filtro['filtroCodProtocolo']) && $filtro['filtroCodProtocolo'] != '') { | |
381 | - $strProtocoloFormatadoLimpo = InfraUtil::retirarFormatacao($filtro['filtroCodProtocolo']); | |
382 | - $objProtocolo = new ProtocoloDTO(); | |
383 | - $objProtocolo->retDblIdProtocolo(); | |
384 | - $objProtocoloRN = new ProtocoloRN(); | |
385 | - $objProtocolo->setStrProtocoloFormatadoPesquisa($strProtocoloFormatadoLimpo . '%', InfraDTO::$OPER_LIKE); | |
386 | - $arrProtocolosRetornados = $objProtocoloRN->listarRN0668($objProtocolo); | |
387 | - | |
388 | - $arrIdProtocolo = array(); | |
389 | - for ($k = 0; $k < count($arrProtocolosRetornados); $k++) { | |
390 | - array_push($arrIdProtocolo, $arrProtocolosRetornados[$k]->getDblIdProtocolo()); | |
391 | - } | |
392 | - if (count($arrIdProtocolo) > 0) { | |
393 | - $objPacoteDTO->setNumIdProtocolo($arrIdProtocolo, InfraDTO::$OPER_IN); | |
394 | - } else { | |
395 | - $objPacoteDTO->setNumIdProtocolo(-1); | |
396 | - } | |
397 | - } | |
398 | - | |
399 | - if (isset($filtro['filtroSelSitucaoIntegracao']) && $filtro['filtroSelSitucaoIntegracao'] != '') { | |
400 | - | |
401 | - $objPacoteDTO->setStrStaIntegracao($filtro['filtroSelSitucaoIntegracao']); | |
402 | - } else if (!isset($filtro['filtroSelSitucaoIntegracao'])) { | |
403 | - $strSqlNativo .= "sta_integracao<>'NI' AND "; | |
404 | - } | |
405 | - | |
406 | - if (isset($filtro['filtroSelUnidade']) && $filtro['filtroSelUnidade'] != '' && $filtro['filtroSelUnidade'] != 0) { | |
407 | - $strUnidades = $filtro['filtroSelUnidade']; | |
408 | - if (isset($filtro['filtroIncluirUnidadesFilhas']) && $filtro['filtroIncluirUnidadesFilhas']=='on') { | |
409 | - $objInfraSip = new InfraSip(SessaoSEI::getInstance()); | |
410 | - $ret = $objInfraSip->carregarUnidades(SessaoSEI::getInstance()->getNumIdSistema()); | |
411 | - $arrUnidadesSip = array(); | |
412 | - | |
413 | - $numUnidade = $filtro['filtroSelUnidade']; | |
414 | - foreach ($ret as $uni) { | |
415 | - $numIdUnidade = $uni[InfraSip::$WS_UNIDADE_ID]; | |
416 | - if ($numIdUnidade!='' && $numIdUnidade==$numUnidade) { | |
417 | - $numIdUnidadesInferor = $uni[InfraSip::$WS_UNIDADE_SUBUNIDADES]; | |
418 | - | |
419 | - foreach ($numIdUnidadesInferor as $numIdUnidadeInferor) { | |
420 | - $strUnidades = $strUnidades.",".$numIdUnidadeInferor; | |
421 | - } | |
422 | - } | |
423 | - } | |
424 | - } | |
425 | - // Adriano MPOG - tratando novos IDs de tamanho máximo de 30 posições | |
426 | - $strSqlNativo .= " md_pi_pacote_envio.id_protocolo IN (select id_protocolo from protocolo p where p.id_unidade_geradora IN (".$strUnidades.")) AND "; | |
427 | - } | |
428 | - //Adriano -MPOG - fazendo alterações para ficar multibancos o tratamento do formato de data | |
429 | - //Se campo inicial da data de geração do processo está preenchido | |
430 | - if (isset($filtro['filtroTxtPeriodoGeracaoDe']) && $filtro['filtroTxtPeriodoGeracaoDe'] != '') { | |
431 | - | |
432 | - $strDataInicio = $filtro['filtroTxtPeriodoGeracaoDe']; | |
433 | - | |
434 | - //Código provisório para tratar unificação dos fontes | |
435 | - $objBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
436 | - | |
437 | - $strDataInicialFormatada = $strDataInicio . " 00:00:00"; | |
438 | - $strNovaDataInicial = $objBD->retornarFormatoData($strDataInicialFormatada); | |
439 | - | |
440 | - //Se campo final da data de geração do processo está preenchido | |
441 | - if (isset($filtro['filtroTxtPeriodoGeracaoA']) && $filtro['filtroTxtPeriodoGeracaoA'] != '') { | |
442 | - $strDataFim = $filtro['filtroTxtPeriodoGeracaoA']; | |
443 | - $strDataFinalFormatada = $strDataFim . " 23:59:59"; | |
444 | - $strNovaDataFinal = $objBD->retornarFormatoData($strDataFinalFormatada); | |
445 | - | |
446 | - //Trata SQL nativo para que considere apenas protocolos produzidos dentro daquele intervalo | |
447 | - $strSqlNativo .= " md_pi_pacote_envio.id_protocolo IN (select p.id_protocolo from protocolo p where p.dta_geracao>= ".$strNovaDataInicial." AND p.dta_geracao<= ".$strNovaDataFinal.") AND "; | |
448 | - } else { | |
449 | - //Trata SQL nativo para que considere apenas protocolos produzidos a partir da data inicial informada. | |
450 | - $strSqlNativo .= " md_pi_pacote_envio.id_protocolo IN (select p.id_protocolo from protocolo p where p.dta_geracao>= ".$strNovaDataInicial. ") AND "; | |
451 | - } | |
452 | - | |
453 | - } else if (isset($filtro['filtroTxtPeriodoGeracaoA']) && $filtro['filtroTxtPeriodoGeracaoA'] != '') { | |
454 | - //Se apenas o segundo campo de data de geração do processo está preenchido, considera apenas os processos produzidos até aquela data | |
455 | - $strDataFim = $filtro['filtroTxtPeriodoGeracaoA']; | |
456 | - | |
457 | - //Código provisório para tratar unificação dos fontes | |
458 | - $objBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
459 | - | |
460 | - $strDataFinalFormatada = $strDataFim . " 23:59:59"; | |
461 | - $strNovaDataFinal = $objBD->retornarFormatoData($strDataFinalFormatada); | |
462 | - | |
463 | - $strSqlNativo .= " pi_pacote_envio.id_protocolo IN (select p.id_protocolo from protocolo p where p.dta_geracao<= ". $dthNovaDataFinal. ") AND "; | |
464 | - } | |
465 | - | |
466 | - if (isset($filtro['filtroTxtPeriodoDe']) && $filtro['filtroTxtPeriodoDe'] != '') { | |
467 | - $objPacoteDTO->adicionarCriterio(array('DataSituacao'), array(InfraDTO::$OPER_MAIOR_IGUAL), array($filtro['filtroTxtPeriodoDe'] . ' 00:00:00')); | |
468 | - } | |
469 | - if (isset($filtro['filtroTxtPeriodoA']) && $filtro['filtroTxtPeriodoA'] != '') { | |
470 | - $objPacoteDTO->adicionarCriterio(array('DataSituacao'), array(InfraDTO::$OPER_MENOR_IGUAL), array($filtro['filtroTxtPeriodoA'] . ' 23:59:59')); | |
471 | - } | |
472 | - if ($strSqlNativo!='') { | |
473 | - $strSqlNativo = trim($strSqlNativo); | |
474 | - $strSqlNativo = substr($strSqlNativo, 0,strlen($strSqlNativo)-3); | |
475 | - $objPacoteDTO->setStrCriterioSqlNativo($strSqlNativo); | |
476 | - } | |
477 | - | |
478 | - if (isset($filtro['paginacao']) && $filtro['paginacao'] == true) { | |
479 | - PaginaSEI::getInstance()->prepararOrdenacao($objPacoteDTO, 'IdProtocoloIntegradoPacoteEnvio', InfraDTO::$TIPO_ORDENACAO_ASC); | |
480 | - | |
481 | - if (isset($filtro['filtroNumQuantidadeRegistrosPorPagina']) && $filtro['filtroNumQuantidadeRegistrosPorPagina']!='') { | |
482 | - PaginaSEI::getInstance()->prepararPaginacao($objPacoteDTO, $filtro['filtroNumQuantidadeRegistrosPorPagina']); | |
483 | - } else { | |
484 | - PaginaSEI::getInstance()->prepararPaginacao($objPacoteDTO, 50); | |
485 | - } | |
486 | - } | |
487 | - | |
488 | - $arrObjPacotesDTO = $objPacoteRN->listar($objPacoteDTO); | |
489 | - $numPacotes = count($arrObjPacotesDTO); | |
490 | - if (isset($filtro['paginacao']) && $filtro['paginacao'] == true) { | |
491 | - if(isset($filtro['filtroNumQuantidadeRegistrosPorPagina']) && $filtro['filtroNumQuantidadeRegistrosPorPagina']!=''&&$numPacotes>$filtro['filtroNumQuantidadeRegistrosPorPagina']) { | |
492 | - $objPacoteDTO->setNumRegistrosPaginaAtual($filtro['filtroNumQuantidadeRegistrosPorPagina']); | |
493 | - } | |
494 | - PaginaSEI::getInstance()->processarPaginacao($objPacoteDTO); | |
495 | - } | |
496 | - $arrObjProcedimentoDTO = $this->montarPacotesMonitorados($arrObjPacotesDTO, $filtro); | |
497 | - | |
498 | - return $arrObjProcedimentoDTO; | |
499 | - } | |
500 | - | |
501 | - public function montarPacotesMonitorados($arrObjPacotesDTO, $filtro = null) { | |
502 | - | |
503 | - $objProtocoloIntegradoMonitoramentoProcessosRN = new ProtocoloIntegradoMonitoramentoProcessosRN(); | |
504 | - $objProtocoloRN = new ProtocoloRN(); | |
505 | - $numPacotes = count($arrObjPacotesDTO); | |
506 | - $arrObjProcedimentoDTO = array(); | |
507 | - $objProtocoloIntegradoRN = new ProtocoloIntegradoRN(); | |
508 | - $objPacoteRN = new ProtocoloIntegradoPacoteEnvioRN(); | |
509 | - $objProtocoloIntegradoMonitoramentoProcessosDTO = new ProtocoloIntegradoMonitoramentoProcessosDTO(); | |
510 | - $objProtocoloIntegradoMonitoramentoProcessosDTO->retNumIdProtocoloIntegradoMonitoramentoProcessos(); | |
511 | - $objProtocoloIntegradoMonitoramentoProcessosDTO->retNumIdAtividade(); | |
512 | - $objProtocoloIntegradoMonitoramentoProcessosDTO->retNumIdProtocolo(); | |
513 | - | |
514 | - $objProtocoloIntegradoDTO = new ProtocoloIntegradoDTO(); | |
515 | - | |
516 | - for ($p = 0; $p < $numPacotes; $p++) { | |
517 | - | |
518 | - $idProtocolo = $arrObjPacotesDTO[$p]->getNumIdProtocolo(); | |
519 | - $situacaoPacote = $arrObjPacotesDTO[$p]->getStrStaIntegracao(); | |
520 | - $dataSituacao = $arrObjPacotesDTO[$p]->getDthDataSituacao(); | |
521 | - | |
522 | - //$objProtocoloIntegradoMonitoramentoProcessosDTO->setNumIdProtocolo($arrObjPacotesDTO[$p]->getNumIdProtocolo()); | |
523 | - $pacote = $arrObjPacotesDTO[$p]->getNumIdProtocoloIntegradoPacoteEnvio(); | |
524 | - $arrObjProcedimentoDTO[$pacote]['atividades'] = array(); | |
525 | - | |
526 | - $objProtocolo = new ProtocoloDTO(); | |
527 | - $objProtocolo->retStrNomeTipoProcedimentoDocumento(); | |
528 | - $objProtocolo->retStrProtocoloFormatado(); | |
529 | - $objProtocolo->retStrDescricao(); | |
530 | - $objProtocolo->retStrProtocoloFormatadoPesquisa(); | |
531 | - $objProtocolo->retDblIdProtocolo(); | |
532 | - $objProtocolo->retDtaGeracao(); | |
533 | - $objProtocolo->retStrNomeTipoProcedimentoProcedimento(); | |
534 | - | |
535 | - $objProtocolo->setDblIdProtocolo($idProtocolo); | |
536 | - $objProtocolo->setDblIdProtocolo($arrObjPacotesDTO[$p]->getNumIdProtocolo()); | |
537 | - | |
538 | - $arrObjProcedimentoDTO[$pacote]['protocolo'] = $objProtocoloRN->consultarRN0186($objProtocolo); | |
539 | - $arrObjProcedimentoDTO[$pacote]['sta_integracao'] = $situacaoPacote; | |
540 | - $arrObjProcedimentoDTO[$pacote]['dth_metadados'] = $arrObjPacotesDTO[$p]->getDthDataMetadados(); | |
541 | - $arrObjProcedimentoDTO[$pacote]['id_pacote'] = $arrObjPacotesDTO[$p]->getNumIdProtocoloIntegradoPacoteEnvio(); | |
542 | - $arrObjProcedimentoDTO[$pacote]['num_tentativas'] = $arrObjPacotesDTO[$p]->getNumTentativasEnvio(); | |
543 | - $arrObjProcedimentoDTO[$pacote]['dth_situacao'] = $dataSituacao; | |
544 | - } | |
545 | - | |
546 | - return $arrObjProcedimentoDTO; | |
547 | - } | |
548 | - | |
549 | - public function listarProcessosPublicacao($filtro) { | |
550 | - | |
551 | - $objProtocoloIntegradoRN = new ProtocoloIntegradoRN(); | |
552 | - $objPacoteRN = new ProtocoloIntegradoPacoteEnvioRN(); | |
553 | - $objProtocoloIntegradoMonitoramentoProcessosRN = new ProtocoloIntegradoMonitoramentoProcessosRN(); | |
554 | - $objProtocoloRN = new ProtocoloRN(); | |
555 | - | |
556 | - $objProtocoloIntegradoDTO = new ProtocoloIntegradoDTO(); | |
557 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
558 | - $objPacoteDTO->retNumIdProtocolo(); | |
559 | - $objPacoteDTO->retStrStaIntegracao(); | |
560 | - $objPacoteDTO->retDthDataSituacao(); | |
561 | - $objPacoteDTO->retDthDataMetadados(); | |
562 | - $objPacoteDTO->retNumTentativasEnvio(); | |
563 | - $objPacoteDTO->retNumIdProtocoloIntegradoPacoteEnvio(); | |
564 | - $strSqlNativo = ''; | |
565 | - | |
566 | - if (isset($filtro['strDthAgendamentoExecutado'])) { | |
567 | - $strDataAgendamentoExecutado = str_replace('/', '-', $filtro['strDthAgendamentoExecutado']); | |
568 | - $strDataAgendamentoExecutado = date('d/m/Y G:i:s', strtotime($strDataAgendamentoExecutado)); | |
569 | - $objPIMonitoraProcessosBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
570 | - | |
571 | - $strDataAgendamentoExecutado = $objPIMonitoraProcessosBD->retornarFormatoData($strDataAgendamentoExecutado); | |
572 | - $strSqlNativo .= "(dth_agendamento_executado is null OR dth_agendamento_executado<>".$strDataAgendamentoExecutado.") AND "; | |
573 | - } | |
574 | - if (isset($filtro['numMaxResultados'])) { | |
575 | - $objPacoteDTO->setNumMaxRegistrosRetorno($filtro['numMaxResultados']); | |
576 | - } | |
577 | - if (isset($filtro['numPagina'])) { | |
578 | - $objPacoteDTO->setNumPaginaAtual($filtro['numPagina']); | |
579 | - } | |
580 | - if (isset($filtro['pacotes'])) { | |
581 | - $objPacoteDTO->setNumIdProtocoloIntegradoPacoteEnvio($filtro['pacotes'], InfraDTO::$OPER_IN); | |
582 | - } else { | |
583 | - if (isset($filtro['numMaxTentativas'])) { | |
584 | - $strSqlNativo .= "sta_integracao='NI' OR (sta_integracao<>'I' AND num_tentativas_envio<".$filtro['numMaxTentativas'].") AND "; | |
585 | - } else { | |
586 | - $strSqlNativo .= "sta_integracao<>'I' AND "; | |
587 | - } | |
588 | - } | |
589 | - if($strSqlNativo!='') { | |
590 | - $strSqlNativo = trim($strSqlNativo); | |
591 | - $strSqlNativo = substr($strSqlNativo, 0,strlen($strSqlNativo)-3); | |
592 | - $objPacoteDTO->setStrCriterioSqlNativo($strSqlNativo); | |
593 | - } | |
594 | - | |
595 | - $arrObjPacotesDTO = $objPacoteRN->listar($objPacoteDTO); | |
596 | - $arrObjProcedimentoDTO = $this->montarPacotesMonitorados($arrObjPacotesDTO, $filtro); | |
597 | - return $arrObjProcedimentoDTO; | |
598 | - } | |
599 | - | |
600 | - public function publicarProcessosMonitorados($arrObjRetornoProtocoloIntegradoParametrosDTOFiltro) { | |
601 | - | |
602 | - $objRetornoProtocoloIntegradoParametrosDTO = $arrObjRetornoProtocoloIntegradoParametrosDTOFiltro[0]; | |
603 | - $filtro = $arrObjRetornoProtocoloIntegradoParametrosDTOFiltro[1]; | |
604 | - | |
605 | - $objRN = new ProtocoloIntegradoMonitoramentoProcessosRN(); | |
606 | - $objAtividadeRN = new AtividadeRN(); | |
607 | - $objProtocoloRN = new ProtocoloRN(); | |
608 | - $objProtocoloIntegradoRN = new ProtocoloIntegradoRN(); | |
609 | - $objPacoteRN = new ProtocoloIntegradoPacoteEnvioRN(); | |
610 | - $objProtocoloIntegradoParametrosRN = new ProtocoloIntegradoParametrosRN(); | |
611 | - | |
612 | - $objParticipanteDTO = new ParticipanteDTO(); | |
613 | - $objParticipanteDTO->retNumIdContato(); | |
614 | - $objParticipanteDTO->retStrNomeContato(); | |
615 | - $objParticipanteDTO->retStrSiglaContato(); | |
616 | - | |
617 | - $dom = new DOMDocument("1.0", "UTF-8"); | |
618 | - $dom->preserveWhiteSpace = false; | |
619 | - $dom->formatOutput = true; | |
620 | - | |
621 | - $root = $dom->createElement("ListaDocumentos"); | |
622 | - | |
623 | - $objTipoProcedimentoRN = new TipoProcedimentoRN(); | |
624 | - $arrObjPacotesEnviados = array(); | |
625 | - $arrObjProtocoloEnviados = array(); | |
626 | - $objProtocoloDTO; | |
627 | - | |
628 | - $quantidadeDocumentos = 1; | |
629 | - | |
630 | - $opcoes = array("soap_version" => SOAP_1_1, "trace" => 1, 'exceptions' => 0, 'encoding' => ' UTF-8'); | |
631 | - | |
632 | - $this->parametrosProtocolo = $objRetornoProtocoloIntegradoParametrosDTO; | |
633 | - $urlWebService = $objRetornoProtocoloIntegradoParametrosDTO->getStrUrlWebservice(); | |
634 | - $loginWebService = $objRetornoProtocoloIntegradoParametrosDTO->getStrLoginWebservice(); | |
635 | - | |
636 | - //recupera senha salva na base que está encriptada | |
637 | - $senhaWebService = $objRetornoProtocoloIntegradoParametrosDTO->getStrSenhaWebservice(); | |
638 | - | |
639 | - //Recupera senha de acesso através da encriptação da senha salva na base | |
640 | - $senhaWebService = $objProtocoloIntegradoParametrosRN->encriptaSenha(rawurldecode($senhaWebService)); | |
641 | - if (strlen(trim($senhaWebService)) > 0 && strlen(trim($loginWebService)) > 0) { | |
642 | - $conexaoCliente = new ProtocoloIntegradoClienteWS($urlWebService, $loginWebService, $senhaWebService, $opcoes); | |
643 | - } else { | |
644 | - | |
645 | - throw new InfraException('Campos Login e Senha para Acesso ao WebService devem ser informados na tela de Configuração de Parâmetros do Protocolo Integrado.', $e); | |
646 | - } | |
647 | - | |
648 | - | |
649 | - $retornoWS = $conexaoCliente->getQuantidadeMaximaDocumentosPorRequisicaoServidor(); | |
650 | - | |
651 | - | |
652 | - if (!is_int($retornoWS->NumeroMaximoDocumentos)) { | |
653 | - | |
654 | - if ($retornoWS instanceof SoapFault) { | |
655 | - | |
656 | - if (isset($retornoWS->detail->NegocioFault->mensagemFault)) { | |
657 | - | |
658 | - //throw new InfraException(utf8_decode($retornoWS->detail->NegocioFault->mensagemFault),$e); | |
659 | - throw new InfraException('Usuário e/ou senha inválidos para uso do serviço. | |
660 | - Verifique se os parâmetros de integração ao Protocolo Integrado estão corretamente informados.', $retornoWS); | |
661 | - } | |
662 | - | |
663 | - } | |
664 | - throw new InfraException('Não foi Possível Obter a Quantidade Máxima de Documentos no WebService do Protocolo Integrado.', $retornoWS); | |
665 | - } | |
666 | - $quantidadeMaximaDocumentos = $retornoWS->NumeroMaximoDocumentos; | |
667 | - $numMaximoTentativas = $objRetornoProtocoloIntegradoParametrosDTO->getNumQuantidadeTentativas(); | |
668 | - | |
669 | - $unidadesOperacao = array(); | |
670 | - $unidadesOperacaoId = array(); | |
671 | - $tratarEnconding = new Encoding(); | |
672 | - | |
673 | - $strHierarquiaUnidade = ''; | |
674 | - $objInfraSip = new InfraSip(SessaoSEI::getInstance()); | |
675 | - $ret = $objInfraSip->carregarUnidades(SessaoSEI::getInstance()->getNumIdSistema()); | |
676 | - | |
677 | - $arrUnidadesSip = array(); | |
678 | - | |
679 | - foreach ($ret as $uni) { | |
680 | - $numIdUnidade = $uni[InfraSip::$WS_UNIDADE_ID]; | |
681 | - $arrUnidadesSip[$numIdUnidade] = array(); | |
682 | - //$arrUnidadesSip[$numIdUnidade][self::$POS_UNIDADE_ORGAO_ID] = $uni[InfraSip::$WS_UNIDADE_ORGAO_ID]; | |
683 | - $arrUnidadesSip[$numIdUnidade][UnidadeRN::$POS_UNIDADE_SIGLA] = $uni[InfraSip::$WS_UNIDADE_SIGLA]; | |
684 | - $arrUnidadesSip[$numIdUnidade][UnidadeRN::$POS_UNIDADE_DESCRICAO] = $uni[InfraSip::$WS_UNIDADE_DESCRICAO]; | |
685 | - //$arrUnidadesSip[$numIdUnidade][self::$POS_UNIDADE_SUBUNIDADES] = $uni[InfraSip::$WS_UNIDADE_SUBUNIDADES]; | |
686 | - $arrUnidadesSip[$numIdUnidade][UnidadeRN::$POS_UNIDADE_UNIDADES_SUPERIORES] = $uni[InfraSip::$WS_UNIDADE_UNIDADES_SUPERIORES]; | |
687 | - } | |
688 | - | |
689 | - $numTotal = 0; | |
690 | - $numRodada = 0; | |
691 | - $filtro["numMaxTentativas"] = $numMaximoTentativas; | |
692 | - $filtro["numMaxResultados"] = $quantidadeMaximaDocumentos; | |
693 | - $filtro["numPagina"] = 0; | |
694 | - | |
695 | - $strInicioPublicacao = date('d/m/Y H:i:s'); | |
696 | - $filtro['strDthAgendamentoExecutado'] = $strInicioPublicacao; | |
697 | - | |
698 | - while (true) { | |
699 | - $numRodada = $numRodada+1; | |
700 | - $arrObjProcessosMonitorados = $this->listarProcessosPublicacao($filtro); | |
701 | - | |
702 | - if (count($arrObjProcessosMonitorados)==0) { | |
703 | - break; | |
704 | - } | |
705 | - $numTotal = $numTotal+count($arrObjProcessosMonitorados); | |
706 | - | |
707 | - $contador = 0; | |
708 | - | |
709 | - foreach ($arrObjProcessosMonitorados as $pacote => $protocoloMonitorado) { | |
710 | - $contador = $contador+1; | |
711 | - $documento = $dom->createElement("Documento"); | |
712 | - | |
713 | - $objProtocoloDTO = $protocoloMonitorado['protocolo']; | |
714 | - | |
715 | - | |
716 | - | |
717 | - array_push($arrObjProtocoloEnviados, $objProtocoloDTO); | |
718 | - | |
719 | - $objParticipanteDTO->setDblIdProtocolo($objProtocoloDTO->getDblIdProtocolo()); | |
720 | - | |
721 | - $objParticipanteDTO->setStrStaParticipacao(array(ParticipanteRN::$TP_INTERESSADO), InfraDTO::$OPER_IN); | |
722 | - | |
723 | - $objParticipanteDTO->setOrdNumSequencia(InfraDTO::$TIPO_ORDENACAO_ASC); | |
724 | - | |
725 | - $objParticipanteRN = new ParticipanteRN(); | |
726 | - $arrObjParticipanteDTO = $objParticipanteRN->listarRN0189($objParticipanteDTO); | |
727 | - $arrIdParticipanteProcesso = array(); | |
728 | - foreach ($arrObjParticipanteDTO as $ch => $val) { | |
729 | - | |
730 | - array_push($arrIdParticipanteProcesso, $val->getNumIdContato()); | |
731 | - } | |
732 | - $arrDocumentosAssinadosDTO = $this->consultarParticipantesDocumentosAssinadosProcesso($objProtocoloDTO); | |
733 | - | |
734 | - if (is_array($arrDocumentosAssinadosDTO) && count($arrDocumentosAssinadosDTO) > 0) { | |
735 | - | |
736 | - foreach ($arrDocumentosAssinadosDTO as $key => $participante) { | |
737 | - | |
738 | - if (!in_array($participante->getNumIdContato(), $arrIdParticipanteProcesso)) { | |
739 | - array_push($arrObjParticipanteDTO, $participante); | |
740 | - } | |
741 | - } | |
742 | - } | |
743 | - | |
744 | - unset($arrDocumentosAssinadosDTO); | |
745 | - | |
746 | - $arrObjParticipanteDTO = array_unique($arrObjParticipanteDTO); | |
747 | - | |
748 | - $objRelProtocoloAssuntoDTO = new RelProtocoloAssuntoDTO(); | |
749 | - $objRelProtocoloAssuntoDTO->setDistinct(true); | |
750 | - $objRelProtocoloAssuntoDTO->retNumSequencia(); | |
751 | - $objRelProtocoloAssuntoDTO->retNumIdAssunto(); | |
752 | - $objRelProtocoloAssuntoDTO->retStrCodigoEstruturadoAssunto(); | |
753 | - $objRelProtocoloAssuntoDTO->retStrDescricaoAssunto(); | |
754 | - //$objRelProtocoloAssuntoDTO->setDblIdProtocolo($arrProtocolos,InfraDTO::$OPER_IN); | |
755 | - $objRelProtocoloAssuntoDTO->setDblIdProtocolo($objProtocoloDTO->getDblIdProtocolo()); | |
756 | - $objRelProtocoloAssuntoDTO->setOrdNumSequencia(InfraDTO::$TIPO_ORDENACAO_ASC); | |
757 | - | |
758 | - $objRelProtocoloAssuntoRN = new RelProtocoloAssuntoRN(); | |
759 | - $arrObjRelProtocoloAssuntoDTO = $objRelProtocoloAssuntoRN->listarRN0188($objRelProtocoloAssuntoDTO); | |
760 | - | |
761 | - foreach ($arrObjRelProtocoloAssuntoDTO as $key => $value) { | |
762 | - | |
763 | - $objRelProtocoloAssuntoDTO = $value; | |
764 | - } | |
765 | - unset($arrObjRelProtocoloAssuntoDTO); | |
766 | - | |
767 | - $codigoProtocolo = $dom->createElement("Protocolo", $objProtocoloDTO->getStrProtocoloFormatadoPesquisa()); | |
768 | - | |
769 | - list($day, $month, $year) = explode('/', $objProtocoloDTO->getDtaGeracao()); | |
770 | - $dataGeracaoConvertida = sprintf('%s-%s-%s', $year, $month, $day); | |
771 | - $dataGeracao = $dom->createElement("DataHoraProducao", date('c', strtotime($dataGeracaoConvertida))); | |
772 | - | |
773 | - $tipoProcedimento = $dom->createElement("Especie", "Processo"); | |
774 | - if (strlen(trim($objProtocoloDTO->getStrDescricao())) > 0) { | |
775 | - $assunto = $dom->createElement("Assunto", InfraString::formatarXML($objProtocoloDTO->getStrNomeTipoProcedimentoProcedimento() . ' - ' . $objProtocoloDTO->getStrDescricao())); | |
776 | - } else { | |
777 | - | |
778 | - $assunto = $dom->createElement("Assunto", InfraString::formatarXML($objProtocoloDTO->getStrNomeTipoProcedimentoProcedimento())); | |
779 | - } | |
780 | - | |
781 | - // $identificacao = $dom->createElement("IdentificacaoDocumento", $identificacaoPrimeiroDocumentoAssinado); | |
782 | - | |
783 | - $documento->appendChild($codigoProtocolo); | |
784 | - $documento->appendChild($dataGeracao); | |
785 | - $documento->appendChild($tipoProcedimento); | |
786 | - $documento->appendChild($assunto); | |
787 | - // $documento->appendChild($identificacao); | |
788 | - | |
789 | - $objRelProtocoloProtocoloDTO = new RelProtocoloProtocoloDTO(); | |
790 | - $objRelProtocoloProtocoloRN = new RelProtocoloProtocoloRN(); | |
791 | - $objRelProtocoloProtocoloDTO->retStrProtocoloFormatadoProtocolo2(); | |
792 | - $objRelProtocoloProtocoloDTO->setDblIdProtocolo1($objProtocoloDTO->getDblIdProtocolo()); | |
793 | - $arrEstadosRelacaoProtocolo = array(); | |
794 | - | |
795 | - array_push($arrEstadosRelacaoProtocolo, RelProtocoloProtocoloRN::$TA_PROCEDIMENTO_SOBRESTADO); | |
796 | - array_push($arrEstadosRelacaoProtocolo, RelProtocoloProtocoloRN::$TA_PROCEDIMENTO_RELACIONADO); | |
797 | - array_push($arrEstadosRelacaoProtocolo, RelProtocoloProtocoloRN::$TA_PROCEDIMENTO_ANEXADO); | |
798 | - $objRelProtocoloProtocoloDTO->setStrStaAssociacao($arrEstadosRelacaoProtocolo, InfraDTO::$OPER_IN); | |
799 | - $arrRelProtocoloProtocoloDTO = $objRelProtocoloProtocoloRN->listarRN0187($objRelProtocoloProtocoloDTO); | |
800 | - | |
801 | - $objRelProtocoloProtocoloDTO = new RelProtocoloProtocoloDTO(); | |
802 | - $objRelProtocoloProtocoloRN = new RelProtocoloProtocoloRN(); | |
803 | - $objRelProtocoloProtocoloDTO->retStrProtocoloFormatadoProtocolo1(); | |
804 | - $objRelProtocoloProtocoloDTO->setDblIdProtocolo2($objProtocoloDTO->getDblIdProtocolo()); | |
805 | - $arrEstadosRelacaoProtocolo = array(); | |
806 | - | |
807 | - array_push($arrEstadosRelacaoProtocolo, RelProtocoloProtocoloRN::$TA_PROCEDIMENTO_SOBRESTADO); | |
808 | - array_push($arrEstadosRelacaoProtocolo, RelProtocoloProtocoloRN::$TA_PROCEDIMENTO_RELACIONADO); | |
809 | - array_push($arrEstadosRelacaoProtocolo, RelProtocoloProtocoloRN::$TA_PROCEDIMENTO_ANEXADO); | |
810 | - $objRelProtocoloProtocoloDTO->setStrStaAssociacao($arrEstadosRelacaoProtocolo, InfraDTO::$OPER_IN); | |
811 | - $arrRelProtocoloProtocoloDTO2 = $objRelProtocoloProtocoloRN->listarRN0187($objRelProtocoloProtocoloDTO); | |
812 | - | |
813 | - for ($numProtocolo = 0; $numProtocolo < count($arrRelProtocoloProtocoloDTO2); $numProtocolo++) { | |
814 | - $arrRelProtocoloProtocoloDTO2[$numProtocolo]->setStrProtocoloFormatadoProtocolo2($arrRelProtocoloProtocoloDTO2[$numProtocolo]->getStrProtocoloFormatadoProtocolo1()); | |
815 | - array_push($arrRelProtocoloProtocoloDTO, $arrRelProtocoloProtocoloDTO2[$numProtocolo]); | |
816 | - } | |
817 | - unset($arrObjRelProtocoloAssuntoDTO); | |
818 | - | |
819 | - if (count($arrRelProtocoloProtocoloDTO) > 0) { | |
820 | - $protocolosRelacionados = $dom->createElement("ListaProtocolosRelacionados"); | |
821 | - $arrCodigoProtocoloRelacionado = array(); | |
822 | - for ($k = 0; $k < count($arrRelProtocoloProtocoloDTO); $k++) { | |
823 | - | |
824 | - $protocoloRelacionadoDTO = $arrRelProtocoloProtocoloDTO[$k]; | |
825 | - $codProtocoloRelacionado = InfraUtil::retirarFormatacao($protocoloRelacionadoDTO->getStrProtocoloFormatadoProtocolo2()); | |
826 | - if (strlen($codProtocoloRelacionado) == 13 || strlen($codProtocoloRelacionado) == 14 || strlen($codProtocoloRelacionado) == 15 || strlen($codProtocoloRelacionado) == 17 || strlen($codProtocoloRelacionado) == 21) { | |
827 | - $protocoloRelacionado = $dom->createElement("ProtocoloRelacionado", InfraUtil::retirarFormatacao($protocoloRelacionadoDTO->getStrProtocoloFormatadoProtocolo2())); | |
828 | - $protocolosRelacionados->appendChild($protocoloRelacionado); | |
829 | - array_push($arrCodigoProtocoloRelacionado, $codProtocoloRelacionado); | |
830 | - } | |
831 | - | |
832 | - } | |
833 | - if (count($arrCodigoProtocoloRelacionado) > 0) { | |
834 | - | |
835 | - $documento->appendChild($protocolosRelacionados); | |
836 | - } | |
837 | - } | |
838 | - unset($arrObjRelProtocoloAssuntoDTO); | |
839 | - if (count($arrObjParticipanteDTO) > 0) { | |
840 | - | |
841 | - $interessados = $dom->createElement("ListaInteressados"); | |
842 | - | |
843 | - foreach ($arrObjParticipanteDTO as $key => $objInteressadoDTO) { | |
844 | - $strNomeInteressado = $this->gerarNomeInteressadoComCpfEscondido($objInteressadoDTO->getStrNomeContato()); | |
845 | - $interessado = $dom->createElement("Interessado"); | |
846 | - $nomeInteressado = $dom->createElement("NomeInteressado", InfraString::formatarXML(substr($strNomeInteressado, 0, 150))); | |
847 | - $interessado->appendChild($nomeInteressado); | |
848 | - $interessados->appendChild($interessado); | |
849 | - } | |
850 | - $documento->appendChild($interessados); | |
851 | - } | |
852 | - | |
853 | - unset($arrObjParticipanteDTO); | |
854 | - | |
855 | - $historico = $dom->createElement("Historico"); | |
856 | - | |
857 | - $objProtocoloIntegradoMonitoramentoProcessosDTO = new ProtocoloIntegradoMonitoramentoProcessosDTO(); | |
858 | - $objProtocoloIntegradoMonitoramentoProcessosDTO->setNumIdPacote($protocoloMonitorado['id_pacote']); | |
859 | - | |
860 | - $arrAtividades = $this->listarAtividadesPublicacao($objProtocoloIntegradoMonitoramentoProcessosDTO); | |
861 | - | |
862 | - for ($j = 0; $j < count($arrAtividades); $j++) { | |
863 | - | |
864 | - $numAtividade = $arrAtividades[$j]->getNumIdAtividade(); | |
865 | - | |
866 | - $strMensagem = $arrAtividades[$j]->getStrMensagemPublicacao(); | |
867 | - | |
868 | - $objProtocoloIntegradoRN = new ProtocoloIntegradoRN(); | |
869 | - $strNomeOperacao = $objProtocoloIntegradoRN->transformarMensagemOperacao($numAtividade, $strMensagem); | |
870 | - | |
871 | - $itemHistorico = $dom->createElement("ItemHistorico"); | |
872 | - | |
873 | - $dataHoraOperacaoConvertida = str_replace('/', '-', $arrAtividades[$j]->getDthDataAbertura()); | |
874 | - $dataHoraOperacao = $dom->createElement("DataHoraOperacao", date('c', strtotime($dataHoraOperacaoConvertida))); | |
875 | - $unidadeOperacao = ''; | |
876 | - | |
877 | - if ($arrAtividades[$j]->getNumIdUnidade() != null) { | |
878 | - | |
879 | - $idUnidadeOperacao = $arrAtividades[$j]->getNumIdUnidade(); | |
880 | - | |
881 | - if (in_array($idUnidadeOperacao, $unidadesOperacaoId)) { | |
882 | - | |
883 | - $unidadeOperacao = $unidadesOperacao[$idUnidadeOperacao]; | |
884 | - | |
885 | - } else { | |
886 | - $objUnidadeDTO = new UnidadeDTO(); | |
887 | - | |
888 | - $objUnidadeDTO->retNumIdUnidade(); | |
889 | - $objUnidadeDTO->retStrSigla(); | |
890 | - $objUnidadeDTO->retStrSiglaOrgao(); | |
891 | - $objUnidadeDTO->retStrDescricaoOrgao(); | |
892 | - $objUnidadeDTO->retStrDescricao(); | |
893 | - | |
894 | - $objUnidadeDTO->setNumIdUnidade($idUnidadeOperacao); | |
895 | - $objUnidadeDTO->setBolExclusaoLogica(false); | |
896 | - | |
897 | - $objUnidadeRN = new UnidadeRN(); | |
898 | - | |
899 | - $objUnidadeDTO = $objUnidadeRN->consultarRN0125($objUnidadeDTO); | |
900 | - | |
901 | - if ($objUnidadeDTO != null) { | |
902 | - | |
903 | - $strHierarquiaUnidade = $this->obterHierarquiaUnidade($objUnidadeDTO, $arrUnidadesSip); | |
904 | - if (strlen(trim($strHierarquiaUnidade)) == 0) { | |
905 | - | |
906 | - $strHierarquiaUnidade = $objUnidadeDTO->getStrDescricao(); | |
907 | - } | |
908 | - $unidadeOperacao = substr($strHierarquiaUnidade . '/' . $objUnidadeDTO->getStrDescricaoOrgao(), 0, 297); | |
909 | - if (strlen($strHierarquiaUnidade . '/' . $objUnidadeDTO->getStrDescricaoOrgao()) > 297) { | |
910 | - | |
911 | - $unidadeOperacao .= '...'; | |
912 | - } | |
913 | - $unidadesOperacao[$idUnidadeOperacao] = $unidadeOperacao; | |
914 | - array_push($unidadesOperacaoId, $idUnidadeOperacao); | |
915 | - } | |
916 | - } | |
917 | - } | |
918 | - $unidadeOperacao = $dom->createElement("UnidadeOperacao", InfraString::formatarXML($unidadeOperacao)); | |
919 | - $operacao = $dom->createElement("Operacao", InfraString::formatarXML($strNomeOperacao)); | |
920 | - | |
921 | - $itemHistorico->appendChild($dataHoraOperacao); | |
922 | - $itemHistorico->appendChild($unidadeOperacao); | |
923 | - $itemHistorico->appendChild($operacao); | |
924 | - $historico->appendChild($itemHistorico); | |
925 | - | |
926 | - } | |
927 | - | |
928 | - unset($arrAtividades); | |
929 | - | |
930 | - $documento->appendChild($historico); | |
931 | - $root->appendChild($documento); | |
932 | - $dom->appendChild($root); | |
933 | - | |
934 | - $metadados = $dom->saveXML(); | |
935 | - | |
936 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
937 | - $objPacoteDTO->setNumIdProtocoloIntegradoPacoteEnvio($protocoloMonitorado['id_pacote']); | |
938 | - $objPacoteDTO->setStrStaIntegracao($protocoloMonitorado['sta_integracao']); | |
939 | - | |
940 | - $domDocumento = new DOMDocument("1.0", "UTF-8"); | |
941 | - $domDocumento->preserveWhiteSpace = false; | |
942 | - $domDocumento->formatOutput = true; | |
943 | - $node = $domDocumento->importNode($documento, true); | |
944 | - $domDocumento->appendChild($node); | |
945 | - $xmlArquivoMetadado = $domDocumento->saveXML(); | |
946 | - | |
947 | - for($control = 0; $control < 32; $control++) { | |
948 | - $xmlArquivoMetadado = str_replace(chr($control), "", $xmlArquivoMetadado); | |
949 | - } | |
950 | - | |
951 | - $objPacoteDTO->setStrArquivoMetadados($xmlArquivoMetadado); | |
952 | - $objPacoteDTO->setNumTentativasEnvio($protocoloMonitorado['num_tentativas']); | |
953 | - if ($protocoloMonitorado['dth_metadados'] == NULL) { | |
954 | - | |
955 | - $objPacoteDTO->setDthDataMetadados(date('d/m/Y H:i:s')); | |
956 | - } | |
957 | - $retornoAtualizacao = $objPacoteRN->alterar($objPacoteDTO); | |
958 | - if($retornoAtualizacao==-1) { | |
959 | - continue; | |
960 | - | |
961 | - } | |
962 | - if($arrObjPacotesEnviados==null) { | |
963 | - $arrObjPacotesEnviados = array(); | |
964 | - } | |
965 | - array_push($arrObjPacotesEnviados, $objPacoteDTO); | |
966 | - | |
967 | - if ($quantidadeDocumentos == $quantidadeMaximaDocumentos) { | |
968 | - | |
969 | - try{ | |
970 | - $arrObjEnviarListaDocumentosPI = array(); | |
971 | - $arrObjEnviarListaDocumentosPI[0] = $dom; | |
972 | - $arrObjEnviarListaDocumentosPI[1] = $arrObjPacotesEnviados; | |
973 | - $arrObjEnviarListaDocumentosPI[2] = $arrObjProtocoloEnviados; | |
974 | - $arrObjEnviarListaDocumentosPI[3] = $strInicioPublicacao; | |
975 | - $arrObjEnviarListaDocumentosPI[4] = $conexaoCliente; | |
976 | - $this->enviarListaDocumentosPI($arrObjEnviarListaDocumentosPI); | |
977 | - | |
978 | - | |
979 | - } | |
980 | - catch(Exception $e) { | |
981 | - error_log($e); | |
982 | - } | |
983 | - $dom = new DOMDocument("1.0", "UTF-8"); | |
984 | - $dom->preserveWhiteSpace = false; | |
985 | - $dom->formatOutput = true; | |
986 | - | |
987 | - $root = $dom->createElement("ListaDocumentos"); | |
988 | - unset($arrObjPacotesEnviados); | |
989 | - $arrObjPacotesEnviados = array(); | |
990 | - $arrObjProtocoloEnviados = array(); | |
991 | - $quantidadeDocumentos = 0; | |
992 | - | |
993 | - } | |
994 | - $quantidadeDocumentos++; | |
995 | - | |
996 | - } | |
997 | - if ($quantidadeDocumentos < $quantidadeMaximaDocumentos) { | |
998 | - $documentos = $dom->getElementsByTagName("Documento"); | |
999 | - | |
1000 | - if ($documentos->length > 0) { | |
1001 | - try{ | |
1002 | - $arrObjEnviarListaDocumentosPI = array(); | |
1003 | - $arrObjEnviarListaDocumentosPI[0] = $dom; | |
1004 | - $arrObjEnviarListaDocumentosPI[1] = $arrObjPacotesEnviados; | |
1005 | - $arrObjEnviarListaDocumentosPI[2] = $arrObjProtocoloEnviados; | |
1006 | - $arrObjEnviarListaDocumentosPI[3] = $strInicioPublicacao; | |
1007 | - $arrObjEnviarListaDocumentosPI[4] = $conexaoCliente; | |
1008 | - $this->enviarListaDocumentosPI($arrObjEnviarListaDocumentosPI); | |
1009 | - } | |
1010 | - catch(Exception $e) { | |
1011 | - error_log($e); | |
1012 | - } | |
1013 | - unset($arrObjPacotesEnviados); | |
1014 | - } | |
1015 | - } | |
1016 | - if (count($arrObjProcessosMonitorados)<$quantidadeMaximaDocumentos) { | |
1017 | - break; | |
1018 | - } | |
1019 | - if ($numTotal>ProtocoloIntegradoParametrosRN::$NUM_MAX_ANDAMENTOS_POR_VEZ) { | |
1020 | - break; | |
1021 | - } | |
1022 | - } | |
1023 | - | |
1024 | - } | |
1025 | - | |
1026 | - private function gerarNomeInteressadoComCpfEscondido($strNomeInteressado) { | |
1027 | - | |
1028 | - if (preg_match("/[0-9]{3}[.]?[0-9]{3}[.]?[0-9]{3}[-]?[0-9]{2}/", $strNomeInteressado, $matches)) { | |
1029 | - $strCpf = $matches[0]; | |
1030 | - $bolCpfValido = $this->validarCPF($strCpf); | |
1031 | - if ($bolCpfValido==true) { | |
1032 | - $strCpf = "***".substr($strCpf, 3, strlen($strCpf)-5); | |
1033 | - if (substr($strCpf, -1, 1)=="-") { | |
1034 | - $strCpf = substr($strCpf, 0, strlen($strCpf)-2)."*-**"; | |
1035 | - } else { | |
1036 | - $strCpf = substr($strCpf, 0, strlen($strCpf)-1)."***"; | |
1037 | - } | |
1038 | - } | |
1039 | - | |
1040 | - $strNomeInteressado = str_replace($matches[0],$strCpf,$strNomeInteressado); | |
1041 | - } | |
1042 | - | |
1043 | - return $strNomeInteressado; | |
1044 | - } | |
1045 | - | |
1046 | - private function validarCPF($cpf = null) { | |
1047 | - | |
1048 | - // Verifica se um número foi informado | |
1049 | - if (empty($cpf)) { | |
1050 | - return false; | |
1051 | - } | |
1052 | - | |
1053 | - // Elimina possivel mascara | |
1054 | - $cpf = ereg_replace('[^0-9]', '', $cpf); | |
1055 | - $cpf = str_pad($cpf, 11, '0', STR_PAD_LEFT); | |
1056 | - | |
1057 | - // Verifica se o numero de digitos informados é igual a 11 | |
1058 | - if (strlen($cpf) != 11) { | |
1059 | - return false; | |
1060 | - } else if ($cpf == '00000000000' || $cpf == '11111111111' || $cpf == '22222222222' || $cpf == '33333333333' || $cpf == '44444444444' || $cpf == '55555555555' || | |
1061 | - $cpf == '66666666666' || $cpf == '77777777777' || $cpf == '88888888888' || $cpf == '99999999999') { | |
1062 | - // Retorna false caso o CPF seja igual à uma das sequencia invalidas | |
1063 | - return false; | |
1064 | - } else { | |
1065 | - // Verifica se o CPF é válido | |
1066 | - for ($t = 9; $t < 11; $t++) { | |
1067 | - for ($d = 0, $c = 0; $c < $t; $c++) { | |
1068 | - $d += $cpf{$c} * (($t + 1) - $c); | |
1069 | - } | |
1070 | - $d = ((10 * $d) % 11) % 10; | |
1071 | - if ($cpf{$c} != $d) { | |
1072 | - return false; | |
1073 | - } | |
1074 | - } | |
1075 | - return true; | |
1076 | - } | |
1077 | - } | |
1078 | - | |
1079 | - public function atualizaPacote($objPacoteDTO, $objProtocoloDTO, $resultado, $strInicioPublicacao) { | |
1080 | - | |
1081 | - $objPacoteRN = new ProtocoloIntegradoPacoteEnvioRN(); | |
1082 | - $erroXML = new DOMDocument("1.0", "UTF-8"); | |
1083 | - $erroXML->preserveWhiteSpace = false; | |
1084 | - $erroXML->formatOutput = true; | |
1085 | - | |
1086 | - if($objPacoteDTO!=null) { | |
1087 | - $strStatusStaIntegracao = $objPacoteDTO->getStrStaIntegracao(); | |
1088 | - $resultadoDocumento = $erroXML->createElement("ResultadoDocumento"); | |
1089 | - if ($resultado == 'Ok!') { | |
1090 | - $objPacoteDTO->setStrStaIntegracao(ProtocoloIntegradoPacoteEnvioRN::$STA_INTEGRADO); | |
1091 | - $objPacoteDTO->setNumTentativasEnvio($objPacoteDTO->getNumTentativasEnvio() + 1); | |
1092 | - } else if (stripos($resultado, 'NF00') !== false) { | |
1093 | - $objPacoteDTO->setStrStaIntegracao(ProtocoloIntegradoPacoteEnvioRN::$STA_ERRO_NEGOCIAL); | |
1094 | - $objPacoteDTO->setNumTentativasEnvio($objPacoteDTO->getNumTentativasEnvio() + 1); | |
1095 | - $protocoloDocumento = $erroXML->createElement("Protocolo", $objProtocoloDTO->getStrProtocoloFormatadoPesquisa()); | |
1096 | - $respostaDocumento = $erroXML->createElement("Resultado", utf8_decode($resultado)); | |
1097 | - $resultadoDocumento->appendChild($protocoloDocumento); | |
1098 | - $resultadoDocumento->appendChild($respostaDocumento); | |
1099 | - $erroXML->appendChild($resultadoDocumento); | |
1100 | - $objPacoteDTO->setStrArquivoErro($erroXML->saveXML()); | |
1101 | - | |
1102 | - } else { | |
1103 | - $objPacoteDTO->setNumTentativasEnvio($objPacoteDTO->getNumTentativasEnvio() + 1); | |
1104 | - $objPacoteDTO->setStrStaIntegracao(ProtocoloIntegradoPacoteEnvioRN::$STA_FALHA_INFRA); | |
1105 | - $protocoloDocumento = $erroXML->createElement("Protocolo", $objProtocoloDTO->getStrProtocoloFormatadoPesquisa()); | |
1106 | - $respostaDocumento = $erroXML->createElement("Resultado", utf8_decode($resultado)); | |
1107 | - $resultadoDocumento->appendChild($protocoloDocumento); | |
1108 | - $resultadoDocumento->appendChild($respostaDocumento); | |
1109 | - $erroXML->appendChild($resultadoDocumento); | |
1110 | - $objPacoteDTO->setStrArquivoErro($erroXML->saveXML()); | |
1111 | - | |
1112 | - } | |
1113 | - | |
1114 | - $objPacoteDTO->setDthDataSituacao(date('d/m/Y H:i:s')); | |
1115 | - $objPacoteDTO->setDthDataAgendamentoExecutado($strInicioPublicacao); | |
1116 | - | |
1117 | - if ($strStatusStaIntegracao=='I') { | |
1118 | - $objPacoteDTO->setDthDataMetadados(date('d/m/Y H:i:s')); | |
1119 | - } | |
1120 | - $objPacoteRN->alterar($objPacoteDTO); | |
1121 | - | |
1122 | - } | |
1123 | - | |
1124 | - } | |
1125 | - | |
1126 | - private function obterHierarquiaUnidade(UnidadeDTO $objUnidadeDTO, $arrUnidadesSip) { | |
1127 | - | |
1128 | - if (isset($arrUnidadesSip[$objUnidadeDTO->getNumIdUnidade()])) { | |
1129 | - $arrUnidadesSuperiores = $arrUnidadesSip[$objUnidadeDTO->getNumIdUnidade()][UnidadeRN::$POS_UNIDADE_UNIDADES_SUPERIORES]; | |
1130 | - $arrUnidadesSuperiores[] = $objUnidadeDTO->getNumIdUnidade(); | |
1131 | - $it = 0; | |
1132 | - $arrUnidadesSuperiores = array_reverse($arrUnidadesSuperiores); | |
1133 | - | |
1134 | - foreach ($arrUnidadesSuperiores as $numIdUnidadeSuperior) { | |
1135 | - if ($strHierarquiaUnidade != '') { | |
1136 | - $strHierarquiaUnidade .= '/'; | |
1137 | - } | |
1138 | - if ($it > 0) { | |
1139 | - $strHierarquiaUnidade .= $arrUnidadesSip[$numIdUnidadeSuperior][UnidadeRN::$POS_UNIDADE_SIGLA]; | |
1140 | - } else { | |
1141 | - | |
1142 | - $strHierarquiaUnidade .= $arrUnidadesSip[$numIdUnidadeSuperior][UnidadeRN::$POS_UNIDADE_DESCRICAO]; | |
1143 | - } | |
1144 | - $it++; | |
1145 | - } | |
1146 | - } | |
1147 | - | |
1148 | - return $strHierarquiaUnidade; | |
1149 | - } | |
1150 | - | |
1151 | - public function enviarListaDocumentosPIControlado($arrObjEnviarListaDocumentosPI) { | |
1152 | - | |
1153 | - $xml = $arrObjEnviarListaDocumentosPI[0]; | |
1154 | - $arrObjPacotesEnviados = $arrObjEnviarListaDocumentosPI[1]; | |
1155 | - $arrObjProtocolosEnviados = $arrObjEnviarListaDocumentosPI[2]; | |
1156 | - $strInicioPublicacao = $arrObjEnviarListaDocumentosPI[3]; | |
1157 | - $conexaoCliente = $arrObjEnviarListaDocumentosPI[4]; | |
1158 | - | |
1159 | - $ret = $conexaoCliente->enviarListaDocumentosServidor($xml); | |
1160 | - $iterador = 0; | |
1161 | - if ($ret instanceof SoapFault) { | |
1162 | - $retorno = new stdClass(); | |
1163 | - $retorno->ResultadoDocumento = array(); | |
1164 | - | |
1165 | - for ($i = 0; $i < count($arrObjProtocolosEnviados); $i++) { | |
1166 | - $resultado = new stdClass(); | |
1167 | - $resultado->Resultado = 'SF001 - ' . $ret->getMessage(); | |
1168 | - array_push($retorno->ResultadoDocumento, $resultado); | |
1169 | - } | |
1170 | - | |
1171 | - $ret = $retorno; | |
1172 | - } | |
1173 | - | |
1174 | - if (is_array($ret->ResultadoDocumento)) { | |
1175 | - foreach ($ret->ResultadoDocumento as $key => $value) { | |
1176 | - $objPacoteDTO = $arrObjPacotesEnviados[$iterador]; | |
1177 | - $objProtocoloDTO = $arrObjProtocolosEnviados[$iterador]; | |
1178 | - $this->atualizaPacote($objPacoteDTO, $objProtocoloDTO, $value->Resultado, $strInicioPublicacao); | |
1179 | - $iterador++; | |
1180 | - } | |
1181 | - } else { | |
1182 | - $objPacoteDTO = $arrObjPacotesEnviados[0]; | |
1183 | - $objProtocoloDTO = $arrObjProtocolosEnviados[0]; | |
1184 | - $this->atualizaPacote($objPacoteDTO, $objProtocoloDTO, $ret->ResultadoDocumento->Resultado, $strInicioPublicacao); | |
1185 | - } | |
1186 | - | |
1187 | - } | |
1188 | - | |
1189 | - public function notificarPacotesSemEnvio() { | |
1190 | - | |
1191 | - $objProtocoloIntegradoParametrosDTO = new ProtocoloIntegradoParametrosDTO(); | |
1192 | - $objProtocoloIntegradoParametrosDTO->retTodos(); | |
1193 | - $objProtocoloIntegradoParametrosRN = new ProtocoloIntegradoParametrosRN(); | |
1194 | - $objRetornoParametrosDTO = $objProtocoloIntegradoParametrosRN->consultar($objProtocoloIntegradoParametrosDTO); | |
1195 | - | |
1196 | - $objPacoteRN = new ProtocoloIntegradoPacoteEnvioRN(); | |
1197 | - $protocoloIntegradoPacoteEnvioDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
1198 | - $protocoloIntegradoPacoteEnvioDTO->retTodos(); | |
1199 | - | |
1200 | - $protocoloIntegradoPacoteEnvioDTO->setNumMaxRegistrosRetorno(1); | |
1201 | - $protocoloIntegradoPacoteEnvioDTO->setOrd('DataSituacao', InfraDTO::$TIPO_ORDENACAO_DESC); | |
1202 | - | |
1203 | - $arrPacote = $objPacoteRN->listar($protocoloIntegradoPacoteEnvioDTO); | |
1204 | - if (count($arrPacote)>0) { | |
1205 | - $objPacoteIntegradoPacoteEnvio = $arrPacote[0]; | |
1206 | - $protocoloIntegradoRN = new ProtocoloIntegradoRN(); | |
1207 | - | |
1208 | - $infraAgendamentoTarefaDTO = new InfraAgendamentoTarefaDTO(); | |
1209 | - $infraAgendamentoTarefaDTO->retTodos(); | |
1210 | - $infraAgendamentoTarefaDTO->setStrComando('ProtocoloIntegradoAgendamentoRN::notificarNovosPacotesNaoSendoGerados'); | |
1211 | - | |
1212 | - $arrAgendamentoTarefas = $this->listarAgendamentoTarefa($infraAgendamentoTarefaDTO); | |
1213 | - | |
1214 | - $objTarefaNotificarNovosPacotesNaoSendoGerados = $arrAgendamentoTarefas[0]; | |
1215 | - $numDias = $objTarefaNotificarNovosPacotesNaoSendoGerados->getStrParametro(); | |
1216 | - | |
1217 | - $numMaxDthSituacao = DateTime::createFromFormat("d/m/Y G:i:s", $objPacoteIntegradoPacoteEnvio->getDthDataSituacao()); | |
1218 | - | |
1219 | - $numAgora = time(); | |
1220 | - $diffSegundos = $numAgora - $numMaxDthSituacao->getTimestamp(); | |
1221 | - $diffDias = intval($diffSegundos/(60*60*24)); | |
1222 | - | |
1223 | - if ($diffDias>=$numDias) { | |
1224 | - $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); | |
1225 | - $strEmailSistema = $objInfraParametro->getValor('SEI_EMAIL_SISTEMA'); | |
1226 | - | |
1227 | - $strMensagem = 'Prezado Administrador de Integração, <br />'; | |
1228 | - $strMensagem .= 'Há '.$diffDias.' dias não há envio de informações ao Protocolo Integrado. Favor verificar '; | |
1229 | - $strMensagem .= 'se os parâmetros informados na integração estão corretos, tais como: login e senha para conexão ao webservice, endereço '; | |
1230 | - $strMensagem .= 'de conexão ao webservice e agendamento no SEI do envio das informações.<br /><br /><br />'; | |
1231 | - $strMensagem .= 'Obrigado.<br />'; | |
1232 | - $strMensagem .= 'Sistema Eletrônico de Informações.'; | |
1233 | - | |
1234 | - $strAssunto = '[Plugin SEI-PI] Há '.$diffDias.' dias não há envio de informações ao Protocolo Integrado.'; | |
1235 | - InfraMail::enviarConfigurado(ConfiguracaoSEI::getInstance(), $strEmailSistema, $objRetornoParametrosDTO->getStrEmailAdministrador(), null, null, $strAssunto, $strMensagem, 'text/html'); | |
1236 | - } | |
1237 | - } | |
1238 | - } | |
1239 | - | |
1240 | - | |
1241 | - public function notificarProcessosComFalha() { | |
1242 | - | |
1243 | - $objPacoteRN = new ProtocoloIntegradoPacoteEnvioRN(); | |
1244 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
1245 | - $objPacoteDTO->setNumMaxRegistrosRetorno(1); | |
1246 | - $objPacoteDTO->retTodos(); | |
1247 | - $objPacoteDTO->setOrd('DataAgendamentoExecutado', InfraDTO::$TIPO_ORDENACAO_DESC); | |
1248 | - $arrPacotes = $objPacoteRN->listar($objPacoteDTO); | |
1249 | - $dataUltimoEnvio = null; | |
1250 | - if (count($arrPacotes)>0) { | |
1251 | - $pacote = $arrPacotes[0]; | |
1252 | - $dataUltimoEnvio = $pacote->getDthDataAgendamentoExecutado(); | |
1253 | - } | |
1254 | - | |
1255 | - if ($dataUltimoEnvio!=null) { | |
1256 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
1257 | - $objPacoteDTO->setStrStaIntegracao(ProtocoloIntegradoPacoteEnvioRN::$STA_FALHA_INFRA); | |
1258 | - $objPacoteDTO->setDthDataAgendamentoExecutado($dataUltimoEnvio); | |
1259 | - $objPacoteDTO->retTodos(); | |
1260 | - $arrPacotesFalhaInfra = $objPacoteRN->listar($objPacoteDTO); | |
1261 | - | |
1262 | - $objPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
1263 | - $objPacoteDTO->setStrStaIntegracao(ProtocoloIntegradoPacoteEnvioRN::$STA_ERRO_NEGOCIAL); | |
1264 | - $objPacoteDTO->setDthDataAgendamentoExecutado($dataUltimoEnvio); | |
1265 | - $objPacoteDTO->retTodos(); | |
1266 | - $arrPacotesErroNegocial = $objPacoteRN->listar($objPacoteDTO); | |
1267 | - | |
1268 | - $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); | |
1269 | - | |
1270 | - if (count($arrPacotesErroNegocial) > 0 || count($arrPacotesFalhaInfra) > 0) { | |
1271 | - $strEmailSistema = $objInfraParametro->getValor('SEI_EMAIL_SISTEMA'); | |
1272 | - | |
1273 | - $objProtocoloIntegradoParametrosDTO = new ProtocoloIntegradoParametrosDTO(); | |
1274 | - $objProtocoloIntegradoParametrosDTO->retTodos(); | |
1275 | - | |
1276 | - $objProtocoloIntegradoParametrosRN = new ProtocoloIntegradoParametrosRN(); | |
1277 | - $objRetorno = $objProtocoloIntegradoParametrosRN->consultar($objProtocoloIntegradoParametrosDTO); | |
1278 | - | |
1279 | - InfraDebug::getInstance()->gravar('Buscando Configuração de Publicação no Protocolo Integrado'); | |
1280 | - $objRetornoParametrosDTO = $objProtocoloIntegradoParametrosRN->consultar($objProtocoloIntegradoParametrosDTO); | |
1281 | - | |
1282 | - $strMensagem = 'Prezado Administrador de Integração,<br>Alguns processos não puderam ser enviados ao protocolo integrado no último ciclo de integração realizado pelo SEI em ' . $objRetornoParametrosDTO->getDthDataUltimoProcessamento() . ' <br /> <br />'; | |
1283 | - $strMensagem .= '<' . count($arrPacotesFalhaInfra) . '>' . 'Processos não enviados por erro de infraestrutura <br />'; | |
1284 | - $strMensagem .= '<' . count($arrPacotesErroNegocial) . '>' . 'Processos não enviados por erro negocial <br /> <br />'; | |
1285 | - $strMensagem .= 'Favor observar a tabela de monitoramento do SEI para maiores detalhes. <br />'; | |
1286 | - $strMensagem .= 'Obrigado. <br /> <br />'; | |
1287 | - $strMensagem .= 'Sistema Eletrônico de Informações'; | |
1288 | - $strAssunto = '[Plugin SEI-PI] Processos não integrados no último ciclo '; | |
1289 | - InfraMail::enviarConfigurado(ConfiguracaoSEI::getInstance(), $strEmailSistema, $objRetornoParametrosDTO->getStrEmailAdministrador(), null, null, $strAssunto, $strMensagem, 'text/html'); | |
1290 | - } else { | |
1291 | - //error_log("sem envio"); | |
1292 | - } | |
1293 | - } | |
1294 | - | |
1295 | - } | |
1296 | - | |
1297 | - protected function listarAgendamentoTarefaConectado(InfraAgendamentoTarefaDTO $infraAgendamentoTarefaDTO) { | |
1298 | - | |
1299 | - try { | |
1300 | - $objAgendamentoBD = new InfraAgendamentoTarefaBD($this->getObjInfraIBanco()); | |
1301 | - $ret = $objAgendamentoBD->listar($infraAgendamentoTarefaDTO); | |
1302 | - | |
1303 | - return $ret; | |
1304 | - } catch (Exception $e) { | |
1305 | - throw new InfraException('Erro listando Tarefas.',$e); | |
1306 | - } | |
1307 | - | |
1308 | - } | |
1309 | - | |
1310 | - protected function listarUnidadesConectado(UnidadeDTO $unidadeDTO) { | |
1311 | - | |
1312 | - try { | |
1313 | - $objUnidadeBD = new UnidadeBD($this->getObjInfraIBanco()); | |
1314 | - $ret = $objUnidadeBD->listar($unidadeDTO); | |
1315 | - | |
1316 | - return $ret; | |
1317 | - } catch(Exception $e) { | |
1318 | - throw new InfraException('Erro listando Unidades.',$e); | |
1319 | - } | |
1320 | - | |
1321 | - } | |
1322 | - | |
1323 | -} | |
1324 | - | |
1325 | -?> |
containeres/sei-app/protocolo_integrado/rn/ProtocoloIntegradoPacoteEnvioRN.php
... | ... | @@ -1,135 +0,0 @@ |
1 | -<?php | |
2 | -/** | |
3 | -* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
4 | -* | |
5 | -* 13/10/2009 - criado por mga | |
6 | -* | |
7 | -* Versão do Gerador de Código: 1.29.1 | |
8 | -* | |
9 | -* Versão no CVS: $Id$ | |
10 | -*/ | |
11 | - | |
12 | -require_once dirname(__FILE__).'/../../../../SEI.php'; | |
13 | - | |
14 | -class ProtocoloIntegradoPacoteEnvioRN extends InfraRN { | |
15 | - | |
16 | - public static $STA_NAO_INTEGRADO = 'NI'; | |
17 | - public static $STA_INTEGRADO = 'I'; | |
18 | - public static $STA_ERRO_NEGOCIAL = 'EN'; | |
19 | - public static $STA_FALHA_INFRA = 'FI'; | |
20 | - | |
21 | - public function __construct(){ | |
22 | - parent::__construct(); | |
23 | - } | |
24 | - | |
25 | - protected function inicializarObjInfraIBanco(){ | |
26 | - return BancoSEI::getInstance(); | |
27 | - } | |
28 | - | |
29 | - protected function listarConectado(ProtocoloIntegradoPacoteEnvioDTO $protocoloIntegradoPacoteEnvioDTO) { | |
30 | - | |
31 | - try { | |
32 | - | |
33 | - //Valida Permissao | |
34 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento',__METHOD__,$protocoloIntegradoPacoteEnvioDTO); | |
35 | - | |
36 | - //Regras de Negocio | |
37 | - //$objInfraException = new InfraException(); | |
38 | - //$objInfraException->lancarValidacoes(); | |
39 | - | |
40 | - $objProtocoloBD = new ProtocoloIntegradoPacoteEnvioBD($this->getObjInfraIBanco()); | |
41 | - $ret = $objProtocoloBD->listar($protocoloIntegradoPacoteEnvioDTO); | |
42 | - | |
43 | - return $ret; | |
44 | - | |
45 | - } catch(Exception $e) { | |
46 | - throw new InfraException('Erro listando Pacotes.',$e); | |
47 | - } | |
48 | - | |
49 | - } | |
50 | - | |
51 | - protected function contarConectado(ProtocoloIntegradoPacoteEnvioDTO $protocoloIntegradoPacoteEnvioDTO) { | |
52 | - | |
53 | - try { | |
54 | - | |
55 | - //Valida Permissao | |
56 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento',__METHOD__,$protocoloIntegradoPacoteEnvioDTO); | |
57 | - | |
58 | - //Regras de Negocio | |
59 | - //$objInfraException = new InfraException(); | |
60 | - //$objInfraException->lancarValidacoes(); | |
61 | - | |
62 | - $objProtocoloBD = new ProtocoloIntegradoPacoteEnvioBD($this->getObjInfraIBanco()); | |
63 | - $ret = $objProtocoloBD->contar($protocoloIntegradoPacoteEnvioDTO); | |
64 | - | |
65 | - return $ret; | |
66 | - | |
67 | - } catch(Exception $e) { | |
68 | - throw new InfraException('Erro obtendo número de atividades monitoradas.',$e); | |
69 | - } | |
70 | - | |
71 | - } | |
72 | - | |
73 | - protected function consultarControlado(ProtocoloIntegradoPacoteEnvioDTO $protocoloIntegradoPacoteEnvioDTO) { | |
74 | - | |
75 | - try { | |
76 | - | |
77 | - //Valida Permissao | |
78 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento',__METHOD__,$protocoloIntegradoPacoteEnvioDTO); | |
79 | - | |
80 | - //Regras de Negocio | |
81 | - //$objInfraException = new InfraException(); | |
82 | - //$objInfraException->lancarValidacoes(); | |
83 | - | |
84 | - $objProtocoloBD = new ProtocoloIntegradoPacoteEnvioBD($this->getObjInfraIBanco()); | |
85 | - $ret = $objProtocoloBD->consultar($protocoloIntegradoPacoteEnvioDTO); | |
86 | - | |
87 | - //Auditoria | |
88 | - return $ret; | |
89 | - | |
90 | - } catch(Exception $e) { | |
91 | - throw new InfraException('Erro Consultando Pacote.',$e); | |
92 | - } | |
93 | - | |
94 | - } | |
95 | - | |
96 | - protected function cadastrarControlado(ProtocoloIntegradoPacoteEnvioDTO $protocoloIntegradoPacoteEnvioDTO){ | |
97 | - | |
98 | - try { | |
99 | - | |
100 | - //Valida Permissao | |
101 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento',__METHOD__,$protocoloIntegradoPacoteEnvioDTO); | |
102 | - | |
103 | - //Regras de Negocio | |
104 | - $objInfraException = new InfraException(); | |
105 | - | |
106 | - $objInfraException->lancarValidacoes(); | |
107 | - $objProtocoloBD = new ProtocoloIntegradoPacoteEnvioBD($this->getObjInfraIBanco()); | |
108 | - | |
109 | - return $objProtocoloBD->cadastrar($protocoloIntegradoPacoteEnvioDTO); | |
110 | - | |
111 | - } catch(Exception $e) { | |
112 | - throw new InfraException('Erro alterando Mensagens de Publicação no Protocolo Integrado.',$e); | |
113 | - } | |
114 | - | |
115 | - } | |
116 | - | |
117 | - protected function alterarControlado(ProtocoloIntegradoPacoteEnvioDTO $protocoloIntegradoPacoteEnvioDTO){ | |
118 | - | |
119 | - //Valida Permissao | |
120 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_monitoramento',__METHOD__,$protocoloIntegradoPacoteEnvioDTO); | |
121 | - | |
122 | - //Regras de Negocio | |
123 | - $objInfraException = new InfraException(); | |
124 | - | |
125 | - | |
126 | - $objInfraException->lancarValidacoes(); | |
127 | - | |
128 | - $objPacoteBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
129 | - $objPacoteBD->alterar($protocoloIntegradoPacoteEnvioDTO); | |
130 | - | |
131 | - } | |
132 | - | |
133 | -} | |
134 | - | |
135 | -?> | |
136 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/rn/ProtocoloIntegradoParametrosRN.php
... | ... | @@ -1,228 +0,0 @@ |
1 | -<?php | |
2 | -/** | |
3 | -* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
4 | -* | |
5 | -* 13/10/2009 - criado por mga | |
6 | -* | |
7 | -* Versão do Gerador de Código: 1.29.1 | |
8 | -* | |
9 | -* Versão no CVS: $Id$ | |
10 | -*/ | |
11 | - | |
12 | -require_once dirname(__FILE__).'/../../../../SEI.php'; | |
13 | - | |
14 | -class ProtocoloIntegradoParametrosRN extends InfraRN { | |
15 | - | |
16 | - public static $NUM_MAX_ANDAMENTOS_POR_VEZ = 500000; | |
17 | - public static $CHAVE_MODULO_PI = '169a7b029ff7417c'; | |
18 | - public static $NUM_CARACTERES_CHAVE_PI = 16; | |
19 | - | |
20 | - public function __construct(){ | |
21 | - parent::__construct(); | |
22 | - } | |
23 | - | |
24 | - protected function inicializarObjInfraIBanco(){ | |
25 | - return BancoSEI::getInstance(); | |
26 | - } | |
27 | - | |
28 | - /* | |
29 | - * Encripta senha de acesso ao PI através da operação XOR entre as variáveis $CHAVE_MODULO_PI e a senha de acesso ao PI | |
30 | - */ | |
31 | - function encriptaSenha($senha) { | |
32 | - | |
33 | - // Chave do módulo definida para encriptar a senha de acesso ao WS do PI | |
34 | - $chave = ProtocoloIntegradoParametrosRN::$CHAVE_MODULO_PI; | |
35 | - | |
36 | - if(strlen(ProtocoloIntegradoParametrosRN::$CHAVE_MODULO_PI)!=ProtocoloIntegradoParametrosRN::$NUM_CARACTERES_CHAVE_PI){ | |
37 | - | |
38 | - throw new InfraException ("Erro: Chave de encriptação do módulo não possui ".ProtocoloIntegradoParametrosRN::$NUM_CARACTERES_CHAVE_PI." caracteres"); | |
39 | - } | |
40 | - if(ProtocoloIntegradoParametrosRN::$CHAVE_MODULO_PI == $senha){ | |
41 | - | |
42 | - //throw new InfraException ("Erro: Senha informada não deve ser igual a chave de encriptação"); | |
43 | - } | |
44 | - | |
45 | - | |
46 | - // Senha que será salva na base | |
47 | - for ($senhaIncriptada = $senha, $x = 0, $y = 0; $x < strlen($senhaIncriptada); $x++){ | |
48 | - | |
49 | - $senhaIncriptada{$x} = chr(ord($senhaIncriptada{$x}) ^ ord($chave{$y})); | |
50 | - $y = ($y >= (strlen($chave) - 1)) ? 0 : ++$y; | |
51 | - | |
52 | - } | |
53 | - | |
54 | - return $senhaIncriptada; | |
55 | - } | |
56 | - protected function listarConectado(ProtocoloIntegradoParametrosDTO $protocoloIntegradoParametrosDTO) { | |
57 | - try { | |
58 | - | |
59 | - //Valida Permissao | |
60 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_configurar_parametros',__METHOD__,$protocoloIntegradoParametrosDTO); | |
61 | - | |
62 | - //Regras de Negocio | |
63 | - //$objInfraException = new InfraException(); | |
64 | - | |
65 | - //$objInfraException->lancarValidacoes(); | |
66 | - | |
67 | - | |
68 | - $objProtocoloBD = new ProtocoloIntegradoParametrosBD($this->getObjInfraIBanco()); | |
69 | - $ret = $objProtocoloBD->listar($protocoloIntegradoParametrosDTO); | |
70 | - | |
71 | - if(count($ret)==1){ | |
72 | - | |
73 | - return $ret[0]; | |
74 | - } | |
75 | - | |
76 | - | |
77 | - | |
78 | - }catch(Exception $e){ | |
79 | - throw new InfraException('Erro listando Parâmetros.',$e); | |
80 | - } | |
81 | - } | |
82 | - | |
83 | - protected function consultarControlado(ProtocoloIntegradoParametrosDTO $protocoloIntegradoParametrosDTO) { | |
84 | - try { | |
85 | - | |
86 | - //Valida Permissao | |
87 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_configurar_parametros',__METHOD__,$protocoloIntegradoParametrosDTO); | |
88 | - | |
89 | - //Regras de Negocio | |
90 | - //$objInfraException = new InfraException(); | |
91 | - | |
92 | - //$objInfraException->lancarValidacoes(); | |
93 | - | |
94 | - | |
95 | - $objProtocoloBD = new ProtocoloIntegradoParametrosBD($this->getObjInfraIBanco()); | |
96 | - $ret = $objProtocoloBD->consultar($protocoloIntegradoParametrosDTO); | |
97 | - | |
98 | - | |
99 | - return $ret; | |
100 | - | |
101 | - }catch(Exception $e){ | |
102 | - throw new InfraException('Erro consultando Parâmetros.',$e); | |
103 | - } | |
104 | - } | |
105 | - protected function alterarControlado(ProtocoloIntegradoParametrosDTO $protocoloIntegradoParametrosDTO){ | |
106 | - try { | |
107 | - | |
108 | - //Valida Permissao | |
109 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_configurar_parametros',__METHOD__,$protocoloIntegradoParametrosDTO); | |
110 | - | |
111 | - //Regras de Negocio | |
112 | - $objInfraException = new InfraException(); | |
113 | - | |
114 | - if ($protocoloIntegradoParametrosDTO->isSetStrUrlWebservice()){ | |
115 | - $this->validarStrUrlWebservice($protocoloIntegradoParametrosDTO, $objInfraException); | |
116 | - } | |
117 | - if ($protocoloIntegradoParametrosDTO->isSetStrLoginWebservice()){ | |
118 | - $this->validarStrLoginWebservice($protocoloIntegradoParametrosDTO, $objInfraException); | |
119 | - } | |
120 | - | |
121 | - if ($protocoloIntegradoParametrosDTO->isSetStrSenhaWebservice()){ | |
122 | - $this->validarStrSenhaWebservice($protocoloIntegradoParametrosDTO, $objInfraException); | |
123 | - } | |
124 | - | |
125 | - if ($protocoloIntegradoParametrosDTO->isSetNumQuantidadeTentativas()){ | |
126 | - $this->validarNumQuantidadeTentativas($protocoloIntegradoParametrosDTO, $objInfraException); | |
127 | - } | |
128 | - if ($protocoloIntegradoParametrosDTO->isSetNumAtividadesCarregar()){ | |
129 | - $this->validarNumAtividadesCarregar($protocoloIntegradoParametrosDTO, $objInfraException); | |
130 | - } | |
131 | - | |
132 | - if ($protocoloIntegradoParametrosDTO->isSetStrEmailAdministrador()){ | |
133 | - $this->validarStrEmailAdministrador($protocoloIntegradoParametrosDTO, $objInfraException); | |
134 | - } | |
135 | - $objInfraException->lancarValidacoes(); | |
136 | - | |
137 | - $objProtocoloBD = new ProtocoloIntegradoParametrosBD($this->getObjInfraIBanco()); | |
138 | - $objProtocoloBD->alterar($protocoloIntegradoParametrosDTO); | |
139 | - | |
140 | - | |
141 | - }catch(Exception $e){ | |
142 | - throw new InfraException('Erro alterando Mensagens de Publicação no Protocolo Integrado.',$e); | |
143 | - } | |
144 | - } | |
145 | - private function validarStrUrlWebservice(ProtocoloIntegradoParametrosDTO $protocoloIntegradoParametrosDTO, InfraException $objInfraException){ | |
146 | - if (InfraString::isBolVazia($protocoloIntegradoParametrosDTO->getStrUrlWebservice())){ | |
147 | - $objInfraException->adicionarValidacao('URL do WebService não informada'); | |
148 | - }else{ | |
149 | - $protocoloIntegradoParametrosDTO->setStrUrlWebservice(trim($protocoloIntegradoParametrosDTO->getStrUrlWebservice())); | |
150 | - | |
151 | - } | |
152 | - } | |
153 | - private function validarStrLoginWebservice(ProtocoloIntegradoParametrosDTO $protocoloIntegradoParametrosDTO, InfraException $objInfraException){ | |
154 | - if (InfraString::isBolVazia($protocoloIntegradoParametrosDTO->getStrLoginWebservice())){ | |
155 | - $objInfraException->adicionarValidacao('Login de acesso ao WebService não informado'); | |
156 | - }else{ | |
157 | - if(strlen($protocoloIntegradoParametrosDTO->getStrLoginWebservice())>10){ | |
158 | - | |
159 | - $objInfraException->adicionarValidacao('Login de acesso ao WebService deve ter 10 caracteres no máximo'); | |
160 | - }else{ | |
161 | - | |
162 | - $protocoloIntegradoParametrosDTO->setStrLoginWebservice(trim($protocoloIntegradoParametrosDTO->getStrLoginWebservice())); | |
163 | - } | |
164 | - | |
165 | - } | |
166 | - } | |
167 | - private function validarStrSenhaWebservice(ProtocoloIntegradoParametrosDTO $protocoloIntegradoParametrosDTO, InfraException $objInfraException){ | |
168 | - if (InfraString::isBolVazia($protocoloIntegradoParametrosDTO->getStrSenhaWebservice())){ | |
169 | - $objInfraException->adicionarValidacao('Senha de acesso ao WebService não informada'); | |
170 | - }else{ | |
171 | - | |
172 | - if(strlen($protocoloIntegradoParametrosDTO->getStrLoginWebservice())>20){ | |
173 | - | |
174 | - $objInfraException->adicionarValidacao('Senha de acesso ao WebService deve ter 20 caracteres no máximo'); | |
175 | - }else{ | |
176 | - | |
177 | - $protocoloIntegradoParametrosDTO->setStrSenhaWebservice(trim($protocoloIntegradoParametrosDTO->getStrSenhaWebservice())); | |
178 | - | |
179 | - } | |
180 | - | |
181 | - } | |
182 | - } | |
183 | - private function validarNumQuantidadeTentativas(ProtocoloIntegradoParametrosDTO $protocoloIntegradoParametrosDTO, InfraException $objInfraException){ | |
184 | - if (InfraString::isBolVazia($protocoloIntegradoParametrosDTO->getNumQuantidadeTentativas())){ | |
185 | - $objInfraException->adicionarValidacao('Quantidade de tentativas não informada'); | |
186 | - }else{ | |
187 | - if(!is_numeric($protocoloIntegradoParametrosDTO->getNumQuantidadeTentativas())){ | |
188 | - | |
189 | - $objInfraException->adicionarValidacao('Quantidade de tentativas deve ser um número inteiro'); | |
190 | - }else{ | |
191 | - | |
192 | - $protocoloIntegradoParametrosDTO->setNumQuantidadeTentativas(intval($protocoloIntegradoParametrosDTO->getNumQuantidadeTentativas())); | |
193 | - } | |
194 | - | |
195 | - } | |
196 | - } | |
197 | - private function validarNumAtividadesCarregar(ProtocoloIntegradoParametrosDTO $protocoloIntegradoParametrosDTO, InfraException $objInfraException){ | |
198 | - if (InfraString::isBolVazia($protocoloIntegradoParametrosDTO->getNumAtividadesCarregar())){ | |
199 | - $objInfraException->adicionarValidacao('Quantidade máxima de andamentos por vez não informada'); | |
200 | - }else{ | |
201 | - if(!is_numeric($protocoloIntegradoParametrosDTO->getNumAtividadesCarregar())){ | |
202 | - | |
203 | - $objInfraException->adicionarValidacao('Quantidade máxima de andamentos por vez deve ser um número inteiro'); | |
204 | - | |
205 | - }else{ | |
206 | - if($protocoloIntegradoParametrosDTO->getNumAtividadesCarregar()>ProtocoloIntegradoParametrosRN::$NUM_MAX_ANDAMENTOS_POR_VEZ){ | |
207 | - | |
208 | - $objInfraException->adicionarValidacao('Quantidade máxima de andamentos por vez não deve ser maior que '.ProtocoloIntegradoParametrosRN::$NUM_MAX_ANDAMENTOS_POR_VEZ); | |
209 | - }else{ | |
210 | - | |
211 | - $protocoloIntegradoParametrosDTO->setNumAtividadesCarregar(intval($protocoloIntegradoParametrosDTO->getNumAtividadesCarregar())); | |
212 | - | |
213 | - } | |
214 | - | |
215 | - } | |
216 | - } | |
217 | - | |
218 | - } | |
219 | - private function validarStrEmailAdministrador(ProtocoloIntegradoParametrosDTO $protocoloIntegradoParametrosDTO, InfraException $objInfraException){ | |
220 | - if (InfraString::isBolVazia($protocoloIntegradoParametrosDTO->getStrEmailAdministrador())){ | |
221 | - $objInfraException->adicionarValidacao('Email do administrador da Integração não informado'); | |
222 | - }else{ | |
223 | - $protocoloIntegradoParametrosDTO->setStrEmailAdministrador(trim($protocoloIntegradoParametrosDTO->getStrEmailAdministrador())); | |
224 | - | |
225 | - } | |
226 | - } | |
227 | -} | |
228 | -?> |
containeres/sei-app/protocolo_integrado/rn/ProtocoloIntegradoRN.php
... | ... | @@ -1,481 +0,0 @@ |
1 | -<?php | |
2 | -/** | |
3 | -* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
4 | -* | |
5 | -* 13/10/2009 - criado por mga | |
6 | -* | |
7 | -* Versão do Gerador de Código: 1.29.1 | |
8 | -* | |
9 | -* Versão no CVS: $Id$ | |
10 | -*/ | |
11 | - | |
12 | -require_once dirname(__FILE__).'/../../../../SEI.php'; | |
13 | - | |
14 | -class ProtocoloIntegradoRN extends InfraRN { | |
15 | - | |
16 | - public function __construct(){ | |
17 | - parent::__construct(); | |
18 | - | |
19 | - } | |
20 | - | |
21 | - public function montaTarefasPadraoPublicacao(){ | |
22 | - $tarefasPadraoPublicacao = array( | |
23 | - TarefaRN::$TI_GERACAO_PROCEDIMENTO,TarefaRN::$TI_RELACIONAR_PROCEDIMENTO,TarefaRN::$TI_REMOCAO_RELACIONAMENTO_PROCEDIMENTO,TarefaRN::$TI_SOBRESTAMENTO, | |
24 | - TarefaRN::$TI_REMOCAO_SOBRESTAMENTO, | |
25 | - TarefaRN::$TI_CONCLUSAO_PROCESSO_UNIDADE,TarefaRN::$TI_REABERTURA_PROCESSO_UNIDADE, | |
26 | - TarefaRN::$TI_PROCESSO_REMETIDO_UNIDADE,TarefaRN::$TI_SOBRESTANDO_PROCESSO, | |
27 | - TarefaRN::$TI_REMOCAO_SOBRESTANDO_PROCESSO,TarefaRN::$TI_SOBRESTADO_AO_PROCESSO, | |
28 | - TarefaRN::$TI_REMOCAO_SOBRESTADO_AO_PROCESSO,TarefaRN::$TI_PROCESSO_RECEBIDO_UNIDADE,TarefaRN::$TI_ALTERACAO_NIVEL_ACESSO_GLOBAL, | |
29 | - TarefaRN::$TI_CONCLUSAO_PROCESSO_USUARIO,TarefaRN::$TI_PROCESSO_CIENCIA, | |
30 | - TarefaRN::$TI_ANEXADO_PROCESSO,TarefaRN::$TI_ANEXADO_AO_PROCESSO,TarefaRN::$TI_DESANEXADO_PROCESSO,TarefaRN::$TI_DESANEXADO_DO_PROCESSO,TarefaRN::$TI_ALTERACAO_NIVEL_ACESSO_PROCESSO,TarefaRN::$TI_ALTERACAO_GRAU_SIGILO_PROCESSO,TarefaRN::$TI_ALTERACAO_HIPOTESE_LEGAL_PROCESSO,TarefaRN::$TI_PROCESSO_ANEXADO_CIENCIA,TarefaRN::$TI_ATUALIZACAO_ANDAMENTO, | |
31 | - ); | |
32 | - return $tarefasPadraoPublicacao; | |
33 | - } | |
34 | - | |
35 | - protected function inicializarObjInfraIBanco(){ | |
36 | - return BancoSEI::getInstance(); | |
37 | - } | |
38 | - | |
39 | - protected function listarConectado(ProtocoloIntegradoDTO $objProtocoloDTO) { | |
40 | - try { | |
41 | - | |
42 | - //Valida Permissao | |
43 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_mensagens_listar',__METHOD__,$objProtocoloDTO); | |
44 | - | |
45 | - //Regras de Negocio | |
46 | - //$objInfraException = new InfraException(); | |
47 | - | |
48 | - //$objInfraException->lancarValidacoes(); | |
49 | - | |
50 | - | |
51 | - $objProtocoloBD = new ProtocoloIntegradoBD($this->getObjInfraIBanco()); | |
52 | - $ret = $objProtocoloBD->listar($objProtocoloDTO); | |
53 | - | |
54 | - //Auditoria | |
55 | - | |
56 | - return $ret; | |
57 | - | |
58 | - }catch(Exception $e){ | |
59 | - throw new InfraException('Erro listando Tarefas.',$e); | |
60 | - } | |
61 | - } | |
62 | - protected function consultarConectado(ProtocoloIntegradoDTO $objProtocoloDTO) { | |
63 | - try { | |
64 | - | |
65 | - //Valida Permissao | |
66 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_mensagens_listar',__METHOD__,$objProtocoloDTO); | |
67 | - | |
68 | - //Regras de Negocio | |
69 | - //$objInfraException = new InfraException(); | |
70 | - | |
71 | - //$objInfraException->lancarValidacoes(); | |
72 | - | |
73 | - | |
74 | - $objProtocoloBD = new ProtocoloIntegradoBD($this->getObjInfraIBanco()); | |
75 | - $ret = $objProtocoloBD->consultar($objProtocoloDTO); | |
76 | - | |
77 | - //Auditoria | |
78 | - | |
79 | - return $ret; | |
80 | - | |
81 | - }catch(Exception $e){ | |
82 | - throw new InfraException('Erro listando Tarefas.',$e); | |
83 | - } | |
84 | - } | |
85 | - protected function alterarControlado(ProtocoloIntegradoDTO $protocoloIntegradoDTO){ | |
86 | - try { | |
87 | - | |
88 | - //Valida Permissao | |
89 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_mensagens_alterar',__METHOD__,$protocoloIntegradoDTO); | |
90 | - | |
91 | - //Regras de Negocio | |
92 | - $objInfraException = new InfraException(); | |
93 | - | |
94 | - /*if ($objTarefaDTO->isSetStrNome()){ | |
95 | - $this->validarStrNome($objTarefaDTO, $objInfraException); | |
96 | - } | |
97 | - | |
98 | - if ($objTarefaDTO->isSetStrSinHistoricoResumido()){ | |
99 | - $this->validarStrSinHistoricoResumido($objTarefaDTO, $objInfraException); | |
100 | - } | |
101 | - */ | |
102 | - $objInfraException->lancarValidacoes(); | |
103 | - | |
104 | - $objProtocoloBD = new ProtocoloIntegradoBD($this->getObjInfraIBanco()); | |
105 | - $objProtocoloBD->alterar($protocoloIntegradoDTO); | |
106 | - | |
107 | - | |
108 | - }catch(Exception $e){ | |
109 | - throw new InfraException('Erro alterando Mensagens de Publicação no Protocolo Integrado.',$e); | |
110 | - } | |
111 | - } | |
112 | - protected function alterarOperacoesPublicacaoControlado(ProtocoloIntegradoDTO $protocoloIntegradoDTO){ | |
113 | - try { | |
114 | - | |
115 | - //Valida Permissao | |
116 | - SessaoSEI::getInstance()->validarAuditarPermissao('protocolo_integrado_configurar_publicacao',__METHOD__,$protocoloIntegradoDTO); | |
117 | - | |
118 | - //Regras de Negocio | |
119 | - $objInfraException = new InfraException(); | |
120 | - | |
121 | - /*if ($objTarefaDTO->isSetStrNome()){ | |
122 | - $this->validarStrNome($objTarefaDTO, $objInfraException); | |
123 | - } | |
124 | - | |
125 | - if ($objTarefaDTO->isSetStrSinHistoricoResumido()){ | |
126 | - $this->validarStrSinHistoricoResumido($objTarefaDTO, $objInfraException); | |
127 | - } | |
128 | - */ | |
129 | - $objInfraException->lancarValidacoes(); | |
130 | - | |
131 | - $objProtocoloBD = new ProtocoloIntegradoBD($this->getObjInfraIBanco()); | |
132 | - $objProtocoloBD->alterar($protocoloIntegradoDTO); | |
133 | - | |
134 | - | |
135 | - }catch(Exception $e){ | |
136 | - throw new InfraException('Erro alterando Mensagens de Publicação no Protocolo Integrado.',$e); | |
137 | - } | |
138 | - } | |
139 | - public function transformarMensagemOperacao($numAtividade,$strNomeTarefa){ | |
140 | - | |
141 | - $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); | |
142 | - $objAtributoAndamentoDTO->retStrNome(); | |
143 | - $objAtributoAndamentoDTO->retStrValor(); | |
144 | - $objAtributoAndamentoDTO->retStrIdOrigem(); | |
145 | - $objAtributoAndamentoDTO->retNumIdAtividade(); | |
146 | - $objAtributoAndamentoDTO->setNumIdAtividade($numAtividade); | |
147 | - | |
148 | - $objAtributoAndamentoDTO->setOrdNumIdAtributoAndamento(InfraDTO::$TIPO_ORDENACAO_ASC); | |
149 | - | |
150 | - $objAtributoAndamentoRN = new AtributoAndamentoRN(); | |
151 | - $arrObjAtributoAndamentoDTO = $objAtributoAndamentoRN->listarRN1367($objAtributoAndamentoDTO); | |
152 | - | |
153 | - $arrObjAtributoAndamentoDTOPorNome = InfraArray::indexarArrInfraDTO($arrObjAtributoAndamentoDTO,'Nome',true); | |
154 | - | |
155 | - | |
156 | - for($k=0;$k<count($arrObjAtributoAndamentoDTO);$k++){ | |
157 | - | |
158 | - | |
159 | - $objAtributoAndamentoDTO = $arrObjAtributoAndamentoDTO[$k]; | |
160 | - switch($objAtributoAndamentoDTO->getStrNome()){ | |
161 | - | |
162 | - case 'DOCUMENTO': | |
163 | - if (isset($arrObjAtributoAndamentoDTOPorNome['DOCUMENTO'])){ | |
164 | - $dto = new DocumentoDTO(); | |
165 | - $dto->retDblIdDocumento(); | |
166 | - $dto->retStrProtocoloDocumentoFormatado(); | |
167 | - $dto->retStrNomeSerie(); | |
168 | - $dto->retStrStaProtocoloProtocolo(); | |
169 | - $dto->setDblIdDocumento(InfraArray::converterArrInfraDTO($arrObjAtributoAndamentoDTOPorNome['DOCUMENTO'],'IdOrigem'),InfraDTO::$OPER_IN); | |
170 | - | |
171 | - $objDocumentoRN = new DocumentoRN(); | |
172 | - $arrObjDocumentoDTO = InfraArray::indexarArrInfraDTO($objDocumentoRN->listarRN0008($dto),'IdDocumento'); | |
173 | - $strNomeTarefa = $this->substituirAtributoDocumentoHistorico($objAtributoAndamentoDTO, $arrObjDocumentoDTO, $bolAcaoDocumentoVisualizar, $strNomeTarefa); | |
174 | - | |
175 | - } | |
176 | - break; | |
177 | - | |
178 | - case 'DOCUMENTOS': | |
179 | - $bolAcaoDocumentoVisualizar = SessaoSEI::getInstance()->verificarPermissao('documento_visualizar'); | |
180 | - $strNomeTarefa = $this->substitutirAtributoMultiploDocumentos($objAtributoAndamentoDTO, $arrObjAtributoAndamentoDTOPorNome['DOCUMENTO'], $arrObjDocumentoDTO, $bolAcaoDocumentoVisualizar,$strNomeTarefa); | |
181 | - break; | |
182 | - | |
183 | - case 'NIVEL_ACESSO': | |
184 | - $objProtocoloRN = new ProtocoloRN(); | |
185 | - $arrObjNivelAcessoDTO = InfraArray::indexarArrInfraDTO($objProtocoloRN->listarNiveisAcessoRN0878(),'StaNivel'); | |
186 | - $strNomeTarefa = str_replace('@NIVEL_ACESSO@', $arrObjNivelAcessoDTO[$objAtributoAndamentoDTO->getStrIdOrigem()]->getStrDescricao(),$strNomeTarefa); | |
187 | - | |
188 | - break; | |
189 | - | |
190 | - case 'GRAU_SIGILO': | |
191 | - | |
192 | - $arrObjGrauSigiloDTO = InfraArray::indexarArrInfraDTO(ProtocoloRN::listarGrausSigiloso(),'StaGrau'); | |
193 | - foreach($arrObjGrauSigiloDTO as $objGrauSigiloDTO){ | |
194 | - | |
195 | - $objGrauSigiloDTO->setStrDescricao(InfraString::transformarCaixaBaixa($objGrauSigiloDTO->getStrDescricao())); | |
196 | - } | |
197 | - if ($objAtributoAndamentoDTO->getNumIdAtividade()==TarefaRN::$TI_GERACAO_PROCEDIMENTO || | |
198 | - $objAtributoAndamentoDTO->getNumIdAtividade()==TarefaRN::$TI_GERACAO_DOCUMENTO || | |
199 | - $objAtributoAndamentoDTO->getNumIdAtividade()==TarefaRN::$TI_RECEBIMENTO_DOCUMENTO || | |
200 | - $objAtributoAndamentoDTO->getNumIdAtividade()==TarefaRN::$TI_ALTERACAO_NIVEL_ACESSO_GLOBAL){ | |
201 | - | |
202 | - $strNomeTarefa = str_replace('@GRAU_SIGILO@', ' ('.$arrObjGrauSigiloDTO[$objAtributoAndamentoDTO->getStrIdOrigem()]->getStrDescricao().')', $strNomeTarefa); | |
203 | - | |
204 | - }else{ | |
205 | - | |
206 | - $strNomeTarefa = str_replace('@GRAU_SIGILO@', ' '.$arrObjGrauSigiloDTO[$objAtributoAndamentoDTO->getStrIdOrigem()]->getStrDescricao(), $strNomeTarefa); | |
207 | - } | |
208 | - break; | |
209 | - | |
210 | - case 'HIPOTESE_LEGAL': | |
211 | - | |
212 | - | |
213 | - $objHipoteseLegalDTO = new HipoteseLegalDTO(); | |
214 | - $objHipoteseLegalDTO->setBolExclusaoLogica(false); | |
215 | - $objHipoteseLegalDTO->retNumIdHipoteseLegal(); | |
216 | - $objHipoteseLegalDTO->retStrNome(); | |
217 | - $objHipoteseLegalDTO->retStrBaseLegal(); | |
218 | - | |
219 | - $objHipoteseLegalRN = new HipoteseLegalRN(); | |
220 | - $arrObjHipoteseLegalDTO = InfraArray::indexarArrInfraDTO($objHipoteseLegalRN->listar($objHipoteseLegalDTO),'IdHipoteseLegal'); | |
221 | - | |
222 | - if($objAtributoAndamentoDTO->getNumIdAtividade()==TarefaRN::$TI_ALTERACAO_NIVEL_ACESSO_PROCESSO || | |
223 | - $objAtributoAndamentoDTO->getNumIdAtividade()==TarefaRN::$TI_ALTERACAO_GRAU_SIGILO_PROCESSO || | |
224 | - $objAtributoAndamentoDTO->getNumIdAtividade()==TarefaRN::$TI_ALTERACAO_HIPOTESE_LEGAL_PROCESSO || | |
225 | - $objAtributoAndamentoDTO->getNumIdAtividade()==TarefaRN::$TI_ALTERACAO_NIVEL_ACESSO_DOCUMENTO || | |
226 | - $objAtributoAndamentoDTO->getNumIdAtividade()==TarefaRN::$TI_ALTERACAO_GRAU_SIGILO_DOCUMENTO || | |
227 | - $objAtributoAndamentoDTO->getNumIdAtividade()==TarefaRN::$TI_ALTERACAO_HIPOTESE_LEGAL_DOCUMENTO){ | |
228 | - if ($objAtributoAndamentoDTO->getStrIdOrigem()==null){ | |
229 | - $strNomeTarefa = str_replace('@HIPOTESE_LEGAL@', '"não informada"', $strNomeTarefa); | |
230 | - }else if(is_array($arrObjHipoteseLegalDTO)){ | |
231 | - $strNomeTarefa = str_replace('@HIPOTESE_LEGAL@', HipoteseLegalINT::formatarHipoteseLegal($arrObjHipoteseLegalDTO[$objAtributoAndamentoDTO->getStrIdOrigem()]->getStrNome(), $arrObjHipoteseLegalDTO[$objAtributoAndamentoDTO->getStrIdOrigem()]->getStrBaseLegal()), $strNomeTarefa); | |
232 | - } | |
233 | - }else if(is_array($arrObjHipoteseLegalDTO) && $arrObjHipoteseLegalDTO[$objAtributoAndamentoDTO->getStrIdOrigem()]){ | |
234 | - $strNomeTarefa = str_replace('@HIPOTESE_LEGAL@', ', '.HipoteseLegalINT::formatarHipoteseLegal($arrObjHipoteseLegalDTO[$objAtributoAndamentoDTO->getStrIdOrigem()]->getStrNome(), $arrObjHipoteseLegalDTO[$objAtributoAndamentoDTO->getStrIdOrigem()]->getStrBaseLegal()), $strNomeTarefa); | |
235 | - } | |
236 | - | |
237 | - break; | |
238 | - | |
239 | - case 'DATA_AUTUACAO': | |
240 | - if ($objAtributoAndamentoDTO->getStrValor()!=null){ | |
241 | - $strNomeTarefa = str_replace('@DATA_AUTUACAO@', ' (autuado em '.$objAtributoAndamentoDTO->getStrValor().')', $strNomeTarefa); | |
242 | - } | |
243 | - break; | |
244 | - | |
245 | - case 'TIPO_CONFERENCIA': | |
246 | - $objTipoConferenciaDTO = new TipoConferenciaDTO(); | |
247 | - $objTipoConferenciaDTO->setBolExclusaoLogica(false); | |
248 | - $objTipoConferenciaDTO->retNumIdTipoConferencia(); | |
249 | - $objTipoConferenciaDTO->retStrDescricao(); | |
250 | - $objTipoConferenciaRN = new TipoConferenciaRN(); | |
251 | - $arrObjTipoConferenciaDTO = InfraArray::indexarArrInfraDTO($objTipoConferenciaRN->listar($objTipoConferenciaDTO),'IdTipoConferencia'); | |
252 | - | |
253 | - if ($objAtributoAndamentoDTO->getNumIdAtividade()==TarefaRN::$TI_ALTERACAO_TIPO_CONFERENCIA_DOCUMENTO){ | |
254 | - if ($objAtributoAndamentoDTO->getStrIdOrigem()==null){ | |
255 | - $strNomeTarefa = str_replace('@TIPO_CONFERENCIA@', '"não informado"', $strNomeTarefa); | |
256 | - }else{ | |
257 | - $strNomeTarefa = str_replace('@TIPO_CONFERENCIA@', $arrObjTipoConferenciaDTO[$objAtributoAndamentoDTO->getStrIdOrigem()]->getStrDescricao(), $strNomeTarefa); | |
258 | - } | |
259 | - }else{ | |
260 | - $strNomeTarefa = str_replace('@TIPO_CONFERENCIA@', ', conferido com '.$arrObjTipoConferenciaDTO[$objAtributoAndamentoDTO->getStrIdOrigem()]->getStrDescricao(), $strNomeTarefa); | |
261 | - } | |
262 | - break; | |
263 | - | |
264 | - case 'PROCESSO': | |
265 | - if (isset($arrObjAtributoAndamentoDTOPorNome['PROCESSO'])){ | |
266 | - $dto = new ProcedimentoDTO(); | |
267 | - $dto->retDblIdProcedimento(); | |
268 | - $bolAcaoProcedimentoTrabalhar = SessaoSEI::getInstance()->verificarPermissao('procedimento_trabalhar'); | |
269 | - $objObjProcedimentoRN = new ProcedimentoRN(); | |
270 | - $dto->setDblIdProcedimento(InfraArray::converterArrInfraDTO($arrObjAtributoAndamentoDTOPorNome['PROCESSO'],'IdOrigem'),InfraDTO::$OPER_IN); | |
271 | - $arrObjProcedimentoDTO = InfraArray::indexarArrInfraDTO($objObjProcedimentoRN->listarRN0278($dto),'IdProcedimento'); | |
272 | - $strNomeTarefa = $this->substituirAtributoProcessoHistorico($objAtributoAndamentoDTO, $arrObjProcedimentoDTO, $bolAcaoProcedimentoTrabalhar, $strNomeTarefa); | |
273 | - | |
274 | - } | |
275 | - break; | |
276 | - | |
277 | - case 'USUARIO': | |
278 | - | |
279 | - if ($objAtributoAndamentoDTO->getStrValor()!=null){ | |
280 | - $arrValor = explode('¥',$objAtributoAndamentoDTO->getStrValor()); | |
281 | - $strSubstituicao = $arrValor[0]; | |
282 | - }else{ | |
283 | - $strSubstituicao = ''; | |
284 | - } | |
285 | - $strNomeTarefa = str_replace('@USUARIO@', $strSubstituicao, $strNomeTarefa); | |
286 | - break; | |
287 | - | |
288 | - case 'USUARIOS': | |
289 | - | |
290 | - $strNomeTarefa = $this->substitutirAtributoMultiploUsuarios($objAtributoAndamentoDTO, $arrObjAtributoAndamentoDTOPorNome['USUARIO'], $strNomeTarefa); | |
291 | - break; | |
292 | - | |
293 | - case 'UNIDADE': | |
294 | - | |
295 | - $arrValor = explode('¥',$objAtributoAndamentoDTO->getStrValor()); | |
296 | - $strSubstituicao = $arrValor[0]; | |
297 | - $strNomeTarefa = str_replace('@UNIDADE@', $strSubstituicao, $strNomeTarefa); | |
298 | - break; | |
299 | - | |
300 | - case 'BLOCO': | |
301 | - $bolAcaoRelBlocoProtocoloListar = SessaoSEI::getInstance()->verificarPermissao('rel_bloco_protocolo_listar'); | |
302 | - if (isset($arrObjAtributoAndamentoDTOPorNome['BLOCO'])){ | |
303 | - $objBlocoDTO = new BlocoDTO(); | |
304 | - $objBlocoDTO->retNumIdBloco(); | |
305 | - $objBlocoDTO->setNumIdBloco(InfraArray::converterArrInfraDTO($arrObjAtributoAndamentoDTOPorNome['BLOCO'],'IdOrigem'),InfraDTO::$OPER_IN); | |
306 | - $objBlocoDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); | |
307 | - | |
308 | - $objBlocoRN = new BlocoRN(); | |
309 | - $arrIdBloco = InfraArray::converterArrInfraDTO($objBlocoRN->listarRN1277($objBlocoDTO),'IdBloco'); | |
310 | - | |
311 | - $objRelBlocoUnidadeDTO = new RelBlocoUnidadeDTO(); | |
312 | - $objRelBlocoUnidadeDTO->retNumIdBloco(); | |
313 | - $objRelBlocoUnidadeDTO->setNumIdBloco(InfraArray::converterArrInfraDTO($arrObjAtributoAndamentoDTOPorNome['BLOCO'],'IdOrigem'),InfraDTO::$OPER_IN); | |
314 | - $objRelBlocoUnidadeDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); | |
315 | - $objRelBlocoUnidadeRN = new RelBlocoUnidadeRN(); | |
316 | - $arrIdBloco = array_unique(array_merge($arrIdBloco, InfraArray::converterArrInfraDTO($objRelBlocoUnidadeRN->listarRN1304($objRelBlocoUnidadeDTO),'IdBloco'))); | |
317 | - $strNomeTarefa = $this->substituirAtributoBlocoHistorico($objAtributoAndamentoDTO, $arrIdBloco, $bolAcaoRelBlocoProtocoloListar, $strNomeTarefa); | |
318 | - | |
319 | - } | |
320 | - break; | |
321 | - | |
322 | - case 'DATA_HORA': | |
323 | - $strNomeTarefa = str_replace('@DATA_HORA@', substr($objAtributoAndamentoDTO->getStrValor(),0,16), $strNomeTarefa); | |
324 | - break; | |
325 | - | |
326 | - case 'USUARIO_ANULACAO': | |
327 | - $arrValor = explode('¥',$objAtributoAndamentoDTO->getStrValor()); | |
328 | - $strSubstituicao = $arrValor[0]; | |
329 | - $strNomeTarefa = str_replace('@USUARIO_ANULACAO@', $strSubstituicao, $strNomeTarefa); | |
330 | - break; | |
331 | - | |
332 | - case 'INTERESSADO': | |
333 | - $arrValor = explode('¥',$objAtributoAndamentoDTO->getStrValor()); | |
334 | - $strSubstituicao = $arrValor[0]; | |
335 | - $strNomeTarefa = str_replace('@INTERESSADO@', $strSubstituicao, $strNomeTarefa); | |
336 | - break; | |
337 | - | |
338 | - case 'LOCALIZADOR': | |
339 | - $bolAcaoLocalizadorProtocolosListar = SessaoSEI::getInstance()->verificarPermissao('localizador_protocolos_listar'); | |
340 | - $strNomeTarefa = $this->substituirAtributoLocalizadorHistorico($objAtributoAndamentoDTO, $bolAcaoLocalizadorProtocolosListar, $strNomeTarefa); | |
341 | - break; | |
342 | - | |
343 | - case 'ANEXO': | |
344 | - | |
345 | - $strSubstituicao = $objAtributoAndamentoDTO->getStrValor(); | |
346 | - $bolAcaoDownload = SessaoSEI::getInstance()->verificarPermissao('documento_download_anexo'); | |
347 | - if ($bolAcaoDownload){ | |
348 | - $objAnexoDTO = new AnexoDTO(); | |
349 | - $objAnexoDTO->setNumIdAnexo($objAtributoAndamentoDTO->getStrIdOrigem()); | |
350 | - | |
351 | - $objAnexoRN = new AnexoRN(); | |
352 | - $strSubstituicao = $objAtributoAndamentoDTO->getStrValor(); | |
353 | - | |
354 | - } | |
355 | - $strNomeTarefa = str_replace('@ANEXO@', $strSubstituicao, $strNomeTarefa); | |
356 | - break; | |
357 | - | |
358 | - default: | |
359 | - $strNomeTarefa = str_replace('@'.$objAtributoAndamentoDTO->getStrNome().'@', $objAtributoAndamentoDTO->getStrValor(), $strNomeTarefa); | |
360 | - | |
361 | - } | |
362 | - | |
363 | - } | |
364 | - $strNomeTarefa = str_replace(array('@NIVEL_ACESSO@','@GRAU_SIGILO@','@TIPO_CONFERENCIA@', '@DATA_AUTUACAO@','@HIPOTESE_LEGAL@'),'',$strNomeTarefa); | |
365 | - | |
366 | - return $strNomeTarefa; | |
367 | - | |
368 | - } | |
369 | - public function substituirAtributoDocumentoHistorico(AtributoAndamentoDTO $objAtributoAndamentoDTO, $arrObjDocumentoDTO, $bolAcaoDocumentoVisualizar, &$strNomeTarefa){ | |
370 | - $strSubstituicao = $this->montarAtributoDocumentoHistorico($objAtributoAndamentoDTO, $arrObjDocumentoDTO, $bolAcaoDocumentoVisualizar); | |
371 | - $strNomeTarefa = str_replace('@DOCUMENTO@', $strSubstituicao, $strNomeTarefa); | |
372 | - return $strNomeTarefa; | |
373 | - } | |
374 | - public function montarAtributoDocumentoHistorico(AtributoAndamentoDTO $objAtributoAndamentoDTO, $arrObjDocumentoDTO, $bolAcaoDocumentoVisualizar){ | |
375 | - | |
376 | - $strSubstituicao = $objAtributoAndamentoDTO->getStrValor(); | |
377 | - | |
378 | - if (!isset($arrObjDocumentoDTO[$objAtributoAndamentoDTO->getStrIdOrigem()])){ | |
379 | - $strSubstituicao = $objAtributoAndamentoDTO->getStrValor(); | |
380 | - }else{ | |
381 | - | |
382 | - $strSubstituicao = $arrObjDocumentoDTO[$objAtributoAndamentoDTO->getStrIdOrigem()]->getStrProtocoloDocumentoFormatado().' ('.$arrObjDocumentoDTO[$objAtributoAndamentoDTO->getStrIdOrigem()]->getStrNomeSerie().')'; | |
383 | - | |
384 | - } | |
385 | - | |
386 | - return $strSubstituicao; | |
387 | - } | |
388 | - public function substitutirAtributoMultiploDocumentos($objAtributoAndamentoDTO, $arrObjAtributoAndamentoDTO, $arrObjDocumentoDTO, $bolAcaoDocumentoVisualizar, &$strNomeTarefa){ | |
389 | - if (is_array($arrObjAtributoAndamentoDTO)){ | |
390 | - | |
391 | - $arr = array(); | |
392 | - | |
393 | - $numAtributosTotal = count($arrObjAtributoAndamentoDTO); | |
394 | - for($i=0;$i<$numAtributosTotal;$i++){ | |
395 | - if ($arrObjAtributoAndamentoDTO[$i]->getNumIdAtividade()==$objAtributoAndamentoDTO->getNumIdAtividade()){ | |
396 | - $arr[] = $arrObjAtributoAndamentoDTO[$i]; | |
397 | - } | |
398 | - } | |
399 | - | |
400 | - $n = count($arr); | |
401 | - $strValorMultiplo = ''; | |
402 | - for($i=0;$i<$n;$i++){ | |
403 | - if ($strValorMultiplo!=''){ | |
404 | - if ($i == ($n-1)){ | |
405 | - $strValorMultiplo .= ' e '; | |
406 | - }else{ | |
407 | - $strValorMultiplo .= ', '; | |
408 | - } | |
409 | - } | |
410 | - $strValorMultiplo .= $this->montarAtributoDocumentoHistorico($arr[$i], $arrObjDocumentoDTO, $bolAcaoDocumentoVisualizar); | |
411 | - } | |
412 | - | |
413 | - $strNomeTarefa = str_replace('#DOCUMENTOS#', $strValorMultiplo, $strNomeTarefa); | |
414 | - } | |
415 | - return $strNomeTarefa; | |
416 | - } | |
417 | - public function substituirAtributoProcessoHistorico(AtributoAndamentoDTO $objAtributoAndamentoDTO, $arrObjProcedimentoDTO, $bolAcaoProcedimentoTrabalhar, &$strNomeTarefa){ | |
418 | - | |
419 | - $strSubstituicao = $objAtributoAndamentoDTO->getStrValor(); | |
420 | - | |
421 | - if ($bolAcaoProcedimentoTrabalhar){ | |
422 | - | |
423 | - $strSubstituicao = $objAtributoAndamentoDTO->getStrValor(); | |
424 | - | |
425 | - } | |
426 | - | |
427 | - $strNomeTarefa = str_replace('@PROCESSO@', $strSubstituicao, $strNomeTarefa); | |
428 | - return $strNomeTarefa; | |
429 | - } | |
430 | - public function substituirAtributoLocalizadorHistorico(AtributoAndamentoDTO $objAtributoAndamentoDTO, $bolAcaoLocalizadorProtocoloListar, &$strNomeTarefa){ | |
431 | - | |
432 | - $arrIdOrigem = explode('¥',$objAtributoAndamentoDTO->getStrIdOrigem()); | |
433 | - | |
434 | - //só mostra link se o localizador é da unidade atual | |
435 | - $strSubstituicao = $objAtributoAndamentoDTO->getStrValor(); | |
436 | - | |
437 | - | |
438 | - $strNomeTarefa = str_replace('@LOCALIZADOR@', $strSubstituicao, $strNomeTarefa); | |
439 | - return $strNomeTarefa; | |
440 | - } | |
441 | - public function substitutirAtributoMultiploUsuarios($objAtributoAndamentoDTO, $arrObjAtributoAndamentoDTO, &$strNomeTarefa){ | |
442 | - if (is_array($arrObjAtributoAndamentoDTO)){ | |
443 | - | |
444 | - $arr = array(); | |
445 | - | |
446 | - $numAtributosTotal = count($arrObjAtributoAndamentoDTO); | |
447 | - for($i=0;$i<$numAtributosTotal;$i++){ | |
448 | - if ($arrObjAtributoAndamentoDTO[$i]->getNumIdAtividade()==$objAtributoAndamentoDTO->getNumIdAtividade()){ | |
449 | - $arr[] = $arrObjAtributoAndamentoDTO[$i]; | |
450 | - } | |
451 | - } | |
452 | - | |
453 | - $n = count($arr); | |
454 | - $strValorMultiplo = ''; | |
455 | - for($i=0;$i<$n;$i++){ | |
456 | - if ($strValorMultiplo!=''){ | |
457 | - if ($i == ($n-1)){ | |
458 | - $strValorMultiplo .= ' e '; | |
459 | - }else{ | |
460 | - $strValorMultiplo .= ', '; | |
461 | - } | |
462 | - } | |
463 | - $arrValor = explode('¥',$arr[$i]->getStrValor()); | |
464 | - $strValorMultiplo .= $arrValor[0]; | |
465 | - } | |
466 | - | |
467 | - $strNomeTarefa = str_replace('#USUARIOS#', $strValorMultiplo, $strNomeTarefa); | |
468 | - } | |
469 | - return $strNomeTarefa; | |
470 | - } | |
471 | - public function substituirAtributoBlocoHistorico(AtributoAndamentoDTO $objAtributoAndamentoDTO, $arrIdBloco, $bolAcaoRelBlocoProtocoloListar, &$strNomeTarefa){ | |
472 | - | |
473 | - $strSubstituicao = $objAtributoAndamentoDTO->getStrValor(); | |
474 | - | |
475 | - $strNomeTarefa = str_replace('@BLOCO@', $strSubstituicao, $strNomeTarefa); | |
476 | - return $strNomeTarefa; | |
477 | - } | |
478 | - | |
479 | - | |
480 | -} | |
481 | -?> | |
482 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/rn/ProtocoloIntegradoVersaoRN.php
... | ... | @@ -1,988 +0,0 @@ |
1 | -<?php | |
2 | -/** | |
3 | -* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
4 | -* | |
5 | -* 07/05/2013 - criado por mga | |
6 | -* | |
7 | -*/ | |
8 | - | |
9 | -require_once dirname(__FILE__).'/../../../../SEI.php'; | |
10 | -require_once dirname(__FILE__).'/../../../../../../sip/web/Sip.php'; | |
11 | -require_once dirname(__FILE__).'/../../../../../../sip/web/BancoSip.php'; | |
12 | - | |
13 | -class ProtocoloIntegradoVersaoRN extends InfraRN { | |
14 | - | |
15 | - private $numSeg = 0; | |
16 | - private $versaoAtualDesteModulo = '2.0.0'; | |
17 | - private $nomeParametroModulo = 'PI_VERSAO'; | |
18 | - private $historicoVersoes = array('1.1.1','1.1.2','1.1.3','1.1.4','1.1.5','2.0.0'); | |
19 | - | |
20 | - public function __construct(){ | |
21 | - //parent::__construct(); | |
22 | - $this->inicializar(' SEI - INICIALIZAR '); | |
23 | - } | |
24 | - | |
25 | - protected function inicializarObjInfraIBanco(){ | |
26 | - return BancoSEI::getInstance(); | |
27 | - } | |
28 | - | |
29 | - private function inicializar($strTitulo){ | |
30 | - | |
31 | - ini_set('max_execution_time','0'); | |
32 | - ini_set('memory_limit','-1'); | |
33 | - | |
34 | - try { | |
35 | - @ini_set('zlib.output_compression','0'); | |
36 | - @ini_set('implicit_flush', '1'); | |
37 | - } catch(Exception $e) {} | |
38 | - | |
39 | - BancoSEI::getInstance()->abrirConexao(); | |
40 | - BancoSEI::getInstance()->abrirTransacao(); | |
41 | - | |
42 | - ob_implicit_flush(); | |
43 | - | |
44 | - InfraDebug::getInstance()->setBolLigado(true); | |
45 | - InfraDebug::getInstance()->setBolDebugInfra(true); | |
46 | - InfraDebug::getInstance()->setBolEcho(true); | |
47 | - InfraDebug::getInstance()->limpar(); | |
48 | - | |
49 | - $this->logar($strTitulo); | |
50 | - | |
51 | - } | |
52 | - | |
53 | - private function logar($strMsg){ | |
54 | - InfraDebug::getInstance()->gravar($strMsg); | |
55 | - flush(); | |
56 | - //para encher o buffer e fazer o flush | |
57 | - //echo str_repeat(' ',64*1024); flush(); | |
58 | - //LogSEI::getInstance()->gravar($strMsg); | |
59 | - } | |
60 | - | |
61 | - private function finalizar($strMsg=null, $bolErro){ | |
62 | - | |
63 | - if (!$bolErro) { | |
64 | - $this->numSeg = InfraUtil::verificarTempoProcessamento($this->numSeg); | |
65 | - $this->logar('TEMPO TOTAL DE EXECUCAO: ' . $this->numSeg . ' s'); | |
66 | - } else { | |
67 | - $strMsg = 'ERRO: '.$strMsg; | |
68 | - } | |
69 | - | |
70 | - if ($strMsg!=null){ | |
71 | - $this->logar($strMsg); | |
72 | - } | |
73 | - | |
74 | - InfraDebug::getInstance()->setBolLigado(false); | |
75 | - InfraDebug::getInstance()->setBolDebugInfra(false); | |
76 | - InfraDebug::getInstance()->setBolEcho(false); | |
77 | - BancoSEI::getInstance()->cancelarTransacao(); | |
78 | - BancoSEI::getInstance()->fecharConexao(); | |
79 | - InfraDebug::getInstance()->limpar(); | |
80 | - $this->numSeg = 0; | |
81 | - die; | |
82 | - | |
83 | - } | |
84 | - | |
85 | - | |
86 | - /** | |
87 | - * @throws InfraException | |
88 | - */ | |
89 | - protected function atualizarVersaoControlado(){ | |
90 | - | |
91 | - try { | |
92 | - | |
93 | - if (!(BancoSEI::getInstance() instanceof InfraMySql) && !(BancoSEI::getInstance() instanceof InfraSqlServer) && !(BancoSEI::getInstance() instanceof InfraOracle)){ | |
94 | - $this->finalizar('BANCO DE DADOS NAO SUPORTADO: '.get_parent_class(BancoSEI::getInstance()),true); | |
95 | - } | |
96 | - | |
97 | - //Selecionando versão a ser instalada | |
98 | - $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); | |
99 | - $strVersaoPreviaModuloProtocoloIntegrado = $objInfraParametro->getValor('PI_VERSAO', false); | |
100 | - | |
101 | - $instalacao = array(); | |
102 | - switch($this->versaoAtualDesteModulo) { | |
103 | - case '1.1.2': | |
104 | - // Versão do plugin com suporte apenas ao Mysql | |
105 | - $instalacao = $this->instalarv112($strVersaoPreviaModuloProtocoloIntegrado); | |
106 | - break; | |
107 | - case '1.1.3': | |
108 | - //Versão do plugin com suporte multibancos : Mysql,SqlServer e Oracle | |
109 | - $instalacao = $this->instalarv113($strVersaoPreviaModuloProtocoloIntegrado); | |
110 | - break; | |
111 | - case '1.1.4': | |
112 | - //Versão do plugin com suporte multibancos : Mysql,SqlServer e Oracle | |
113 | - $instalacao = $this->instalarv114($strVersaoPreviaModuloProtocoloIntegrado); | |
114 | - break; | |
115 | - case '1.1.5': | |
116 | - //Versão do plugin com suporte multibancos : Mysql,SqlServer e Oracle | |
117 | - $instalacao = $this->instalarv115($strVersaoPreviaModuloProtocoloIntegrado); | |
118 | - break; | |
119 | - case '2.0.0': | |
120 | - //Versão com suporte ao SEI 3.0 | |
121 | - $instalacao = $this->instalarv200($strVersaoPreviaModuloProtocoloIntegrado); | |
122 | - break; | |
123 | - default: | |
124 | - $instalacao["operacoes"] = null; | |
125 | - $instalacao["erro"] = "Erro instalando/atualizando Módulo Protocolo Integrado no SEI. Versão do módulo".$strVersaoPreviaModuloProtocoloIntegrado." inválida"; | |
126 | - break; | |
127 | - } | |
128 | - if (isset($instalacao["erro"])) { | |
129 | - $this->finalizar($instalacao["erro"],true); | |
130 | - } else { | |
131 | - $this->logar("Instalação/Atualização realizada com sucesso"); | |
132 | - } | |
133 | - | |
134 | - InfraDebug::getInstance()->setBolLigado(false); | |
135 | - InfraDebug::getInstance()->setBolDebugInfra(false); | |
136 | - InfraDebug::getInstance()->setBolEcho(false); | |
137 | - | |
138 | - LogSEI::getInstance()->gravar(InfraDebug::getInstance()->getStrDebug()); | |
139 | - | |
140 | - BancoSEI::getInstance()->confirmarTransacao(); | |
141 | - BancoSEI::getInstance()->fecharConexao(); | |
142 | - InfraDebug::getInstance()->limpar(); | |
143 | - | |
144 | - } catch(Exception $e) { | |
145 | - | |
146 | - InfraDebug::getInstance()->setBolLigado(false); | |
147 | - InfraDebug::getInstance()->setBolDebugInfra(false); | |
148 | - InfraDebug::getInstance()->setBolEcho(false); | |
149 | - | |
150 | - BancoSEI::getInstance()->cancelarTransacao(); | |
151 | - BancoSEI::getInstance()->fecharConexao(); | |
152 | - | |
153 | - InfraDebug::getInstance()->limpar(); | |
154 | - throw new InfraException('Erro instalando/atualizando módulo do protocolo integrado no SEI.', $e); | |
155 | - | |
156 | - } | |
157 | - | |
158 | - } | |
159 | - | |
160 | - private function instalarv200($strVersaoPreviaModuloProtocoloIntegrado) { | |
161 | - // Versão 2.0.0 não gerou modificações no banco | |
162 | - $resultado = array(); | |
163 | - if(trim($strVersaoPreviaModuloProtocoloIntegrado)==trim($this->versaoAtualDesteModulo)){ | |
164 | - $resultado["erro"] = "Erro instalando/atualizando Módulo Protocolo Integrado no SEI. Versão ".$strVersaoPreviaModuloProtocoloIntegrado." já instalada"; | |
165 | - return $resultado; | |
166 | - }else if($strVersaoPreviaModuloProtocoloIntegrado=='1.1.5'){ | |
167 | - | |
168 | - BancoSEI::getInstance()->executarSql('update infra_parametro set valor=\''.$this->versaoAtualDesteModulo.'\' where nome=\'PI_VERSAO\''); | |
169 | - | |
170 | - }else{ | |
171 | - | |
172 | - $this->instalarv115($strVersaoPreviaModuloProtocoloIntegrado); | |
173 | - } | |
174 | - | |
175 | - // Configurar SIP | |
176 | - //$this->configurarSIP(); | |
177 | - } | |
178 | - | |
179 | - private function configurarSIP() { | |
180 | - BancoSIP::getInstance()->abrirConexao(); | |
181 | - BancoSIP::getInstance()->abrirTransacao(); | |
182 | - | |
183 | - // recursos | |
184 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from recurso where id_sistema=(select id_sistema from sistema where sigla='SEI') and nome='protocolo_integrado_acesso_arquivo_metadados'"); | |
185 | - if ($numCountElementos==0){ | |
186 | - BancoSIP::getInstance()->executarSql("INSERT INTO recurso (id_sistema, id_recurso, nome, descricao, caminho, sin_ativo) VALUES ((select id_sistema from sistema where sigla='SEI'), | |
187 | - (select max(s.id_recurso)+1 from recurso s), 'protocolo_integrado_acesso_arquivo_metadados', 'Visualização do arquivo XML que foi gerado para um pacote de envio ao PI', | |
188 | - 'controlador.php?acao=protocolo_integrado_acesso_arquivo_metadados', 'S');"); | |
189 | - } | |
190 | - | |
191 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from recurso where id_sistema=(select id_sistema from sistema where sigla='SEI') and nome='protocolo_integrado_configurar_parametros'"); | |
192 | - if ($numCountElementos==0){ | |
193 | - BancoSIP::getInstance()->executarSql("INSERT INTO recurso (id_sistema, id_recurso, nome, descricao, caminho, sin_ativo) VALUES ((select id_sistema from sistema where sigla='SEI'), | |
194 | - (select max(s.id_recurso)+1 from recurso s), 'protocolo_integrado_configurar_parametros', 'Configuração dos Parametros Gerais do Modulo', | |
195 | - 'controlador.php?acao=protocolo_integrado_configurar_parametros', 'S');"); | |
196 | - } | |
197 | - | |
198 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from recurso where id_sistema=(select id_sistema from sistema where sigla='SEI') and nome='protocolo_integrado_configurar_publicacao'"); | |
199 | - if ($numCountElementos==0){ | |
200 | - BancoSIP::getInstance()->executarSql("INSERT INTO recurso (id_sistema, id_recurso, nome, descricao, caminho, sin_ativo) VALUES ((select id_sistema from sistema where sigla='SEI'), | |
201 | - (select max(s.id_recurso)+1 from recurso s), 'protocolo_integrado_configurar_publicacao', 'Opção de configurar quais históricos sobem ou não pro PI', | |
202 | - 'controlador.php?acao=protocolo_integrado_configurar_publicacao', 'S');"); | |
203 | - } | |
204 | - | |
205 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from recurso where id_sistema=(select id_sistema from sistema where sigla='SEI') and nome='protocolo_integrado_forcar_reenvio'"); | |
206 | - if ($numCountElementos==0){ | |
207 | - BancoSIP::getInstance()->executarSql("INSERT INTO recurso (id_sistema, id_recurso, nome, descricao, caminho, sin_ativo) VALUES ((select id_sistema from sistema where sigla='SEI'), | |
208 | - (select max(s.id_recurso)+1 from recurso s), 'protocolo_integrado_forcar_reenvio', 'Forçar reenvio de dados a partir da tela de monitoramento do PI', | |
209 | - 'controlador.php?acao=protocolo_integrado_forcar_reenvio', 'S');"); | |
210 | - } | |
211 | - | |
212 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from recurso where id_sistema=(select id_sistema from sistema where sigla='SEI') and nome='protocolo_integrado_mensagens_alterar'"); | |
213 | - if ($numCountElementos==0){ | |
214 | - BancoSIP::getInstance()->executarSql("INSERT INTO recurso (id_sistema, id_recurso, nome, descricao, caminho, sin_ativo) VALUES ((select id_sistema from sistema where sigla='SEI'), | |
215 | - (select max(s.id_recurso)+1 from recurso s), 'protocolo_integrado_mensagens_alterar', | |
216 | - 'Opção de configurar qual a mensagem que será traduzida ao PI, uma vez que ela já foi configurada para subir', 'controlador.php?acao=protocolo_integrado_mensagens_alterar', 'S');"); | |
217 | - } | |
218 | - | |
219 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from recurso where id_sistema=(select id_sistema from sistema where sigla='SEI') and nome='protocolo_integrado_mensagens_listar'"); | |
220 | - if ($numCountElementos==0){ | |
221 | - BancoSIP::getInstance()->executarSql("INSERT INTO recurso (id_sistema, id_recurso, nome, descricao, caminho, sin_ativo) VALUES ((select id_sistema from sistema where sigla='SEI'), | |
222 | - (select max(s.id_recurso)+1 from recurso s), 'protocolo_integrado_mensagens_listar', 'Listagem dos Históricos que estão configurados para serem publicados no PI', | |
223 | - 'controlador.php?acao=protocolo_integrado_mensagens_listar', 'S');"); | |
224 | - } | |
225 | - | |
226 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from recurso where id_sistema=(select id_sistema from sistema where sigla='SEI') and nome='protocolo_integrado_monitoramento'"); | |
227 | - if ($numCountElementos==0){ | |
228 | - BancoSIP::getInstance()->executarSql("INSERT INTO recurso (id_sistema, id_recurso, nome, descricao, caminho, sin_ativo) VALUES ((select id_sistema from sistema where sigla='SEI'), | |
229 | - (select max(s.id_recurso)+1 from recurso s), 'protocolo_integrado_monitoramento', 'Monitoramento da Integração', 'controlador.php?acao=protocolo_integrado_monitoramento', 'S');"); | |
230 | - } | |
231 | - | |
232 | - // perfil_recursos | |
233 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from rel_perfil_recurso where id_perfil=(select id_perfil from perfil where nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
234 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
235 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_acesso_arquivo_metadados' and id_sistema=(select id_sistema from sistema where sigla='SEI'))"); | |
236 | - if ($numCountElementos==0){ | |
237 | - BancoSIP::getInstance()->executarSql("INSERT INTO rel_perfil_recurso (id_perfil, id_sistema, id_recurso) VALUES ((select id_perfil from perfil where nome='Administrador' and | |
238 | - id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_sistema from sistema where sigla='SEI'), | |
239 | - (select id_recurso from recurso where nome='protocolo_integrado_acesso_arquivo_metadados' and id_sistema=(select id_sistema from sistema where sigla='SEI')));"); | |
240 | - } | |
241 | - | |
242 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from rel_perfil_recurso where id_perfil=(select id_perfil from perfil where nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
243 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
244 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_configurar_parametros' and id_sistema=(select id_sistema from sistema where sigla='SEI'))"); | |
245 | - if ($numCountElementos==0){ | |
246 | - BancoSIP::getInstance()->executarSql("INSERT INTO rel_perfil_recurso (id_perfil, id_sistema, id_recurso) VALUES ((select id_perfil from perfil where nome='Administrador' and | |
247 | - id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_sistema from sistema where sigla='SEI'), (select id_recurso from recurso where | |
248 | - nome='protocolo_integrado_configurar_parametros' and id_sistema=(select id_sistema from sistema where sigla='SEI')));"); | |
249 | - } | |
250 | - | |
251 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from rel_perfil_recurso where id_perfil=(select id_perfil from perfil where nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
252 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
253 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_configurar_publicacao' and id_sistema=(select id_sistema from sistema where sigla='SEI'))"); | |
254 | - if ($numCountElementos==0){ | |
255 | - BancoSIP::getInstance()->executarSql("INSERT INTO rel_perfil_recurso (id_perfil, id_sistema, id_recurso) VALUES ((select id_perfil from perfil where nome='Administrador' and | |
256 | - id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_sistema from sistema where sigla='SEI'), (select id_recurso from recurso where | |
257 | - nome='protocolo_integrado_configurar_publicacao' and id_sistema=(select id_sistema from sistema where sigla='SEI')));"); | |
258 | - } | |
259 | - | |
260 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from rel_perfil_recurso where id_perfil=(select id_perfil from perfil where nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
261 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
262 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_forcar_reenvio' and id_sistema=(select id_sistema from sistema where sigla='SEI'))"); | |
263 | - if ($numCountElementos==0){ | |
264 | - BancoSIP::getInstance()->executarSql("INSERT INTO rel_perfil_recurso (id_perfil, id_sistema, id_recurso) VALUES ((select id_perfil from perfil where nome='Administrador' and | |
265 | - id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_sistema from sistema where sigla='SEI'), (select id_recurso from recurso where | |
266 | - nome='protocolo_integrado_forcar_reenvio' and id_sistema=(select id_sistema from sistema where sigla='SEI')));"); | |
267 | - } | |
268 | - | |
269 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from rel_perfil_recurso where id_perfil=(select id_perfil from perfil where nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
270 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
271 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_mensagens_alterar' and id_sistema=(select id_sistema from sistema where sigla='SEI'))"); | |
272 | - if ($numCountElementos==0){ | |
273 | - BancoSIP::getInstance()->executarSql("INSERT INTO rel_perfil_recurso (id_perfil, id_sistema, id_recurso) VALUES ((select id_perfil from perfil where nome='Administrador' and | |
274 | - id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_sistema from sistema where sigla='SEI'), (select id_recurso from recurso where | |
275 | - nome='protocolo_integrado_mensagens_alterar' and id_sistema=(select id_sistema from sistema where sigla='SEI')));"); | |
276 | - } | |
277 | - | |
278 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from rel_perfil_recurso where id_perfil=(select id_perfil from perfil where nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
279 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
280 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_mensagens_listar' and id_sistema=(select id_sistema from sistema where sigla='SEI'))"); | |
281 | - if ($numCountElementos==0){ | |
282 | - BancoSIP::getInstance()->executarSql("INSERT INTO rel_perfil_recurso (id_perfil, id_sistema, id_recurso) VALUES ((select id_perfil from perfil where nome='Administrador' and | |
283 | - id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_sistema from sistema where sigla='SEI'), (select id_recurso from recurso where | |
284 | - nome='protocolo_integrado_mensagens_listar' and id_sistema=(select id_sistema from sistema where sigla='SEI')));"); | |
285 | - } | |
286 | - | |
287 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from rel_perfil_recurso where id_perfil=(select id_perfil from perfil where nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
288 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
289 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_monitoramento' and id_sistema=(select id_sistema from sistema where sigla='SEI'))"); | |
290 | - if ($numCountElementos==0){ | |
291 | - BancoSIP::getInstance()->executarSql("INSERT INTO rel_perfil_recurso (id_perfil, id_sistema, id_recurso) VALUES ((select id_perfil from perfil where nome='Administrador' and | |
292 | - id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_sistema from sistema where sigla='SEI'), (select id_recurso from recurso where | |
293 | - nome='protocolo_integrado_monitoramento' and id_sistema=(select id_sistema from sistema where sigla='SEI')));"); | |
294 | - } | |
295 | - | |
296 | - // item_menu | |
297 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from item_menu where id_menu=(select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
298 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
299 | - and id_menu_pai=(select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
300 | - and id_item_menu_pai=(select im.id_item_menu from item_menu im where im.rotulo='Administração' and im.id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
301 | - and rotulo='Protocolo Integrado'"); | |
302 | - if ($numCountElementos==0){ | |
303 | - BancoSIP::getInstance()->executarSql("INSERT INTO item_menu (id_menu, id_item_menu, id_sistema, id_menu_pai, id_item_menu_pai, rotulo, sequencia, sin_ativo, sin_nova_janela) VALUES | |
304 | - ((select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')), (select max(im.id_item_menu)+1 from item_menu im), (select id_sistema | |
305 | - from sistema where sigla='SEI'), (select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')), (select im.id_item_menu from | |
306 | - item_menu im where im.rotulo='Administração' and im.id_sistema=(select id_sistema from sistema where sigla='SEI')), 'Protocolo Integrado', '0', 'S', 'N');"); | |
307 | - } | |
308 | - | |
309 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from item_menu where id_menu=(select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
310 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
311 | - and id_menu_pai=(select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
312 | - and id_item_menu_pai=(select im.id_item_menu from item_menu im where im.rotulo='Protocolo Integrado' and im.id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
313 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_configurar_parametros' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
314 | - and rotulo='Parâmetros'"); | |
315 | - if ($numCountElementos==0){ | |
316 | - BancoSIP::getInstance()->executarSql("INSERT INTO item_menu (id_menu, id_item_menu, id_sistema, id_menu_pai, id_item_menu_pai, id_recurso, rotulo, sequencia, sin_ativo, sin_nova_janela) | |
317 | - VALUES ((select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')), (select max(im.id_item_menu)+1 from item_menu im), | |
318 | - (select id_sistema from sistema where sigla='SEI'), (select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')), (select | |
319 | - im.id_item_menu from item_menu im where im.rotulo='Protocolo Integrado' and im.id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_recurso | |
320 | - from recurso where nome='protocolo_integrado_configurar_parametros' and id_sistema=(select id_sistema from sistema where sigla='SEI')), 'Parâmetros', '10', 'S', 'N');"); | |
321 | - } | |
322 | - | |
323 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from item_menu where id_menu=(select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
324 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
325 | - and id_menu_pai=(select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
326 | - and id_item_menu_pai=(select im.id_item_menu from item_menu im where im.rotulo='Protocolo Integrado' and im.id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
327 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_mensagens_listar' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
328 | - and rotulo='Configuração das Mensagens'"); | |
329 | - if ($numCountElementos==0){ | |
330 | - BancoSIP::getInstance()->executarSql("INSERT INTO item_menu (id_menu, id_item_menu, id_sistema, id_menu_pai, id_item_menu_pai, id_recurso, rotulo, sequencia, sin_ativo, sin_nova_janela) | |
331 | - VALUES ((select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')), (select max(im.id_item_menu)+1 from item_menu im), | |
332 | - (select id_sistema from sistema where sigla='SEI'), (select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')), | |
333 | - (select im.id_item_menu from item_menu im where im.rotulo='Protocolo Integrado' and im.id_sistema=(select id_sistema from sistema where sigla='SEI')), | |
334 | - (select id_recurso from recurso where nome='protocolo_integrado_mensagens_listar' and id_sistema=(select id_sistema from sistema where sigla='SEI')), | |
335 | - 'Configuração das Mensagens', '20', 'S', 'N');"); | |
336 | - } | |
337 | - | |
338 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from item_menu where id_menu=(select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
339 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
340 | - and id_menu_pai=(select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
341 | - and id_item_menu_pai=(select im.id_item_menu from item_menu im where im.rotulo='Protocolo Integrado' and im.id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
342 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_monitoramento' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
343 | - and rotulo='Monitoramento'"); | |
344 | - if ($numCountElementos==0){ | |
345 | - BancoSIP::getInstance()->executarSql("INSERT INTO item_menu (id_menu, id_item_menu, id_sistema, id_menu_pai, id_item_menu_pai, id_recurso, rotulo, sequencia, sin_ativo, sin_nova_janela) | |
346 | - VALUES ((select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')), (select max(im.id_item_menu)+1 from item_menu im), | |
347 | - (select id_sistema from sistema where sigla='SEI'), (select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')), | |
348 | - (select im.id_item_menu from item_menu im where im.rotulo='Protocolo Integrado' and im.id_sistema=(select id_sistema from sistema where sigla='SEI')), | |
349 | - (select id_recurso from recurso where nome='protocolo_integrado_monitoramento' and id_sistema=(select id_sistema from sistema where sigla='SEI')), | |
350 | - 'Monitoramento', '30', 'S', 'N');"); | |
351 | - } | |
352 | - | |
353 | - // rel_perfil_item_menu | |
354 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from rel_perfil_item_menu where id_perfil=(select id_perfil from perfil where nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
355 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
356 | - and id_menu=(select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
357 | - and id_item_menu=(select id_item_menu from item_menu where id_sistema=(select id_sistema from sistema where sigla='SEI') and rotulo='Parâmetros' and id_item_menu_pai=(select im.id_item_menu from item_menu im where im.rotulo='Protocolo Integrado' and im.id_sistema=(select id_sistema from sistema where sigla='SEI'))) | |
358 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_configurar_parametros' and id_sistema=(select id_sistema from sistema where sigla='SEI'))"); | |
359 | - if ($numCountElementos==0){ | |
360 | - BancoSIP::getInstance()->executarSql("INSERT INTO rel_perfil_item_menu (id_perfil, id_sistema, id_menu, id_item_menu, id_recurso) VALUES ((select id_perfil from perfil | |
361 | - where nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_sistema from sistema where sigla='SEI'), (select id_menu | |
362 | - from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_item_menu from item_menu where id_sistema=(select id_sistema from | |
363 | - sistema where sigla='SEI') and rotulo='Parâmetros' and id_item_menu_pai=(select im.id_item_menu from item_menu im where im.rotulo='Protocolo Integrado' and | |
364 | - im.id_sistema=(select id_sistema from sistema where sigla='SEI'))), (select id_recurso from recurso where nome='protocolo_integrado_configurar_parametros' and | |
365 | - id_sistema=(select id_sistema from sistema where sigla='SEI')));"); | |
366 | - } | |
367 | - | |
368 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from rel_perfil_item_menu where id_perfil=(select id_perfil from perfil where nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
369 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
370 | - and id_menu=(select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
371 | - and id_item_menu=(select id_item_menu from item_menu where id_sistema=(select id_sistema from sistema where sigla='SEI') and rotulo='Configuração das Mensagens' and id_item_menu_pai=(select im.id_item_menu from item_menu im where im.rotulo='Protocolo Integrado' and im.id_sistema=(select id_sistema from sistema where sigla='SEI'))) | |
372 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_mensagens_listar' and id_sistema=(select id_sistema from sistema where sigla='SEI'))"); | |
373 | - if ($numCountElementos==0){ | |
374 | - BancoSIP::getInstance()->executarSql("INSERT INTO rel_perfil_item_menu (id_perfil, id_sistema, id_menu, id_item_menu, id_recurso) VALUES ((select id_perfil from perfil where | |
375 | - nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_sistema from sistema where sigla='SEI'), (select id_menu from menu | |
376 | - where id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_item_menu from item_menu where id_sistema=(select id_sistema from sistema where sigla='SEI') | |
377 | - and rotulo='Configuração das Mensagens' and id_item_menu_pai=(select im.id_item_menu from item_menu im where im.rotulo='Protocolo Integrado' and im.id_sistema=(select id_sistema | |
378 | - from sistema where sigla='SEI'))), (select id_recurso from recurso where nome='protocolo_integrado_mensagens_listar' and id_sistema=(select id_sistema from sistema where | |
379 | - sigla='SEI')));"); | |
380 | - } | |
381 | - | |
382 | - $numCountElementos = BancoSIP::getInstance()->executarSql("select * from rel_perfil_item_menu where id_perfil=(select id_perfil from perfil where nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
383 | - and id_sistema=(select id_sistema from sistema where sigla='SEI') | |
384 | - and id_menu=(select id_menu from menu where id_sistema=(select id_sistema from sistema where sigla='SEI')) | |
385 | - and id_item_menu=(select id_item_menu from item_menu where id_sistema=(select id_sistema from sistema where sigla='SEI') and rotulo='Monitoramento' and id_item_menu_pai=(select im.id_item_menu from item_menu im where im.rotulo='Protocolo Integrado' and im.id_sistema=(select id_sistema from sistema where sigla='SEI'))) | |
386 | - and id_recurso=(select id_recurso from recurso where nome='protocolo_integrado_monitoramento' and id_sistema=(select id_sistema from sistema where sigla='SEI'))"); | |
387 | - if ($numCountElementos==0){ | |
388 | - BancoSIP::getInstance()->executarSql("INSERT INTO rel_perfil_item_menu (id_perfil, id_sistema, id_menu, id_item_menu, id_recurso) VALUES ((select id_perfil from perfil where | |
389 | - nome='Administrador' and id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_sistema from sistema where sigla='SEI'), (select id_menu from menu | |
390 | - where id_sistema=(select id_sistema from sistema where sigla='SEI')), (select id_item_menu from item_menu where id_sistema=(select id_sistema from sistema where | |
391 | - sigla='SEI') and rotulo='Monitoramento' and id_item_menu_pai=(select im.id_item_menu from item_menu im where im.rotulo='Protocolo Integrado' and im.id_sistema=(select | |
392 | - id_sistema from sistema where sigla='SEI'))), (select id_recurso from recurso where nome='protocolo_integrado_monitoramento' and id_sistema=(select id_sistema from | |
393 | - sistema where sigla='SEI')));"); | |
394 | - } | |
395 | - | |
396 | - BancoSIP::getInstance()->confirmarTransacao(); | |
397 | - BancoSIP::getInstance()->fecharConexao(); | |
398 | - } | |
399 | - | |
400 | - private function instalarv115($strVersaoPreviaModuloProtocoloIntegrado){ | |
401 | - | |
402 | - $objProtocoloIntegradoParametrosDTO = new ProtocoloIntegradoParametrosDTO(); | |
403 | - $objProtocoloIntegradoParametrosRN = new ProtocoloIntegradoParametrosRN(); | |
404 | - $objInfraMetaBD = new InfraMetaBD(BancoSEI::getInstance()); | |
405 | - | |
406 | - $resultado = array(); | |
407 | - if (strlen(ProtocoloIntegradoParametrosRN::$CHAVE_MODULO_PI)!=ProtocoloIntegradoParametrosRN::$NUM_CARACTERES_CHAVE_PI) { | |
408 | - $resultado["erro"] = "Erro instalando/atualizando Módulo Protocolo Integrado no SEI.É necessário definir uma chave de 16 caracteres para variável CHAVE_MODULO_PI no arquivo ProtocoloIntegradoParametrosRN.php "; | |
409 | - return $resultado; | |
410 | - } | |
411 | - | |
412 | - if (trim($strVersaoPreviaModuloProtocoloIntegrado)==trim($this->versaoAtualDesteModulo)) { | |
413 | - $resultado["erro"] = "Erro instalando/atualizando Módulo Protocolo Integrado no SEI. Versão ".$strVersaoPreviaModuloProtocoloIntegrado." já instalada"; | |
414 | - return $resultado; | |
415 | - } else { | |
416 | - $this->instalarv114($strVersaoPreviaModuloProtocoloIntegrado); | |
417 | - } | |
418 | - if(!InfraString::isBolVazia($strVersaoPreviaModuloProtocoloIntegrado)){ | |
419 | - | |
420 | - | |
421 | - $objInfraSequencia = new InfraSequencia(BancoSEI::getInstance()); | |
422 | - $objInfraSequenciaBD = new InfraSequenciaBD(BancoSEI::getInstance()); | |
423 | - $objInfraSequenciaDTO = new InfraSequenciaDTO(); | |
424 | - $objInfraSequenciaDTO->setStrNome('infra_agendamento_tarefa'); | |
425 | - $objInfraSequenciaDTO->retDblNumAtual(); | |
426 | - $objInfraSequencia = $objInfraSequenciaBD->consultar($objInfraSequenciaDTO); | |
427 | - $numProximoValorSequencia = $objInfraSequencia->getDblNumAtual(); | |
428 | - $numMaxIdAgendamento = $this->getMaxIdAgendamento(); | |
429 | - | |
430 | - if($numProximoValorSequencia<$numMaxIdAgendamento){ | |
431 | - | |
432 | - | |
433 | - $objInfraSequenciaDTO = new InfraSequenciaDTO(); | |
434 | - | |
435 | - $objInfraSequenciaDTO->setDblNumAtual($numMaxIdAgendamento); | |
436 | - $objInfraSequenciaDTO->setStrNome('infra_agendamento_tarefa'); | |
437 | - $objInfraSequenciaBD->alterar($objInfraSequenciaDTO); | |
438 | - | |
439 | - } | |
440 | - | |
441 | - } | |
442 | - $objAgendamentoDTO = $this->adicionarAgendamento('ProtocoloIntegradoAgendamentoRN::publicarProtocoloIntegrado','Processo de Publicação do PI','D','2'); | |
443 | - $objAgendamentoDTO = $this->adicionarAgendamento('ProtocoloIntegradoAgendamentoRN::notificarProcessosComFalhaPublicacaoProtocoloIntegrado','Agendamento do alarme de e-mail disparado quando há falha na publicação de pacotes','D','17'); | |
444 | - $objAgendamentoDTO = $this->adicionarAgendamento('ProtocoloIntegradoAgendamentoRN::notificarNovosPacotesNaoSendoGerados','Agendamento do alarme de e-mail disparado quando novos pacotes não estão sendo gerados','D','12'); | |
445 | - | |
446 | - $objInfraMetaBD->excluirChaveEstrangeira('md_pi_mensagem','fk_md_pi_mensagem_tarefa'); | |
447 | - | |
448 | - BancoSEI::getInstance()->executarSql('ALTER TABLE md_pi_mensagem ADD CONSTRAINT fk_md_pi_mensagem_tarefa FOREIGN KEY (id_tarefa) REFERENCES tarefa (id_tarefa) ON DELETE CASCADE'); | |
449 | - | |
450 | - BancoSEI::getInstance()->executarSql('update infra_parametro set valor=\''.$this->versaoAtualDesteModulo.'\' where nome=\'PI_VERSAO\''); | |
451 | - | |
452 | - } | |
453 | - | |
454 | - private function instalarv114($strVersaoPreviaModuloProtocoloIntegrado){ | |
455 | - | |
456 | - $objProtocoloIntegradoParametrosDTO = new ProtocoloIntegradoParametrosDTO(); | |
457 | - $objProtocoloIntegradoParametrosRN = new ProtocoloIntegradoParametrosRN(); | |
458 | - | |
459 | - $resultado = array(); | |
460 | - if( strlen(ProtocoloIntegradoParametrosRN::$CHAVE_MODULO_PI)!=ProtocoloIntegradoParametrosRN::$NUM_CARACTERES_CHAVE_PI){ | |
461 | - | |
462 | - $resultado["erro"] = "Erro instalando/atualizando Módulo Protocolo Integrado no SEI.É necessário definir uma chave de 16 caracteres para variável CHAVE_MODULO_PI no arquivo ProtocoloIntegradoParametrosRN.php "; | |
463 | - return $resultado; | |
464 | - } | |
465 | - if(InfraString::isBolVazia($strVersaoPreviaModuloProtocoloIntegrado)|| trim($strVersaoPreviaModuloProtocoloIntegrado)=='1.1.2'){ | |
466 | - | |
467 | - $instalacao = $this->instalarv113($strVersaoPreviaModuloProtocoloIntegrado); | |
468 | - if(!isset($instalacao["erro"])){ | |
469 | - return $this->instalarv114('1.1.3'); | |
470 | - }else{ | |
471 | - | |
472 | - return $instalacao; | |
473 | - } | |
474 | - | |
475 | - }else if(trim($strVersaoPreviaModuloProtocoloIntegrado)=='1.1.3'){ | |
476 | - | |
477 | - //Criando a tabela de pacotes nos três bancos | |
478 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
479 | - BancoSEI::getInstance()->executarSql("alter table md_pi_parametros modify column senha_webservice varchar(100)"); | |
480 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
481 | - BancoSEI::getInstance()->executarSql("alter table md_pi_parametros alter column senha_webservice varchar(100)"); | |
482 | - }else if (BancoSEI::getInstance() instanceof InfraOracle){ | |
483 | - BancoSEI::getInstance()->executarSql("alter table md_pi_parametros modify( senha_webservice varchar(100))"); | |
484 | - } | |
485 | - $objProtocoloIntegradoParametrosDTO->retTodos(); | |
486 | - | |
487 | - $objParametrosRetornados = $objProtocoloIntegradoParametrosRN->consultar($objProtocoloIntegradoParametrosDTO); | |
488 | - | |
489 | - if(strlen(trim($objParametrosRetornados->getStrSenhaWebservice()))>0){ | |
490 | - $senhaEncriptada = rawurlencode($objProtocoloIntegradoParametrosRN->encriptaSenha(trim($objParametrosRetornados->getStrSenhaWebservice()))); | |
491 | - $objParametrosRetornados->setStrSenhaWebservice($senhaEncriptada); | |
492 | - $objProtocoloIntegradoParametrosRN->alterar($objParametrosRetornados); | |
493 | - } | |
494 | - BancoSEI::getInstance()->executarSql('update infra_parametro set valor=\''.$this->versaoAtualDesteModulo.'\' where nome=\'PI_VERSAO\''); | |
495 | - | |
496 | - } else if (trim($strVersaoPreviaModuloProtocoloIntegrado)==trim($this->versaoAtualDesteModulo)) { | |
497 | - $resultado["erro"] = "Erro instalando/atualizando Módulo Protocolo Integrado no SEI. Versão ".$strVersaoPreviaModuloProtocoloIntegrado." já instalada"; | |
498 | - return $resultado; | |
499 | - } | |
500 | - } | |
501 | - | |
502 | - private function instalarv113($strVersaoPreviaModuloProtocoloIntegrado){ | |
503 | - | |
504 | - | |
505 | - $objInfraMetaBD = new InfraMetaBD(BancoSEI::getInstance()); | |
506 | - $this->logar(' INICIANDO OPERACOES DA INSTALACAO DA VERSAO 1.1.3 DO MODULO PROTOCOLO INTEGRADO NA BASE DO SEI'); | |
507 | - | |
508 | - $erros = null; | |
509 | - $versao = '1.1.3'; | |
510 | - | |
511 | - $resultado = array(); | |
512 | - $resultado["operacoes"] = null; | |
513 | - $comandosExecutados = ''; | |
514 | - if(InfraString::isBolVazia($strVersaoPreviaModuloProtocoloIntegrado)){ | |
515 | - | |
516 | - //Criando a tabela de pacotes nos três bancos | |
517 | - BancoSEI::getInstance()->executarSql("CREATE TABLE md_pi_pacote_envio ( | |
518 | - id_md_pi_pacote_envio ".$objInfraMetaBD->tipoNumeroGrande()." NOT NULL, | |
519 | - id_protocolo ".$objInfraMetaBD->tipoNumeroGrande()." NOT NULL, | |
520 | - dth_metadados ".$objInfraMetaBD->tipoDataHora()." NULL, | |
521 | - dth_situacao ".$objInfraMetaBD->tipoDataHora()." NULL, | |
522 | - sta_integracao ".$objInfraMetaBD->tipoTextoFixo(2)." NOT NULL, | |
523 | - arquivo_metadados ".$objInfraMetaBD->tipoTextoGrande()." NULL, | |
524 | - arquivo_erro ".$objInfraMetaBD->tipoTextoGrande()." NULL, | |
525 | - num_tentativas_envio ".$objInfraMetaBD->tipoNumero()." DEFAULT '0', | |
526 | - dth_agendamento_executado ".$objInfraMetaBD->tipoDataHora()." NULL)"); | |
527 | - | |
528 | - $objInfraMetaBD->adicionarChavePrimaria('md_pi_pacote_envio','pk_id_md_pi_pacote_envio',array('id_md_pi_pacote_envio')); | |
529 | - | |
530 | - $objInfraMetaBD->adicionarChaveEstrangeira('fk_md_pacote_pi_protocolo','md_pi_pacote_envio',array('id_protocolo'),'protocolo',array('id_protocolo')); | |
531 | - | |
532 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
533 | - BancoSEI::getInstance()->executarSql('create table seq_md_pi_pacote_envio (id bigint not null primary key AUTO_INCREMENT, campo char(1) null) AUTO_INCREMENT = 1'); | |
534 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
535 | - BancoSEI::getInstance()->executarSql('create table seq_md_pi_pacote_envio (id bigint identity(1,1), campo char(1) null)'); | |
536 | - } else if (BancoSEI::getInstance() instanceof InfraOracle){ | |
537 | - BancoSEI::getInstance()->criarSequencialNativa('seq_md_pi_pacote_envio', 1); | |
538 | - } | |
539 | - | |
540 | - //Criando a tabela de monitoramento de processos nos três bancos | |
541 | - BancoSEI::getInstance()->executarSql("CREATE TABLE md_pi_monitora_processos ( | |
542 | - id_md_pi_monitora_processos ".$objInfraMetaBD->tipoNumeroGrande()." NOT NULL, | |
543 | - id_atividade ".$objInfraMetaBD->tipoNumero()." NOT NULL, | |
544 | - dth_cadastro ".$objInfraMetaBD->tipoDataHora()." NULL, | |
545 | - id_md_pi_pacote_envio ".$objInfraMetaBD->tipoNumeroGrande()." NOT NULL)"); | |
546 | - | |
547 | - /*$objInfraMetaBD->adicionarChavePrimaria('md_pi_monitora_processos','pk_id_md_pi_monitora_processos',array('id_md_pi_monitora_processos'));*/ | |
548 | - | |
549 | - $objInfraMetaBD->adicionarChaveEstrangeira('fk_md_pi_monit_processo_ativ','md_pi_monitora_processos',array('id_atividade'),'atividade',array('id_atividade')); | |
550 | - $objInfraMetaBD->adicionarChaveEstrangeira('fk_md_pi_monit_processo_pacote','md_pi_monitora_processos',array('id_md_pi_pacote_envio'),'md_pi_pacote_envio',array('id_md_pi_pacote_envio')); | |
551 | - | |
552 | - $objInfraMetaBD->criarIndice('md_pi_monitora_processos','i01_md_pi_monitora_processos',array('id_atividade')); | |
553 | - $objInfraMetaBD->criarIndice('md_pi_monitora_processos','i02_md_pi_monitora_processos',array('id_md_pi_pacote_envio')); | |
554 | - | |
555 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
556 | - BancoSEI::getInstance()->executarSql('create table seq_md_pi_monitora_processos (id bigint not null primary key AUTO_INCREMENT, campo char(1) null) AUTO_INCREMENT = 1'); | |
557 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
558 | - BancoSEI::getInstance()->executarSql('create table seq_md_pi_monitora_processos (id bigint identity(1,1), campo char(1) null)'); | |
559 | - } else if (BancoSEI::getInstance() instanceof InfraOracle){ | |
560 | - BancoSEI::getInstance()->criarSequencialNativa('seq_md_pi_monitora_processos', 1); | |
561 | - } | |
562 | - | |
563 | - //Criando a tabela de configuração de mensagens de publicação no Protocolo Integrado nos três bancos | |
564 | - BancoSEI::getInstance()->executarSql("CREATE TABLE md_pi_mensagem ( | |
565 | - id_md_pi_mensagem ".$objInfraMetaBD->tipoNumeroGrande()." NOT NULL, | |
566 | - id_tarefa ".$objInfraMetaBD->tipoNumero()." NULL, | |
567 | - sin_publicar ".$objInfraMetaBD->tipoTextoFixo(1)." NOT NULL, | |
568 | - mensagem_publicacao ".$objInfraMetaBD->tipoTextoVariavel(255)." NOT NULL)"); | |
569 | - | |
570 | - $objInfraMetaBD->adicionarChavePrimaria('md_pi_mensagem','pk_id_md_pi_mensagem',array('id_md_pi_mensagem')); | |
571 | - $objInfraMetaBD->adicionarChaveEstrangeira('fk_md_pi_mensagem_tarefa','md_pi_mensagem',array('id_tarefa'),'tarefa',array('id_tarefa')); | |
572 | - | |
573 | - $objInfraMetaBD->criarIndice('md_pi_mensagem','i01_md_pi_mensagem',array('id_tarefa')); | |
574 | - | |
575 | - //Criando a tabela de configuração de parâmetros do módulo nos três bancos | |
576 | - BancoSEI::getInstance()->executarSql("CREATE TABLE md_pi_parametros ( | |
577 | - id_md_pi_parametros ".$objInfraMetaBD->tipoNumeroGrande()." NOT NULL, | |
578 | - url_webservice ".$objInfraMetaBD->tipoTextoVariavel(255)." NOT NULL, | |
579 | - quantidade_tentativas ".$objInfraMetaBD->tipoNumero()." NOT NULL, | |
580 | - email_administrador ".$objInfraMetaBD->tipoTextoVariavel(255)." NULL, | |
581 | - dth_ultimo_processamento ".$objInfraMetaBD->tipoDataHora()." NULL, | |
582 | - login_webservice ".$objInfraMetaBD->tipoTextoVariavel(10)." NULL, | |
583 | - senha_webservice ".$objInfraMetaBD->tipoTextoVariavel(20)." NULL, | |
584 | - sin_executando_publicacao ".$objInfraMetaBD->tipoTextoFixo(1)." DEFAULT 'N', | |
585 | - sin_publicacao_restritos ".$objInfraMetaBD->tipoTextoFixo(1)." DEFAULT 'S', | |
586 | - num_atividades_carregar ".$objInfraMetaBD->tipoNumero()." NULL)"); | |
587 | - | |
588 | - $objInfraMetaBD->adicionarChavePrimaria('md_pi_parametros','pk_id_md_pi_parametros',array('id_md_pi_parametros')); | |
589 | - | |
590 | - //Inserindo as atividades que devem ser enviadas,por padrão,ao Protocolo Integrado | |
591 | - BancoSEI::getInstance()->executarSql("insert into md_pi_mensagem (id_md_pi_mensagem, id_tarefa,sin_publicar,mensagem_publicacao) select id_tarefa, id_tarefa,'N',nome from tarefa"); | |
592 | - | |
593 | - $objProtocoloIntegradoRN = new ProtocoloIntegradoRN(); | |
594 | - $tarefasPublicacao = $objProtocoloIntegradoRN->montaTarefasPadraoPublicacao(); | |
595 | - foreach($tarefasPublicacao as $key=>$value){ | |
596 | - | |
597 | - BancoSEI::getInstance()->executarSql("UPDATE md_pi_mensagem set sin_publicar = 'S' where id_tarefa = ".$value." "); | |
598 | - | |
599 | - } | |
600 | - BancoSEI::getInstance()->executarSql("INSERT INTO md_pi_parametros (id_md_pi_parametros,url_webservice,quantidade_tentativas,email_administrador, | |
601 | - login_webservice,senha_webservice,sin_executando_publicacao,sin_publicacao_restritos,num_atividades_carregar) VALUES (1,'https://protocolointegrado.gov.br/ProtocoloWS/integradorService?wsdl',15,'','','','N','S',100000)"); | |
602 | - | |
603 | - BancoSEI::getInstance()->executarSql('insert into infra_parametro(nome,valor) values(\'PI_VERSAO\', \''.$versao.'\')'); | |
604 | - | |
605 | - | |
606 | - | |
607 | - }else if(trim($strVersaoPreviaModuloProtocoloIntegrado)==$versao){ | |
608 | - | |
609 | - | |
610 | - $resultado["erro"] = "Erro instalando/atualizando Módulo Protocolo Integrado no SEI. Versão ".$strVersaoPreviaModuloProtocoloIntegrado." já instalada"; | |
611 | - return $resultado; | |
612 | - | |
613 | - }else if(trim($strVersaoPreviaModuloProtocoloIntegrado)=='1.1.2'){ | |
614 | - | |
615 | - $objProtocoloIntegradoBD = new ProtocoloIntegradoBD($this->getObjInfraIBanco()); | |
616 | - $chavesEstrangeirasProtocoloIntegrado = $objProtocoloIntegradoBD->recuperarChavesEstrangeirasv112(); | |
617 | - | |
618 | - foreach($chavesEstrangeirasProtocoloIntegrado as $key=>$arrChaveEstrangeiraProtocoloIntegrado){ | |
619 | - foreach($arrChaveEstrangeiraProtocoloIntegrado as $k=>$objChave){ | |
620 | - | |
621 | - $objInfraMetaBD->excluirChaveEstrangeira('protocolo_integrado',$objChave); | |
622 | - | |
623 | - } | |
624 | - } | |
625 | - | |
626 | - $objPacoteBD = new ProtocoloIntegradoPacoteEnvioBD($this->getObjInfraIBanco()); | |
627 | - $chavesEstrangeirasPacote = $objPacoteBD->recuperarChavesEstrangeirasv112(); | |
628 | - | |
629 | - foreach($chavesEstrangeirasPacote as $key=>$arrChaveEstrangeiraPacote){ | |
630 | - //$this->logar($chaveEstrangeiraPacote); | |
631 | - foreach($arrChaveEstrangeiraPacote as $k=>$objChave){ | |
632 | - | |
633 | - $objInfraMetaBD->excluirChaveEstrangeira('protocolo_integrado_pacote_envio',$objChave); | |
634 | - } | |
635 | - } | |
636 | - | |
637 | - $objProtocoloIntegradoMonitoramentoProcessosBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
638 | - $chavesEstrangeirasMonitoramentoProcessos = $objProtocoloIntegradoMonitoramentoProcessosBD->recuperarChavesEstrangeirasv112(); | |
639 | - | |
640 | - foreach($chavesEstrangeirasMonitoramentoProcessos as $key=>$arrChaveEstrangeiraMonitoramentoProcessos){ | |
641 | - | |
642 | - //$this->logar($chaveEstrangeiraPacote); | |
643 | - foreach($arrChaveEstrangeiraMonitoramentoProcessos as $k=>$objChave){ | |
644 | - | |
645 | - $objInfraMetaBD->excluirChaveEstrangeira('protocolo_integrado_monitoramento_processos',$objChave); | |
646 | - } | |
647 | - | |
648 | - } | |
649 | - | |
650 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
651 | - BancoSEI::getInstance()->executarSql('RENAME TABLE protocolo_integrado to md_pi_mensagem'); | |
652 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
653 | - BancoSEI::getInstance()->executarSql("EXEC sp_rename 'protocolo_integrado', 'md_pi_mensagem';"); | |
654 | - } | |
655 | - | |
656 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
657 | - BancoSEI::getInstance()->executarSql("Alter TABLE md_pi_mensagem CHANGE id_protocolo_integrado id_md_pi_mensagem BIGINT(20)"); | |
658 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
659 | - BancoSEI::getInstance()->executarSql("EXEC sp_RENAME 'md_pi_mensagem.id_protocolo_integrado' , 'id_md_pi_mensagem', 'COLUMN' "); | |
660 | - } | |
661 | - | |
662 | - /*$objInfraMetaBD->adicionarChavePrimaria('md_pi_mensagem','pk_id_md_pi_mensagem',array('id_md_pi_mensagem'));*/ | |
663 | - $objInfraMetaBD->adicionarChaveEstrangeira('fk_md_pi_mensagem_tarefa','md_pi_mensagem',array('id_tarefa'),'tarefa',array('id_tarefa')); | |
664 | - | |
665 | - $arrPacotesPrevios = array(); | |
666 | - $objPacoteBD = new ProtocoloIntegradoPacoteEnvioBD($this->getObjInfraIBanco()); | |
667 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
668 | - | |
669 | - | |
670 | - | |
671 | - BancoSEI::getInstance()->executarSql('RENAME TABLE protocolo_integrado_pacote_envio to md_pi_pacote_envio'); | |
672 | - | |
673 | - | |
674 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
675 | - | |
676 | - BancoSEI::getInstance()->executarSql("EXEC sp_rename 'protocolo_integrado_pacote_envio', 'md_pi_pacote_envio';"); | |
677 | - | |
678 | - $arrPacotesPrevios = $objPacoteBD->recuperarColunaTabelaPacote('id_protocolo_integrado_pacote_envio'); | |
679 | - | |
680 | - | |
681 | - } | |
682 | - | |
683 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
684 | - BancoSEI::getInstance()->executarSql("ALTER TABLE md_pi_pacote_envio CHANGE id_protocolo_integrado_pacote_envio id_md_pi_pacote_envio BIGINT(20)"); | |
685 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
686 | - | |
687 | - BancoSEI::getInstance()->executarSql("ALTER TABLE md_pi_pacote_envio add id_md_pi_pacote_envio bigint;"); | |
688 | - | |
689 | - BancoSEI::getInstance()->executarSql("update md_pi_pacote_envio set id_md_pi_pacote_envio=id_protocolo_integrado_pacote_envio"); | |
690 | - $nomeRestricaoChavePrimaria = $objPacoteBD->recuperarChavePrimaria(); | |
691 | - | |
692 | - BancoSEI::getInstance()->executarSql("ALTER TABLE md_pi_pacote_envio drop constraint ".$nomeRestricaoChavePrimaria."; "); | |
693 | - | |
694 | - BancoSEI::getInstance()->executarSql("ALTER TABLE md_pi_pacote_envio drop column id_protocolo_integrado_pacote_envio; "); | |
695 | - | |
696 | - BancoSEI::getInstance()->executarSql("ALTER TABLE md_pi_pacote_envio alter column id_md_pi_pacote_envio bigint not null; "); | |
697 | - | |
698 | - $objInfraMetaBD->adicionarChavePrimaria('md_pi_pacote_envio','pk_id_md_pi_pacote_envio',array('id_md_pi_pacote_envio')); | |
699 | - } | |
700 | - | |
701 | - | |
702 | - | |
703 | - $objInfraMetaBD->adicionarChaveEstrangeira('fk_md_pacote_pi_protocolo','md_pi_pacote_envio',array('id_protocolo'),'protocolo',array('id_protocolo')); | |
704 | - | |
705 | - | |
706 | - if(BancoSEI::getInstance() instanceof InfraSqlServer){ | |
707 | - | |
708 | - BancoSEI::getInstance()->executarSql("ALTER TABLE md_pi_pacote_envio ALTER COLUMN arquivo_metadados ".$objInfraMetaBD->tipoTextoGrande()." NULL"); | |
709 | - BancoSEI::getInstance()->executarSql("ALTER TABLE md_pi_pacote_envio ALTER COLUMN arquivo_erro ".$objInfraMetaBD->tipoTextoGrande()." NULL"); | |
710 | - } | |
711 | - | |
712 | - | |
713 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
714 | - BancoSEI::getInstance()->executarSql("RENAME TABLE protocolo_integrado_parametros to md_pi_parametros"); | |
715 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
716 | - BancoSEI::getInstance()->executarSql("EXEC sp_rename 'protocolo_integrado_parametros', 'md_pi_parametros';"); | |
717 | - } | |
718 | - | |
719 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
720 | - BancoSEI::getInstance()->executarSql("Alter TABLE md_pi_parametros CHANGE id_protocolo_integrado_parametros id_md_pi_parametros BIGINT(20)"); | |
721 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
722 | - BancoSEI::getInstance()->executarSql("EXEC sp_RENAME 'md_pi_parametros.id_protocolo_integrado_parametros' , 'id_md_pi_parametros', 'COLUMN' "); | |
723 | - } | |
724 | - | |
725 | - | |
726 | - $arrProcessosMonitoradosPrevios = array(); | |
727 | - $objMonitoramentoProcessosBD = new ProtocoloIntegradoMonitoramentoProcessosBD($this->getObjInfraIBanco()); | |
728 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
729 | - | |
730 | - BancoSEI::getInstance()->executarSql( "RENAME TABLE protocolo_integrado_monitoramento_processos to md_pi_monitora_processos"); | |
731 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
732 | - | |
733 | - | |
734 | - $arrProcessosMonitoradosPrevios = $objMonitoramentoProcessosBD->recuperarIdsTabelaMonitoramentov112(); | |
735 | - BancoSEI::getInstance()->executarSql("EXEC sp_rename 'protocolo_integrado_monitoramento_processos', 'md_pi_monitora_processos';"); | |
736 | - } | |
737 | - | |
738 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
739 | - BancoSEI::getInstance()->executarSql("Alter TABLE md_pi_monitora_processos CHANGE id_protocolo_integrado_monitoramento_processos id_md_pi_monitora_processos BIGINT(20)"); | |
740 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
741 | - | |
742 | - BancoSEI::getInstance()->executarSql("ALTER TABLE md_pi_monitora_processos add id_md_pi_monitora_processos bigint;"); | |
743 | - $objMonitoraProcessosRN = new ProtocoloIntegradoMonitoramentoProcessosRN(); | |
744 | - foreach($arrProcessosMonitoradosPrevios as $key=>$value){ | |
745 | - | |
746 | - BancoSEI::getInstance()->executarSql('update md_pi_monitora_processos set id_md_pi_monitora_processos=\''.$value->getNumIdProtocoloIntegradoMonitoramentoProcessos().'\' where id_protocolo_integrado_monitoramento_processos=\''.$value->getNumIdProtocoloIntegradoMonitoramentoProcessos().'\';'); | |
747 | - | |
748 | - } | |
749 | - $nomeRestricaoChavePrimaria = $objMonitoramentoProcessosBD->recuperarChavePrimaria(); | |
750 | - | |
751 | - BancoSEI::getInstance()->executarSql("ALTER TABLE md_pi_monitora_processos drop constraint ".$nomeRestricaoChavePrimaria."; "); | |
752 | - | |
753 | - BancoSEI::getInstance()->executarSql("ALTER TABLE md_pi_monitora_processos drop column id_protocolo_integrado_monitoramento_processos; "); | |
754 | - | |
755 | - BancoSEI::getInstance()->executarSql("ALTER TABLE md_pi_monitora_processos alter column id_md_pi_monitora_processos bigint not null; "); | |
756 | - | |
757 | - $objInfraMetaBD->adicionarChavePrimaria('md_pi_monitora_processos','pk_id_md_pi_monitora_processos',array('id_md_pi_monitora_processos')); | |
758 | - /* | |
759 | - BancoSEI::getInstance()->executarSql("EXEC sp_RENAME 'md_pi_monitora_processos.id_protocolo_integrado_monitoramento_processos' , 'id_md_pi_monitora_processos', 'COLUMN' ");*/ | |
760 | - } | |
761 | - | |
762 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
763 | - BancoSEI::getInstance()->executarSql("Alter TABLE md_pi_monitora_processos CHANGE id_protocolo_integrado_pacote_envio id_md_pi_pacote_envio BIGINT(20)"); | |
764 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
765 | - | |
766 | - | |
767 | - BancoSEI::getInstance()->executarSql("EXEC sp_RENAME 'md_pi_monitora_processos.id_protocolo_integrado_pacote_envio' , 'id_md_pi_pacote_envio', 'COLUMN' "); | |
768 | - } | |
769 | - | |
770 | - /*$objInfraMetaBD->adicionarChavePrimaria('md_pi_monitora_processos','pk_id_md_pi_monitora_processos',array('id_md_pi_monitora_processos'));*/ | |
771 | - | |
772 | - $objInfraMetaBD->adicionarChaveEstrangeira('fk_md_pi_monit_processo_ativ','md_pi_monitora_processos',array('id_atividade'),'atividade',array('id_atividade')); | |
773 | - $objInfraMetaBD->adicionarChaveEstrangeira('fk_md_pi_monit_processo_pacote','md_pi_monitora_processos',array('id_md_pi_pacote_envio'),'md_pi_pacote_envio',array('id_md_pi_pacote_envio')); | |
774 | - | |
775 | - $objInfraMetaBD->criarIndice('md_pi_monitora_processos','i01_md_pi_monitora_processos',array('id_atividade')); | |
776 | - $objInfraMetaBD->criarIndice('md_pi_monitora_processos','i02_md_pi_monitora_processos',array('id_md_pi_pacote_envio')); | |
777 | - | |
778 | - | |
779 | - $objProtocoloIntegradoPacoteRN = new ProtocoloIntegradoPacoteEnvioRN(); | |
780 | - $objProtocoloIntegradoPacoteDTO = new ProtocoloIntegradoPacoteEnvioDTO(); | |
781 | - $numPacotes = $objProtocoloIntegradoPacoteRN->contar($objProtocoloIntegradoPacoteDTO); | |
782 | - | |
783 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
784 | - BancoSEI::getInstance()->executarSql('create table seq_md_pi_pacote_envio (id bigint not null primary key AUTO_INCREMENT, campo char(1) null) AUTO_INCREMENT = '.($numPacotes+1)); | |
785 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
786 | - BancoSEI::getInstance()->executarSql('create table seq_md_pi_pacote_envio (id bigint identity('.($numPacotes+1).',1), campo char(1) null)'); | |
787 | - } else if (BancoSEI::getInstance() instanceof InfraOracle){ | |
788 | - BancoSEI::getInstance()->criarSequencialNativa('seq_md_pi_pacote_envio', ($numPacotes+1)); | |
789 | - } | |
790 | - | |
791 | - $objProtocoloIntegradoMonitoraProcessoRN = new ProtocoloIntegradoMonitoramentoProcessosRN(); | |
792 | - $objProtocoloIntegradoMonitoraProcessoDTO = new ProtocoloIntegradoMonitoramentoProcessosDTO(); | |
793 | - $numAtividadesPacotes = $objProtocoloIntegradoMonitoraProcessoRN->contar($objProtocoloIntegradoMonitoraProcessoDTO); | |
794 | - if (BancoSEI::getInstance() instanceof InfraMySql){ | |
795 | - BancoSEI::getInstance()->executarSql('create table seq_md_pi_monitora_processos (id bigint not null primary key AUTO_INCREMENT, campo char(1) null) AUTO_INCREMENT = '.($numAtividadesPacotes+1)); | |
796 | - } else if (BancoSEI::getInstance() instanceof InfraSqlServer){ | |
797 | - BancoSEI::getInstance()->executarSql('create table seq_md_pi_monitora_processos (id bigint identity('.($numAtividadesPacotes+1).',1), campo char(1) null)'); | |
798 | - } else if (BancoSEI::getInstance() instanceof InfraOracle){ | |
799 | - BancoSEI::getInstance()->criarSequencialNativa('seq_md_pi_monitora_processos', ($numAtividadesPacotes+1)); | |
800 | - } | |
801 | - | |
802 | - BancoSEI::getInstance()->executarSql('update infra_parametro set valor=\''.$versao.'\' where nome=\'PI_VERSAO\';'); | |
803 | - } else if(trim($strVersaoPreviaModuloProtocoloIntegrado)<'1.1.2') { | |
804 | - $resultado["erro"] = "Erro instalando/atualizando Módulo Protocolo Integrado no SEI. Versão ".$strVersaoPreviaModuloProtocoloIntegrado." não pode ser atualizada para versão ".$this->versaoAtualDesteModulo; | |
805 | - return $resultado; | |
806 | - } | |
807 | - | |
808 | - return $resultado; | |
809 | - | |
810 | - } | |
811 | - private function instalarv112($strVersaoInstaladaModuloProtocoloIntegrado){ | |
812 | - | |
813 | - $erros = null; | |
814 | - $comandosExecutados = ''; | |
815 | - $resultado = array(); | |
816 | - $resultado["operacoes"] = null; | |
817 | - | |
818 | - //Verifica se não possui módulo prévios cadastrados | |
819 | - if(InfraString::isBolVazia($strVersaoInstaladaModuloProtocoloIntegrado) || | |
820 | - intval($strVersaoInstaladaModuloProtocoloIntegrado)<=intval($this->versaoAtualDesteModulo)) { | |
821 | - | |
822 | - if (intval($strVersaoInstaladaModuloProtocoloIntegrado)==intval($this->versaoAtualDesteModulo)) { | |
823 | - $resultado["erro"] = "Erro instalando/atualizando Módulo Protocolo Integrado no SEI. Versão ".$strVersaoInstaladaModuloProtocoloIntegrado." já instalada"; | |
824 | - return $resultado; | |
825 | - } | |
826 | - | |
827 | - BancoSEI::getInstance()->executarSql("CREATE TABLE protocolo_integrado_pacote_envio (id_protocolo_integrado_pacote_envio bigint(20) NOT NULL AUTO_INCREMENT,id_protocolo bigint(20) NOT NULL, | |
828 | - dth_metadados datetime DEFAULT NULL,dth_situacao datetime DEFAULT NULL,sta_integracao char(2) NOT NULL,arquivo_metadados MEDIUMBLOB,arquivo_erro blob,num_tentativas_envio int(11) DEFAULT '0', | |
829 | - dth_agendamento_executado varchar(45) DEFAULT NULL,PRIMARY KEY (id_protocolo_integrado_pacote_envio),KEY fk_pacote_envio_protocolo_integrado_protocolo (id_protocolo), | |
830 | - CONSTRAINT fk_pacote_envio_protocolo_integrado_protocolo FOREIGN KEY (id_protocolo) REFERENCES protocolo (id_protocolo) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB;"); | |
831 | - | |
832 | - | |
833 | - BancoSEI::getInstance()->executarSql("CREATE TABLE protocolo_integrado_monitoramento_processos (id_protocolo_integrado_monitoramento_processos bigint(20) NOT NULL AUTO_INCREMENT, | |
834 | - id_atividade int(11) NOT NULL,dth_cadastro datetime DEFAULT NULL,id_protocolo_integrado_pacote_envio bigint(20) NOT NULL,PRIMARY KEY (id_protocolo_integrado_monitoramento_processos), | |
835 | - KEY id_atividade_idx (id_atividade),KEY fk_protocolo_integrado_monitoramento_processos_pacote (id_protocolo_integrado_pacote_envio), | |
836 | - CONSTRAINT fk_protocolo_integrado_monitoramento_processos_atividade FOREIGN KEY (id_atividade) REFERENCES atividade (id_atividade) ON DELETE CASCADE ON UPDATE CASCADE, | |
837 | - CONSTRAINT fk_protocolo_integrado_monitoramento_processos_pacote_envio FOREIGN KEY (id_protocolo_integrado_pacote_envio) | |
838 | - REFERENCES protocolo_integrado_pacote_envio (id_protocolo_integrado_pacote_envio) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB;"); | |
839 | - | |
840 | - | |
841 | - BancoSEI::getInstance()->executarSql("CREATE TABLE protocolo_integrado (id_protocolo_integrado bigint(20) NOT NULL AUTO_INCREMENT,id_tarefa int(11) DEFAULT NULL, | |
842 | - sin_publicar char(1) NOT NULL DEFAULT 'N',mensagem_publicacao varchar(255) NOT NULL,PRIMARY KEY (id_protocolo_integrado),KEY fk_protocolo_integrado_tarefa_idx (id_tarefa), | |
843 | - CONSTRAINT fk_protocolo_integrado_tarefa FOREIGN KEY (id_tarefa) REFERENCES tarefa (id_tarefa) ON DELETE CASCADE ON UPDATE CASCADE) ENGINE=InnoDB;"); | |
844 | - | |
845 | - | |
846 | - BancoSEI::getInstance()->executarSql("insert into protocolo_integrado (id_tarefa,sin_publicar,mensagem_publicacao) select id_tarefa,'N',nome from tarefa"); | |
847 | - | |
848 | - $objProtocoloIntegradoRN = new ProtocoloIntegradoRN(); | |
849 | - $tarefasPublicacao = $objProtocoloIntegradoRN->montaTarefasPadraoPublicacao(); | |
850 | - foreach ($tarefasPublicacao as $key=>$value) { | |
851 | - BancoSEI::getInstance()->executarSql("UPDATE protocolo_integrado SET sin_publicar='S' WHERE id_tarefa= ".$value." "); | |
852 | - } | |
853 | - | |
854 | - BancoSEI::getInstance()->executarSql("CREATE TABLE protocolo_integrado_parametros (id_protocolo_integrado_parametros bigint(20) NOT NULL AUTO_INCREMENT,url_webservice varchar(255) NOT NULL, | |
855 | - quantidade_tentativas int(11) NOT NULL,email_administrador varchar(255) NOT NULL,dth_ultimo_processamento datetime DEFAULT NULL,login_webservice varchar(10) DEFAULT NULL, | |
856 | - senha_webservice varchar(20) DEFAULT NULL,sin_executando_publicacao char(1) NOT NULL DEFAULT 'N',sin_publicacao_restritos char(1) NOT NULL DEFAULT 'S',num_atividades_carregar int(11) | |
857 | - DEFAULT NULL, PRIMARY KEY (id_protocolo_integrado_parametros)) ENGINE=InnoDB;"); | |
858 | - | |
859 | - $numCountElementos = BancoSEI::getInstance()->executarSql("select * from protocolo_integrado_parametros"); | |
860 | - if ($numCountElementos==0) { | |
861 | - BancoSEI::getInstance()->executarSql("INSERT INTO protocolo_integrado_parametros (id_protocolo_integrado_parametros,url_webservice,quantidade_tentativas,email_administrador, | |
862 | - login_webservice,senha_webservice,sin_executando_publicacao,sin_publicacao_restritos,num_atividades_carregar) VALUES (1,'https://protocolointegrado.gov.br/ProtocoloWS/integradorService?wsdl' | |
863 | - ,15,'','','','N','S',100000);"); | |
864 | - } | |
865 | - | |
866 | - $bolExiste = BancoSEI::getInstance()->executarSql('select * from infra_parametro where nome=\'PI_VERSAO\''); | |
867 | - if (InfraString::isBolVazia($strVersaoInstaladaModuloProtocoloIntegrado)) { | |
868 | - BancoSEI::getInstance()->executarSql('insert into infra_parametro(nome,valor) values(\'PI_VERSAO\', \''.$this->versaoAtualDesteModulo.'\')'); | |
869 | - } else { | |
870 | - BancoSEI::getInstance()->executarSql('update infra_parametro set valor=\''.$this->versaoAtualDesteModulo.'\' where nome=\'PI_VERSAO\';'); | |
871 | - } | |
872 | - | |
873 | - $numCountElementos = BancoSEI::getInstance()->executarSql("select * from infra_agendamento_tarefa where comando='ProtocoloIntegradoAgendamentoRN::publicarProtocoloIntegrado'"); | |
874 | - if ($numCountElementos==0){ | |
875 | - | |
876 | - $comando ="INSERT INTO infra_agendamento_tarefa (id_infra_agendamento_tarefa, descricao, comando, sta_periodicidade_execucao, periodicidade_complemento, sin_ativo,sin_sucesso) | |
877 | - VALUES ((select max(iat.id_infra_agendamento_tarefa)+1 from infra_agendamento_tarefa iat), 'Processo de Publicação do PI', 'ProtocoloIntegradoAgendamentoRN::publicarProtocoloIntegrado', | |
878 | - 'D', '2', 'S','N')"; | |
879 | - $comandosExecutados .= '<label>'.$comando . '</label>'.'<br/>'.'<br/>'; | |
880 | - | |
881 | - BancoSEI::getInstance()->executarSql($comando); | |
882 | - } | |
883 | - | |
884 | - $numCountElementos = BancoSEI::getInstance()->executarSql("select * from infra_agendamento_tarefa where comando='ProtocoloIntegradoAgendamentoRN::notificarNovosPacotesNaoSendoGerados'"); | |
885 | - if ($numCountElementos==0){ | |
886 | - $comando = "INSERT INTO infra_agendamento_tarefa (id_infra_agendamento_tarefa, descricao, comando, sta_periodicidade_execucao, periodicidade_complemento, | |
887 | - parametro, sin_ativo,sin_sucesso) VALUES ((select max(iat.id_infra_agendamento_tarefa)+1 from infra_agendamento_tarefa iat), 'Agendamento do alarme de e-mail disparado quando novos pacotes não | |
888 | - estão sendo gerados', 'ProtocoloIntegradoAgendamentoRN::notificarNovosPacotesNaoSendoGerados', 'D', '12', '2', 'S','N')"; | |
889 | - $comandosExecutados .= '<label>'.$comando . '</label>'.'<br/>'.'<br/>'; | |
890 | - | |
891 | - BancoSEI::getInstance()->executarSql($comando); | |
892 | - } | |
893 | - | |
894 | - $numCountElementos = BancoSEI::getInstance()->executarSql("select * from infra_agendamento_tarefa where comando='ProtocoloIntegradoAgendamentoRN::notificarProcessosComFalhaPublicacaoProtocoloIntegrado'"); | |
895 | - if ($numCountElementos==0){ | |
896 | - | |
897 | - $comando = "INSERT INTO infra_agendamento_tarefa (id_infra_agendamento_tarefa,descricao,comando,sta_periodicidade_execucao,periodicidade_complemento,sin_ativo,sin_sucesso) | |
898 | - VALUES ((select max(iat.id_infra_agendamento_tarefa)+1 from infra_agendamento_tarefa iat),'Agendamento do alarme de e-mail disparado quando há falha na publocação de pacotes', | |
899 | - 'ProtocoloIntegradoAgendamentoRN::notificarProcessosComFalhaPublicacaoProtocoloIntegrado','D','17','S','N')"; | |
900 | - $comandosExecutados .= '<label>'.$comando . '</label>'.'<br/>'.'<br/>'; | |
901 | - | |
902 | - BancoSEI::getInstance()->executarSql($comando); | |
903 | - } | |
904 | - $this->configurarSIP(); | |
905 | - | |
906 | - } | |
907 | - return $resultado; | |
908 | - } | |
909 | - private function getMaxIdAgendamento(){ | |
910 | - | |
911 | - $objAgendamentoDTO = new InfraAgendamentoTarefaDTO(); | |
912 | - $objAgendamentoRN = new InfraAgendamentoTarefaRN(); | |
913 | - $objAgendamentoDTO->retNumIdInfraAgendamentoTarefa(); | |
914 | - $numMaxIdAgendamento = 0; | |
915 | - | |
916 | - $objAgendamentoBD = new InfraAgendamentoTarefaBD(BancoSEI::getInstance()); | |
917 | - $objAgendamentoDTO->retNumIdInfraAgendamentoTarefa(); | |
918 | - $arrAgendamentos = $objAgendamentoBD->listar($objAgendamentoDTO); | |
919 | - foreach($arrAgendamentos as $key =>$value){ | |
920 | - | |
921 | - $idAgendamento = $value->getNumIdInfraAgendamentoTarefa(); | |
922 | - if($idAgendamento>$numMaxIdAgendamento){ | |
923 | - | |
924 | - $numMaxIdAgendamento = $idAgendamento; | |
925 | - } | |
926 | - } | |
927 | - return $numMaxIdAgendamento; | |
928 | - | |
929 | - | |
930 | - } | |
931 | - private function recuperaAgendamento($strComando){ | |
932 | - | |
933 | - $objAgendamentoDTO = new InfraAgendamentoTarefaDTO(); | |
934 | - $objAgendamentoDTO->retNumIdInfraAgendamentoTarefa(); | |
935 | - $objAgendamentoDTO->setStrComando($strComando); | |
936 | - $objAgendamentoDTO->setBolExclusaoLogica(false); | |
937 | - | |
938 | - $objAgendamentoRN = new InfraAgendamentoTarefaRN(); | |
939 | - $objAgendamentoBD = new InfraAgendamentoTarefaBD(BancoSEI::getInstance()); | |
940 | - $objAgendamentoDTO = $objAgendamentoBD->consultar($objAgendamentoDTO); | |
941 | - | |
942 | - return $objAgendamentoDTO; | |
943 | - | |
944 | - } | |
945 | - private function cadastrarAgendamento($objAgendamentoDTO){ | |
946 | - | |
947 | - $objAgendamentoRN = new InfraAgendamentoTarefaRN(); | |
948 | - $objAgendamentoBD = new InfraAgendamentoTarefaBD(BancoSEI::getInstance()); | |
949 | - $objAgendamentoDTO = $objAgendamentoBD->cadastrar($objAgendamentoDTO); | |
950 | - | |
951 | - return $objAgendamentoDTO; | |
952 | - | |
953 | - } | |
954 | - private function adicionarAgendamento($strComando, $strDescricao, $strPeriodicidadeExecucao,$strComplementoPeriodicidade,$strParametro=null){ | |
955 | - | |
956 | - $objAgendamentoDTO = $this->recuperaAgendamento($strComando); | |
957 | - if ($objAgendamentoDTO==null){ | |
958 | - | |
959 | - $objAgendamentoDTO = new InfraAgendamentoTarefaDTO(); | |
960 | - $objAgendamentoDTO->setNumIdInfraAgendamentoTarefa(null); | |
961 | - $objAgendamentoDTO->setStrComando($strComando); | |
962 | - $objAgendamentoDTO->setStrDescricao($strDescricao); | |
963 | - $objAgendamentoDTO->setStrStaPeriodicidadeExecucao($strPeriodicidadeExecucao); | |
964 | - $objAgendamentoDTO->setStrPeriodicidadeComplemento($strComplementoPeriodicidade); | |
965 | - if($strParametro==null){ | |
966 | - | |
967 | - $objAgendamentoDTO->setStrParametro(''); | |
968 | - | |
969 | - }else{ | |
970 | - | |
971 | - $objAgendamentoDTO->setStrParametro($strParametro); | |
972 | - } | |
973 | - $objAgendamentoDTO->setDthUltimaExecucao(null); | |
974 | - $objAgendamentoDTO->setDthUltimaConclusao(null); | |
975 | - $objAgendamentoDTO->setStrSinSucesso('N'); | |
976 | - $objAgendamentoDTO->setStrEmailErro(''); | |
977 | - | |
978 | - $objAgendamentoDTO->setStrSinAtivo('N'); | |
979 | - $objAgendamentoDTO = $this->cadastrarAgendamento($objAgendamentoDTO); | |
980 | - } | |
981 | - return $objAgendamentoDTO; | |
982 | - } | |
983 | - | |
984 | - | |
985 | - | |
986 | -} | |
987 | - | |
988 | -?> | |
989 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/rn/ProtocoloIntegradoVersaoSipRN.php
... | ... | @@ -1,634 +0,0 @@ |
1 | -<? | |
2 | - | |
3 | -require_once dirname(__FILE__).'/../../../../../../sip/web/Sip.php'; | |
4 | - | |
5 | - | |
6 | - | |
7 | -class ProtocoloIntegradoVersaoSipRN extends InfraRN { | |
8 | - | |
9 | - private $numSeg = 0; | |
10 | - private $versaoAtualDesteModulo = '2.0.0'; | |
11 | - private $nomeParametroModulo = 'PI_VERSAO'; | |
12 | - | |
13 | - public function __construct(){ | |
14 | - parent::__construct(); | |
15 | - $this->inicializar(' SIP - INICIALIZAR '); | |
16 | - } | |
17 | - | |
18 | - protected function inicializarObjInfraIBanco(){ | |
19 | - return BancoSip::getInstance(); | |
20 | - } | |
21 | - | |
22 | - private function inicializar($strTitulo){ | |
23 | - | |
24 | - ini_set('max_execution_time','0'); | |
25 | - ini_set('memory_limit','-1'); | |
26 | - | |
27 | - try { | |
28 | - @ini_set('zlib.output_compression','0'); | |
29 | - @ini_set('implicit_flush', '1'); | |
30 | - }catch(Exception $e){} | |
31 | - | |
32 | - ob_implicit_flush(); | |
33 | - | |
34 | - InfraDebug::getInstance()->setBolLigado(true); | |
35 | - InfraDebug::getInstance()->setBolDebugInfra(true); | |
36 | - InfraDebug::getInstance()->setBolEcho(true); | |
37 | - InfraDebug::getInstance()->limpar(); | |
38 | - | |
39 | - $this->numSeg = InfraUtil::verificarTempoProcessamento(); | |
40 | - | |
41 | - $this->logar($strTitulo); | |
42 | - } | |
43 | - | |
44 | - private function logar($strMsg){ | |
45 | - InfraDebug::getInstance()->gravar($strMsg); | |
46 | - flush(); | |
47 | - } | |
48 | - | |
49 | - private function finalizar($strMsg=null, $bolErro){ | |
50 | - | |
51 | - if (!$bolErro) { | |
52 | - $this->numSeg = InfraUtil::verificarTempoProcessamento($this->numSeg); | |
53 | - $this->logar('TEMPO TOTAL DE EXECUÇÃO: ' . $this->numSeg . ' s'); | |
54 | - }else{ | |
55 | - $strMsg = 'ERRO: '.$strMsg; | |
56 | - } | |
57 | - | |
58 | - if ($strMsg!=null){ | |
59 | - $this->logar($strMsg); | |
60 | - } | |
61 | - | |
62 | - InfraDebug::getInstance()->setBolLigado(false); | |
63 | - InfraDebug::getInstance()->setBolDebugInfra(false); | |
64 | - InfraDebug::getInstance()->setBolEcho(false); | |
65 | - $this->numSeg = 0; | |
66 | - die; | |
67 | - } | |
68 | - | |
69 | - private function instalarv200(){ | |
70 | - | |
71 | - $this->instalarv115(); | |
72 | - //Como não houve mudanças de banco no SIP desde a versão 1.1.5,apenas cria parâmetro PI_VERSAO com valor 2.0.0 | |
73 | - BancoSip::getInstance()->executarSql('insert into infra_parametro (valor, nome ) VALUES( \''. $this->versaoAtualDesteModulo .'\', \''. $this->nomeParametroModulo .'\' )' ); | |
74 | - $this->logar('ATUALIZAÇÔES DO MÓDULO PROTOCOLO INTEGRADO NA BASE DO SIP REALIZADAS COM SUCESSO'); | |
75 | - | |
76 | - | |
77 | - } | |
78 | - | |
79 | - private function instalarv115(){ | |
80 | - | |
81 | - $objSistemaRN = new SistemaRN(); | |
82 | - $objPerfilRN = new PerfilRN(); | |
83 | - $objMenuRN = new MenuRN(); | |
84 | - $objItemMenuRN = new ItemMenuRN(); | |
85 | - $objRecursoRN = new RecursoRN(); | |
86 | - | |
87 | - $objSistemaDTO = new SistemaDTO(); | |
88 | - $objSistemaDTO->retNumIdSistema(); | |
89 | - $objSistemaDTO->setStrSigla('SEI'); | |
90 | - | |
91 | - $objSistemaDTO = $objSistemaRN->consultar($objSistemaDTO); | |
92 | - | |
93 | - if ($objSistemaDTO == null){ | |
94 | - throw new InfraException('Sistema SEI não encontrado.'); | |
95 | - } | |
96 | - | |
97 | - $numIdSistemaSei = $objSistemaDTO->getNumIdSistema(); | |
98 | - | |
99 | - $objPerfilDTO = new PerfilDTO(); | |
100 | - $objPerfilDTO->retNumIdPerfil(); | |
101 | - $objPerfilDTO->setNumIdSistema($numIdSistemaSei); | |
102 | - $objPerfilDTO->setStrNome('Administrador'); | |
103 | - $objPerfilDTO = $objPerfilRN->consultar($objPerfilDTO); | |
104 | - | |
105 | - if ($objPerfilDTO == null){ | |
106 | - throw new InfraException('Perfil Administrador do sistema SEI não encontrado.'); | |
107 | - } | |
108 | - | |
109 | - $numIdPerfilSeiAdministrador = $objPerfilDTO->getNumIdPerfil(); | |
110 | - | |
111 | - | |
112 | - $objMenuDTO = new MenuDTO(); | |
113 | - $objMenuDTO->retNumIdMenu(); | |
114 | - $objMenuDTO->setNumIdSistema($numIdSistemaSei); | |
115 | - $objMenuDTO->setStrNome('Principal'); | |
116 | - $objMenuDTO = $objMenuRN->consultar($objMenuDTO); | |
117 | - | |
118 | - if ($objMenuDTO == null){ | |
119 | - throw new InfraException('Menu do sistema SEI não encontrado.'); | |
120 | - } | |
121 | - | |
122 | - $numIdMenuSei = $objMenuDTO->getNumIdMenu(); | |
123 | - | |
124 | - $objItemMenuDTO = new ItemMenuDTO(); | |
125 | - $objItemMenuDTO->retNumIdItemMenu(); | |
126 | - $objItemMenuDTO->setNumIdSistema($numIdSistemaSei); | |
127 | - $objItemMenuDTO->setStrRotulo('Administração'); | |
128 | - $objItemMenuDTO = $objItemMenuRN->consultar($objItemMenuDTO); | |
129 | - | |
130 | - if ($objItemMenuDTO == null){ | |
131 | - throw new InfraException('Item de menu Administração do sistema SEI não encontrado.'); | |
132 | - } | |
133 | - | |
134 | - $numIdItemMenuSeiAdministracao = $objItemMenuDTO->getNumIdItemMenu(); | |
135 | - | |
136 | - | |
137 | - //SEI //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | |
138 | - $this->logar('ATUALIZANDO RECURSOS, MENUS E PERFIS DO MÓDULO PROTOCOLO INTEGRADO NA BASE DO SIP...'); | |
139 | - | |
140 | - //criando os recursos e vinculando-os aos perfil Administrador | |
141 | - $objRecursoArquivoMetadadosDTO = $this->adicionarRecursoPerfil($numIdSistemaSei, $numIdPerfilSeiAdministrador, 'protocolo_integrado_acesso_arquivo_metadados'); | |
142 | - $objRecursoConfigurarParametrosDTO = $this->adicionarRecursoPerfil($numIdSistemaSei, $numIdPerfilSeiAdministrador, 'protocolo_integrado_configurar_parametros'); | |
143 | - $objRecursoConfiguracaoPublicacaoDTO = $this->adicionarRecursoPerfil($numIdSistemaSei, $numIdPerfilSeiAdministrador, 'protocolo_integrado_configurar_publicacao'); | |
144 | - $objRecursoForcarReenvioDTO = $this->adicionarRecursoPerfil($numIdSistemaSei, $numIdPerfilSeiAdministrador, 'protocolo_integrado_forcar_reenvio'); | |
145 | - $objRecursoMensagensAlterarDTO = $this->adicionarRecursoPerfil($numIdSistemaSei, $numIdPerfilSeiAdministrador, 'protocolo_integrado_mensagens_alterar'); | |
146 | - $objRecursoMensagensListarDTO = $this->adicionarRecursoPerfil($numIdSistemaSei, $numIdPerfilSeiAdministrador, 'protocolo_integrado_mensagens_listar'); | |
147 | - $objRecursoMonitoramentoDTO = $this->adicionarRecursoPerfil($numIdSistemaSei, $numIdPerfilSeiAdministrador, 'protocolo_integrado_monitoramento'); | |
148 | - | |
149 | - //criando Administração -> Administração do Módulo | |
150 | - $objItemMenuDTOControleProcesso = $this->adicionarItemMenu($numIdSistemaSei, $numIdPerfilSeiAdministrador, $numIdMenuSei, $numIdItemMenuSeiAdministracao, null, 'Protocolo Integrado', 0); | |
151 | - | |
152 | - //criando Protocolo Integrado -> Configuração de Mensagens | |
153 | - $this->adicionarItemMenu($numIdSistemaSei, | |
154 | - $numIdPerfilSeiAdministrador, | |
155 | - $numIdMenuSei, | |
156 | - $objItemMenuDTOControleProcesso->getNumIdItemMenu() , | |
157 | - $objRecursoMensagensListarDTO->getNumIdRecurso(), | |
158 | - 'Configuração das mensagens', | |
159 | - 20); | |
160 | - | |
161 | - //criando Protocolo Integrado -> Configuração de Parâmetros | |
162 | - $this->adicionarItemMenu($numIdSistemaSei, | |
163 | - $numIdPerfilSeiAdministrador, | |
164 | - $numIdMenuSei, | |
165 | - $objItemMenuDTOControleProcesso->getNumIdItemMenu() , | |
166 | - $objRecursoConfigurarParametrosDTO->getNumIdRecurso(), | |
167 | - 'Parâmetros', | |
168 | - 20); | |
169 | - | |
170 | - $this->adicionarItemMenu($numIdSistemaSei, | |
171 | - $numIdPerfilSeiAdministrador, | |
172 | - $numIdMenuSei, | |
173 | - $objItemMenuDTOControleProcesso->getNumIdItemMenu() , | |
174 | - $objRecursoMonitoramentoDTO->getNumIdRecurso(), | |
175 | - 'Monitoramento', | |
176 | - 20); | |
177 | - | |
178 | - //$this->removerRecursoPerfil($numIdSistemaSei, $numIdPerfilSeiInformatica, 'atributo_consultar'); | |
179 | - | |
180 | - //$this->adicionarRecursoPerfil($numIdSistemaSei,$numIdPerfilSeiAdministrador,'usuario_alterar'); | |
181 | - | |
182 | - //$this->removerRecurso($numIdSistemaSei,'rel_unidade_serie_alterar'); | |
183 | - | |
184 | - $objRegraAuditoriaDTO = new RegraAuditoriaDTO(); | |
185 | - $objRegraAuditoriaDTO->retNumIdRegraAuditoria(); | |
186 | - $objRegraAuditoriaDTO->setNumIdSistema($numIdSistemaSei); | |
187 | - $objRegraAuditoriaDTO->setStrDescricao('Geral'); | |
188 | - | |
189 | - $objRegraAuditoriaRN = new RegraAuditoriaRN(); | |
190 | - $objRegraAuditoriaDTO = $objRegraAuditoriaRN->consultar($objRegraAuditoriaDTO); | |
191 | - | |
192 | - $rs = BancoSip::getInstance()->consultarSql('select id_recurso from recurso where id_sistema='.$numIdSistemaSei.' and nome in ( | |
193 | - \'protocolo_integrado_acesso_arquivo_metadados\', | |
194 | - \'protocolo_integrado_configurar_parametros\', | |
195 | - \'protocolo_integrado_configurar_publicacao\', | |
196 | - \'protocolo_integrado_mensagens_alterar\', | |
197 | - \'protocolo_integrado_mensagens_listar\', | |
198 | - \'protocolo_integrado_monitoramento\' )' | |
199 | - ); | |
200 | - | |
201 | - | |
202 | - //CRIANDO REGRA DE AUDITORIA PARA NOVOS RECURSOS RECEM ADICIONADOS | |
203 | - foreach($rs as $recurso){ | |
204 | - BancoSip::getInstance()->executarSql('insert into rel_regra_auditoria_recurso (id_regra_auditoria, id_sistema, id_recurso) values ('.$objRegraAuditoriaDTO->getNumIdRegraAuditoria().', '.$numIdSistemaSei.', '.$recurso['id_recurso'].')'); | |
205 | - } | |
206 | - | |
207 | - $objReplicacaoRegraAuditoriaDTO = new ReplicacaoRegraAuditoriaDTO(); | |
208 | - $objReplicacaoRegraAuditoriaDTO->setStrStaOperacao('A'); | |
209 | - $objReplicacaoRegraAuditoriaDTO->setNumIdRegraAuditoria($objRegraAuditoriaDTO->getNumIdRegraAuditoria()); | |
210 | - | |
211 | - $objSistemaRN = new SistemaRN(); | |
212 | - $objSistemaRN->replicarRegraAuditoria($objReplicacaoRegraAuditoriaDTO); | |
213 | - | |
214 | - } | |
215 | - | |
216 | - | |
217 | - protected function atualizarVersaoConectado(){ | |
218 | - | |
219 | - try{ | |
220 | - | |
221 | - //checando BDs suportados | |
222 | - if (!(BancoSip::getInstance() instanceof InfraMySql) && | |
223 | - !(BancoSip::getInstance() instanceof InfraSqlServer) && | |
224 | - !(BancoSip::getInstance() instanceof InfraOracle)){ | |
225 | - $this->finalizar('BANCO DE DADOS NAO SUPORTADO: '.get_parent_class(BancoSip::getInstance()),true); | |
226 | - } | |
227 | - | |
228 | - //checando permissoes na base de dados | |
229 | - $objInfraMetaBD = new InfraMetaBD(BancoSip::getInstance()); | |
230 | - | |
231 | - /*if (count($objInfraMetaBD->obterTabelas('sip_teste'))==0){ | |
232 | - BancoSip::getInstance()->executarSql('CREATE TABLE sip_teste (id '.$objInfraMetaBD->tipoNumero().' null)'); | |
233 | - } | |
234 | - | |
235 | - BancoSip::getInstance()->executarSql('DROP TABLE sip_teste');*/ | |
236 | - | |
237 | - //checando qual versao instalar | |
238 | - $objInfraParametro = new InfraParametro(BancoSip::getInstance()); | |
239 | - | |
240 | - $strVersaoModuloPI = $objInfraParametro->getValor($this->nomeParametroModulo, false); | |
241 | - | |
242 | - if (InfraString::isBolVazia($strVersaoModuloPI)){ | |
243 | - | |
244 | - $numMaxIdRecurso = $this->getMaxIdRecurso(); | |
245 | - $numMaxIdItemMenu = $this->getMaxIdItemMenu(); | |
246 | - | |
247 | - $this->atualizaSequenciaTabela('recurso',$numMaxIdRecurso); | |
248 | - $this->atualizaSequenciaTabela('item_menu',$numMaxIdItemMenu); | |
249 | - //aplica instalação da versão 2.0.0 | |
250 | - $this->instalarv200(); | |
251 | - | |
252 | - | |
253 | - }else if($strVersaoModuloPI=='1.1.5') { | |
254 | - | |
255 | - BancoSip::getInstance()->executarSql('update infra_parametro set valor=\''.$this->versaoAtualDesteModulo.'\' where nome=\''.$this->nomeParametroModulo.'\''); | |
256 | - $this->logar('ATUALIZAÇÔES DO MÓDULO PROTOCOLO INTEGRADO NA BASE DO SIP REALIZADAS COM SUCESSO'); | |
257 | - }else if($strVersaoModuloPI==$this->versaoAtualDesteModulo){ | |
258 | - | |
259 | - $this->finalizar('Erro instalando/atualizando Módulo Protocolo Integrado no SIP.Versão '.$strVersaoModuloPI.' já instalada',false); | |
260 | - }else{ | |
261 | - | |
262 | - $this->finalizar('Erro instalando/atualizando Módulo Protocolo Integrado no SIP.Versão do módulo'.$this->versaoAtualDesteModulo.' inválida',false); | |
263 | - | |
264 | - | |
265 | - } | |
266 | - //BancoSip::getInstance()->executarSql('update infra_parametro set valor=\''.SIP_VERSAO.'\' where nome=\'SIP_VERSAO\''); | |
267 | - //$this->logar("SIP - FIM"); | |
268 | - //$this->finalizar('Versão '.$strVersaoModuloPI.' já instalada',false); | |
269 | - | |
270 | - } catch(Exception $e){ | |
271 | - | |
272 | - InfraDebug::getInstance()->setBolLigado(false); | |
273 | - InfraDebug::getInstance()->setBolDebugInfra(false); | |
274 | - InfraDebug::getInstance()->setBolEcho(false); | |
275 | - throw new InfraException('Erro atualizando versão.', $e); | |
276 | - | |
277 | - } | |
278 | - | |
279 | - } | |
280 | - private function getMaxIdRecurso(){ | |
281 | - | |
282 | - $objRecursoDTO = new RecursoDTO(); | |
283 | - $objRecursoRN = new RecursoRN(); | |
284 | - $objRecursoDTO->retNumIdRecurso(); | |
285 | - $numMaxIdRecurso = 0; | |
286 | - | |
287 | - $arrRecursos = $objRecursoRN->listar($objRecursoDTO); | |
288 | - foreach($arrRecursos as $key =>$value){ | |
289 | - | |
290 | - $idRecurso = $value->getNumIdRecurso(); | |
291 | - if($idRecurso>$numMaxIdRecurso){ | |
292 | - | |
293 | - $numMaxIdRecurso = $idRecurso; | |
294 | - } | |
295 | - } | |
296 | - return $numMaxIdRecurso; | |
297 | - | |
298 | - } | |
299 | - private function getMaxIdItemMenu(){ | |
300 | - | |
301 | - $objItemMenuDTO = new ItemMenuDTO(); | |
302 | - $objItemMenuRN = new ItemMenuRN(); | |
303 | - $objItemMenuDTO->retNumIdItemMenu(); | |
304 | - $numMaxIdItemMenu = 0; | |
305 | - | |
306 | - $arrItemMenu = $objItemMenuRN->listar($objItemMenuDTO); | |
307 | - foreach($arrItemMenu as $key =>$value){ | |
308 | - | |
309 | - $idItemMenu = $value->getNumIdItemMenu(); | |
310 | - if($idItemMenu>$numMaxIdItemMenu){ | |
311 | - | |
312 | - $numMaxIdItemMenu = $idItemMenu; | |
313 | - } | |
314 | - } | |
315 | - return $numMaxIdItemMenu; | |
316 | - | |
317 | - } | |
318 | - private function atualizaSequenciaTabela($strNomeTabela,$numMaxIdTabela){ | |
319 | - | |
320 | - | |
321 | - $objInfraSequencia = new InfraSequencia(BancoSEI::getInstance()); | |
322 | - $objInfraSequenciaBD = new InfraSequenciaBD(BancoSip::getInstance()); | |
323 | - $objInfraSequenciaDTO = new InfraSequenciaDTO(); | |
324 | - $objInfraSequenciaDTO->setStrNome($strNomeTabela); | |
325 | - $objInfraSequenciaDTO->retDblNumAtual(); | |
326 | - $objInfraSequencia = $objInfraSequenciaBD->consultar($objInfraSequenciaDTO); | |
327 | - $numProximoValorSequencia = $objInfraSequencia->getDblNumAtual(); | |
328 | - | |
329 | - if($numProximoValorSequencia<$numMaxIdTabela){ | |
330 | - | |
331 | - | |
332 | - $objInfraSequenciaDTO = new InfraSequenciaDTO(); | |
333 | - | |
334 | - $objInfraSequenciaDTO->setDblNumAtual($numMaxIdTabela); | |
335 | - $objInfraSequenciaDTO->setStrNome($strNomeTabela); | |
336 | - $objInfraSequenciaBD->alterar($objInfraSequenciaDTO); | |
337 | - | |
338 | - } | |
339 | - } | |
340 | - | |
341 | - private function adicionarRecursoPerfil($numIdSistema, $numIdPerfil, $strNome, $strCaminho = null){ | |
342 | - | |
343 | - $objRecursoDTO = new RecursoDTO(); | |
344 | - $objRecursoDTO->retNumIdRecurso(); | |
345 | - $objRecursoDTO->setNumIdSistema($numIdSistema); | |
346 | - $objRecursoDTO->setStrNome($strNome); | |
347 | - | |
348 | - $objRecursoRN = new RecursoRN(); | |
349 | - $objRecursoDTO = $objRecursoRN->consultar($objRecursoDTO); | |
350 | - | |
351 | - if ($objRecursoDTO==null){ | |
352 | - | |
353 | - $objRecursoDTO = new RecursoDTO(); | |
354 | - $objRecursoDTO->setNumIdRecurso(null); | |
355 | - $objRecursoDTO->setNumIdSistema($numIdSistema); | |
356 | - $objRecursoDTO->setStrNome($strNome); | |
357 | - $objRecursoDTO->setStrDescricao(null); | |
358 | - | |
359 | - if ($strCaminho == null){ | |
360 | - $objRecursoDTO->setStrCaminho('controlador.php?acao='.$strNome); | |
361 | - }else{ | |
362 | - $objRecursoDTO->setStrCaminho($strCaminho); | |
363 | - } | |
364 | - | |
365 | - $objRecursoDTO->setStrSinAtivo('S'); | |
366 | - $objRecursoDTO = $objRecursoRN->cadastrar($objRecursoDTO); | |
367 | - } | |
368 | - | |
369 | - if ($numIdPerfil!=null){ | |
370 | - $objRelPerfilRecursoDTO = new RelPerfilRecursoDTO(); | |
371 | - $objRelPerfilRecursoDTO->setNumIdSistema($numIdSistema); | |
372 | - $objRelPerfilRecursoDTO->setNumIdPerfil($numIdPerfil); | |
373 | - $objRelPerfilRecursoDTO->setNumIdRecurso($objRecursoDTO->getNumIdRecurso()); | |
374 | - | |
375 | - $objRelPerfilRecursoRN = new RelPerfilRecursoRN(); | |
376 | - | |
377 | - if ($objRelPerfilRecursoRN->contar($objRelPerfilRecursoDTO)==0){ | |
378 | - $objRelPerfilRecursoRN->cadastrar($objRelPerfilRecursoDTO); | |
379 | - } | |
380 | - } | |
381 | - | |
382 | - return $objRecursoDTO; | |
383 | - } | |
384 | - | |
385 | - private function removerRecursoPerfil($numIdSistema, $strNome, $numIdPerfil){ | |
386 | - | |
387 | - $objRecursoDTO = new RecursoDTO(); | |
388 | - $objRecursoDTO->setBolExclusaoLogica(false); | |
389 | - $objRecursoDTO->retNumIdRecurso(); | |
390 | - $objRecursoDTO->setNumIdSistema($numIdSistema); | |
391 | - $objRecursoDTO->setStrNome($strNome); | |
392 | - | |
393 | - $objRecursoRN = new RecursoRN(); | |
394 | - $objRecursoDTO = $objRecursoRN->consultar($objRecursoDTO); | |
395 | - | |
396 | - if ($objRecursoDTO!=null){ | |
397 | - $objRelPerfilRecursoDTO = new RelPerfilRecursoDTO(); | |
398 | - $objRelPerfilRecursoDTO->retTodos(); | |
399 | - $objRelPerfilRecursoDTO->setNumIdSistema($numIdSistema); | |
400 | - $objRelPerfilRecursoDTO->setNumIdRecurso($objRecursoDTO->getNumIdRecurso()); | |
401 | - $objRelPerfilRecursoDTO->setNumIdPerfil($numIdPerfil); | |
402 | - | |
403 | - $objRelPerfilRecursoRN = new RelPerfilRecursoRN(); | |
404 | - $objRelPerfilRecursoRN->excluir($objRelPerfilRecursoRN->listar($objRelPerfilRecursoDTO)); | |
405 | - | |
406 | - $objRelPerfilItemMenuDTO = new RelPerfilItemMenuDTO(); | |
407 | - $objRelPerfilItemMenuDTO->retTodos(); | |
408 | - $objRelPerfilItemMenuDTO->setNumIdSistema($numIdSistema); | |
409 | - $objRelPerfilItemMenuDTO->setNumIdRecurso($objRecursoDTO->getNumIdRecurso()); | |
410 | - $objRelPerfilItemMenuDTO->setNumIdPerfil($numIdPerfil); | |
411 | - | |
412 | - $objRelPerfilItemMenuRN = new RelPerfilItemMenuRN(); | |
413 | - $objRelPerfilItemMenuRN->excluir($objRelPerfilItemMenuRN->listar($objRelPerfilItemMenuDTO)); | |
414 | - } | |
415 | - } | |
416 | - | |
417 | - private function desativarRecurso($numIdSistema, $strNome){ | |
418 | - $objRecursoDTO = new RecursoDTO(); | |
419 | - $objRecursoDTO->retNumIdRecurso(); | |
420 | - $objRecursoDTO->setNumIdSistema($numIdSistema); | |
421 | - $objRecursoDTO->setStrNome($strNome); | |
422 | - | |
423 | - $objRecursoRN = new RecursoRN(); | |
424 | - $objRecursoDTO = $objRecursoRN->consultar($objRecursoDTO); | |
425 | - | |
426 | - if ($objRecursoDTO!=null){ | |
427 | - $objRecursoRN->desativar(array($objRecursoDTO)); | |
428 | - } | |
429 | - } | |
430 | - | |
431 | - private function removerRecurso($numIdSistema, $strNome){ | |
432 | - | |
433 | - $objRecursoDTO = new RecursoDTO(); | |
434 | - $objRecursoDTO->setBolExclusaoLogica(false); | |
435 | - $objRecursoDTO->retNumIdRecurso(); | |
436 | - $objRecursoDTO->setNumIdSistema($numIdSistema); | |
437 | - $objRecursoDTO->setStrNome($strNome); | |
438 | - | |
439 | - $objRecursoRN = new RecursoRN(); | |
440 | - $objRecursoDTO = $objRecursoRN->consultar($objRecursoDTO); | |
441 | - | |
442 | - if ($objRecursoDTO!=null){ | |
443 | - $objRelPerfilRecursoDTO = new RelPerfilRecursoDTO(); | |
444 | - $objRelPerfilRecursoDTO->retTodos(); | |
445 | - $objRelPerfilRecursoDTO->setNumIdSistema($numIdSistema); | |
446 | - $objRelPerfilRecursoDTO->setNumIdRecurso($objRecursoDTO->getNumIdRecurso()); | |
447 | - | |
448 | - $objRelPerfilRecursoRN = new RelPerfilRecursoRN(); | |
449 | - $objRelPerfilRecursoRN->excluir($objRelPerfilRecursoRN->listar($objRelPerfilRecursoDTO)); | |
450 | - | |
451 | - $objItemMenuDTO = new ItemMenuDTO(); | |
452 | - $objItemMenuDTO->retNumIdMenu(); | |
453 | - $objItemMenuDTO->retNumIdItemMenu(); | |
454 | - $objItemMenuDTO->setNumIdSistema($numIdSistema); | |
455 | - $objItemMenuDTO->setNumIdRecurso($objRecursoDTO->getNumIdRecurso()); | |
456 | - | |
457 | - $objItemMenuRN = new ItemMenuRN(); | |
458 | - $arrObjItemMenuDTO = $objItemMenuRN->listar($objItemMenuDTO); | |
459 | - | |
460 | - $objRelPerfilItemMenuRN = new RelPerfilItemMenuRN(); | |
461 | - | |
462 | - foreach($arrObjItemMenuDTO as $objItemMenuDTO){ | |
463 | - $objRelPerfilItemMenuDTO = new RelPerfilItemMenuDTO(); | |
464 | - $objRelPerfilItemMenuDTO->retTodos(); | |
465 | - $objRelPerfilItemMenuDTO->setNumIdSistema($numIdSistema); | |
466 | - $objRelPerfilItemMenuDTO->setNumIdItemMenu($objItemMenuDTO->getNumIdItemMenu()); | |
467 | - | |
468 | - $objRelPerfilItemMenuRN->excluir($objRelPerfilItemMenuRN->listar($objRelPerfilItemMenuDTO)); | |
469 | - } | |
470 | - | |
471 | - $objItemMenuRN->excluir($arrObjItemMenuDTO); | |
472 | - $objRecursoRN->excluir(array($objRecursoDTO)); | |
473 | - } | |
474 | - } | |
475 | - | |
476 | - private function adicionarItemMenu($numIdSistema, $numIdPerfil, $numIdMenu, $numIdItemMenuPai, $numIdRecurso, $strRotulo, $numSequencia ){ | |
477 | - | |
478 | - $objItemMenuDTO = new ItemMenuDTO(); | |
479 | - $objItemMenuDTO->retNumIdItemMenu(); | |
480 | - $objItemMenuDTO->setNumIdMenu($numIdMenu); | |
481 | - | |
482 | - if ($numIdItemMenuPai==null){ | |
483 | - $objItemMenuDTO->setNumIdMenuPai(null); | |
484 | - $objItemMenuDTO->setNumIdItemMenuPai(null); | |
485 | - }else{ | |
486 | - $objItemMenuDTO->setNumIdMenuPai($numIdMenu); | |
487 | - $objItemMenuDTO->setNumIdItemMenuPai($numIdItemMenuPai); | |
488 | - } | |
489 | - | |
490 | - $objItemMenuDTO->setNumIdSistema($numIdSistema); | |
491 | - $objItemMenuDTO->setNumIdRecurso($numIdRecurso); | |
492 | - if($numIdRecurso==null){ | |
493 | - | |
494 | - $objItemMenuDTO->setStrRotulo($strRotulo); | |
495 | - } | |
496 | - $objItemMenuRN = new ItemMenuRN(); | |
497 | - $objItemMenuDTO = $objItemMenuRN->consultar($objItemMenuDTO); | |
498 | - | |
499 | - if ($objItemMenuDTO==null){ | |
500 | - | |
501 | - $objItemMenuDTO = new ItemMenuDTO(); | |
502 | - $objItemMenuDTO->setNumIdItemMenu(null); | |
503 | - $objItemMenuDTO->setNumIdMenu($numIdMenu); | |
504 | - | |
505 | - if ($numIdItemMenuPai==null){ | |
506 | - $objItemMenuDTO->setNumIdMenuPai(null); | |
507 | - $objItemMenuDTO->setNumIdItemMenuPai(null); | |
508 | - }else{ | |
509 | - $objItemMenuDTO->setNumIdMenuPai($numIdMenu); | |
510 | - $objItemMenuDTO->setNumIdItemMenuPai($numIdItemMenuPai); | |
511 | - } | |
512 | - | |
513 | - $objItemMenuDTO->setNumIdSistema($numIdSistema); | |
514 | - $objItemMenuDTO->setNumIdRecurso($numIdRecurso); | |
515 | - $objItemMenuDTO->setStrRotulo($strRotulo); | |
516 | - $objItemMenuDTO->setStrDescricao(null); | |
517 | - $objItemMenuDTO->setNumSequencia($numSequencia); | |
518 | - $objItemMenuDTO->setStrSinNovaJanela('N'); | |
519 | - $objItemMenuDTO->setStrSinAtivo('S'); | |
520 | - $objItemMenuDTO = $objItemMenuRN->cadastrar($objItemMenuDTO); | |
521 | - } | |
522 | - | |
523 | - | |
524 | - if ($numIdPerfil!=null && $numIdRecurso!=null){ | |
525 | - | |
526 | - $objRelPerfilRecursoDTO = new RelPerfilRecursoDTO(); | |
527 | - $objRelPerfilRecursoDTO->setNumIdSistema($numIdSistema); | |
528 | - $objRelPerfilRecursoDTO->setNumIdPerfil($numIdPerfil); | |
529 | - $objRelPerfilRecursoDTO->setNumIdRecurso($numIdRecurso); | |
530 | - | |
531 | - $objRelPerfilRecursoRN = new RelPerfilRecursoRN(); | |
532 | - | |
533 | - if ($objRelPerfilRecursoRN->contar($objRelPerfilRecursoDTO)==0){ | |
534 | - $objRelPerfilRecursoRN->cadastrar($objRelPerfilRecursoDTO); | |
535 | - } | |
536 | - | |
537 | - $objRelPerfilItemMenuDTO = new RelPerfilItemMenuDTO(); | |
538 | - $objRelPerfilItemMenuDTO->setNumIdPerfil($numIdPerfil); | |
539 | - $objRelPerfilItemMenuDTO->setNumIdSistema($numIdSistema); | |
540 | - $objRelPerfilItemMenuDTO->setNumIdRecurso($numIdRecurso); | |
541 | - $objRelPerfilItemMenuDTO->setNumIdMenu($numIdMenu); | |
542 | - $objRelPerfilItemMenuDTO->setNumIdItemMenu($objItemMenuDTO->getNumIdItemMenu()); | |
543 | - | |
544 | - $objRelPerfilItemMenuRN = new RelPerfilItemMenuRN(); | |
545 | - | |
546 | - if ($objRelPerfilItemMenuRN->contar($objRelPerfilItemMenuDTO)==0){ | |
547 | - $objRelPerfilItemMenuRN->cadastrar($objRelPerfilItemMenuDTO); | |
548 | - } | |
549 | - } | |
550 | - | |
551 | - return $objItemMenuDTO; | |
552 | - } | |
553 | - | |
554 | - private function removerItemMenu($numIdSistema, $numIdMenu, $numIdItemMenu){ | |
555 | - | |
556 | - $objItemMenuDTO = new ItemMenuDTO(); | |
557 | - $objItemMenuDTO->retNumIdMenu(); | |
558 | - $objItemMenuDTO->retNumIdItemMenu(); | |
559 | - $objItemMenuDTO->setNumIdSistema($numIdSistema); | |
560 | - $objItemMenuDTO->setNumIdMenu($numIdMenu); | |
561 | - $objItemMenuDTO->setNumIdItemMenu($numIdItemMenu); | |
562 | - | |
563 | - $objItemMenuRN = new ItemMenuRN(); | |
564 | - $objItemMenuDTO = $objItemMenuRN->consultar($objItemMenuDTO); | |
565 | - | |
566 | - if ($objItemMenuDTO!=null) { | |
567 | - | |
568 | - $objRelPerfilItemMenuDTO = new RelPerfilItemMenuDTO(); | |
569 | - $objRelPerfilItemMenuDTO->retTodos(); | |
570 | - $objRelPerfilItemMenuDTO->setNumIdSistema($numIdSistema); | |
571 | - $objRelPerfilItemMenuDTO->setNumIdMenu($objItemMenuDTO->getNumIdMenu()); | |
572 | - $objRelPerfilItemMenuDTO->setNumIdItemMenu($objItemMenuDTO->getNumIdItemMenu()); | |
573 | - | |
574 | - $objRelPerfilItemMenuRN = new RelPerfilItemMenuRN(); | |
575 | - $objRelPerfilItemMenuRN->excluir($objRelPerfilItemMenuRN->listar($objRelPerfilItemMenuDTO)); | |
576 | - | |
577 | - $objItemMenuRN->excluir(array($objItemMenuDTO)); | |
578 | - } | |
579 | - } | |
580 | - | |
581 | - private function removerPerfil($numIdSistema, $strNome){ | |
582 | - | |
583 | - $objPerfilDTO = new PerfilDTO(); | |
584 | - $objPerfilDTO->retNumIdPerfil(); | |
585 | - $objPerfilDTO->setNumIdSistema($numIdSistema); | |
586 | - $objPerfilDTO->setStrNome($strNome); | |
587 | - | |
588 | - $objPerfilRN = new PerfilRN(); | |
589 | - $objPerfilDTO = $objPerfilRN->consultar($objPerfilDTO); | |
590 | - | |
591 | - if ($objPerfilDTO!=null){ | |
592 | - | |
593 | - $objPermissaoDTO = new PermissaoDTO(); | |
594 | - $objPermissaoDTO->retNumIdSistema(); | |
595 | - $objPermissaoDTO->retNumIdUsuario(); | |
596 | - $objPermissaoDTO->retNumIdPerfil(); | |
597 | - $objPermissaoDTO->retNumIdUnidade(); | |
598 | - $objPermissaoDTO->setNumIdSistema($numIdSistema); | |
599 | - $objPermissaoDTO->setNumIdPerfil($objPerfilDTO->getNumIdPerfil()); | |
600 | - | |
601 | - $objPermissaoRN = new PermissaoRN(); | |
602 | - $objPermissaoRN->excluir($objPermissaoRN->listar($objPermissaoDTO)); | |
603 | - | |
604 | - $objRelPerfilItemMenuDTO = new RelPerfilItemMenuDTO(); | |
605 | - $objRelPerfilItemMenuDTO->retTodos(); | |
606 | - $objRelPerfilItemMenuDTO->setNumIdSistema($numIdSistema); | |
607 | - $objRelPerfilItemMenuDTO->setNumIdPerfil($objPerfilDTO->getNumIdPerfil()); | |
608 | - | |
609 | - $objRelPerfilItemMenuRN = new RelPerfilItemMenuRN(); | |
610 | - $objRelPerfilItemMenuRN->excluir($objRelPerfilItemMenuRN->listar($objRelPerfilItemMenuDTO)); | |
611 | - | |
612 | - $objRelPerfilRecursoDTO = new RelPerfilRecursoDTO(); | |
613 | - $objRelPerfilRecursoDTO->retTodos(); | |
614 | - $objRelPerfilRecursoDTO->setNumIdSistema($numIdSistema); | |
615 | - $objRelPerfilRecursoDTO->setNumIdPerfil($objPerfilDTO->getNumIdPerfil()); | |
616 | - | |
617 | - $objRelPerfilRecursoRN = new RelPerfilRecursoRN(); | |
618 | - $objRelPerfilRecursoRN->excluir($objRelPerfilRecursoRN->listar($objRelPerfilRecursoDTO)); | |
619 | - | |
620 | - $objCoordenadorPerfilDTO = new CoordenadorPerfilDTO(); | |
621 | - $objCoordenadorPerfilDTO->retTodos(); | |
622 | - $objCoordenadorPerfilDTO->setNumIdSistema($numIdSistema); | |
623 | - $objCoordenadorPerfilDTO->setNumIdPerfil($objPerfilDTO->getNumIdPerfil()); | |
624 | - | |
625 | - $objCoordenadorPerfilRN = new CoordenadorPerfilRN(); | |
626 | - $objCoordenadorPerfilRN->excluir($objCoordenadorPerfilRN->listar($objCoordenadorPerfilDTO)); | |
627 | - | |
628 | - $objPerfilRN->excluir(array($objPerfilDTO)); | |
629 | - } | |
630 | - } | |
631 | - | |
632 | -} | |
633 | - | |
634 | -?> | |
635 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/ws/Enconding.php
... | ... | @@ -1,332 +0,0 @@ |
1 | -<?php | |
2 | -/* | |
3 | -Copyright (c) 2008 Sebastián Grignoli | |
4 | -All rights reserved. | |
5 | -Redistribution and use in source and binary forms, with or without | |
6 | -modification, are permitted provided that the following conditions | |
7 | -are met: | |
8 | -1. Redistributions of source code must retain the above copyright | |
9 | - notice, this list of conditions and the following disclaimer. | |
10 | -2. Redistributions in binary form must reproduce the above copyright | |
11 | - notice, this list of conditions and the following disclaimer in the | |
12 | - documentation and/or other materials provided with the distribution. | |
13 | -3. Neither the name of copyright holders nor the names of its | |
14 | - contributors may be used to endorse or promote products derived | |
15 | - from this software without specific prior written permission. | |
16 | -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
17 | -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
18 | -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
19 | -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS | |
20 | -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
21 | -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
22 | -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
23 | -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
24 | -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
25 | -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
26 | -POSSIBILITY OF SUCH DAMAGE. | |
27 | -*/ | |
28 | -/** | |
29 | - * @author "Sebastián Grignoli" <grignoli@gmail.com> | |
30 | - * @package Encoding | |
31 | - * @version 2.0 | |
32 | - * @link https://github.com/neitanod/forceutf8 | |
33 | - * @example https://github.com/neitanod/forceutf8 | |
34 | - * @license Revised BSD | |
35 | - */ | |
36 | - | |
37 | -class Encoding { | |
38 | - const ICONV_TRANSLIT = "TRANSLIT"; | |
39 | - const ICONV_IGNORE = "IGNORE"; | |
40 | - const WITHOUT_ICONV = ""; | |
41 | - | |
42 | - function convert_xml_entities($string) { | |
43 | - return strtr( | |
44 | - $string, | |
45 | - array( | |
46 | - "<" => "<", | |
47 | - ">" => ">", | |
48 | - '"' => """, | |
49 | - "'" => "'", | |
50 | - "&" => "&", | |
51 | - ) | |
52 | - ); | |
53 | - } | |
54 | - function deconvert_xml_entities($string) { | |
55 | - return strtr( | |
56 | - $string, | |
57 | - array( | |
58 | - "<" => "<", | |
59 | - ">" => ">", | |
60 | - '"' => '"', | |
61 | - "'" => "'", | |
62 | - "&" => "&", | |
63 | - ) | |
64 | - ); | |
65 | - } | |
66 | - protected static $win1252ToUtf8 = array( | |
67 | - 128 => "\xe2\x82\xac", | |
68 | - 130 => "\xe2\x80\x9a", | |
69 | - 131 => "\xc6\x92", | |
70 | - 132 => "\xe2\x80\x9e", | |
71 | - 133 => "\xe2\x80\xa6", | |
72 | - 134 => "\xe2\x80\xa0", | |
73 | - 135 => "\xe2\x80\xa1", | |
74 | - 136 => "\xcb\x86", | |
75 | - 137 => "\xe2\x80\xb0", | |
76 | - 138 => "\xc5\xa0", | |
77 | - 139 => "\xe2\x80\xb9", | |
78 | - 140 => "\xc5\x92", | |
79 | - 142 => "\xc5\xbd", | |
80 | - 145 => "\xe2\x80\x98", | |
81 | - 146 => "\xe2\x80\x99", | |
82 | - 147 => "\xe2\x80\x9c", | |
83 | - 148 => "\xe2\x80\x9d", | |
84 | - 149 => "\xe2\x80\xa2", | |
85 | - 150 => "\xe2\x80\x93", | |
86 | - 151 => "\xe2\x80\x94", | |
87 | - 152 => "\xcb\x9c", | |
88 | - 153 => "\xe2\x84\xa2", | |
89 | - 154 => "\xc5\xa1", | |
90 | - 155 => "\xe2\x80\xba", | |
91 | - 156 => "\xc5\x93", | |
92 | - 158 => "\xc5\xbe", | |
93 | - 159 => "\xc5\xb8" | |
94 | - ); | |
95 | - protected static $brokenUtf8ToUtf8 = array( | |
96 | - "\xc2\x80" => "\xe2\x82\xac", | |
97 | - "\xc2\x82" => "\xe2\x80\x9a", | |
98 | - "\xc2\x83" => "\xc6\x92", | |
99 | - "\xc2\x84" => "\xe2\x80\x9e", | |
100 | - "\xc2\x85" => "\xe2\x80\xa6", | |
101 | - "\xc2\x86" => "\xe2\x80\xa0", | |
102 | - "\xc2\x87" => "\xe2\x80\xa1", | |
103 | - "\xc2\x88" => "\xcb\x86", | |
104 | - "\xc2\x89" => "\xe2\x80\xb0", | |
105 | - "\xc2\x8a" => "\xc5\xa0", | |
106 | - "\xc2\x8b" => "\xe2\x80\xb9", | |
107 | - "\xc2\x8c" => "\xc5\x92", | |
108 | - "\xc2\x8e" => "\xc5\xbd", | |
109 | - "\xc2\x91" => "\xe2\x80\x98", | |
110 | - "\xc2\x92" => "\xe2\x80\x99", | |
111 | - "\xc2\x93" => "\xe2\x80\x9c", | |
112 | - "\xc2\x94" => "\xe2\x80\x9d", | |
113 | - "\xc2\x95" => "\xe2\x80\xa2", | |
114 | - "\xc2\x96" => "\xe2\x80\x93", | |
115 | - "\xc2\x97" => "\xe2\x80\x94", | |
116 | - "\xc2\x98" => "\xcb\x9c", | |
117 | - "\xc2\x99" => "\xe2\x84\xa2", | |
118 | - "\xc2\x9a" => "\xc5\xa1", | |
119 | - "\xc2\x9b" => "\xe2\x80\xba", | |
120 | - "\xc2\x9c" => "\xc5\x93", | |
121 | - "\xc2\x9e" => "\xc5\xbe", | |
122 | - "\xc2\x9f" => "\xc5\xb8" | |
123 | - ); | |
124 | - protected static $utf8ToWin1252 = array( | |
125 | - "\xe2\x82\xac" => "\x80", | |
126 | - "\xe2\x80\x9a" => "\x82", | |
127 | - "\xc6\x92" => "\x83", | |
128 | - "\xe2\x80\x9e" => "\x84", | |
129 | - "\xe2\x80\xa6" => "\x85", | |
130 | - "\xe2\x80\xa0" => "\x86", | |
131 | - "\xe2\x80\xa1" => "\x87", | |
132 | - "\xcb\x86" => "\x88", | |
133 | - "\xe2\x80\xb0" => "\x89", | |
134 | - "\xc5\xa0" => "\x8a", | |
135 | - "\xe2\x80\xb9" => "\x8b", | |
136 | - "\xc5\x92" => "\x8c", | |
137 | - "\xc5\xbd" => "\x8e", | |
138 | - "\xe2\x80\x98" => "\x91", | |
139 | - "\xe2\x80\x99" => "\x92", | |
140 | - "\xe2\x80\x9c" => "\x93", | |
141 | - "\xe2\x80\x9d" => "\x94", | |
142 | - "\xe2\x80\xa2" => "\x95", | |
143 | - "\xe2\x80\x93" => "\x96", | |
144 | - "\xe2\x80\x94" => "\x97", | |
145 | - "\xcb\x9c" => "\x98", | |
146 | - "\xe2\x84\xa2" => "\x99", | |
147 | - "\xc5\xa1" => "\x9a", | |
148 | - "\xe2\x80\xba" => "\x9b", | |
149 | - "\xc5\x93" => "\x9c", | |
150 | - "\xc5\xbe" => "\x9e", | |
151 | - "\xc5\xb8" => "\x9f" | |
152 | - ); | |
153 | - static function toUTF8($text){ | |
154 | - /** | |
155 | - * Function \ForceUTF8\Encoding::toUTF8 | |
156 | - * | |
157 | - * This function leaves UTF8 characters alone, while converting almost all non-UTF8 to UTF8. | |
158 | - * | |
159 | - * It assumes that the encoding of the original string is either Windows-1252 or ISO 8859-1. | |
160 | - * | |
161 | - * It may fail to convert characters to UTF-8 if they fall into one of these scenarios: | |
162 | - * | |
163 | - * 1) when any of these characters: ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞß | |
164 | - * are followed by any of these: ("group B") | |
165 | - * ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶•¸¹º»¼½¾¿ | |
166 | - * For example: %ABREPRESENT%C9%BB. «REPRESENTÉ» | |
167 | - * The "«" (%AB) character will be converted, but the "É" followed by "»" (%C9%BB) | |
168 | - * is also a valid unicode character, and will be left unchanged. | |
169 | - * | |
170 | - * 2) when any of these: àáâãäåæçèéêëìíîï are followed by TWO chars from group B, | |
171 | - * 3) when any of these: ðñòó are followed by THREE chars from group B. | |
172 | - * | |
173 | - * @name toUTF8 | |
174 | - * @param string $text Any string. | |
175 | - * @return string The same string, UTF8 encoded | |
176 | - * | |
177 | - */ | |
178 | - if(is_array($text)) | |
179 | - { | |
180 | - foreach($text as $k => $v) | |
181 | - { | |
182 | - $text[$k] = self::toUTF8($v); | |
183 | - } | |
184 | - return $text; | |
185 | - } | |
186 | - | |
187 | - if(!is_string($text)) { | |
188 | - return $text; | |
189 | - } | |
190 | - | |
191 | - $max = self::strlen($text); | |
192 | - | |
193 | - $buf = ""; | |
194 | - for($i = 0; $i < $max; $i++){ | |
195 | - $c1 = $text{$i}; | |
196 | - if($c1>="\xc0"){ //Should be converted to UTF8, if it's not UTF8 already | |
197 | - $c2 = $i+1 >= $max? "\x00" : $text{$i+1}; | |
198 | - $c3 = $i+2 >= $max? "\x00" : $text{$i+2}; | |
199 | - $c4 = $i+3 >= $max? "\x00" : $text{$i+3}; | |
200 | - if($c1 >= "\xc0" & $c1 <= "\xdf"){ //looks like 2 bytes UTF8 | |
201 | - if($c2 >= "\x80" && $c2 <= "\xbf"){ //yeah, almost sure it's UTF8 already | |
202 | - $buf .= $c1 . $c2; | |
203 | - $i++; | |
204 | - } else { //not valid UTF8. Convert it. | |
205 | - $cc1 = (chr(ord($c1) / 64) | "\xc0"); | |
206 | - $cc2 = ($c1 & "\x3f") | "\x80"; | |
207 | - $buf .= $cc1 . $cc2; | |
208 | - } | |
209 | - } elseif($c1 >= "\xe0" & $c1 <= "\xef"){ //looks like 3 bytes UTF8 | |
210 | - if($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf"){ //yeah, almost sure it's UTF8 already | |
211 | - $buf .= $c1 . $c2 . $c3; | |
212 | - $i = $i + 2; | |
213 | - } else { //not valid UTF8. Convert it. | |
214 | - $cc1 = (chr(ord($c1) / 64) | "\xc0"); | |
215 | - $cc2 = ($c1 & "\x3f") | "\x80"; | |
216 | - $buf .= $cc1 . $cc2; | |
217 | - } | |
218 | - } elseif($c1 >= "\xf0" & $c1 <= "\xf7"){ //looks like 4 bytes UTF8 | |
219 | - if($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf" && $c4 >= "\x80" && $c4 <= "\xbf"){ //yeah, almost sure it's UTF8 already | |
220 | - $buf .= $c1 . $c2 . $c3 . $c4; | |
221 | - $i = $i + 3; | |
222 | - } else { //not valid UTF8. Convert it. | |
223 | - $cc1 = (chr(ord($c1) / 64) | "\xc0"); | |
224 | - $cc2 = ($c1 & "\x3f") | "\x80"; | |
225 | - $buf .= $cc1 . $cc2; | |
226 | - } | |
227 | - } else { //doesn't look like UTF8, but should be converted | |
228 | - $cc1 = (chr(ord($c1) / 64) | "\xc0"); | |
229 | - $cc2 = (($c1 & "\x3f") | "\x80"); | |
230 | - $buf .= $cc1 . $cc2; | |
231 | - } | |
232 | - } elseif(($c1 & "\xc0") == "\x80"){ // needs conversion | |
233 | - if(isset(self::$win1252ToUtf8[ord($c1)])) { //found in Windows-1252 special cases | |
234 | - $buf .= self::$win1252ToUtf8[ord($c1)]; | |
235 | - } else { | |
236 | - $cc1 = (chr(ord($c1) / 64) | "\xc0"); | |
237 | - $cc2 = (($c1 & "\x3f") | "\x80"); | |
238 | - $buf .= $cc1 . $cc2; | |
239 | - } | |
240 | - } else { // it doesn't need conversion | |
241 | - $buf .= $c1; | |
242 | - } | |
243 | - } | |
244 | - return $buf; | |
245 | - } | |
246 | - static function toWin1252($text, $option = self::WITHOUT_ICONV) { | |
247 | - if(is_array($text)) { | |
248 | - foreach($text as $k => $v) { | |
249 | - $text[$k] = self::toWin1252($v, $option); | |
250 | - } | |
251 | - return $text; | |
252 | - } elseif(is_string($text)) { | |
253 | - return static::utf8_decode($text, $option); | |
254 | - } else { | |
255 | - return $text; | |
256 | - } | |
257 | - } | |
258 | - static function toISO8859($text) { | |
259 | - return self::toWin1252($text); | |
260 | - } | |
261 | - static function toLatin1($text) { | |
262 | - return self::toWin1252($text); | |
263 | - } | |
264 | - static function fixUTF8($text, $option = self::WITHOUT_ICONV){ | |
265 | - if(is_array($text)) { | |
266 | - foreach($text as $k => $v) { | |
267 | - $text[$k] = self::fixUTF8($v, $option); | |
268 | - } | |
269 | - return $text; | |
270 | - } | |
271 | - $last = ""; | |
272 | - while($last <> $text){ | |
273 | - $last = $text; | |
274 | - $text = self::toUTF8(static::utf8_decode($text, $option)); | |
275 | - } | |
276 | - $text = self::toUTF8(static::utf8_decode($text, $option)); | |
277 | - return $text; | |
278 | - } | |
279 | - static function UTF8FixWin1252Chars($text){ | |
280 | - // If you received an UTF-8 string that was converted from Windows-1252 as it was ISO8859-1 | |
281 | - // (ignoring Windows-1252 chars from 80 to 9F) use this function to fix it. | |
282 | - // See: http://en.wikipedia.org/wiki/Windows-1252 | |
283 | - return str_replace(array_keys(self::$brokenUtf8ToUtf8), array_values(self::$brokenUtf8ToUtf8), $text); | |
284 | - } | |
285 | - static function removeBOM($str=""){ | |
286 | - if(substr($str, 0,3) == pack("CCC",0xef,0xbb,0xbf)) { | |
287 | - $str=substr($str, 3); | |
288 | - } | |
289 | - return $str; | |
290 | - } | |
291 | - protected static function strlen($text){ | |
292 | - return (function_exists('mb_strlen') && ((int) ini_get('mbstring.func_overload')) & 2) ? | |
293 | - mb_strlen($text,'8bit') : strlen($text); | |
294 | - } | |
295 | - public static function normalizeEncoding($encodingLabel) | |
296 | - { | |
297 | - $encoding = strtoupper($encodingLabel); | |
298 | - $encoding = preg_replace('/[^a-zA-Z0-9\s]/', '', $encoding); | |
299 | - $equivalences = array( | |
300 | - 'ISO88591' => 'ISO-8859-1', | |
301 | - 'ISO8859' => 'ISO-8859-1', | |
302 | - 'ISO' => 'ISO-8859-1', | |
303 | - 'LATIN1' => 'ISO-8859-1', | |
304 | - 'LATIN' => 'ISO-8859-1', | |
305 | - 'UTF8' => 'UTF-8', | |
306 | - 'UTF' => 'UTF-8', | |
307 | - 'WIN1252' => 'ISO-8859-1', | |
308 | - 'WINDOWS1252' => 'ISO-8859-1' | |
309 | - ); | |
310 | - if(empty($equivalences[$encoding])){ | |
311 | - return 'UTF-8'; | |
312 | - } | |
313 | - return $equivalences[$encoding]; | |
314 | - } | |
315 | - public static function encode($encodingLabel, $text) | |
316 | - { | |
317 | - $encodingLabel = self::normalizeEncoding($encodingLabel); | |
318 | - if($encodingLabel == 'ISO-8859-1') return Encoding::toLatin1($text); | |
319 | - return Encoding::toUTF8($text); | |
320 | - } | |
321 | - protected static function utf8_decode($text, $option) | |
322 | - { | |
323 | - if ($option == self::WITHOUT_ICONV || !function_exists('iconv')) { | |
324 | - $o = utf8_decode( | |
325 | - str_replace(array_keys(self::$utf8ToWin1252), array_values(self::$utf8ToWin1252), self::toUTF8($text)) | |
326 | - ); | |
327 | - } else { | |
328 | - $o = iconv("UTF-8", "Windows-1252" . ($option == self::ICONV_TRANSLIT ? '//TRANSLIT' : ($option == self::ICONV_IGNORE ? '//IGNORE' : '')), $text); | |
329 | - } | |
330 | - return $o; | |
331 | - } | |
332 | -} | |
333 | 0 | \ No newline at end of file |
containeres/sei-app/protocolo_integrado/ws/ProtocoloIntegradoClienteWS.php
... | ... | @@ -1,186 +0,0 @@ |
1 | -<?php | |
2 | -/* | |
3 | -* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
4 | -* | |
5 | -* 27/11/2006 - criado por mga | |
6 | -*/ | |
7 | - | |
8 | -ini_set('soap.wsdl_cache_enabled',0); | |
9 | -ini_set('soap.wsdl_cache_ttl',0); | |
10 | -require_once dirname(__FILE__).'/../../../../SEI.php'; | |
11 | -require_once dirname(__FILE__).'/Enconding.php'; | |
12 | - | |
13 | -class ProtocoloIntegradoClienteWS extends SoapClient { | |
14 | - | |
15 | - private $context; | |
16 | - private $acao; | |
17 | - private $login; | |
18 | - private $senha; | |
19 | - private $url; | |
20 | - private $listaDocumentosFormatada; | |
21 | - private $certificado; | |
22 | - | |
23 | - public function __construct($url,$login,$senha,$opcoes) { | |
24 | - | |
25 | - try { | |
26 | - | |
27 | - if (strpos($url,'homologa.protocolointegrado.gov.br') !== FALSE ) { | |
28 | - $this->certificado = "certificado_homologacao.cer"; | |
29 | - } else if (strpos($url,'protocolointegrado.gov.br')!== FALSE) { | |
30 | - $this->certificado = "certificado_producao.cer"; | |
31 | - } else { | |
32 | - $this->certificado = "certificado.cer"; | |
33 | - } | |
34 | - | |
35 | - $this->login = $login; | |
36 | - $this->senha = $senha; | |
37 | - $this->url = preg_replace("/^http:/i", "https:", $url); | |
38 | - // Create the stream_context and add it to the options | |
39 | - $this->context = stream_context_create( | |
40 | - array( | |
41 | - 'ssl' => array( | |
42 | - //'local_cert' => $this->certificado, | |
43 | - 'cafile' => dirname(__FILE__) . '/' . $this->certificado, | |
44 | - 'verify_peer' => false, | |
45 | - 'verify_peer_name' => false, | |
46 | - 'allow_self_signed' => true | |
47 | - ) | |
48 | - )); | |
49 | - $opcoes = array_merge($opcoes, array('stream_context' => $this->context)); | |
50 | - | |
51 | - $this->validarConexaoWebService(); | |
52 | - parent::SoapClient($url, $opcoes); | |
53 | - | |
54 | - } catch (Exception $e) { | |
55 | - throw new InfraException('Erro ao se conectar ao Webservice',$e); | |
56 | - } | |
57 | - | |
58 | - } | |
59 | - | |
60 | - private function validarConexaoWebService() { | |
61 | - | |
62 | - $ch = curl_init(); | |
63 | - curl_setopt($ch, CURLOPT_HEADER, true); | |
64 | - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); | |
65 | - curl_setopt($ch, CURLOPT_NOBODY, true); | |
66 | - curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows; U; //Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0'); | |
67 | - curl_setopt($ch, CURLOPT_URL, $this->url); | |
68 | - | |
69 | - curl_setopt($ch, CURLOPT_SSL_VERIFYHOST,1 ); | |
70 | - curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__).'/'.$this->certificado); | |
71 | - curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); | |
72 | - | |
73 | - $retorno = curl_exec($ch); | |
74 | - $headerSize = curl_getinfo($ch, CURLINFO_HEADER_SIZE); | |
75 | - $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); | |
76 | - $header = substr($retorno, 0, $headerSize); | |
77 | - $e = null; | |
78 | - | |
79 | - $curl_errno = curl_errno($ch); | |
80 | - $curl_error = null; | |
81 | - if ($curl_errno) { | |
82 | - $curl_error = curl_error($ch); | |
83 | - } | |
84 | - curl_close($ch); | |
85 | - | |
86 | - if (stripos( $this->url,"?wsdl")===false) { | |
87 | - throw new InfraException("Endereço do serviço inválido ou serviço fora do ar. | |
88 | - Verifique se este endereço está corretamente informado nos parâmetros de integração ao Protocolo Integrado.",$e); | |
89 | - } | |
90 | - | |
91 | - if ($curl_errno) { | |
92 | - $e = new Exception($header."Requisição CURL resultou no seguinte erro: " . $curl_error . "(Código: " . $curl_errno . ")"); | |
93 | - if ($curl_errno == 60) { | |
94 | - throw new InfraException("Certificado inválido ou ausente.",$e); | |
95 | - } else { | |
96 | - throw new InfraException("Ocorreu um problema ao realizar a conexão ao Web Service do Protocolo Integrado. Acesse o log do SEI para maiores detalhes", $e); | |
97 | - } | |
98 | - } else { | |
99 | - if ($httpCode!=200) { | |
100 | - if (strlen($header)>0) { | |
101 | - $e = new Exception($header); | |
102 | - } else { | |
103 | - $e = new Exception("503 Service Unavailable.Não foi possível conectar ao servidor"); | |
104 | - } | |
105 | - throw new InfraException("Ocorreu um problema ao realizar a conexão ao Web Service do Protocolo Integrado. Acesse o log do SEI para maiores detalhes.", $e); | |
106 | - } | |
107 | - } | |
108 | - | |
109 | - } | |
110 | - | |
111 | - // Override doRequest to calculate the authentication hash from the $request. | |
112 | - function __doRequest($request, $location, $action, $version, $one_way = 0) { | |
113 | - // Grab all the text from the request. | |
114 | - $codSiorg = $this->login ; | |
115 | - $senha = $this->senha; | |
116 | - if ($this->acao=='enviarListaDocumentosServidor') { | |
117 | - $request = $this->listaDocumentosFormatada; | |
118 | - } | |
119 | - | |
120 | - // Set the HTTP headers. | |
121 | - $autorizacao = "Basic ".base64_encode($codSiorg.':'.$senha); | |
122 | - stream_context_set_option($this->context, array('http' => array('header' => 'Authorization:'. $autorizacao))); | |
123 | - $response = parent::__doRequest($request, $location, $action, $version, $one_way); | |
124 | - return $response; | |
125 | - } | |
126 | - | |
127 | - public function getQuantidadeMaximaDocumentosPorRequisicaoServidor(){ | |
128 | - | |
129 | - try { | |
130 | - $numMaxDocumentos = $this->getQuantidadeMaximaDocumentosPorRequisicao(); | |
131 | - return $numMaxDocumentos; | |
132 | - } catch(Exception $e){ | |
133 | - return $e->getMessage(); | |
134 | - } | |
135 | - | |
136 | - return null; | |
137 | - } | |
138 | - | |
139 | - public function enviarListaDocumentosServidor($param){ | |
140 | - | |
141 | - try { | |
142 | - $this->acao = 'enviarListaDocumentosServidor'; | |
143 | - $retorno = $this->formatarEnvioListaDocumentosPI($param); | |
144 | - return $retorno; | |
145 | - } catch(Exception $e) { | |
146 | - error_log('Exceção:'.$e->getMessage()); | |
147 | - return $e; | |
148 | - } | |
149 | - | |
150 | - return null; | |
151 | - } | |
152 | - | |
153 | - public function formatarEnvioListaDocumentosPI($param){ | |
154 | - | |
155 | - $elementos = array(0=>'Assunto',1=>'NomeInteressado',2=>'Operacao',3=>'UnidadeOperacao'); | |
156 | - | |
157 | - for ($it=0;$it<count($elementos);$it++) { | |
158 | - $this->formatarElementoXML($param,$elementos[$it]); | |
159 | - } | |
160 | - $sax = xml_parser_create(); | |
161 | - | |
162 | - $xml = $param->saveXML(); | |
163 | - $pos = strpos($xml, '<ListaDocumentos>'); | |
164 | - $xml = substr($xml, $pos,strlen($xml)); | |
165 | - for ($control = 0; $control < 32; $control++) { | |
166 | - $xml = str_replace(chr($control), "", $xml); | |
167 | - } | |
168 | - $this->listaDocumentosFormatada = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:end="http://endpoint.ws.protocolo.gov.br/"> | |
169 | - <soapenv:Header/> | |
170 | - <soapenv:Body> <end:enviarListaDocumentos>'.($xml).' </end:enviarListaDocumentos></soapenv:Body> | |
171 | - </soapenv:Envelope>'; | |
172 | - | |
173 | - return $this->__soapCall('EnviarListaDocumentos',array()); | |
174 | - } | |
175 | - | |
176 | - //Converte elementos(tags) do XML com caracteres especiais (acentos,pontuação,etc.) para formato de enconding aceito pelo PI | |
177 | - private function formatarElementoXML($xml,$elemento){ | |
178 | - $objetos = $xml->getElementsByTagName($elemento); | |
179 | - if ($objetos!=null) { | |
180 | - for ($ite=0;$ite<$objetos->length;$ite++) { | |
181 | - $objetos->item($ite)->nodeValue = InfraString::formatarXML(Encoding::fixUTF8($objetos->item($ite)->nodeValue)); | |
182 | - } | |
183 | - } | |
184 | - } | |
185 | - | |
186 | -} |
containeres/sei-app/protocolo_integrado/ws/certificado.cer
... | ... | @@ -1,22 +0,0 @@ |
1 | ------BEGIN CERTIFICATE----- | |
2 | -MIIDojCCAoqgAwIBAgIEfj/yyTANBgkqhkiG9w0BAQsFADB5MQswCQYDVQQGEwJC | |
3 | -UjEXMBUGA1UECBMOUmlvIGRlIEphbmVpcm8xFzAVBgNVBAcTDlJpbyBkZSBKYW5l | |
4 | -aXJvMQ8wDQYDVQQKEwZDYXBnb3YxDzANBgNVBAsTBkNhcGdvdjEWMBQGA1UEAxMN | |
5 | -MTg5LjkuMTM3LjIxMDAeFw0xNDA1MjAxMzUwMDFaFw0xODA2MjgxMzUwMDFaMHkx | |
6 | -CzAJBgNVBAYTAkJSMRcwFQYDVQQIEw5SaW8gZGUgSmFuZWlybzEXMBUGA1UEBxMO | |
7 | -UmlvIGRlIEphbmVpcm8xDzANBgNVBAoTBkNhcGdvdjEPMA0GA1UECxMGQ2FwZ292 | |
8 | -MRYwFAYDVQQDEw0xODkuOS4xMzcuMjEwMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A | |
9 | -MIIBCgKCAQEAj9/gBEtGnlNLwcs7aQ+eyeXBN2jOLJwqqmDhiuAWn9Z7q3o9uhJk | |
10 | -MNg3O4E/FTioQ6TSwOEsTwjo2ksbTyiQZPMEu5J7Xq5Qeo1FswMTSuC0TUqacT1O | |
11 | -YnvQW8YQ7dTxn+hSILuZSFaxd0W0nlTE5OC46iFlhi3MsA1zUgB1A1C35FZd7HW2 | |
12 | -gz7rRpXPngebnun3vcEiG5XJ4C80mVlnxxHlyChL7NJJXSFhO9/fz4S8ucESFsXs | |
13 | -SXP4OcI6IoMyjWsJw7BdNRwIOB4Cv90iQgE2QfP/HCek0a2N6/q6gg6nrHtjvsKp | |
14 | -mg8BNap3IGVlFIpuAlNG6pVYf1ItOpMv+wIDAQABozIwMDAdBgNVHQ4EFgQUMn+N | |
15 | -g/o5ojY77knQbRghZCli6q0wDwYDVR0RBAgwBocEvQmJ0jANBgkqhkiG9w0BAQsF | |
16 | -AAOCAQEAaHqhNHZatPznDWJaIIe+hpF9EVbVoHUI4eXlxT33JZcf/qsVZfalg8zq | |
17 | -riv2srK0xuIfkmIxGojtvoMePmIcgHgzx7plswd3gVRxLb3la0F+ydwQh/KooKuz | |
18 | -jAZLixVW/9nNt0C6lZINQVIF/EKL/dNG3HSHW8lQ0Dq0dRA0qnlF4G6C/9Ou7wP6 | |
19 | -IvU2NrizDTEQO9U5zTNrzQXPoi1T/w5+VJG8U3gmj8AjBnqBWm0QS6tKzM6upuxH | |
20 | -cFNdQCQ75J7yheaQ8yZJ+T1ag4gnw0G0fwh3jjv38hmfOHcsKKHxCwCpNOVOr9Kt | |
21 | -jf02xKvnjHHgXzlCDq7tVaaPE8oSqA== | |
22 | ------END CERTIFICATE----- |
containeres/sei-app/protocolo_integrado/ws/certificado_homologacao.cer
... | ... | @@ -1,25 +0,0 @@ |
1 | ------BEGIN CERTIFICATE----- | |
2 | -MIIEIjCCAwoCCQC6yiMiU/r3JDANBgkqhkiG9w0BAQUFADCB0jELMAkGA1UEBhMC | |
3 | -QlIxFzAVBgNVBAgMDlJpbyBkZSBKYW5laXJvMRcwFQYDVQQHDA5SaW8gZGUgSmFu | |
4 | -ZWlybzEPMA0GA1UECgwGQ2FwZ292MRwwGgYDVQQLDBNQcm90b2NvbG8gSW50ZWdy | |
5 | -YWRvMSswKQYDVQQDDCJob21vbG9nYS5wcm90b2NvbG9pbnRlZ3JhZG8uZ292LmJy | |
6 | -MTUwMwYJKoZIhvcNAQkBFiZwcm90b2NvbG9pbnRlZ3JhZG9AcGxhbmVqYW1lbnRv | |
7 | -Lmdvdi5icjAeFw0xNDA1MjYxOTAxMDhaFw0yODAyMDIxOTAxMDhaMIHSMQswCQYD | |
8 | -VQQGEwJCUjEXMBUGA1UECAwOUmlvIGRlIEphbmVpcm8xFzAVBgNVBAcMDlJpbyBk | |
9 | -ZSBKYW5laXJvMQ8wDQYDVQQKDAZDYXBnb3YxHDAaBgNVBAsME1Byb3RvY29sbyBJ | |
10 | -bnRlZ3JhZG8xKzApBgNVBAMMImhvbW9sb2dhLnByb3RvY29sb2ludGVncmFkby5n | |
11 | -b3YuYnIxNTAzBgkqhkiG9w0BCQEWJnByb3RvY29sb2ludGVncmFkb0BwbGFuZWph | |
12 | -bWVudG8uZ292LmJyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxvre | |
13 | -zKND/6U9MHtsLZeAbeVlBEGwke1hFEaGkPSWCLpEu/0zQOC9OTTSVBv8UuEx/V6K | |
14 | -JjtXDC+5pA2G9RM77AUT2wqvvvAOwTGtHNTNnT4yudUhipKoKrSS/Xh87bjFLC2/ | |
15 | -52sHtpoogroT359YzP3pSGU9bt4eaGI2DbuU2ldsoBeq2auibJ+gP7fMt/V2rBAA | |
16 | -e4/pKqUPGLOTcMssstu6fMSP6ucwDI1U3LCbLBRpcyzeCXf2q/RzHlbvXoPwlwq0 | |
17 | -bZcWB2IAqV3UdUHVOAflgal9jZecONLCJ1KysoBlCMkI2lYgHqepiAvbKL9p6m3J | |
18 | -r7wSTJL2++06+NtcewIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQAGvqGCf4RagAH3 | |
19 | -b8KdIo9VDZUwvPuEcoPdW4AppnIE/WcuqD0VKlpNYTzX17F0dkx3AQXud2AJvbOz | |
20 | -YT9VUxMOsFPcsahO+pmNx90tC1rPv8iTEOG1XzaUYIGaMYL1+FnvCPks3zWM7+wv | |
21 | -T6l4FT//LMbrNklKV82/DAbgjzaAqF4sJ2uNmdmdrSPFYGjz4bFX8YZAdAaus3OZ | |
22 | -iyeGaULsxiF/Mn5mY3pJSnd10dM+u+3XfLuZQ9mQj6vGL2votVWJzctSuVqucUys | |
23 | -hyvm2FEZDKWCCGXD1QL1Hbuzhoin2IZP6ilYuRLU6rsAq33xVjF9ddhn0lD2x8og | |
24 | -ag4cfZ0/ | |
25 | ------END CERTIFICATE----- |
containeres/sei-app/protocolo_integrado/ws/certificado_producao.cer
... | ... | @@ -1,155 +0,0 @@ |
1 | ------BEGIN CERTIFICATE----- | |
2 | -MIIHZDCCBUygAwIBAgIDAu9HMA0GCSqGSIb3DQEBCwUAMIGOMQswCQYDVQQGEwJC | |
3 | -UjETMBEGA1UECgwKSUNQLUJyYXNpbDE2MDQGA1UECwwtU2VjcmV0YXJpYSBkYSBS | |
4 | -ZWNlaXRhIEZlZGVyYWwgZG8gQnJhc2lsIC0gUkZCMTIwMAYDVQQDDClBdXRvcmlk | |
5 | -YWRlIENlcnRpZmljYWRvcmEgZG8gU0VSUFJPUkZCIFNTTDAeFw0xODA3MTcxMzEw | |
6 | -MDNaFw0xOTA3MTcxMzEwMDNaMIGtMQswCQYDVQQGEwJCUjETMBEGA1UECgwKSUNQ | |
7 | -LUJyYXNpbDE2MDQGA1UECwwtU2VjcmV0YXJpYSBkYSBSZWNlaXRhIEZlZGVyYWwg | |
8 | -ZG8gQnJhc2lsIC0gUkZCMREwDwYDVQQLDAhBUlNFUlBSTzEaMBgGA1UECwwRUkZC | |
9 | -IGUtU2Vydmlkb3IgQTExIjAgBgNVBAMMGXByb3RvY29sb2ludGVncmFkby5nb3Yu | |
10 | -YnIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDWjG8iTTb5+JuZaH/o | |
11 | -vWKKwqMgipTbFaL3cAIDWPyx0mJDvSP7jpZPnrb3sE2vMyzdbNAmVP7Rf+aLwnhR | |
12 | -Yf6B4yU0sHmaTDnlSAvEBP5c1Yz0ey357QHAw6Q1te5GR+UH40bWdfcL/bg3gVT9 | |
13 | -3CbLNSCOuRZD/aT5hAgBC8T/wfnmV8IXKuHoQX7OwCJIsXBD/A+US0YuHeN6/PC9 | |
14 | -onCPo4rWn18qu37DeJ2sPvMdYZqk10FjzK3ZQUQMh0HLN5LgZ2DDyk05ViEfMSFq | |
15 | -QLBNrhyfiP94IzGyRFx4ZaXcOo4FwzGWcJTnFHJrWzH9vJn7k9fXIum+vuBJF0v+ | |
16 | -zEgPAgMBAAGjggKoMIICpDAfBgNVHSMEGDAWgBQgjRFcVcMBb6tW8YPMaKmrwtq1 | |
17 | -YzBeBgNVHSAEVzBVMFMGBmBMAQIBWzBJMEcGCCsGAQUFBwIBFjtodHRwOi8vcmVw | |
18 | -b3NpdG9yaW8uc2VycHJvLmdvdi5ici9kb2NzL2RwY2Fjc2VycHJvcmZic3NsLnBk | |
19 | -ZjCBiwYDVR0fBIGDMIGAMD2gO6A5hjdodHRwOi8vcmVwb3NpdG9yaW8uc2VycHJv | |
20 | -Lmdvdi5ici9sY3IvYWNzZXJwcm9yZmJzc2wuY3JsMD+gPaA7hjlodHRwOi8vY2Vy | |
21 | -dGlmaWNhZG9zMi5zZXJwcm8uZ292LmJyL2xjci9hY3NlcnByb3JmYnNzbC5jcmww | |
22 | -VwYIKwYBBQUHAQEESzBJMEcGCCsGAQUFBzAChjtodHRwOi8vcmVwb3NpdG9yaW8u | |
23 | -c2VycHJvLmdvdi5ici9jYWRlaWFzL2Fjc2VycHJvcmZic3NsLnA3YjCCAQkGA1Ud | |
24 | -EQSCAQAwgf2gOwYFYEwBAwigMgQwU0VSVklDTyBGRURFUkFMIERFIFBST0NFU1NB | |
25 | -TUVOVE8gREUgREFET1MgU0VSUFJPghlwcm90b2NvbG9pbnRlZ3JhZG8uZ292LmJy | |
26 | -oDgGBWBMAQMEoC8ELTEzMDUxOTc4MDc4MjQ1NzY3MzYwMDAwMDAwMDAwMDAwMDAw | |
27 | -MDAwMDAwMDAwMKAqBgVgTAEDAqAhBB9QRURSTyBSSUJFSVJPIERFIEZSRUlUQVMg | |
28 | -SlVOSU9SoBkGBWBMAQMDoBAEDjMzNjgzMTExMDAwMTA3gSJwZWRyby5mcmVpdGFz | |
29 | -LWp1bmlvckBzZXJwcm8uZ292LmJyMA4GA1UdDwEB/wQEAwIF4DAdBgNVHSUEFjAU | |
30 | -BggrBgEFBQcDAQYIKwYBBQUHAwIwDQYJKoZIhvcNAQELBQADggIBABgILnGVbEWS | |
31 | -MigCs3Bq+YEGTSqg3lE3iHbmb2OWqHw3gXC2BlZfDPRNfCLXw3eydcL8oCytehWP | |
32 | -4A/Re6PqKO8fhQicvXv/C6rc1GOuPInRsXXL37BBJn83G5C2D9iW8EuQSUqPo5Cx | |
33 | -yrgHEXpBdF66dVzvEoW2cwY+VxwaKjD2MqUzpXGgnXtlZraG8xxVT/BJ0BChrNZn | |
34 | -6PJfdyUL8WznvRzYdoEyt/JnKbohzyzhF3pb5j1y7COCtKnXUN45mYyX5krTHteg | |
35 | -kQuHX1kbGWoQ5CzaoXkS2y9RFqSo9K6xg3sTL6epA68VRIxV7nIuEwWd41uYFPmx | |
36 | -O5wKrcM3lKkZn9dczucp4Fjea35zX+/gGsHIzexFzFPZc/TcDCA6Pt2SHrzBjJvo | |
37 | -JycFuN1xYY4VX9UsOYzy/hddfx/HoRC+UAtLX7+Q2w24jSDPghGhKEGGVIDZD/Rk | |
38 | -dKtOpGBcCu/WCeP9WNHyIFzMqsB1Ju7wdmGszKkgTc33UivVjoJwQrbU0ZhYA68J | |
39 | -wy13Pgumcr5nw9xFuaxbPVTKNbNH3lJiEZecDArAxTdjsa2Flh0akMg9SJUdkPO5 | |
40 | -3hmBL3xr6RKRQ3n8lj3LPVNG+EOR+00eK3up5Q4iNabbptfzzRIDlEDi+zIdIdjn | |
41 | -nn+Sl1nnrWpCD3SLk7nbS/VQkdQsz54F | |
42 | ------END CERTIFICATE----- | |
43 | ------BEGIN CERTIFICATE----- | |
44 | -MIIGoTCCBImgAwIBAgIBGzANBgkqhkiG9w0BAQ0FADCBkDELMAkGA1UEBhMCQlIx | |
45 | -EzARBgNVBAoTCklDUC1CcmFzaWwxNDAyBgNVBAsTK0F1dG9yaWRhZGUgQ2VydGlm | |
46 | -aWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjIxNjA0BgNVBAMTLUFDIFNlY3JldGFy | |
47 | -aWEgZGEgUmVjZWl0YSBGZWRlcmFsIGRvIEJyYXNpbCB2MzAeFw0xNzA2MTkxOTA1 | |
48 | -MDhaFw0yMTEwMTAxOTA1MDhaMIGOMQswCQYDVQQGEwJCUjETMBEGA1UECgwKSUNQ | |
49 | -LUJyYXNpbDE2MDQGA1UECwwtU2VjcmV0YXJpYSBkYSBSZWNlaXRhIEZlZGVyYWwg | |
50 | -ZG8gQnJhc2lsIC0gUkZCMTIwMAYDVQQDDClBdXRvcmlkYWRlIENlcnRpZmljYWRv | |
51 | -cmEgZG8gU0VSUFJPUkZCIFNTTDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoC | |
52 | -ggIBALGlN3qImQR5VCac9sdj1nrA9h7KXiyh58fmIYx+fF5Eo96urVKuRoYPxKB+ | |
53 | -IRqVSbSdhdmO+2b7qXK3N99p1/WuTHPl+m1tS8rOzwExR/d5l3W7dnnVDSWlt8Jy | |
54 | -+zLnM+TX/jHtAfs5CPskidnBspCHP/6oVNwNNTwB+oOGxImsGafMGKhY92t8nSDW | |
55 | -PZ+peNUegf0wR/ZRjbdvZSg57lxRym2lW2Cj4ZIwuT2/j9g41f7p6q35r2JdaPyl | |
56 | -OHQ6JkZVMVKCQ61UFLWtN8cHjKynTmAFloDkCRFxrtKnIE12KpCVy8Hpd32SkU7T | |
57 | -08Kgwq54t5/8sqJ5iqHpIFg/I/Un3viSmDRCzwMOwJzn7tLf04qKUWE2KQeOHSSA | |
58 | -INctOx9aKQIHR1Vhpec0QbPzN4gqIsh+mQ3FJ+j6l6yfV2E3eiz5f58+kl/S88ul | |
59 | -OOddsX9F+a+9Vg44IyObADNOtc+cnASSf3AOsow5USumb9Wp8qaHcRRzUl1lBPxQ | |
60 | -bQQ8U/vhYrArnRKWEeJxktPGLA+Lfa2KEPYzWqmoNtiAfYD1O58YRCiRCAvnfIDA | |
61 | -s55IWy90zo28G1A+GvaYZCgbVOBRyjJJmmoMK2eLETxjyG17Hr5TJSwe7A38gNff | |
62 | -sOuVk095OuZmeQil/LqqUSds5pHhaUzZOpq6iVOlSE5nHfAtAgMBAAGjggEEMIIB | |
63 | -ADBXBgNVHSAEUDBOMEwGBmBMAQIBWzBCMEAGCCsGAQUFBwIBFjRodHRwOi8vd3d3 | |
64 | -LnJlY2VpdGEuZmF6ZW5kYS5nb3YuYnIvYWNyZmIvZHBjYWNyZmIucGRmMEQGA1Ud | |
65 | -HwQ9MDswOaA3oDWGM2h0dHA6Ly93d3cucmVjZWl0YS5mYXplbmRhLmdvdi5ici9h | |
66 | -Y3JmYi9hY3JmYnYzLmNybDAfBgNVHSMEGDAWgBR1y7qQ0c5Mp5LwcbDLvrh7Mway | |
67 | -KDAdBgNVHQ4EFgQUII0RXFXDAW+rVvGDzGipq8LatWMwDwYDVR0TAQH/BAUwAwEB | |
68 | -/zAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIBAMCM7C1u8k+LDCPF | |
69 | -VpJG6DGV7TuRaczA2oOJwuIktcGz3Q9yACGznhsDLMSF6DQxUUTePKJbQ2TXlOAL | |
70 | -cL6afrUl02a6cFXt2cWylWRX0FfKiEFArhLcRayvQJt+BGeeVS6psABSPb4IHZ0u | |
71 | -uQ0+YUt+tOcpeczIO+kDUPusFdH+Y9TTn4UZYChlaox8LqXp+wDizqVdrFZHShmw | |
72 | -+9qOTEuTFMmHKqSsyJaOUoZuucXEdp8tuOjaT5OLm1mhiXIdwQg375eR2YmTWzHP | |
73 | -XDs3R1kFY4rL5M791pn0LDOswZJuCrnPgrEoed4uMZ1hJBD4nN+UsjB7cUZqghwA | |
74 | -rKOMT/SNi8L0GlUU1yQnwlQidUZMHZU1ZjEG8Y7igwe87BAdwc5Jy2YLJpS9qr0w | |
75 | -2Xw3IfgHpjtxm0NAYQDL2dqzq14co7hg/GrWNVgnppW8QlFirVYCDAPGK2mpemXk | |
76 | -s12/f6dZfHd9qAvDG9C8+ecnttRyFuUzIcl5PJT5qHmwtm8z2AItnRSNptgWii1t | |
77 | -xG+rbSajzDk+BEA5ATOnQdqoQbU7lmFyWd42L73C0dN+aeqOC4UZk3drjOT7Govd | |
78 | -0PCMMKm3q4NyGRRCuMyi8YIx//mJfekyZOXqibStxgoO9otsiZzVt6yJPXdgeSUb | |
79 | -prH2k7cA+R0svaCxaLxlEu1xj8uO | |
80 | ------END CERTIFICATE----- | |
81 | ------BEGIN CERTIFICATE----- | |
82 | -MIIGoTCCBImgAwIBAgIBATANBgkqhkiG9w0BAQ0FADCBlzELMAkGA1UEBhMCQlIx | |
83 | -EzARBgNVBAoTCklDUC1CcmFzaWwxPTA7BgNVBAsTNEluc3RpdHV0byBOYWNpb25h | |
84 | -bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxNDAyBgNVBAMTK0F1 | |
85 | -dG9yaWRhZGUgQ2VydGlmaWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjIwHhcNMTAw | |
86 | -NjIxMTkwNDU3WhcNMjMwNjIxMTkwNDU3WjCBlzELMAkGA1UEBhMCQlIxEzARBgNV | |
87 | -BAoTCklDUC1CcmFzaWwxPTA7BgNVBAsTNEluc3RpdHV0byBOYWNpb25hbCBkZSBU | |
88 | -ZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxNDAyBgNVBAMTK0F1dG9yaWRh | |
89 | -ZGUgQ2VydGlmaWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjIwggIiMA0GCSqGSIb3 | |
90 | -DQEBAQUAA4ICDwAwggIKAoICAQC6RqQO3edA8rWgfFKVV0X8bYTzhgHJhQOtmKvS | |
91 | -8l4Fmcm7b2Jn/XdEuQMHPNIbAGLUcCxCg3lmq5lWroG8akm983QPYrfrWwdmlEIk | |
92 | -nUasmkIYMPAkqFFB6quV8agrAnhptSknXpwuc8b+I6Xjps79bBtrAFTrAK1POkw8 | |
93 | -5wqIW9pemgtW5LVUOB3yCpNkTsNBklMgKs/8dG7U2zM4YuT+jkxYHPePKk3/xZLZ | |
94 | -CVK9z3AAnWmaM2qIh0UhmRZRDTTfgr20aah8fNTd0/IVXEvFWBDqhRnLNiJYKnIM | |
95 | -mpbeys8IUWG/tAUpBiuGkP7pTcMEBUfLz3bZf3Gmh3sVQOQzgHgHHaTyjptAO8ly | |
96 | -UN9pvvAslh+QtdWudONltIwa6Wob+3JcxYJU6uBTB8TMEun33tcv1EgvRz8mYQSx | |
97 | -Epoza7WGSxMr0IadR+1p+/yEEmb4VuUOimx2xGsaesKgWhLRI4lYAXwIWNoVjhXZ | |
98 | -fn03tqRF9QOFzEf6i3lFuGZiM9MmSt4c6dR/5m0muTx9zQ8oCikPm91jq7mmRxqE | |
99 | -14WkA2UGBEtSjYM0Qn8xjhEu5rNnlUB+l3pAAPkRbIM4WK0DM1umxMHFsKwNqQbw | |
100 | -pmkBNLbp+JRITz6mdQnsSsU74MlesDL/n2lZzzwwbw3OJ1fsWhto/+xPb3gyPnnF | |
101 | -tF2VfwIDAQABo4H1MIHyME4GA1UdIARHMEUwQwYFYEwBAQAwOjA4BggrBgEFBQcC | |
102 | -ARYsaHR0cDovL2FjcmFpei5pY3BicmFzaWwuZ292LmJyL0RQQ2FjcmFpei5wZGYw | |
103 | -PwYDVR0fBDgwNjA0oDKgMIYuaHR0cDovL2FjcmFpei5pY3BicmFzaWwuZ292LmJy | |
104 | -L0xDUmFjcmFpenYyLmNybDAfBgNVHSMEGDAWgBQMOSA6twEfy9cofUGgx/pKrTIk | |
105 | -vjAdBgNVHQ4EFgQUDDkgOrcBH8vXKH1BoMf6Sq0yJL4wDwYDVR0TAQH/BAUwAwEB | |
106 | -/zAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIBAFmaFGkYbX0pQ3B9 | |
107 | -dpth33eOGnbkqdbLdqQWDEyUEsaQ0YEDxa0G2S1EvLIJdgmAOWcAGDRtBgrmtRBZ | |
108 | -SLp1YPw/jh0YVXArnkuVrImrCncke2HEx5EmjkYTUTe2jCcK0w3wmisig4OzvYM1 | |
109 | -rZs8vHiDKTVhNvgRcTMgVGNTRQHYE1qEO9dmEyS3xEbFIthzJO4cExeWyCXoGx7P | |
110 | -34VQbTzq91CeG5fep2vb1nPSz3xQwLCM5VMSeoY5rDVbZ8fq1PvRwl3qDpdzmK4p | |
111 | -v+Q68wQ2UCzt3h7bhegdhAnu86aDM1tvR3lPSLX8uCYTq6qz9GER+0Vn8x0+bv4q | |
112 | -SyZEGp+xouA82uDkBTp4rPuooU2/XSx3KZDNEx3vBijYtxTzW8jJnqd+MRKKeGLE | |
113 | -0QW8BgJjBCsNid3kXFsygETUQuwq8/JAhzHVPuIKMgwUjdVybQvm/Y3kqPMFjXUX | |
114 | -d5sKufqQkplliDJnQwWOLQsVuzXxYejZZ3ftFuXoAS1rND+Og7P36g9KHj41hJ2M | |
115 | -gDQ/qZXow63EzZ7KFBYsGZ7kNou5uaNCJQc+w+XVaE+gZhyms7ZzHJAaP0C5GlZC | |
116 | -cIf/by0PEf0e//eFMBUO4xcx7ieVzMnpmR6Xx21bB7UFaj3yRd+6gnkkcC6bgh9m | |
117 | -qaVtJ8z2KqLRX4Vv4EadqtKlTlUO | |
118 | ------END CERTIFICATE----- | |
119 | ------BEGIN CERTIFICATE----- | |
120 | -MIIGYDCCBEigAwIBAgIBCDANBgkqhkiG9w0BAQ0FADCBlzELMAkGA1UEBhMCQlIx | |
121 | -EzARBgNVBAoTCklDUC1CcmFzaWwxPTA7BgNVBAsTNEluc3RpdHV0byBOYWNpb25h | |
122 | -bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxNDAyBgNVBAMTK0F1 | |
123 | -dG9yaWRhZGUgQ2VydGlmaWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjIwHhcNMTEx | |
124 | -MDIxMTIxNjI5WhcNMjExMDIxMTIxNjI5WjCBkDELMAkGA1UEBhMCQlIxEzARBgNV | |
125 | -BAoTCklDUC1CcmFzaWwxNDAyBgNVBAsTK0F1dG9yaWRhZGUgQ2VydGlmaWNhZG9y | |
126 | -YSBSYWl6IEJyYXNpbGVpcmEgdjIxNjA0BgNVBAMTLUFDIFNlY3JldGFyaWEgZGEg | |
127 | -UmVjZWl0YSBGZWRlcmFsIGRvIEJyYXNpbCB2MzCCAiIwDQYJKoZIhvcNAQEBBQAD | |
128 | -ggIPADCCAgoCggIBAMFyHLTC/E6bRxhdNYhePQ9um1dASSkb6+2i8Ss0kfSEAm3K | |
129 | -fmWDUxLpHaAKP2xR2NT8ju1Kpq6Mns1tZmso3VzcacHS3X5nagP/I+jwJIV+GftJ | |
130 | -Ep+iiPv1EkiF8hMksXk3vOaHPOA/TNpmmU/nyEB5jNSwEwwych2RTb0IvNr3bV62 | |
131 | -oJecNNJIu+ws7Z4Rs9Wot0F13lCrVm0KRLHj2llcgu67ArTsFlkDhKNZbS3ohFuc | |
132 | -GIlVlkIg/B0E2MjARjos21QJHaYcRmr2w9rF1uZkylUtbn4wYWsj5kt9BCthcjgK | |
133 | -Kl2oVZB9agIS0AgUcfaoia8tsl7F63l/aa2kQ9UcQewBbORR4TZPGJSKbItKylP8 | |
134 | -/EN86u3rPI7nsmJn6HuMVl53hhLKNupP7mtrUZHC3w2FBvD3/JNiKJaP08GFjLH6 | |
135 | -vEiaR2m9YhizvJUXnDL9yFbkRHU+1lDssdnVDRSNVQX1tK0IpeRAMTHz60e1yJq+ | |
136 | -SrGNypEOSlFdeD05xFzIjUbpKQe4Obml9wvBHF9FT2evGxknWOFxda0frZzl0UOK | |
137 | -70++BSfe6BZ9UwHKXhyjOazPoXEzRK7w6fHYlGjY5XkQ6Y9qNCt6lu80zy6vAxQ/ | |
138 | -f1Y3w9b+ArawqyTVtb9AtcJsAxhtBf/9njiE1dSTYve5D5S94zNiIWtpDxzbAgMB | |
139 | -AAGjgbswgbgwHQYDVR0OBBYEFHXLupDRzkynkvBxsMu+uHszBrIoMA8GA1UdEwEB | |
140 | -/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMBQGA1UdIAQNMAswCQYFYEwBAQgwADA/ | |
141 | -BgNVHR8EODA2MDSgMqAwhi5odHRwOi8vYWNyYWl6LmljcGJyYXNpbC5nb3YuYnIv | |
142 | -TENSYWNyYWl6djIuY3JsMB8GA1UdIwQYMBaAFAw5IDq3AR/L1yh9QaDH+kqtMiS+ | |
143 | -MA0GCSqGSIb3DQEBDQUAA4ICAQCJiamFONQFDtlBuOkqfglnGYufeillnVGeH6TW | |
144 | -p7yPEuH9Hfdq/1oN38aJmpvoWnno3GY5U/wKPokFAIizK2kASwvWSpu9hRD1kS5F | |
145 | -p4Qlqt1Zsm6bUOlcAD9wZylp7s1lebSj7XiO6epF4OSdeBtKl9OImeF8dhyqPnWb | |
146 | -j2IrjxEzyrZ+U+Lb4bFcBI6Lp6r1NHyun+TWD3jbCkBRpJLQt7uO+5asMZYEO+L+ | |
147 | -fuexEb2Bb8difS4ujPpdMlctg4wm6NHTcB008C+cMkwDpeBvaWpMOZLvDvENDhQW | |
148 | -4HBNHNDMdVoIsvvoxSVabrNxp02CATP0y9RubIgkmX40H+R8OXy8Cq3oipSm1t4v | |
149 | -/Ihs4aCtoDLZue3Q12RgqHNaKcuwTNoK5BH5AfEYRE2LYxQ/JVrlf1hJAu0fUe2n | |
150 | -hv42+i35AJVWpRrEmBk6GLejpJ/QAF1fRmdb0b1+lSLXgOfw3AzFW+e+8BdwCF/0 | |
151 | -6FPOvapilPMa+bsL7aabinBZ7a4Kc97cMHEW5gkQL0IL6yxYnzALHajvZrrLxwvp | |
152 | -zW/os3P2ztINB12cYAkDKf5nmo2ymDHY34IUfi1hPA8EEPkhozhi5Or/W6qRABsH | |
153 | -iSxrSEeSKLy4V34hkShPjDtl2Ob/aU1/8A5g5BSGPBpfm/TQJc7g7MrF67lRDoAh | |
154 | -DikamA== | |
155 | ------END CERTIFICATE----- |
containeres/sei-app/protocolo_integrado/ws/certificado_producao.cer.old
... | ... | @@ -1,165 +0,0 @@ |
1 | ------BEGIN CERTIFICATE----- | |
2 | -MIIHjzCCBXegAwIBAgIDEyzOMA0GCSqGSIb3DQEBCwUAMIGmMQswCQYDVQQGEwJC | |
3 | -UjETMBEGA1UEChMKSUNQLUJyYXNpbDEPMA0GA1UECxMGQ1NQQi0xMTswOQYDVQQL | |
4 | -EzJTZXJ2aWNvIEZlZGVyYWwgZGUgUHJvY2Vzc2FtZW50byBkZSBEYWRvcyAtIFNF | |
5 | -UlBSTzE0MDIGA1UEAxMrQXV0b3JpZGFkZSBDZXJ0aWZpY2Fkb3JhIGRvIFNFUlBS | |
6 | -TyBGaW5hbCB2NDAeFw0xNTEwMDcxNDQ0NTJaFw0xNjEwMDYxNDQ0NTJaMIGfMQsw | |
7 | -CQYDVQQGEwJCUjETMBEGA1UEChMKSUNQLUJyYXNpbDEXMBUGA1UECxMORXF1aXBh | |
8 | -bWVudG8gQTExETAPBgNVBAsTCEFSU0VSUFJPMSswKQYDVQQLEyJBdXRvcmlkYWRl | |
9 | -IENlcnRpZmljYWRvcmEgU0VSUFJPQUNGMSIwIAYDVQQDExlwcm90b2NvbG9pbnRl | |
10 | -Z3JhZG8uZ292LmJyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAoqzS | |
11 | -HBYX4qlNA6fQAYMbBgfe0G9WjFKER0vsqvNiPEiwB+xa+xzQccs/wr80fHbG1Aud | |
12 | -wptMuca0H3gb7RPpOzVZ6TRlf2S/qy72H6qzeRz8XdWfdkT3e6THolWBf1+Cmefu | |
13 | -mQz3yfZQxHBZUo4vspOUm4vIQCgMiDDpu9AtZmvWjEJK0N1fBCrbXwcXzsQgGPNY | |
14 | -ilTpNzSyF5nrEjdaDkQRyv2QRNSxHGq3gnrmv/1uJgJ0/tDZtEAEuT0a3R6s8hy0 | |
15 | -jwMPddQkyoXR8YRu7pN2knXevc8YpqtxJpganVLJtGEqHc5mRqdkkRlK+VehXcSe | |
16 | -ZAIGcVmqkuOU2VO1NQIDAQABo4ICyTCCAsUwHwYDVR0jBBgwFoAUZNtnW7OVF1KE | |
17 | -ibTvZyCwCIl8B3EwWQYDVR0gBFIwUDBOBgZgTAECARAwRDBCBggrBgEFBQcCARY2 | |
18 | -aHR0cDovL3JlcG9zaXRvcmlvLnNlcnByby5nb3YuYnIvZG9jcy9kcGNzZXJwcm9h | |
19 | -Y2YucGRmMIHRBgNVHR8EgckwgcYwPKA6oDiGNmh0dHA6Ly9yZXBvc2l0b3Jpby5z | |
20 | -ZXJwcm8uZ292LmJyL2xjci9hY3NlcnByb2FjZnY0LmNybDA+oDygOoY4aHR0cDov | |
21 | -L2NlcnRpZmljYWRvczIuc2VycHJvLmdvdi5ici9sY3IvYWNzZXJwcm9hY2Z2NC5j | |
22 | -cmwwRqBEoEKGQGh0dHA6Ly9yZXBvc2l0b3Jpby5pY3BicmFzaWwuZ292LmJyL2xj | |
23 | -ci9zZXJwcm8vYWNzZXJwcm9hY2Z2NC5jcmwwVgYIKwYBBQUHAQEESjBIMEYGCCsG | |
24 | -AQUFBzAChjpodHRwOi8vcmVwb3NpdG9yaW8uc2VycHJvLmdvdi5ici9jYWRlaWFz | |
25 | -L2Fjc2VycHJvYWNmdjQucDdiMIHrBgNVHREEgeMwgeCgNAYFYEwBAwigKwQpU0VS | |
26 | -VklDTyBGRURFUkFMIERFIFBST0NFU1NBTUVOVE8gREUgREFET1OgPQYFYEwBAwSg | |
27 | -NAQyMTMwNTE5NzgwNzgyNDU3NjczNjAwMDAwMDAwMDAwMDAwMDAwMTA3NzgyMDk2 | |
28 | -SUZQUkqgKgYFYEwBAwKgIQQfUEVEUk8gUklCRUlSTyBERSBGUkVJVEFTIEpVTklP | |
29 | -UqAZBgVgTAEDA6AQBA4zMzY4MzExMTAwMDEwN4EicGVkcm8uZnJlaXRhcy1qdW5p | |
30 | -b3JAc2VycHJvLmdvdi5icjAOBgNVHQ8BAf8EBAMCBeAwHQYDVR0lBBYwFAYIKwYB | |
31 | -BQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4ICAQAH2BiC81wr3V+jn7Dp | |
32 | -u37mOoT8uYCIftD+z05n2XwYHG2caeDpFUuS3ZCOr28e2g7SD1hilgWbFQX0kBFF | |
33 | -nIXk/GNk18BdEMT2XtMpzdMvJ2DIrDlXIdnaSjXZ+ISbDI5KvjRefMZytRFDwnLh | |
34 | -Gg3kxUXeJ1WtvBNAio6JtdH0biasVSXPcAg595FTMeSyDLxXAeFmoKi588ttRJEI | |
35 | -wByoW2gOE6tjJ5VVTA8HADkkTbuNZJPKYB52FgaRwROds63vgOSlkNA1bULtksDp | |
36 | -xl98WPmOa4N1qiZcZ3a30+VbvpvXmlQRwMpb4ZKreeUJu3DE4qdLHOlKdSiGriQ3 | |
37 | -aobbFqW8Cb3yLl1JpGAnOJ+awaVwtVQMalfPQ40rP6QJ793/pSDj5rZHeePolDyc | |
38 | -a0OEf5w0WZ3iGwhRQjH+ydHR+LBBcpJickDAKWhgq7nNIzEpEBUddtL8lM7MUr/w | |
39 | -oM0MGULCaP5Lki9OOrAwxYG4++to6Ksi5sArDXy4BdmCkyFLOF0+LToKgbbATK4a | |
40 | -8E4l9srj5kkkDO4eAxRFFm7BgeX+06FLQ6mlnEPjtuGuSH6EsZXAgIAceYtlZ3Yh | |
41 | -bjOIv/wvQE9A/Q1eu0Z/2IJqgihDZcEezBvtjN906UnkmQ/BIwZ/gENhzKTutKEC | |
42 | -L8tsKviP5myfYRdPY/ajJON0aA== | |
43 | ------END CERTIFICATE----- | |
44 | ------BEGIN CERTIFICATE----- | |
45 | -MIIIdjCCBl6gAwIBAgIBBDANBgkqhkiG9w0BAQ0FADCBhTELMAkGA1UEBhMCQlIx | |
46 | -EzARBgNVBAoTCklDUC1CcmFzaWwxNDAyBgNVBAsTK0F1dG9yaWRhZGUgQ2VydGlm | |
47 | -aWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjIxKzApBgNVBAMTIkF1dG9yaWRhZGUg | |
48 | -Q2VydGlmaWNhZG9yYSBTRVJQUk8gdjMwHhcNMTQwMTE1MTkzNDMxWhcNMjExMDA4 | |
49 | -MTkzNDMxWjCBpjELMAkGA1UEBhMCQlIxEzARBgNVBAoTCklDUC1CcmFzaWwxDzAN | |
50 | -BgNVBAsTBkNTUEItMTE7MDkGA1UECxMyU2VydmljbyBGZWRlcmFsIGRlIFByb2Nl | |
51 | -c3NhbWVudG8gZGUgRGFkb3MgLSBTRVJQUk8xNDAyBgNVBAMTK0F1dG9yaWRhZGUg | |
52 | -Q2VydGlmaWNhZG9yYSBkbyBTRVJQUk8gRmluYWwgdjQwggIiMA0GCSqGSIb3DQEB | |
53 | -AQUAA4ICDwAwggIKAoICAQDRS1z3cL2yn0fWpPRGEADhs4ubobOR9umUn4URGEYV | |
54 | -H20TbNvkoOfUGHFepCuFvZwt2TAyo/nKUQSYvAB7MCOnuc9erQmAGkjEQYYWlv51 | |
55 | -h58fIAB4tsObCQfExZxHogXlUqidWABUZLPM/tfnxC8vfKmaPvaXYEbzDZu0oLD0 | |
56 | -nFhHr8sP0fWDb9ssqqGltFy67uqZ6jV6qtHeUz3fs0Me5X01q73oob02U5F9dj6B | |
57 | -824B22i9ziUz8FdtRfq66JgHP562n7ROJrJ9lR/DBzR4KRSHJHUX7Z4t6OQvRqwv | |
58 | -oUQpK5fpQhth8FwgcpihXnt0BsNujvBv5kaKhr1gAlcUjV8XSr7id8GW0Q+wo/RI | |
59 | -Tytp/HUEuwJ5atuD8KPVuNiOUcaMJAHz25JYbyNBGrBELqekz0G/rt8Z22SDNdRC | |
60 | -RA4SWbINRILI5JT7GTFlXs77bQgdIOAksDMnwoIwwJOeTfu7PxSedbJXo2DQFhz1 | |
61 | -X7IWn73YlZc8PCbU59Fo6OQNAO6WnxMfzAo+rR8gC/a/bu823vNkGDQ9/lqm3jXj | |
62 | -2baAdd9ooi7dg6ERkCNR5IbxTbXJrD/hQS3uAIe8w3G9C8NgShf1YgdA9kfvarq7 | |
63 | -hFf1ybRllugVxL70GyzhJTebJQHaTyKQ0PZPp3Bo/3VrE62E8BrWTOJF/sm+Me28 | |
64 | -vQIDAQABo4ICzDCCAsgwggHuBgNVHSAEggHlMIIB4TBOBgZgTAECARAwRDBCBggr | |
65 | -BgEFBQcCARY2aHR0cDovL2NjZC5zZXJwcm8uZ292LmJyL2Fjc2VycHJvL2RvY3Mv | |
66 | -ZHBjYWNzZXJwcm8ucGRmME4GBmBMAQIDDTBEMEIGCCsGAQUFBwIBFjZodHRwOi8v | |
67 | -Y2NkLnNlcnByby5nb3YuYnIvYWNzZXJwcm8vZG9jcy9kcGNhY3NlcnByby5wZGYw | |
68 | -TgYGYEwBAgERMEQwQgYIKwYBBQUHAgEWNmh0dHA6Ly9jY2Quc2VycHJvLmdvdi5i | |
69 | -ci9hY3NlcnByby9kb2NzL2RwY2Fjc2VycHJvLnBkZjBOBgZgTAECZQwwRDBCBggr | |
70 | -BgEFBQcCARY2aHR0cDovL2NjZC5zZXJwcm8uZ292LmJyL2Fjc2VycHJvL2RvY3Mv | |
71 | -ZHBjYWNzZXJwcm8ucGRmME4GBmBMAQJnCjBEMEIGCCsGAQUFBwIBFjZodHRwOi8v | |
72 | -Y2NkLnNlcnByby5nb3YuYnIvYWNzZXJwcm8vZG9jcy9kcGNhY3NlcnByby5wZGYw | |
73 | -TwYHYEwBAoIvAzBEMEIGCCsGAQUFBwIBFjZodHRwOi8vY2NkLnNlcnByby5nb3Yu | |
74 | -YnIvYWNzZXJwcm8vZG9jcy9kcGNhY3NlcnByby5wZGYwcAYDVR0fBGkwZzAxoC+g | |
75 | -LYYraHR0cDovL2NjZC5zZXJwcm8uZ292LmJyL2xjci9hY3NlcnByb3YzLmNybDAy | |
76 | -oDCgLoYsaHR0cDovL2NjZDIuc2VycHJvLmdvdi5ici9sY3IvYWNzZXJwcm92My5j | |
77 | -cmwwHwYDVR0jBBgwFoAUyNbq+YOPTFg7HNmLm5l3Za/JWNowHQYDVR0OBBYEFGTb | |
78 | -Z1uzlRdShIm072cgsAiJfAdxMBIGA1UdEwEB/wQIMAYBAf8CAQAwDgYDVR0PAQH/ | |
79 | -BAQDAgEGMA0GCSqGSIb3DQEBDQUAA4ICAQAt0bMqz2/dlnTcWXYbQ6qDOP16TvYg | |
80 | -Wy5k8uGSMKut2sb/v6bBM4BD5agPjz6SekYLOy0+j24wZvdndoGNdZRoQDoQNZRS | |
81 | -Y2VV2Y1dD8jS2TOwre7HhQou7afjpjumdS68kUAiRd9FX8I5Fhde0S4gm0nbfSLm | |
82 | -HHmQ1hN5HkYH6ZVYfk8tlHnCjEkmDGWplGCbBwIenRF2IaZH2HSDCGmUzIlyYr9z | |
83 | -V2RFltX/icsquvlHBfUpclKNYATkvlylDfgO7X6Mvx5VyazCwcQ5aDjqye/lQvU+ | |
84 | -RomI8Iun8TlBtGHPulwHVDTaTlx4wjicktnpWXYgR6huLP1p4wM/hU3v+hyN+Iqk | |
85 | -GYK7QXQ4h8M+oM7uTi+I0Kvx2dqAI62kxRlz7whqArdrXl8vx3RZFpRhvQlJ33Hm | |
86 | -9E94VORysU5JLY7IbYPTAniebudOeGl7drfo5iQPb3WaMoE1s8092FADWcdnmCSO | |
87 | -zHebTUWfUbM9RhDwombNx2YsRDSj3m/g4crYEjME30ZA2OrosVHrMMpFBZMnOIqO | |
88 | -lvH5jnjheiBxQYiG6ReWx/5omNV17daOaQQ0T0gnsQZie8ZETI01AJ5QX+69pmJr | |
89 | -vSpH8kXeq2ohHxBfvuL2D+MiBwhn65tBGtraprHbentTCmh9ImmSwACqeG8okyX/ | |
90 | -SIdF97XslskCDQ== | |
91 | ------END CERTIFICATE----- | |
92 | ------BEGIN CERTIFICATE----- | |
93 | -MIIGVTCCBD2gAwIBAgIBBzANBgkqhkiG9w0BAQ0FADCBlzELMAkGA1UEBhMCQlIx | |
94 | -EzARBgNVBAoTCklDUC1CcmFzaWwxPTA7BgNVBAsTNEluc3RpdHV0byBOYWNpb25h | |
95 | -bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxNDAyBgNVBAMTK0F1 | |
96 | -dG9yaWRhZGUgQ2VydGlmaWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjIwHhcNMTEx | |
97 | -MDIxMTIwMjQ3WhcNMjExMDIxMTIwMjQ3WjCBhTELMAkGA1UEBhMCQlIxEzARBgNV | |
98 | -BAoTCklDUC1CcmFzaWwxNDAyBgNVBAsTK0F1dG9yaWRhZGUgQ2VydGlmaWNhZG9y | |
99 | -YSBSYWl6IEJyYXNpbGVpcmEgdjIxKzApBgNVBAMTIkF1dG9yaWRhZGUgQ2VydGlm | |
100 | -aWNhZG9yYSBTRVJQUk8gdjMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC | |
101 | -AQDxb+z1eCFkAqtiDxv/Qyh/kyuyjnAWQKG47bumr+CvI6XYU9i3rgJCrsh3qh1Q | |
102 | -aANDTxMi2IjUOsGop5rd1hvMS20KaBNgz8JKmsoaeJxtk2lQNX5jQMeJPXbW+qHg | |
103 | -LpIHBe5UWAmkhNSg01RejukOndR13KpKXBRjfD1EuT8YrbVHItUKFacGUQdP3ud7 | |
104 | -ds6jGeDdVMywmKUIMbREnZQukMtN0COFiHMI+DeEhwupp1+8xRyCbOtD/yw7/Xea | |
105 | -hGpDnpQPqpbkb9hT7cjAtjVsZZt/CwlqAUSgO2/fsFb4NWd5s76edq0qvfLv4AKj | |
106 | -hzzB8LHAb0R+DMEDSfseJ/BDFkg9+EqWMDROSnVakQegUmx8sfOMF7aF66uNf7r6 | |
107 | -8rwVpch01UGPQqVFvJTLLUpOKPAHYMZ1zT9V39+X2NwmAFfjw5yjDQZ5rBYkm3V9 | |
108 | -/i65/nI4XKAEL6+a3kcEbZjTmX2EwCzvpTKWt6dE2L5LvdMHkp8jPpC72/25zPSM | |
109 | -3xGQAGnQ9wkL3wQLu+ya2xHi4xDkP6T7ELTBZEN2Kqfk2/2ZKhjrs6ImjbI5KOqs | |
110 | -//qqLQLkf9ij0AUiOIozbrWbHQmpOXI6SZzm32C8ES5+4HebILB9d6GVJva09hyG | |
111 | -gesuaIWZe4tGnXm7QIqHBDu+iHOgVA7hWG9/K/meA+MqvQIDAQABo4G7MIG4MB0G | |
112 | -A1UdDgQWBBTI1ur5g49MWDsc2YubmXdlr8lY2jAPBgNVHRMBAf8EBTADAQH/MA4G | |
113 | -A1UdDwEB/wQEAwIBBjAUBgNVHSAEDTALMAkGBWBMAQECMAAwPwYDVR0fBDgwNjA0 | |
114 | -oDKgMIYuaHR0cDovL2FjcmFpei5pY3BicmFzaWwuZ292LmJyL0xDUmFjcmFpenYy | |
115 | -LmNybDAfBgNVHSMEGDAWgBQMOSA6twEfy9cofUGgx/pKrTIkvjANBgkqhkiG9w0B | |
116 | -AQ0FAAOCAgEAIybRY3G1KgJb33HvcDnNPEdFpC1J88C+hTWZuQyqamb85Eaiwl3Q | |
117 | -tiw59W+7u4LMrZdJJuur4NYHUNzeHfs3Ce/sVULf2Ord1d7VvQPKSwrOdPIDuMbB | |
118 | -vQRyZgSPy9kpPSQZ+h60+kqG8er39eNnqcCj1J17TpQZpWjKJn8hocqGCGeY7Tu8 | |
119 | -XaPKhzshDqPCwWEvQB0uj8Mt/OSKcarvzBpmPlcotH7dcdKP0Ur0UNfQLqD7Yu/E | |
120 | -DSGQ/WqQ2nS3vIxeRL2ULn3Lq27EWaWmRD2mfQHyE5yCUUoWwDrJJrkE5u8dGG61 | |
121 | -VcNaKtZYwaHHTQuf8LiV7pK4NqcjCNXX9SvKvz1DydFAJheBlPaJ1xnzSbD4tPeR | |
122 | -VqkXC6WlJBGXcREYt1EUpJ+LESkQy1j9ooerXUcNnZKipBYxFyB3WTKaGjrJ1JDx | |
123 | -zHe7x402F3jQKDIILRekN0UrRjygDUaMmH/RikTVPFt2+f2c4FqdvVTdXJ7zjAgO | |
124 | -92z0QzjSEZBSLaVvQSr2kEV9C2n0CsCuztHu6PycpwZeZS/eH/yk8LMZAH76TG0l | |
125 | -Et+CKwNUUPgjK+fIedCs87sxU2QQ09pDptAkKQWm3fPotWaVD4NrHivZj4tX8W/I | |
126 | -soDk7v6OV+H2B9eJ2Rsdszr0abUOIrf8cMtPG2wvDZ5wXAxy5jL73VM= | |
127 | ------END CERTIFICATE----- | |
128 | ------BEGIN CERTIFICATE----- | |
129 | -MIIGoTCCBImgAwIBAgIBATANBgkqhkiG9w0BAQ0FADCBlzELMAkGA1UEBhMCQlIx | |
130 | -EzARBgNVBAoTCklDUC1CcmFzaWwxPTA7BgNVBAsTNEluc3RpdHV0byBOYWNpb25h | |
131 | -bCBkZSBUZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxNDAyBgNVBAMTK0F1 | |
132 | -dG9yaWRhZGUgQ2VydGlmaWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjIwHhcNMTAw | |
133 | -NjIxMTkwNDU3WhcNMjMwNjIxMTkwNDU3WjCBlzELMAkGA1UEBhMCQlIxEzARBgNV | |
134 | -BAoTCklDUC1CcmFzaWwxPTA7BgNVBAsTNEluc3RpdHV0byBOYWNpb25hbCBkZSBU | |
135 | -ZWNub2xvZ2lhIGRhIEluZm9ybWFjYW8gLSBJVEkxNDAyBgNVBAMTK0F1dG9yaWRh | |
136 | -ZGUgQ2VydGlmaWNhZG9yYSBSYWl6IEJyYXNpbGVpcmEgdjIwggIiMA0GCSqGSIb3 | |
137 | -DQEBAQUAA4ICDwAwggIKAoICAQC6RqQO3edA8rWgfFKVV0X8bYTzhgHJhQOtmKvS | |
138 | -8l4Fmcm7b2Jn/XdEuQMHPNIbAGLUcCxCg3lmq5lWroG8akm983QPYrfrWwdmlEIk | |
139 | -nUasmkIYMPAkqFFB6quV8agrAnhptSknXpwuc8b+I6Xjps79bBtrAFTrAK1POkw8 | |
140 | -5wqIW9pemgtW5LVUOB3yCpNkTsNBklMgKs/8dG7U2zM4YuT+jkxYHPePKk3/xZLZ | |
141 | -CVK9z3AAnWmaM2qIh0UhmRZRDTTfgr20aah8fNTd0/IVXEvFWBDqhRnLNiJYKnIM | |
142 | -mpbeys8IUWG/tAUpBiuGkP7pTcMEBUfLz3bZf3Gmh3sVQOQzgHgHHaTyjptAO8ly | |
143 | -UN9pvvAslh+QtdWudONltIwa6Wob+3JcxYJU6uBTB8TMEun33tcv1EgvRz8mYQSx | |
144 | -Epoza7WGSxMr0IadR+1p+/yEEmb4VuUOimx2xGsaesKgWhLRI4lYAXwIWNoVjhXZ | |
145 | -fn03tqRF9QOFzEf6i3lFuGZiM9MmSt4c6dR/5m0muTx9zQ8oCikPm91jq7mmRxqE | |
146 | -14WkA2UGBEtSjYM0Qn8xjhEu5rNnlUB+l3pAAPkRbIM4WK0DM1umxMHFsKwNqQbw | |
147 | -pmkBNLbp+JRITz6mdQnsSsU74MlesDL/n2lZzzwwbw3OJ1fsWhto/+xPb3gyPnnF | |
148 | -tF2VfwIDAQABo4H1MIHyME4GA1UdIARHMEUwQwYFYEwBAQAwOjA4BggrBgEFBQcC | |
149 | -ARYsaHR0cDovL2FjcmFpei5pY3BicmFzaWwuZ292LmJyL0RQQ2FjcmFpei5wZGYw | |
150 | -PwYDVR0fBDgwNjA0oDKgMIYuaHR0cDovL2FjcmFpei5pY3BicmFzaWwuZ292LmJy | |
151 | -L0xDUmFjcmFpenYyLmNybDAfBgNVHSMEGDAWgBQMOSA6twEfy9cofUGgx/pKrTIk | |
152 | -vjAdBgNVHQ4EFgQUDDkgOrcBH8vXKH1BoMf6Sq0yJL4wDwYDVR0TAQH/BAUwAwEB | |
153 | -/zAOBgNVHQ8BAf8EBAMCAQYwDQYJKoZIhvcNAQENBQADggIBAFmaFGkYbX0pQ3B9 | |
154 | -dpth33eOGnbkqdbLdqQWDEyUEsaQ0YEDxa0G2S1EvLIJdgmAOWcAGDRtBgrmtRBZ | |
155 | -SLp1YPw/jh0YVXArnkuVrImrCncke2HEx5EmjkYTUTe2jCcK0w3wmisig4OzvYM1 | |
156 | -rZs8vHiDKTVhNvgRcTMgVGNTRQHYE1qEO9dmEyS3xEbFIthzJO4cExeWyCXoGx7P | |
157 | -34VQbTzq91CeG5fep2vb1nPSz3xQwLCM5VMSeoY5rDVbZ8fq1PvRwl3qDpdzmK4p | |
158 | -v+Q68wQ2UCzt3h7bhegdhAnu86aDM1tvR3lPSLX8uCYTq6qz9GER+0Vn8x0+bv4q | |
159 | -SyZEGp+xouA82uDkBTp4rPuooU2/XSx3KZDNEx3vBijYtxTzW8jJnqd+MRKKeGLE | |
160 | -0QW8BgJjBCsNid3kXFsygETUQuwq8/JAhzHVPuIKMgwUjdVybQvm/Y3kqPMFjXUX | |
161 | -d5sKufqQkplliDJnQwWOLQsVuzXxYejZZ3ftFuXoAS1rND+Og7P36g9KHj41hJ2M | |
162 | -gDQ/qZXow63EzZ7KFBYsGZ7kNou5uaNCJQc+w+XVaE+gZhyms7ZzHJAaP0C5GlZC | |
163 | -cIf/by0PEf0e//eFMBUO4xcx7ieVzMnpmR6Xx21bB7UFaj3yRd+6gnkkcC6bgh9m | |
164 | -qaVtJ8z2KqLRX4Vv4EadqtKlTlUO | |
165 | ------END CERTIFICATE----- |
... | ... | @@ -0,0 +1 @@ |
1 | +Subproject commit daf9613e424db0b7a3e1b03446dbadd5f5f8e75f | ... | ... |