Commit 841310924bbc52b4a8a7d8bcf73e11f7a3bf48dc
1 parent
5efa2c52
Exists in
master
and in
1 other branch
Indicador 6 - QUantidade de processos administrativos
Showing
2 changed files
with
13 additions
and
1 deletions
Show diff stats
dto/IndicadoresDTO.php
@@ -17,5 +17,6 @@ class IndicadoresDTO extends InfraDTO { | @@ -17,5 +17,6 @@ class IndicadoresDTO extends InfraDTO { | ||
17 | $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'QuantidadeUnidades', 'quantidade_unidades'); | 17 | $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'QuantidadeUnidades', 'quantidade_unidades'); |
18 | $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'TamanhoDocumentosExternos', 'tamanho_docs_externos'); | 18 | $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'TamanhoDocumentosExternos', 'tamanho_docs_externos'); |
19 | $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'Protocolo', 'protocolo'); | 19 | $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'Protocolo', 'protocolo'); |
20 | + $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'QuantidadeProcedimentos', 'quantidade_procedimentos'); | ||
20 | } | 21 | } |
21 | } | 22 | } |
rn/MdEstatisticasColetarRN.php
@@ -22,7 +22,7 @@ class MdEstatisticasColetarRN extends InfraRN { | @@ -22,7 +22,7 @@ class MdEstatisticasColetarRN extends InfraRN { | ||
22 | InfraDebug::getInstance()->limpar(); | 22 | InfraDebug::getInstance()->limpar(); |
23 | 23 | ||
24 | //IMPLEMENTAÇÃO DA EXTRAÇÃO DE INDICADORES | 24 | //IMPLEMENTAÇÃO DA EXTRAÇÃO DE INDICADORES |
25 | - //1) Criar o objeto DTO representativo dos indicaores | 25 | + //1) Criar o objeto DTO representativo dos indicadores |
26 | $objIndicadoresDTO = new IndicadoresDTO(); | 26 | $objIndicadoresDTO = new IndicadoresDTO(); |
27 | 27 | ||
28 | //2) Preencher cada indicador do sistema | 28 | //2) Preencher cada indicador do sistema |
@@ -33,6 +33,7 @@ class MdEstatisticasColetarRN extends InfraRN { | @@ -33,6 +33,7 @@ class MdEstatisticasColetarRN extends InfraRN { | ||
33 | $objIndicadoresDTO->setNumQuantidadeUnidades($this->obterQuantidadeUnidades()); | 33 | $objIndicadoresDTO->setNumQuantidadeUnidades($this->obterQuantidadeUnidades()); |
34 | $objIndicadoresDTO->setNumTamanhoDocumentosExternos($this->obterTamanhoTotalDocumentosExternos()); | 34 | $objIndicadoresDTO->setNumTamanhoDocumentosExternos($this->obterTamanhoTotalDocumentosExternos()); |
35 | $objIndicadoresDTO->setStrProtocolo($this->obterProtocolo()); | 35 | $objIndicadoresDTO->setStrProtocolo($this->obterProtocolo()); |
36 | + $objIndicadoresDTO->setNumQuantidadeProcedimentos($this->obterQuantidadeProcessosAdministrativos()); | ||
36 | 37 | ||
37 | //... | 38 | //... |
38 | 39 | ||
@@ -120,6 +121,7 @@ class MdEstatisticasColetarRN extends InfraRN { | @@ -120,6 +121,7 @@ class MdEstatisticasColetarRN extends InfraRN { | ||
120 | InfraDebug::getInstance()->gravar('SEI12 - Tamanho Documentos Externos: ' . $tamanho, InfraLog::$INFORMACAO); | 121 | InfraDebug::getInstance()->gravar('SEI12 - Tamanho Documentos Externos: ' . $tamanho, InfraLog::$INFORMACAO); |
121 | return $tamanho; | 122 | return $tamanho; |
122 | } | 123 | } |
124 | + | ||
123 | private function obterProtocolo(){ | 125 | private function obterProtocolo(){ |
124 | $objConfiguracaoSEI = ConfiguracaoSEI::getInstance(); | 126 | $objConfiguracaoSEI = ConfiguracaoSEI::getInstance(); |
125 | if ($objConfiguracaoSEI->isSetValor('SessaoSEI', 'https')){ | 127 | if ($objConfiguracaoSEI->isSetValor('SessaoSEI', 'https')){ |
@@ -133,5 +135,14 @@ class MdEstatisticasColetarRN extends InfraRN { | @@ -133,5 +135,14 @@ class MdEstatisticasColetarRN extends InfraRN { | ||
133 | } | 135 | } |
134 | } | 136 | } |
135 | 137 | ||
138 | + private function obterQuantidadeProcessosAdministrativos(){ | ||
139 | + $query = "select count(*) as quantidade from procedimento"; | ||
140 | + $rs = BancoSEI::getInstance()->consultarSql($query); | ||
141 | + $quantidade = (count($rs) && isset($rs[0]['quantidade'])) ? $rs[0]['quantidade'] : 0; | ||
142 | + | ||
143 | + InfraDebug::getInstance()->gravar('SEI06 - Quantidade de Processos Administrativos: ' . $quantidade, InfraLog::$INFORMACAO); | ||
144 | + return $quantidade; | ||
145 | + } | ||
146 | + | ||
136 | } | 147 | } |
137 | ?> | 148 | ?> |