Commit 780432ab1dd63ed5c341773d30d2e91dba78a0e6
1 parent
85399cce
Exists in
master
and in
1 other branch
[Fix] Listar usuário
Showing
1 changed file
with
16 additions
and
1 deletions
Show diff stats
rn/MdWsSeiUsuarioRN.php
| ... | ... | @@ -265,6 +265,7 @@ class MdWsSeiUsuarioRN extends InfraRN { |
| 265 | 265 | if($unidadeDTOParam->isSetNumIdUnidade()){ |
| 266 | 266 | $idUnidade = $unidadeDTOParam->getNumIdUnidade(); |
| 267 | 267 | } |
| 268 | + $result = array(); | |
| 268 | 269 | $objSipWs = $this->retornaServicoSip(); |
| 269 | 270 | $ret = $objSipWs->carregarUsuarios( |
| 270 | 271 | SessaoSEI::getInstance()->getNumIdSistema(), |
| ... | ... | @@ -272,7 +273,21 @@ class MdWsSeiUsuarioRN extends InfraRN { |
| 272 | 273 | false, |
| 273 | 274 | false |
| 274 | 275 | ); |
| 275 | - return MdWsSeiRest::formataRetornoSucessoREST(null, $ret); | |
| 276 | + | |
| 277 | + foreach ($ret as $data){ | |
| 278 | + $result[] = array( | |
| 279 | + 'id_usuario' => $data[0], | |
| 280 | + 'id_origem' => $data[1], | |
| 281 | + 'id_orgao' => $data[2], | |
| 282 | + 'sigla' => $data[3], | |
| 283 | + 'nome' => $data[4], | |
| 284 | + 'sin_ativo' => $data[5], | |
| 285 | + 'unidades' => $data[6], | |
| 286 | + 'sin_subunidades' => $data[7], | |
| 287 | + ); | |
| 288 | + } | |
| 289 | + | |
| 290 | + return MdWsSeiRest::formataRetornoSucessoREST(null, $result); | |
| 276 | 291 | }catch (Exception $e){ |
| 277 | 292 | return MdWsSeiRest::formataRetornoErroREST($e); |
| 278 | 293 | } | ... | ... |