Commit ef177ec3318f126f043d05df81d9f07fb5ad150c
1 parent
e1229a88
Exists in
master
and in
21 other branches
Correção no recebimento de processos e documentos já existentes, passando a alte…
…rar o níve de sigilo e hipótese legal
Showing
1 changed file
with
15 additions
and
9 deletions
Show diff stats
rn/ReceberProcedimentoRN.php
... | ... | @@ -560,7 +560,7 @@ class ReceberProcedimentoRN extends InfraRN |
560 | 560 | |
561 | 561 | //Realiza a alteração dos metadados do processo |
562 | 562 | //TODO: Implementar alteração de todos os metadados |
563 | - //$this->alterarMetadadosProcedimento($objProcedimentoDTO->getDblIdProcedimento(), $objProcesso); | |
563 | + $this->alterarMetadadosProcedimento($objProcedimentoDTO->getDblIdProcedimento(), $objProcesso); | |
564 | 564 | |
565 | 565 | //TODO: Finalizar o envio do documento para a respectiva unidade |
566 | 566 | $this->enviarProcedimentoUnidade($objProcedimentoDTO, true); |
... | ... | @@ -761,10 +761,13 @@ class ReceberProcedimentoRN extends InfraRN |
761 | 761 | |
762 | 762 | //Realiza a alteração dos metadados do processo(Por hora, apenas do nível de sigilo e hipótese legal) |
763 | 763 | $objProtocoloDTO = new ProtocoloDTO(); |
764 | - $objProtocoloDTO->setDblIdProcedimento($parNumIdProcedimento); | |
765 | - $objProtocoloDTO->setStrStaNivelAcessoLocal($this->obterNivelSigiloSEI($parObjMetadadoProcedimento->nivelSigilo)); | |
766 | - $objProtocoloDTO->setNumIdHipoteseLegal($this->obterHipoteseLegalSEI($parObjMetadadoProcedimento->hipoteseLegal->identificacao)); | |
767 | - | |
764 | + $objProtocoloDTO->setDblIdProtocolo($parNumIdProcedimento); | |
765 | + $objProtocoloDTO->setStrStaNivelAcessoLocal($this->obterNivelSigiloSEI($parObjMetadadoProcedimento->nivelDeSigilo)); | |
766 | + | |
767 | + if($parObjMetadadoProcedimento->hipoteseLegal && $parObjMetadadoProcedimento->hipoteseLegal->identificacao){ | |
768 | + $objProtocoloDTO->setNumIdHipoteseLegal($this->obterHipoteseLegalSEI($parObjMetadadoProcedimento->hipoteseLegal->identificacao)); | |
769 | + } | |
770 | + | |
768 | 771 | $objProtocoloRN = new ProtocoloRN(); |
769 | 772 | $objProtocoloRN->alterarRN0203($objProtocoloDTO); |
770 | 773 | } |
... | ... | @@ -773,8 +776,11 @@ class ReceberProcedimentoRN extends InfraRN |
773 | 776 | //Realiza a alteração dos metadados do documento(Por hora, apenas do nível de sigilo e hipótese legal) |
774 | 777 | $objProtocoloDTO = new ProtocoloDTO(); |
775 | 778 | $objProtocoloDTO->setDblIdProtocolo($parNumIdDocumento); |
776 | - $objProtocoloDTO->setStrStaNivelAcessoLocal($this->obterNivelSigiloSEI($parObjMetadadoDocumento->nivelSigilo)); | |
777 | - $objProtocoloDTO->setNumIdHipoteseLegal($this->obterHipoteseLegalSEI($parObjMetadadoDocumento->hipoteseLegal->identificacao)); | |
779 | + $objProtocoloDTO->setStrStaNivelAcessoLocal($this->obterNivelSigiloSEI($parObjMetadadoDocumento->nivelDeSigilo)); | |
780 | + | |
781 | + if($parObjMetadadoDocumento->hipoteseLegal && $parObjMetadadoDocumento->hipoteseLegal->identificacao){ | |
782 | + $objProtocoloDTO->setNumIdHipoteseLegal($this->obterHipoteseLegalSEI($parObjMetadadoDocumento->hipoteseLegal->identificacao)); | |
783 | + } | |
778 | 784 | |
779 | 785 | $objProtocoloRN = new ProtocoloRN(); |
780 | 786 | $objProtocoloRN->alterarRN0203($objProtocoloDTO); |
... | ... | @@ -1081,8 +1087,8 @@ class ReceberProcedimentoRN extends InfraRN |
1081 | 1087 | } |
1082 | 1088 | |
1083 | 1089 | if(array_key_exists($objDocumento->ordem, $arrObjComponenteDigitalDTOIndexado)){ |
1084 | - //$objComponenteDigitalDTO = $arrObjComponenteDigitalDTO[$objDocumento->ordem]; | |
1085 | - //$this->alterarMetadadosDocumento($objComponenteDigitalDTO->getDblIdDocumento(), $objDocumento); | |
1090 | + $objComponenteDigitalDTO = $arrObjComponenteDigitalDTOIndexado[$objDocumento->ordem]; | |
1091 | + $this->alterarMetadadosDocumento($objComponenteDigitalDTO->getDblIdDocumento(), $objDocumento); | |
1086 | 1092 | continue; |
1087 | 1093 | } |
1088 | 1094 | ... | ... |