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,18 +547,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
547 | $nivelAcesso = $procedimentoDTO->getNumNivelAcesso(); | 547 | $nivelAcesso = $procedimentoDTO->getNumNivelAcesso(); |
548 | $hipoteseLegal = $procedimentoDTO->getNumIdHipoteseLegal(); | 548 | $hipoteseLegal = $procedimentoDTO->getNumIdHipoteseLegal(); |
549 | $grauSigilo = $procedimentoDTO->getStrStaGrauSigilo(); | 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 | $objTipoProcedimentoDTO = new TipoProcedimentoDTO(); | 551 | $objTipoProcedimentoDTO = new TipoProcedimentoDTO(); |
563 | $objTipoProcedimentoDTO->setBolExclusaoLogica(false); | 552 | $objTipoProcedimentoDTO->setBolExclusaoLogica(false); |
564 | $objTipoProcedimentoDTO->retStrNome(); | 553 | $objTipoProcedimentoDTO->retStrNome(); |
@@ -569,7 +558,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -569,7 +558,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
569 | $objTipoProcedimentoDTO = $objTipoProcedimentoRN->consultarRN0267($objTipoProcedimentoDTO); | 558 | $objTipoProcedimentoDTO = $objTipoProcedimentoRN->consultarRN0267($objTipoProcedimentoDTO); |
570 | 559 | ||
571 | 560 | ||
572 | - if ($objTipoProcedimentoDTO->getStrSinIndividual() == 'S') { | 561 | + if ($objTipoProcedimentoDTO && $objTipoProcedimentoDTO->getStrSinIndividual() == 'S') { |
573 | if (count($arrInteressados) > 1) { | 562 | if (count($arrInteressados) > 1) { |
574 | throw new InfraException('Mais de um Interessado informado.'); | 563 | throw new InfraException('Mais de um Interessado informado.'); |
575 | } | 564 | } |
@@ -598,10 +587,6 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -598,10 +587,6 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
598 | $arrayParticipantes[] = $objParticipanteDTO; | 587 | $arrayParticipantes[] = $objParticipanteDTO; |
599 | } | 588 | } |
600 | } | 589 | } |
601 | -// | ||
602 | -// var_dump($arrayParticipantes); | ||
603 | -// die(); | ||
604 | - | ||
605 | // EDITA AS OBSERVAÇÕES | 590 | // EDITA AS OBSERVAÇÕES |
606 | $objObservacaoDTO = new ObservacaoDTO(); | 591 | $objObservacaoDTO = new ObservacaoDTO(); |
607 | $objObservacaoDTO->setStrDescricao($observacoes); | 592 | $objObservacaoDTO->setStrDescricao($observacoes); |
@@ -988,9 +973,9 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -988,9 +973,9 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
988 | $pesquisaPendenciaDTO->setStrSinInicial('N'); | 973 | $pesquisaPendenciaDTO->setStrSinInicial('N'); |
989 | } else if ($mdWsSeiProtocoloDTOParam->getStrSinTipoBusca() == MdWsSeiProtocoloDTO::SIN_TIPO_BUSCA_G) { | 974 | } else if ($mdWsSeiProtocoloDTOParam->getStrSinTipoBusca() == MdWsSeiProtocoloDTO::SIN_TIPO_BUSCA_G) { |
990 | $pesquisaPendenciaDTO->setStrSinInicial('S'); | 975 | $pesquisaPendenciaDTO->setStrSinInicial('S'); |
991 | - } else { | 976 | + } /* else { |
992 | throw new InfraException('O tipo de busca deve ser (R)ecebidos ou (G)erados'); | 977 | throw new InfraException('O tipo de busca deve ser (R)ecebidos ou (G)erados'); |
993 | - } | 978 | + }*/ |
994 | $ret = $atividadeRN->listarPendencias($pesquisaPendenciaDTO); | 979 | $ret = $atividadeRN->listarPendencias($pesquisaPendenciaDTO); |
995 | $result = $this->montaRetornoListagemProcessos($ret, $usuarioAtribuicaoAtividade, $mdWsSeiProtocoloDTOParam->getStrSinTipoBusca()); | 980 | $result = $this->montaRetornoListagemProcessos($ret, $usuarioAtribuicaoAtividade, $mdWsSeiProtocoloDTOParam->getStrSinTipoBusca()); |
996 | 981 | ||
@@ -1009,6 +994,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -1009,6 +994,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
1009 | */ | 994 | */ |
1010 | private function montaRetornoListagemProcessos(array $ret, $usuarioAtribuicaoAtividade = null , $typeSource = null) | 995 | private function montaRetornoListagemProcessos(array $ret, $usuarioAtribuicaoAtividade = null , $typeSource = null) |
1011 | { | 996 | { |
997 | + | ||
1012 | $result = array(); | 998 | $result = array(); |
1013 | $protocoloRN = new ProtocoloRN(); | 999 | $protocoloRN = new ProtocoloRN(); |
1014 | foreach ($ret as $dto) { | 1000 | foreach ($ret as $dto) { |
@@ -1094,7 +1080,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -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 | if ($arrAtividades) { | 1085 | if ($arrAtividades) { |
1100 | /** @var AtividadeDTO $atividadeDTO */ | 1086 | /** @var AtividadeDTO $atividadeDTO */ |
@@ -1251,6 +1237,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -1251,6 +1237,7 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
1251 | } | 1237 | } |
1252 | 1238 | ||
1253 | $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); | 1239 | $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); |
1240 | + $processoGeradoRecebido = $dto->getNumIdUnidadeGeradoraProtocolo() == SessaoSEI::getInstance()->getNumIdUnidadeAtual() ? 'G' : 'R'; | ||
1254 | 1241 | ||
1255 | $result[] = array( | 1242 | $result[] = array( |
1256 | 'id' => $protocoloDTO->getDblIdProtocolo(), | 1243 | 'id' => $protocoloDTO->getDblIdProtocolo(), |
@@ -1294,7 +1281,8 @@ class MdWsSeiProcedimentoRN extends InfraRN | @@ -1294,7 +1281,8 @@ class MdWsSeiProcedimentoRN extends InfraRN | ||
1294 | 'processoAnexado' => $processoAnexado ? 'S' : 'N', | 1281 | 'processoAnexado' => $processoAnexado ? 'S' : 'N', |
1295 | 'podeReabrirProcesso' => $podeReabrirProcesso ? 'S' : 'N', | 1282 | 'podeReabrirProcesso' => $podeReabrirProcesso ? 'S' : 'N', |
1296 | 'podeRegistrarAnotacao' => $podeRegistrarAnotacao ? 'S' : 'N', | 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,13 +183,28 @@ class MdWsSeiUsuarioRN extends InfraRN { | ||
183 | $this->setaVariaveisAutenticacao(get_object_vars($ret)); | 183 | $this->setaVariaveisAutenticacao(get_object_vars($ret)); |
184 | 184 | ||
185 | $objInfraDadoUsuario = new InfraDadoUsuario(SessaoSEI::getInstance()); | 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 | //dados usuário | 202 | //dados usuário |
189 | $ret->IdUnidadeAtual = SessaoSEI::getInstance()->getNumIdUnidadeAtual(); | 203 | $ret->IdUnidadeAtual = SessaoSEI::getInstance()->getNumIdUnidadeAtual(); |
190 | $ret->sigla = $usuarioDTO->getStrSigla(); | 204 | $ret->sigla = $usuarioDTO->getStrSigla(); |
191 | $ret->nome = SessaoSEI::getInstance()->getStrNomeUsuario(); | 205 | $ret->nome = SessaoSEI::getInstance()->getStrNomeUsuario(); |
192 | - $ret->ultimoCargoAssinatura = $teste; | 206 | + $ret->idUltimoCargoAssinatura = $numIdCargoAssinatura; |
207 | + $ret->ultimoCargoAssinatura = $strNomeCargoAssinatura; | ||
193 | 208 | ||
194 | $token = $this->tokenEncode($usuarioDTO->getStrSigla(), $usuarioDTO->getStrSenha(), $orgao, $contexto); | 209 | $token = $this->tokenEncode($usuarioDTO->getStrSigla(), $usuarioDTO->getStrSenha(), $orgao, $contexto); |
195 | 210 |