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 | 206 | try { |
| 207 | 207 | $acompanhamentoRN = new AcompanhamentoRN(); |
| 208 | 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 | 214 | if (is_null($mdWsSeiProtocoloDTOParam->getNumPaginaAtual())) { |
| 210 | 215 | $acompanhamentoDTO->setNumPaginaAtual(0); |
| 211 | 216 | } else { |
| ... | ... | @@ -217,6 +222,7 @@ class MdWsSeiProcedimentoRN extends InfraRN |
| 217 | 222 | } else { |
| 218 | 223 | $acompanhamentoDTO->setNumMaxRegistrosRetorno($mdWsSeiProtocoloDTOParam->getNumMaxRegistrosRetorno()); |
| 219 | 224 | } |
| 225 | + | |
| 220 | 226 | $arrAcompanhamentoDTO = $acompanhamentoRN->listarAcompanhamentosUnidade($acompanhamentoDTO); |
| 221 | 227 | $totalRegistros = $acompanhamentoDTO->getNumTotalRegistros() ?: 0; |
| 222 | 228 | |
| ... | ... | @@ -473,6 +479,7 @@ class MdWsSeiProcedimentoRN extends InfraRN |
| 473 | 479 | $atividadeDTOConsulta->setOrdNumIdAtividade(InfraDTO::$TIPO_ORDENACAO_DESC); |
| 474 | 480 | |
| 475 | 481 | $arrAtividades = $atividadeRN->listarRN0036($atividadeDTOConsulta); |
| 482 | + | |
| 476 | 483 | if ($arrAtividades) { |
| 477 | 484 | /** @var AtividadeDTO $atividadeDTO */ |
| 478 | 485 | $atividadeDTO = $arrAtividades[0]; |
| ... | ... | @@ -484,7 +491,7 @@ class MdWsSeiProcedimentoRN extends InfraRN |
| 484 | 491 | } |
| 485 | 492 | } |
| 486 | 493 | $arrAtividadePendenciaDTO = array(); |
| 487 | - if ($dto instanceof ProcedimentoDTO) { | |
| 494 | + if ($dto instanceof ProcedimentoDTO && $dto->isSetArrObjAtividadeDTO()) { | |
| 488 | 495 | $procedimentoDTO = $dto; |
| 489 | 496 | $arrAtividadePendenciaDTO = $procedimentoDTO->getArrObjAtividadeDTO(); |
| 490 | 497 | } else { |
| ... | ... | @@ -541,7 +548,6 @@ class MdWsSeiProcedimentoRN extends InfraRN |
| 541 | 548 | } |
| 542 | 549 | } |
| 543 | 550 | } |
| 544 | - | |
| 545 | 551 | $documentoRN = new DocumentoRN(); |
| 546 | 552 | $documentoDTOConsulta = new DocumentoDTO(); |
| 547 | 553 | $documentoDTOConsulta->setDblIdProcedimento($protocoloDTO->getDblIdProtocolo()); | ... | ... |