From ef177ec3318f126f043d05df81d9f07fb5ad150c Mon Sep 17 00:00:00 2001 From: Eduardo Praxedes Heinske Date: Wed, 14 Mar 2018 09:27:38 -0300 Subject: [PATCH] Correção no recebimento de processos e documentos já existentes, passando a alterar o níve de sigilo e hipótese legal --- rn/ReceberProcedimentoRN.php | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/rn/ReceberProcedimentoRN.php b/rn/ReceberProcedimentoRN.php index 149e0a9..e36d2cf 100644 --- a/rn/ReceberProcedimentoRN.php +++ b/rn/ReceberProcedimentoRN.php @@ -560,7 +560,7 @@ class ReceberProcedimentoRN extends InfraRN //Realiza a alteração dos metadados do processo //TODO: Implementar alteração de todos os metadados - //$this->alterarMetadadosProcedimento($objProcedimentoDTO->getDblIdProcedimento(), $objProcesso); + $this->alterarMetadadosProcedimento($objProcedimentoDTO->getDblIdProcedimento(), $objProcesso); //TODO: Finalizar o envio do documento para a respectiva unidade $this->enviarProcedimentoUnidade($objProcedimentoDTO, true); @@ -761,10 +761,13 @@ class ReceberProcedimentoRN extends InfraRN //Realiza a alteração dos metadados do processo(Por hora, apenas do nível de sigilo e hipótese legal) $objProtocoloDTO = new ProtocoloDTO(); - $objProtocoloDTO->setDblIdProcedimento($parNumIdProcedimento); - $objProtocoloDTO->setStrStaNivelAcessoLocal($this->obterNivelSigiloSEI($parObjMetadadoProcedimento->nivelSigilo)); - $objProtocoloDTO->setNumIdHipoteseLegal($this->obterHipoteseLegalSEI($parObjMetadadoProcedimento->hipoteseLegal->identificacao)); - + $objProtocoloDTO->setDblIdProtocolo($parNumIdProcedimento); + $objProtocoloDTO->setStrStaNivelAcessoLocal($this->obterNivelSigiloSEI($parObjMetadadoProcedimento->nivelDeSigilo)); + + if($parObjMetadadoProcedimento->hipoteseLegal && $parObjMetadadoProcedimento->hipoteseLegal->identificacao){ + $objProtocoloDTO->setNumIdHipoteseLegal($this->obterHipoteseLegalSEI($parObjMetadadoProcedimento->hipoteseLegal->identificacao)); + } + $objProtocoloRN = new ProtocoloRN(); $objProtocoloRN->alterarRN0203($objProtocoloDTO); } @@ -773,8 +776,11 @@ class ReceberProcedimentoRN extends InfraRN //Realiza a alteração dos metadados do documento(Por hora, apenas do nível de sigilo e hipótese legal) $objProtocoloDTO = new ProtocoloDTO(); $objProtocoloDTO->setDblIdProtocolo($parNumIdDocumento); - $objProtocoloDTO->setStrStaNivelAcessoLocal($this->obterNivelSigiloSEI($parObjMetadadoDocumento->nivelSigilo)); - $objProtocoloDTO->setNumIdHipoteseLegal($this->obterHipoteseLegalSEI($parObjMetadadoDocumento->hipoteseLegal->identificacao)); + $objProtocoloDTO->setStrStaNivelAcessoLocal($this->obterNivelSigiloSEI($parObjMetadadoDocumento->nivelDeSigilo)); + + if($parObjMetadadoDocumento->hipoteseLegal && $parObjMetadadoDocumento->hipoteseLegal->identificacao){ + $objProtocoloDTO->setNumIdHipoteseLegal($this->obterHipoteseLegalSEI($parObjMetadadoDocumento->hipoteseLegal->identificacao)); + } $objProtocoloRN = new ProtocoloRN(); $objProtocoloRN->alterarRN0203($objProtocoloDTO); @@ -1081,8 +1087,8 @@ class ReceberProcedimentoRN extends InfraRN } if(array_key_exists($objDocumento->ordem, $arrObjComponenteDigitalDTOIndexado)){ - //$objComponenteDigitalDTO = $arrObjComponenteDigitalDTO[$objDocumento->ordem]; - //$this->alterarMetadadosDocumento($objComponenteDigitalDTO->getDblIdDocumento(), $objDocumento); + $objComponenteDigitalDTO = $arrObjComponenteDigitalDTOIndexado[$objDocumento->ordem]; + $this->alterarMetadadosDocumento($objComponenteDigitalDTO->getDblIdDocumento(), $objDocumento); continue; } -- libgit2 0.21.2