Commit d798f84e7270dc14b9c5a905c3c08d658064fa27
1 parent
d96f7de0
Exists in
master
and in
1 other branch
Ajustes e correções nos serviços de autenticação, listagem de processos, listage…
…m de acomapanhamentos e edição de processo
Showing
2 changed files
with
26 additions
and
23 deletions
Show diff stats
rn/MdWsSeiProcedimentoRN.php
| ... | ... | @@ -547,18 +547,7 @@ class MdWsSeiProcedimentoRN extends InfraRN |
| 547 | 547 | $nivelAcesso = $procedimentoDTO->getNumNivelAcesso(); |
| 548 | 548 | $hipoteseLegal = $procedimentoDTO->getNumIdHipoteseLegal(); |
| 549 | 549 | $grauSigilo = $procedimentoDTO->getStrStaGrauSigilo(); |
| 550 | - | |
| 551 | - // PARÂMETROS DE ENTRADA | |
| 552 | -// $tipoProcesso = 100000349; | |
| 553 | -// $especificacao = 'descrição alterada'; | |
| 554 | -// $arrAssuntos = array(array('id' => 2)); | |
| 555 | -// $arrInteressados = array(array('id' => 100000003)); | |
| 556 | -// $observacoes = "observação de teste"; | |
| 557 | -// $nivelAcesso = 1; | |
| 558 | -// $hipoteseLegal = 2; | |
| 559 | -// $grauSigilo = ''; | |
| 560 | 550 | |
| 561 | - | |
| 562 | 551 | $objTipoProcedimentoDTO = new TipoProcedimentoDTO(); |
| 563 | 552 | $objTipoProcedimentoDTO->setBolExclusaoLogica(false); |
| 564 | 553 | $objTipoProcedimentoDTO->retStrNome(); |
| ... | ... | @@ -569,7 +558,7 @@ class MdWsSeiProcedimentoRN extends InfraRN |
| 569 | 558 | $objTipoProcedimentoDTO = $objTipoProcedimentoRN->consultarRN0267($objTipoProcedimentoDTO); |
| 570 | 559 | |
| 571 | 560 | |
| 572 | - if ($objTipoProcedimentoDTO->getStrSinIndividual() == 'S') { | |
| 561 | + if ($objTipoProcedimentoDTO && $objTipoProcedimentoDTO->getStrSinIndividual() == 'S') { | |
| 573 | 562 | if (count($arrInteressados) > 1) { |
| 574 | 563 | throw new InfraException('Mais de um Interessado informado.'); |
| 575 | 564 | } |
| ... | ... | @@ -598,10 +587,6 @@ class MdWsSeiProcedimentoRN extends InfraRN |
| 598 | 587 | $arrayParticipantes[] = $objParticipanteDTO; |
| 599 | 588 | } |
| 600 | 589 | } |
| 601 | -// | |
| 602 | -// var_dump($arrayParticipantes); | |
| 603 | -// die(); | |
| 604 | - | |
| 605 | 590 | // EDITA AS OBSERVAÇÕES |
| 606 | 591 | $objObservacaoDTO = new ObservacaoDTO(); |
| 607 | 592 | $objObservacaoDTO->setStrDescricao($observacoes); |
| ... | ... | @@ -988,9 +973,9 @@ class MdWsSeiProcedimentoRN extends InfraRN |
| 988 | 973 | $pesquisaPendenciaDTO->setStrSinInicial('N'); |
| 989 | 974 | } else if ($mdWsSeiProtocoloDTOParam->getStrSinTipoBusca() == MdWsSeiProtocoloDTO::SIN_TIPO_BUSCA_G) { |
| 990 | 975 | $pesquisaPendenciaDTO->setStrSinInicial('S'); |
| 991 | - } else { | |
| 976 | + } /* else { | |
| 992 | 977 | throw new InfraException('O tipo de busca deve ser (R)ecebidos ou (G)erados'); |
| 993 | - } | |
| 978 | + }*/ | |
| 994 | 979 | $ret = $atividadeRN->listarPendencias($pesquisaPendenciaDTO); |
| 995 | 980 | $result = $this->montaRetornoListagemProcessos($ret, $usuarioAtribuicaoAtividade, $mdWsSeiProtocoloDTOParam->getStrSinTipoBusca()); |
| 996 | 981 | |
| ... | ... | @@ -1009,6 +994,7 @@ class MdWsSeiProcedimentoRN extends InfraRN |
| 1009 | 994 | */ |
| 1010 | 995 | private function montaRetornoListagemProcessos(array $ret, $usuarioAtribuicaoAtividade = null , $typeSource = null) |
| 1011 | 996 | { |
| 997 | + | |
| 1012 | 998 | $result = array(); |
| 1013 | 999 | $protocoloRN = new ProtocoloRN(); |
| 1014 | 1000 | foreach ($ret as $dto) { |
| ... | ... | @@ -1094,7 +1080,7 @@ class MdWsSeiProcedimentoRN extends InfraRN |
| 1094 | 1080 | } |
| 1095 | 1081 | } |
| 1096 | 1082 | |
| 1097 | - $arrAtividades = $procedimentoDTO->getArrObjAtividadeDTO(); | |
| 1083 | + $arrAtividades = $procedimentoDTO ? $procedimentoDTO->getArrObjAtividadeDTO() : null; | |
| 1098 | 1084 | |
| 1099 | 1085 | if ($arrAtividades) { |
| 1100 | 1086 | /** @var AtividadeDTO $atividadeDTO */ |
| ... | ... | @@ -1251,6 +1237,7 @@ class MdWsSeiProcedimentoRN extends InfraRN |
| 1251 | 1237 | } |
| 1252 | 1238 | |
| 1253 | 1239 | $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); |
| 1240 | + $processoGeradoRecebido = $dto->getNumIdUnidadeGeradoraProtocolo() == SessaoSEI::getInstance()->getNumIdUnidadeAtual() ? 'G' : 'R'; | |
| 1254 | 1241 | |
| 1255 | 1242 | $result[] = array( |
| 1256 | 1243 | 'id' => $protocoloDTO->getDblIdProtocolo(), |
| ... | ... | @@ -1294,7 +1281,8 @@ class MdWsSeiProcedimentoRN extends InfraRN |
| 1294 | 1281 | 'processoAnexado' => $processoAnexado ? 'S' : 'N', |
| 1295 | 1282 | 'podeReabrirProcesso' => $podeReabrirProcesso ? 'S' : 'N', |
| 1296 | 1283 | 'podeRegistrarAnotacao' => $podeRegistrarAnotacao ? 'S' : 'N', |
| 1297 | - 'tipo' => $typeSource | |
| 1284 | + 'tipo' => $typeSource, | |
| 1285 | + 'processoGeradoRecebido' => $processoGeradoRecebido | |
| 1298 | 1286 | ) |
| 1299 | 1287 | ) |
| 1300 | 1288 | ); | ... | ... |
rn/MdWsSeiUsuarioRN.php
| ... | ... | @@ -183,13 +183,28 @@ class MdWsSeiUsuarioRN extends InfraRN { |
| 183 | 183 | $this->setaVariaveisAutenticacao(get_object_vars($ret)); |
| 184 | 184 | |
| 185 | 185 | $objInfraDadoUsuario = new InfraDadoUsuario(SessaoSEI::getInstance()); |
| 186 | - $teste = $objInfraDadoUsuario->getValor('ASSINATURA_CARGO_FUNCAO_'.SessaoSEI::getInstance()->getNumIdUnidadeAtual()); | |
| 187 | - | |
| 186 | + | |
| 187 | + //Obtem os dados do carto da assinatura | |
| 188 | + $numIdCargoAssinatura = null; | |
| 189 | + $strNomeCargoAssinatura = $objInfraDadoUsuario->getValor('ASSINATURA_CARGO_FUNCAO_'.SessaoSEI::getInstance()->getNumIdUnidadeAtual()); | |
| 190 | + | |
| 191 | + $objAssinanteDTO = new AssinanteDTO(); | |
| 192 | + $objAssinanteDTO->setStrCargoFuncao($strNomeCargoAssinatura); | |
| 193 | + $objAssinanteDTO->retNumIdAssinante(); | |
| 194 | + | |
| 195 | + $objAssinanteRN = new AssinanteRN(); | |
| 196 | + | |
| 197 | + if($objAssinanteRN->contarRN1340($objAssinanteDTO) == 1){ | |
| 198 | + $objAssinanteDTO = $objAssinanteRN->consultarRN1338($objAssinanteDTO); | |
| 199 | + $numIdCargoAssinatura = $objAssinanteDTO->getNumIdAssinante(); | |
| 200 | + } | |
| 201 | + | |
| 188 | 202 | //dados usuário |
| 189 | 203 | $ret->IdUnidadeAtual = SessaoSEI::getInstance()->getNumIdUnidadeAtual(); |
| 190 | 204 | $ret->sigla = $usuarioDTO->getStrSigla(); |
| 191 | 205 | $ret->nome = SessaoSEI::getInstance()->getStrNomeUsuario(); |
| 192 | - $ret->ultimoCargoAssinatura = $teste; | |
| 206 | + $ret->idUltimoCargoAssinatura = $numIdCargoAssinatura; | |
| 207 | + $ret->ultimoCargoAssinatura = $strNomeCargoAssinatura; | |
| 193 | 208 | |
| 194 | 209 | $token = $this->tokenEncode($usuarioDTO->getStrSigla(), $usuarioDTO->getStrSenha(), $orgao, $contexto); |
| 195 | 210 | ... | ... |