Commit bf7fab3247c67fa780aa0e162344361f011dc08a
1 parent
a475dd0f
Exists in
master
and in
1 other branch
AJustes US042: refs #8517
Showing
2 changed files
with
34 additions
and
19 deletions
Show diff stats
rn/ExpedirProcedimentoRN.php
| ... | ... | @@ -395,11 +395,11 @@ class ExpedirProcedimentoRN extends InfraRN { |
| 395 | 395 | $objProcesso->descricao = utf8_encode($objProcedimentoDTO->getStrDescricaoProtocolo()); |
| 396 | 396 | $objProcesso->dataHoraDeProducao = $this->objProcessoEletronicoRN->converterDataWebService($objProcedimentoDTO->getDtaGeracaoProtocolo()); |
| 397 | 397 | |
| 398 | - if($this->obterNivelSigiloPEN($objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo()) == self::$STA_SIGILO_RESTRITO){ | |
| 398 | + if($objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo() == ProtocoloRN::$NA_RESTRITO){ | |
| 399 | 399 | $objProcesso->hipoteseLegal = new stdClass(); |
| 400 | 400 | $objProcesso->hipoteseLegal->identificacao = $objPenRelHipoteseLegalRN->getIdHipoteseLegalPEN($objProcedimentoDTO->getNumIdHipoteseLegalProtocolo()); |
| 401 | - $objProcesso->hipoteseLegal->nome = 'Nomee'; | |
| 402 | - $objProcesso->hipoteseLegal->baseLegal = 'Base Legall'; | |
| 401 | + // $objProcesso->hipoteseLegal->nome = 'Nomee'; | |
| 402 | + // $objProcesso->hipoteseLegal->baseLegal = 'Base Legall'; | |
| 403 | 403 | |
| 404 | 404 | } |
| 405 | 405 | |
| ... | ... | @@ -851,15 +851,16 @@ class ExpedirProcedimentoRN extends InfraRN { |
| 851 | 851 | $documento->ordem = $ordemDocumento++; |
| 852 | 852 | $documento->descricao = utf8_encode($strDescricaoDocumento); |
| 853 | 853 | $documento->nivelDeSigilo = $this->obterNivelSigiloPEN($documentoDTO->getStrStaNivelAcessoLocalProtocolo()); |
| 854 | - $documento->dataHoraDeProducao = $this->objProcessoEletronicoRN->converterDataWebService($documentoDTO->getDtaGeracaoProtocolo()); | |
| 855 | - | |
| 856 | - if($this->obterNivelSigiloPEN($documentoDTO->getStrStaNivelAcessoLocalProtocolo()) == self::$STA_SIGILO_RESTRITO){ | |
| 854 | + | |
| 855 | + if($documentoDTO->getStrStaNivelAcessoLocalProtocolo() == ProtocoloRN::$NA_RESTRITO){ | |
| 856 | + | |
| 857 | 857 | $documento->hipoteseLegal = new stdClass(); |
| 858 | 858 | $documento->hipoteseLegal->identificacao = $objPenRelHipoteseLegalRN->getIdHipoteseLegalPEN($documentoDTO->getNumIdHipoteseLegalProtocolo()); |
| 859 | - $documento->hipoteseLegal->nome = 'Nomee'; | |
| 860 | - $documento->hipoteseLegal->baseLegal = 'Base Legall'; | |
| 859 | + // $documento->hipoteseLegal->nome = 'Nomee'; | |
| 860 | + // $documento->hipoteseLegal->baseLegal = 'Base Legall'; | |
| 861 | 861 | } |
| 862 | - | |
| 862 | + $documento->dataHoraDeProducao = $this->objProcessoEletronicoRN->converterDataWebService($documentoDTO->getDtaGeracaoProtocolo()); | |
| 863 | + | |
| 863 | 864 | $usuarioDTO = $this->consultarUsuario($documentoDTO->getNumIdUsuarioGeradorProtocolo()); |
| 864 | 865 | if(isset($usuarioDTO)) { |
| 865 | 866 | $documento->produtor = new stdClass(); | ... | ... |
rn/ReceberProcedimentoRN.php
| ... | ... | @@ -581,12 +581,19 @@ class ReceberProcedimentoRN extends InfraRN |
| 581 | 581 | |
| 582 | 582 | if($this->obterNivelSigiloSEI($objProcesso->nivelDeSigilo) == ProtocoloRN::$NA_RESTRITO){ |
| 583 | 583 | $objHipoteseLegalRecebido = new PenRelHipoteseLegalRecebidoRN(); |
| 584 | - $numIdHipoteseLegal = $objHipoteseLegalRecebido->getIdHipoteseLegalSEI($objProcesso->hipoteseLegal->identificacao); | |
| 585 | - if (empty($numIdHipoteseLegal)) { | |
| 586 | - $objPenParametroRN = new PenParametroRN(); | |
| 587 | - $objProtocoloDTO->setNumIdHipoteseLegal($objPenParametroRN->getParametro('HIPOTESE_LEGAL_PADRAO')); | |
| 584 | + $objPenParametroRN = new PenParametroRN(); | |
| 585 | + $numIdHipoteseLegalPadrao = $objPenParametroRN->getParametro('HIPOTESE_LEGAL_PADRAO'); | |
| 586 | + | |
| 587 | + if (!isset($objProcesso->hipoteseLegal) || (isset($objProcesso->hipoteseLegal) && empty($objProcesso->hipoteseLegal->identificacao))) { | |
| 588 | + $objProtocoloDTO->setNumIdHipoteseLegal($numIdHipoteseLegalPadrao); | |
| 588 | 589 | } else { |
| 589 | - $objProtocoloDTO->setNumIdHipoteseLegal($numIdHipoteseLegal); | |
| 590 | + | |
| 591 | + $numIdHipoteseLegal = $objHipoteseLegalRecebido->getIdHipoteseLegalSEI($objProcesso->hipoteseLegal->identificacao); | |
| 592 | + if (empty($numIdHipoteseLegal)) { | |
| 593 | + $objProtocoloDTO->setNumIdHipoteseLegal($numIdHipoteseLegalPadrao); | |
| 594 | + } else { | |
| 595 | + $objProtocoloDTO->setNumIdHipoteseLegal($numIdHipoteseLegal); | |
| 596 | + } | |
| 590 | 597 | } |
| 591 | 598 | } |
| 592 | 599 | |
| ... | ... | @@ -1117,12 +1124,19 @@ class ReceberProcedimentoRN extends InfraRN |
| 1117 | 1124 | |
| 1118 | 1125 | if ($this->obterNivelSigiloSEI($objDocumento->nivelDeSigilo) == ProtocoloRN::$NA_RESTRITO) { |
| 1119 | 1126 | $objHipoteseLegalRecebido = new PenRelHipoteseLegalRecebidoRN(); |
| 1120 | - $numIdHipoteseLegal = $objHipoteseLegalRecebido->getIdHipoteseLegalSEI($objDocumento->hipoteseLegal->identificacao); | |
| 1121 | - if (empty($numIdHipoteseLegal)) { | |
| 1122 | - $objPenParametroRN = new PenParametroRN(); | |
| 1123 | - $objDocumentoDTO->getObjProtocoloDTO()->setNumIdHipoteseLegal($objPenParametroRN->getParametro('HIPOTESE_LEGAL_PADRAO')); | |
| 1127 | + $objPenParametroRN = new PenParametroRN(); | |
| 1128 | + $numIdHipoteseLegalPadrao = $objPenParametroRN->getParametro('HIPOTESE_LEGAL_PADRAO'); | |
| 1129 | + | |
| 1130 | + if (!isset($objDocumento->hipoteseLegal) || (isset($objDocumento->hipoteseLegal) && empty($objDocumento->hipoteseLegal->identificacao))) { | |
| 1131 | + $objDocumentoDTO->getObjProtocoloDTO()->setNumIdHipoteseLegal($numIdHipoteseLegalPadrao); | |
| 1124 | 1132 | } else { |
| 1125 | - $objDocumentoDTO->getObjProtocoloDTO()->setNumIdHipoteseLegal($numIdHipoteseLegal); | |
| 1133 | + | |
| 1134 | + $numIdHipoteseLegal = $objHipoteseLegalRecebido->getIdHipoteseLegalSEI($objDocumento->hipoteseLegal->identificacao); | |
| 1135 | + if (empty($numIdHipoteseLegal)) { | |
| 1136 | + $objDocumentoDTO->getObjProtocoloDTO()->setNumIdHipoteseLegal($numIdHipoteseLegalPadrao); | |
| 1137 | + } else { | |
| 1138 | + $objDocumentoDTO->getObjProtocoloDTO()->setNumIdHipoteseLegal($numIdHipoteseLegal); | |
| 1139 | + } | |
| 1126 | 1140 | } |
| 1127 | 1141 | } |
| 1128 | 1142 | ... | ... |