Commit 7196771cda50f3f62316090100a4b2014d3a485d
1 parent
256ad9ae
Exists in
master
and in
1 other branch
[Feat] Adicionando serviço para reabrir processo.
Showing
2 changed files
with
28 additions
and
0 deletions
Show diff stats
controlador_ws.php
| @@ -512,6 +512,14 @@ $app->group('/api/v1',function(){ | @@ -512,6 +512,14 @@ $app->group('/api/v1',function(){ | ||
| 512 | } | 512 | } |
| 513 | return $response->withJSON($rn->concluirProcesso($dto)); | 513 | return $response->withJSON($rn->concluirProcesso($dto)); |
| 514 | }); | 514 | }); |
| 515 | + $this->post('/reabrir/{procedimento}', function($request, $response, $args){ | ||
| 516 | + //o- novo pacote 4 | ||
| 517 | + /** @var $request Slim\Http\Request */ | ||
| 518 | + $rn = new MdWsSeiProcedimentoRN(); | ||
| 519 | + $dto = new EntradaReabrirProcessoAPI(); | ||
| 520 | + $dto->setIdProcedimento($request->getAttribute('route')->getArgument('procedimento')); | ||
| 521 | + return $response->withJSON($rn->reabrirProcesso($dto)); | ||
| 522 | + }); | ||
| 515 | $this->post('/acompanhar', function($request, $response, $args){ | 523 | $this->post('/acompanhar', function($request, $response, $args){ |
| 516 | /** @var $request Slim\Http\Request */ | 524 | /** @var $request Slim\Http\Request */ |
| 517 | $rn = new MdWsSeiAcompanhamentoRN(); | 525 | $rn = new MdWsSeiAcompanhamentoRN(); |
rn/MdWsSeiProcedimentoRN.php
| @@ -860,6 +860,26 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -860,6 +860,26 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
| 860 | } | 860 | } |
| 861 | 861 | ||
| 862 | /** | 862 | /** |
| 863 | + * Metodo que reabre o procedimento/processo | ||
| 864 | + * @param EntradaReabrirProcessoAPI $entradaReabrirProcessoAPI | ||
| 865 | + * @return array | ||
| 866 | + */ | ||
| 867 | + protected function reabrirProcessoControlado(EntradaReabrirProcessoAPI $entradaReabrirProcessoAPI) | ||
| 868 | + { | ||
| 869 | + try { | ||
| 870 | + if (!$entradaReabrirProcessoAPI->getIdProcedimento()) { | ||
| 871 | + throw new InfraException('E obrigtorio informar o id do procedimento!'); | ||
| 872 | + } | ||
| 873 | + $objSeiRN = new SeiRN(); | ||
| 874 | + $objSeiRN->reabrirProcesso($entradaReabrirProcessoAPI); | ||
| 875 | + | ||
| 876 | + return MdWsSeiRest::formataRetornoSucessoREST('Processo reaberto com sucesso!'); | ||
| 877 | + } catch (Exception $e) { | ||
| 878 | + return MdWsSeiRest::formataRetornoErroREST($e); | ||
| 879 | + } | ||
| 880 | + } | ||
| 881 | + | ||
| 882 | + /** | ||
| 863 | * Metodo que atribui o processo a uma pessoa | 883 | * Metodo que atribui o processo a uma pessoa |
| 864 | * @param EntradaAtribuirProcessoAPI $entradaAtribuirProcessoAPI | 884 | * @param EntradaAtribuirProcessoAPI $entradaAtribuirProcessoAPI |
| 865 | * @info Os parametros IdUsuario, ProtocoloProcedimento e SinReabrir sao obrigatorios. O parametro ProtocoloProcedimento | 885 | * @info Os parametros IdUsuario, ProtocoloProcedimento e SinReabrir sao obrigatorios. O parametro ProtocoloProcedimento |