Commit 9b832172e5e71c744e70363a4853aa5e80384fbe
1 parent
7196771c
Exists in
master
and in
1 other branch
[Fix] Corrigindo retorno de atividades do processo do grupo de acompanhamento.
Showing
1 changed file
with
8 additions
and
2 deletions
Show diff stats
rn/MdWsSeiProcedimentoRN.php
| @@ -206,6 +206,11 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -206,6 +206,11 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
| 206 | try { | 206 | try { |
| 207 | $acompanhamentoRN = new AcompanhamentoRN(); | 207 | $acompanhamentoRN = new AcompanhamentoRN(); |
| 208 | $acompanhamentoDTO = new AcompanhamentoDTO(); | 208 | $acompanhamentoDTO = new AcompanhamentoDTO(); |
| 209 | + if(!$mdWsSeiProtocoloDTOParam->isSetNumIdGrupoAcompanhamentoProcedimento()){ | ||
| 210 | + throw new Exception('O grupo deve ser informado!'); | ||
| 211 | + }else{ | ||
| 212 | + $acompanhamentoDTO->setNumIdGrupoAcompanhamento($mdWsSeiProtocoloDTOParam->getNumIdGrupoAcompanhamentoProcedimento()); | ||
| 213 | + } | ||
| 209 | if (is_null($mdWsSeiProtocoloDTOParam->getNumPaginaAtual())) { | 214 | if (is_null($mdWsSeiProtocoloDTOParam->getNumPaginaAtual())) { |
| 210 | $acompanhamentoDTO->setNumPaginaAtual(0); | 215 | $acompanhamentoDTO->setNumPaginaAtual(0); |
| 211 | } else { | 216 | } else { |
| @@ -217,6 +222,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -217,6 +222,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
| 217 | } else { | 222 | } else { |
| 218 | $acompanhamentoDTO->setNumMaxRegistrosRetorno($mdWsSeiProtocoloDTOParam->getNumMaxRegistrosRetorno()); | 223 | $acompanhamentoDTO->setNumMaxRegistrosRetorno($mdWsSeiProtocoloDTOParam->getNumMaxRegistrosRetorno()); |
| 219 | } | 224 | } |
| 225 | + | ||
| 220 | $arrAcompanhamentoDTO = $acompanhamentoRN->listarAcompanhamentosUnidade($acompanhamentoDTO); | 226 | $arrAcompanhamentoDTO = $acompanhamentoRN->listarAcompanhamentosUnidade($acompanhamentoDTO); |
| 221 | $totalRegistros = $acompanhamentoDTO->getNumTotalRegistros() ?: 0; | 227 | $totalRegistros = $acompanhamentoDTO->getNumTotalRegistros() ?: 0; |
| 222 | 228 | ||
| @@ -473,6 +479,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -473,6 +479,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
| 473 | $atividadeDTOConsulta->setOrdNumIdAtividade(InfraDTO::$TIPO_ORDENACAO_DESC); | 479 | $atividadeDTOConsulta->setOrdNumIdAtividade(InfraDTO::$TIPO_ORDENACAO_DESC); |
| 474 | 480 | ||
| 475 | $arrAtividades = $atividadeRN->listarRN0036($atividadeDTOConsulta); | 481 | $arrAtividades = $atividadeRN->listarRN0036($atividadeDTOConsulta); |
| 482 | + | ||
| 476 | if ($arrAtividades) { | 483 | if ($arrAtividades) { |
| 477 | /** @var AtividadeDTO $atividadeDTO */ | 484 | /** @var AtividadeDTO $atividadeDTO */ |
| 478 | $atividadeDTO = $arrAtividades[0]; | 485 | $atividadeDTO = $arrAtividades[0]; |
| @@ -484,7 +491,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -484,7 +491,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
| 484 | } | 491 | } |
| 485 | } | 492 | } |
| 486 | $arrAtividadePendenciaDTO = array(); | 493 | $arrAtividadePendenciaDTO = array(); |
| 487 | - if ($dto instanceof ProcedimentoDTO) { | 494 | + if ($dto instanceof ProcedimentoDTO && $dto->isSetArrObjAtividadeDTO()) { |
| 488 | $procedimentoDTO = $dto; | 495 | $procedimentoDTO = $dto; |
| 489 | $arrAtividadePendenciaDTO = $procedimentoDTO->getArrObjAtividadeDTO(); | 496 | $arrAtividadePendenciaDTO = $procedimentoDTO->getArrObjAtividadeDTO(); |
| 490 | } else { | 497 | } else { |
| @@ -541,7 +548,6 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -541,7 +548,6 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
| 541 | } | 548 | } |
| 542 | } | 549 | } |
| 543 | } | 550 | } |
| 544 | - | ||
| 545 | $documentoRN = new DocumentoRN(); | 551 | $documentoRN = new DocumentoRN(); |
| 546 | $documentoDTOConsulta = new DocumentoDTO(); | 552 | $documentoDTOConsulta = new DocumentoDTO(); |
| 547 | $documentoDTOConsulta->setDblIdProcedimento($protocoloDTO->getDblIdProtocolo()); | 553 | $documentoDTOConsulta->setDblIdProcedimento($protocoloDTO->getDblIdProtocolo()); |