Commit 841310924bbc52b4a8a7d8bcf73e11f7a3bf48dc

Authored by Starlone Passos
1 parent 5efa2c52

Indicador 6 - QUantidade de processos administrativos

dto/IndicadoresDTO.php
... ... @@ -17,5 +17,6 @@ class IndicadoresDTO extends InfraDTO {
17 17 $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'QuantidadeUnidades', 'quantidade_unidades');
18 18 $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'TamanhoDocumentosExternos', 'tamanho_docs_externos');
19 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 22 InfraDebug::getInstance()->limpar();
23 23  
24 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 26 $objIndicadoresDTO = new IndicadoresDTO();
27 27  
28 28 //2) Preencher cada indicador do sistema
... ... @@ -33,6 +33,7 @@ class MdEstatisticasColetarRN extends InfraRN {
33 33 $objIndicadoresDTO->setNumQuantidadeUnidades($this->obterQuantidadeUnidades());
34 34 $objIndicadoresDTO->setNumTamanhoDocumentosExternos($this->obterTamanhoTotalDocumentosExternos());
35 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 121 InfraDebug::getInstance()->gravar('SEI12 - Tamanho Documentos Externos: ' . $tamanho, InfraLog::$INFORMACAO);
121 122 return $tamanho;
122 123 }
  124 +
123 125 private function obterProtocolo(){
124 126 $objConfiguracaoSEI = ConfiguracaoSEI::getInstance();
125 127 if ($objConfiguracaoSEI->isSetValor('SessaoSEI', 'https')){
... ... @@ -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 ?>
... ...