Skip to content

Commit

Permalink
fix: alterar nome historico no recebimento para teste funcional
Browse files Browse the repository at this point in the history
  • Loading branch information
Glaydson Rodrigues committed Dec 10, 2024
1 parent 5bf5784 commit 8f0ba83
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 425 deletions.
2 changes: 1 addition & 1 deletion src/rn/ExpedirProcedimentoRN.php
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ private function atribuirDadosHistoricoREST($objProcesso, $dblIdProcedimento)
return $dt1 > $dt2;
});

$objProcesso['historico'] = $arrObjOperacao;
$objProcesso['itensHistorico'] = $arrObjOperacao;

return $objProcesso;
}
Expand Down
32 changes: 11 additions & 21 deletions src/rn/ProcessoEletronicoRN.php
Original file line number Diff line number Diff line change
Expand Up @@ -926,30 +926,26 @@ public function construirCabecalho($strNumeroRegistro, $idRepositorioOrigem, $id
$atribuirInformacoes = $this->atribuirInformacoesAssuntoREST($cabecalho, $dblIdProcedimento);
$atribuirInfoModulo = $this->atribuirInformacoesModuloREST($cabecalho);

if (!empty($atribuirInformacoes)) {
$cabecalho = $atribuirInformacoes;
}

if (!empty($atribuirInfoModulo)) {
$cabecalho = $atribuirInfoModulo;
}
$cabecalho['propriedadesAdicionais'] = array_merge($atribuirInformacoes, $atribuirInfoModulo);

return $cabecalho;
}

private function atribuirInformacoesModuloREST($objCabecalho)
{
try{
$arrInformacoeesModulo = [];
$objInfraParametro = new InfraParametro(BancoSEI::getInstance());
$objCabecalho['propriedadesAdicionais'][] = [

$arrInformacoeesModulo[] = [
'chave' => 'MODULO_PEN_VERSAO',
'valor' => $objInfraParametro->getValor('VERSAO_MODULO_PEN')
];

return $objCabecalho;
return $arrInformacoeesModulo;

}catch(Exception $e){

$mensagem = "Erro ao obter versão do módulo PEN";
throw new InfraException($mensagem, $e);
}
}
Expand Down Expand Up @@ -1054,8 +1050,7 @@ private function atribuirInformacoesAssuntoREST($objCabecalho, $dblIdProcediment
$contagem++;
}

$objCabecalho['propriedadesAdicionais'][] = $arrDadosAssunto;
return $objCabecalho;
return $arrDadosAssunto;

}catch(Exception $e){
$mensagem = "Falha ao atribuir informações de assunto";
Expand Down Expand Up @@ -1741,17 +1736,17 @@ public function consultarTramites($parNumIdTramite = null, $parNumeroRegistro =

if (isset($arrResultado['tramites']) && !empty($arrResultado['tramites'][0])) {

$historico = [];
$itensHistorico = [];
foreach ($arrResultado['tramites'][0]['mudancasDeSituacao'] as $mudancaDeSituacao) {
$historico['operacao'][] = $mudancaDeSituacao;
$itensHistorico['operacao'][] = $mudancaDeSituacao;
}

$arrResultado['tramites'][0] = array_filter($arrResultado['tramites'][0], function($value) {
return !is_null($value);
});

$arrObjTramite[] = $this->converterArrayParaObjeto($arrResultado['tramites'][0]);
$arrObjTramite[0]->historico = (object) $historico;
$arrObjTramite[0]->itensHistorico = (object) $itensHistorico;

}

Expand Down Expand Up @@ -2558,15 +2553,10 @@ public static function obterTamanhoBlocoTransferencia(){
*/
private static function documentoFoiAnexado($parObjProtocolo, $parObjDocumento)
{

return (
isset($parObjDocumento->protocoloDoProcessoAnexado) &&
!empty($parObjDocumento->protocoloDoProcessoAnexado) &&
(
is_array($parObjProtocolo)
? $parObjProtocolo['protocolo'] != $parObjDocumento->protocoloDoProcessoAnexado
: (is_object($parObjProtocolo) && $parObjProtocolo->protocolo != $parObjDocumento->protocoloDoProcessoAnexado)
)
$parObjProtocolo->protocolo != $parObjDocumento->protocoloDoProcessoAnexado
);
}

Expand Down
7 changes: 0 additions & 7 deletions src/rn/ReceberProcedimentoRN.php
Original file line number Diff line number Diff line change
Expand Up @@ -1862,13 +1862,6 @@ private function atribuirDocumentos($parObjProcedimentoDTO, $parObjProtocolo, $o
$objDocumentoDTO->getObjProtocoloDTO()->setNumIdUnidadeGeradora(SessaoSEI::getInstance()->getNumIdUnidadeAtual());
$objDocumentoDTO->setStrSinBloqueado('N');


// if (isset($objDocumento->componenteDigital)) {
// $componentesDigitais = $objDocumento->componenteDigital;
// } else {
// $componentesDigitais = (array) $objDocumento->componentesDigitais;
// }

//TODO: Fazer a atribuição dos componentes digitais do processo a partir desse ponto
$this->atribuirComponentesDigitais(
$objDocumentoDTO,
Expand Down
2 changes: 2 additions & 0 deletions tests_sei4/funcional/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php
require_once __DIR__ . '/vendor/autoload.php';

define("DIR_SEI_VENDOR", __DIR__ . '/vendor');

require_once __DIR__ . '/sei/src/sei/web/SEI.php';

define("DIR_SEI_WEB", __DIR__ . '/sei/src/sei/web/');
Expand Down

This file was deleted.

2 changes: 2 additions & 0 deletions tests_sei41/funcional/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?php

require_once __DIR__ . '/vendor/autoload.php';

define("DIR_SEI_VENDOR", __DIR__ . '/vendor');

require_once __DIR__ . '/sei/src/sei/web/SEI.php';

Expand Down

This file was deleted.

Loading

0 comments on commit 8f0ba83

Please sign in to comment.