Commit 3675502c50a27f573a02d954e38a4742795caf49
1 parent
01527ef7
Exists in
master
complementando first commit
Showing
12 changed files
with
2118 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,56 @@ |
| 1 | +<?php | |
| 2 | +/** | |
| 3 | + * CONTROLADORIA GERAL DA UNIAO | |
| 4 | + * | |
| 5 | + * 03/10/2017 - criado por rafael.ferreira@cgu.gov.br | |
| 6 | + * | |
| 7 | + */ | |
| 8 | + | |
| 9 | +class MdCguWsComplementarIntegracao extends SeiIntegracao | |
| 10 | +{ | |
| 11 | + | |
| 12 | +// public function __construct() | |
| 13 | +// { | |
| 14 | +// } | |
| 15 | + | |
| 16 | + public function getNome() | |
| 17 | + { | |
| 18 | + return 'Módulo de Webservice de consultas complementar da CGU'; | |
| 19 | + } | |
| 20 | + | |
| 21 | + public function getVersao() | |
| 22 | + { | |
| 23 | + return '2.0.0'; | |
| 24 | + } | |
| 25 | + | |
| 26 | + public function getInstituicao() | |
| 27 | + { | |
| 28 | + return 'CGU - Controladoria Geral da União'; | |
| 29 | + } | |
| 30 | + | |
| 31 | +// public function inicializar($strVersaoSEI) | |
| 32 | +// { | |
| 33 | +// /* | |
| 34 | +// if (substr($strVersaoSEI, 0, 2) != '3.'){ | |
| 35 | +// die('Módulo "'.$this->getNome().'" ('.$this->getVersao().') não é compatível com esta versão do SEI ('.$strVersaoSEI.').'); | |
| 36 | +// } | |
| 37 | +// */ | |
| 38 | +// } | |
| 39 | + | |
| 40 | + public function processarControladorWebServices($strServico) | |
| 41 | + { | |
| 42 | + $strArq = null; | |
| 43 | + switch ($strServico) { | |
| 44 | + case 'cgu': | |
| 45 | + $strArq = 'cgu.wsdl'; | |
| 46 | + break; | |
| 47 | + } | |
| 48 | + | |
| 49 | + if ($strArq!=null){ | |
| 50 | + $strArq = dirname(__FILE__).'/ws/'.$strArq; | |
| 51 | + } | |
| 52 | + return $strArq; | |
| 53 | + } | |
| 54 | +} | |
| 55 | + | |
| 56 | +?> | |
| 0 | 57 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,36 @@ |
| 1 | +<? | |
| 2 | +/** | |
| 3 | +* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
| 4 | +* | |
| 5 | +* 13/10/2011 - criado por mga | |
| 6 | +* | |
| 7 | +*/ | |
| 8 | + | |
| 9 | +require_once dirname(__FILE__).'/../../../../SEI.php'; | |
| 10 | + | |
| 11 | +class WSCguRetornoConsultarDocumentoDTO extends InfraDTO { | |
| 12 | + | |
| 13 | + public function getStrNomeTabela() { | |
| 14 | + return null; | |
| 15 | + } | |
| 16 | + | |
| 17 | + public function montar() { | |
| 18 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_DBL, 'IdProcedimento'); | |
| 19 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'ProcedimentoFormatado'); | |
| 20 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_DBL, 'IdDocumento'); | |
| 21 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'DocumentoFormatado'); | |
| 22 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'LinkAcesso'); | |
| 23 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdSerie'); | |
| 24 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'NomeSerie'); | |
| 25 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'Numero'); | |
| 26 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdUnidadeGeradora'); | |
| 27 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'SiglaUnidadeGeradora'); | |
| 28 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'DescricaoUnidadeGeradora'); | |
| 29 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_DTA, 'GeracaoProtocolo'); | |
| 30 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'AtividadeDTOGeracao'); | |
| 31 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_ARR, 'ObjAssinaturaDTO'); | |
| 32 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'PublicacaoDTO'); | |
| 33 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_ARR, 'ObjParticipanteDTO'); | |
| 34 | + } | |
| 35 | +} | |
| 36 | +?> | |
| 0 | 37 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,25 @@ |
| 1 | +<? | |
| 2 | +/** | |
| 3 | +* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
| 4 | +* | |
| 5 | +* 13/10/2011 - criado por mga | |
| 6 | +* | |
| 7 | +*/ | |
| 8 | + | |
| 9 | +require_once dirname(__FILE__).'/../../../../SEI.php'; | |
| 10 | + | |
| 11 | +class WSCguRetornoListarAndamentosDTO extends InfraDTO { | |
| 12 | + | |
| 13 | + public function getStrNomeTabela() { | |
| 14 | + return null; | |
| 15 | + } | |
| 16 | + | |
| 17 | + public function montar() { | |
| 18 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_DBL, 'IdProcedimento'); | |
| 19 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'ProcedimentoFormatado'); | |
| 20 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdTipoProcedimento'); | |
| 21 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'NomeTipoProcedimento'); | |
| 22 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_ARR, 'ObjAtividadeDTO'); | |
| 23 | + } | |
| 24 | +} | |
| 25 | +?> | |
| 0 | 26 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,23 @@ |
| 1 | +<? | |
| 2 | +/** | |
| 3 | +* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
| 4 | +* | |
| 5 | +* 17/07/2014 - criado por mga | |
| 6 | +* | |
| 7 | +*/ | |
| 8 | + | |
| 9 | +require_once dirname(__FILE__).'/../../../../SEI.php'; | |
| 10 | + | |
| 11 | +class WSEntradaListarAndamentosDTO extends InfraDTO { | |
| 12 | + | |
| 13 | + public function getStrNomeTabela() { | |
| 14 | + return null; | |
| 15 | + } | |
| 16 | + | |
| 17 | + public function montar() { | |
| 18 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'ServicoDTO'); | |
| 19 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'ProcedimentoDTO'); | |
| 20 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'UnidadeDTO'); | |
| 21 | + } | |
| 22 | +} | |
| 23 | +?> | |
| 0 | 24 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,31 @@ |
| 1 | +<? | |
| 2 | +/** | |
| 3 | +* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
| 4 | +* | |
| 5 | +* 17/07/2014 - criado por mga | |
| 6 | +* | |
| 7 | +*/ | |
| 8 | + | |
| 9 | +require_once dirname(__FILE__) . '/../../../../SEI.php'; | |
| 10 | + | |
| 11 | +class WSEntradaListarDocumentoDTO extends InfraDTO { | |
| 12 | + | |
| 13 | + public function getStrNomeTabela() { | |
| 14 | + return null; | |
| 15 | + } | |
| 16 | + | |
| 17 | + public function montar() { | |
| 18 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'ServicoDTO'); | |
| 19 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'DocumentoDTO'); | |
| 20 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'UnidadeDTO'); | |
| 21 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdUnidadeGeradoraProtocolo'); | |
| 22 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_DTA, 'DataInicialGeracaoProtocolo'); | |
| 23 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_DTA, 'DataFinalGeracaoProtocolo'); | |
| 24 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'SinRetornarAndamentoGeracao'); | |
| 25 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'SinRetornarAssinaturas'); | |
| 26 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'SinRetornarPublicacao'); | |
| 27 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'SinRetornarDestinatarios'); | |
| 28 | + | |
| 29 | + } | |
| 30 | +} | |
| 31 | +?> | |
| 0 | 32 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,22 @@ |
| 1 | +<? | |
| 2 | +/** | |
| 3 | +* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
| 4 | +* | |
| 5 | +* 17/07/2014 - criado por mga | |
| 6 | +* | |
| 7 | +*/ | |
| 8 | + | |
| 9 | +require_once dirname(__FILE__).'/../../../../SEI.php'; | |
| 10 | + | |
| 11 | +class WSEntradaListarObterTramitadosDTO extends InfraDTO { | |
| 12 | + | |
| 13 | + public function getStrNomeTabela() { | |
| 14 | + return null; | |
| 15 | + } | |
| 16 | + | |
| 17 | + public function montar() { | |
| 18 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_ARR, 'RequisicaoConsultaTramiteDTO'); | |
| 19 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdUnidade'); | |
| 20 | + } | |
| 21 | +} | |
| 22 | +?> | |
| 0 | 23 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,28 @@ |
| 1 | +<? | |
| 2 | +/** | |
| 3 | +* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
| 4 | +* | |
| 5 | +* 17/07/2014 - criado por mga | |
| 6 | +* | |
| 7 | +*/ | |
| 8 | + | |
| 9 | +require_once dirname(__FILE__) . '/../../../../SEI.php'; | |
| 10 | + | |
| 11 | +class WSEntradaListarProcedimentoDTO extends InfraDTO { | |
| 12 | + | |
| 13 | + public function getStrNomeTabela() { | |
| 14 | + return null; | |
| 15 | + } | |
| 16 | + | |
| 17 | + public function montar() { | |
| 18 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'ServicoDTO'); | |
| 19 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'ProcedimentoDTO'); | |
| 20 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'UnidadeDTO'); | |
| 21 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'Interessado'); | |
| 22 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'ClassificacaoAssunto'); | |
| 23 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_DTA, 'DataInicialRegistroProcedimento'); | |
| 24 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_DTA, 'DataFinalRegistroProcedimento'); | |
| 25 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'UnidadeProcedimentoAberto'); | |
| 26 | + } | |
| 27 | +} | |
| 28 | +?> | |
| 0 | 29 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,23 @@ |
| 1 | +<? | |
| 2 | +/** | |
| 3 | +* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
| 4 | +* | |
| 5 | +* 17/07/2014 - criado por mga | |
| 6 | +* | |
| 7 | +*/ | |
| 8 | + | |
| 9 | +require_once dirname(__FILE__).'/../../../../SEI.php'; | |
| 10 | + | |
| 11 | +class WSEntradaListarProcedimentosTramitadosDTO extends InfraDTO { | |
| 12 | + | |
| 13 | + public function getStrNomeTabela() { | |
| 14 | + return null; | |
| 15 | + } | |
| 16 | + | |
| 17 | + public function montar() { | |
| 18 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_DBL, 'IdProcedimento'); | |
| 19 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_DTH, 'DataReferencia'); | |
| 20 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdUnidadePesquisa'); | |
| 21 | + } | |
| 22 | +} | |
| 23 | +?> | |
| 0 | 24 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,36 @@ |
| 1 | +<? | |
| 2 | +/** | |
| 3 | +* TRIBUNAL REGIONAL FEDERAL DA 4ª REGIÃO | |
| 4 | +* | |
| 5 | +* 13/10/2011 - criado por mga | |
| 6 | +* | |
| 7 | +*/ | |
| 8 | + | |
| 9 | +require_once dirname(__FILE__).'/../../../../SEI.php'; | |
| 10 | + | |
| 11 | +class WSRetornoConsultarProcedimentoDTO extends InfraDTO { | |
| 12 | + | |
| 13 | + public function getStrNomeTabela() { | |
| 14 | + return null; | |
| 15 | + } | |
| 16 | + | |
| 17 | + public function montar() { | |
| 18 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_DBL, 'IdProcedimento'); | |
| 19 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'ProcedimentoFormatado'); | |
| 20 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdTipoProcedimento'); | |
| 21 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'NomeTipoProcedimento'); | |
| 22 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'Especificacao'); | |
| 23 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_DTA, 'Autuacao'); | |
| 24 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'LinkAcesso'); | |
| 25 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'AtividadeDTOGeracao'); | |
| 26 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'AtividadeDTOConclusao'); | |
| 27 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'AtividadeDTOUltimoAndamento'); | |
| 28 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_ARR, 'ObjAtividadeDTOAberto'); | |
| 29 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_ARR, 'ObjRelProtocoloAssuntoDTO'); | |
| 30 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_ARR, 'ObjObservacaoDTO'); | |
| 31 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_ARR, 'ObjParticipanteDTOInteressados'); | |
| 32 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_ARR, 'ObjRelProtocoloProtocoloDTORelacionados'); | |
| 33 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_ARR, 'ObjRelProtocoloProtocoloDTOAnexados'); | |
| 34 | + } | |
| 35 | +} | |
| 36 | +?> | |
| 0 | 37 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,831 @@ |
| 1 | +<? | |
| 2 | +/** | |
| 3 | +* CONTROLADORIA GERAL DA UNIÃO | |
| 4 | +* | |
| 5 | +* 25/06/2015 - criado por Rafael Leandro Ferreira | |
| 6 | +* | |
| 7 | +*/ | |
| 8 | + | |
| 9 | +require_once dirname(__FILE__) . '/../../../../SEI.php'; | |
| 10 | + | |
| 11 | +class CguRN extends InfraRN { | |
| 12 | + | |
| 13 | + public function __construct(){ | |
| 14 | + parent::__construct(); | |
| 15 | + } | |
| 16 | + | |
| 17 | + protected function inicializarObjInfraIBanco(){ | |
| 18 | + return BancoSEI::getInstance(); | |
| 19 | + } | |
| 20 | + | |
| 21 | + | |
| 22 | + protected function listarDocumentoControlado(WSEntradaListarDocumentoDTO $objWSEntradaListarDocumentoDTO){ | |
| 23 | + try{ | |
| 24 | + | |
| 25 | + $objInfraException = new InfraException(); | |
| 26 | + | |
| 27 | + $objServicoDTO = $objWSEntradaListarDocumentoDTO->getObjServicoDTO(); | |
| 28 | + | |
| 29 | + $objDocumentoDTO = $objWSEntradaListarDocumentoDTO->getObjDocumentoDTO(); | |
| 30 | + | |
| 31 | + $objUnidadeDTO = $objWSEntradaListarDocumentoDTO->getObjUnidadeDTO(); | |
| 32 | + | |
| 33 | + if (!InfraUtil::isBolSinalizadorValido($objWSEntradaListarDocumentoDTO->getStrSinRetornarAndamentoGeracao())) { | |
| 34 | + $objInfraException->adicionarValidacao('Sinalizador de retorno para andamento de geração inválido.'); | |
| 35 | + } | |
| 36 | + | |
| 37 | + if (!InfraUtil::isBolSinalizadorValido($objWSEntradaListarDocumentoDTO->getStrSinRetornarAssinaturas())) { | |
| 38 | + $objInfraException->adicionarValidacao('Sinalizador de retorno para assinaturas inválido.'); | |
| 39 | + } | |
| 40 | + | |
| 41 | + if (!InfraUtil::isBolSinalizadorValido($objWSEntradaListarDocumentoDTO->getStrSinRetornarPublicacao())) { | |
| 42 | + $objInfraException->adicionarValidacao('Sinalizador de retorno para publicação inválido.'); | |
| 43 | + } | |
| 44 | + | |
| 45 | + if (!InfraUtil::isBolSinalizadorValido($objWSEntradaListarDocumentoDTO->getStrSinRetornarDestinatarios())) { | |
| 46 | + $objInfraException->adicionarValidacao('Sinalizador de retorno para destinatários inválido.'); | |
| 47 | + } | |
| 48 | + | |
| 49 | + | |
| 50 | + $dto = new DocumentoDTO(); | |
| 51 | + $dto->retDblIdDocumento(); | |
| 52 | + $dto->retDblIdProcedimento(); | |
| 53 | + $dto->retStrProtocoloDocumentoFormatado(); | |
| 54 | + $dto->retStrProtocoloProcedimentoFormatado(); | |
| 55 | + $dto->retNumIdSerie(); | |
| 56 | + $dto->retStrNomeSerie(); | |
| 57 | + $dto->retStrNumero(); | |
| 58 | + $dto->retStrStaNivelAcessoGlobalProtocolo(); | |
| 59 | + $dto->retDtaGeracaoProtocolo(); | |
| 60 | + $dto->retStrStaProtocoloProtocolo(); | |
| 61 | + $dto->retStrSinBloqueado(); | |
| 62 | + | |
| 63 | + $dto->retNumIdUnidadeGeradoraProtocolo(); | |
| 64 | + $dto->retStrSiglaUnidadeGeradoraProtocolo(); | |
| 65 | + $dto->retStrDescricaoUnidadeGeradoraProtocolo(); | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + if ($objDocumentoDTO!='') { | |
| 70 | + | |
| 71 | + if ($objDocumentoDTO->getStrProtocoloDocumentoFormatado()!='') { | |
| 72 | + $dto->setStrProtocoloDocumentoFormatadoPesquisa($objDocumentoDTO->getStrProtocoloDocumentoFormatado()); | |
| 73 | + } | |
| 74 | + if ($objDocumentoDTO->getStrProtocoloProcedimentoFormatado()!='') { | |
| 75 | + $dto->setStrProtocoloProcedimentoFormatado($objDocumentoDTO->getStrProtocoloProcedimentoFormatado()); | |
| 76 | + } | |
| 77 | + if ($objDocumentoDTO->getStrNumero()!='') { | |
| 78 | + $dto->setStrNumero('%'.$objDocumentoDTO->getStrNumero().'%', InfraDTO::$OPER_LIKE); | |
| 79 | + } | |
| 80 | + if ($objDocumentoDTO->getNumIdSerie()!='') { | |
| 81 | + $dto->setNumIdSerie($objDocumentoDTO->getNumIdSerie()); | |
| 82 | + } | |
| 83 | + if ($objDocumentoDTO->getNumIdUnidadeGeradoraProtocolo()!='') { | |
| 84 | + $dto->setNumIdUnidadeGeradoraProtocolo($objDocumentoDTO->getNumIdUnidadeGeradoraProtocolo()); | |
| 85 | + } | |
| 86 | + } | |
| 87 | + | |
| 88 | + $dto->setStrStaProtocoloProtocolo(array(ProtocoloRN::$TP_DOCUMENTO_GERADO, ProtocoloRN::$TP_DOCUMENTO_RECEBIDO), InfraDTO::$OPER_IN); | |
| 89 | + $dto->setStrStaNivelAcessoGlobalProtocolo(ProtocoloRN::$NA_SIGILOSO, InfraDTO::$OPER_DIFERENTE); | |
| 90 | + | |
| 91 | + if(trim($objWSEntradaListarDocumentoDTO->getDtaDataInicialGeracaoProtocolo())!=null&&trim($objWSEntradaListarDocumentoDTO->getDtaDataFinalGeracaoProtocolo())!=null) { | |
| 92 | + $dto->adicionarCriterio(array('GeracaoProtocolo', 'GeracaoProtocolo'), | |
| 93 | + array(InfraDTO::$OPER_MAIOR_IGUAL, InfraDTO::$OPER_MENOR_IGUAL), | |
| 94 | + array($objWSEntradaListarDocumentoDTO->getDtaDataInicialGeracaoProtocolo(), $objWSEntradaListarDocumentoDTO->getDtaDataFinalGeracaoProtocolo()), | |
| 95 | + array(InfraDTO::$OPER_LOGICO_AND)); | |
| 96 | + } | |
| 97 | + else{ | |
| 98 | + if(trim($objWSEntradaListarDocumentoDTO->getDtaDataInicialGeracaoProtocolo())!=null){ | |
| 99 | + $dto->setDtaGeracaoProtocolo($objWSEntradaListarDocumentoDTO->getDtaDataInicialGeracaoProtocolo(), InfraDTO::$OPER_MAIOR_IGUAL); | |
| 100 | + } | |
| 101 | + if(trim($objWSEntradaListarDocumentoDTO->getDtaDataFinalGeracaoProtocolo())!=null){ | |
| 102 | + $dto->setDtaGeracaoProtocolo($objWSEntradaListarDocumentoDTO->getDtaDataFinalGeracaoProtocolo(), InfraDTO::$OPER_MENOR_IGUAL); | |
| 103 | + } | |
| 104 | + } | |
| 105 | + | |
| 106 | + $objDocumentoRN = new DocumentoRN(); | |
| 107 | + $arrDto = $objDocumentoRN->listarRN0008($dto); | |
| 108 | + | |
| 109 | + if ($arrDto==null){ | |
| 110 | + $objInfraException->lancarValidacao('Nenhum documento encontrado com os parâmetros informados.'); | |
| 111 | + } | |
| 112 | + | |
| 113 | + $i = 0; | |
| 114 | + | |
| 115 | + foreach($arrDto as $objDocumentoDTOEncontrado) { | |
| 116 | + $objDocumentoRN->bloquearConsultado($objDocumentoDTOEncontrado); | |
| 117 | + | |
| 118 | + $objDocumentoDTO = $objDocumentoDTOEncontrado; | |
| 119 | + | |
| 120 | + | |
| 121 | + /* | |
| 122 | + * Comentado, verificar depois! | |
| 123 | + * if ($objUnidadeDTO != null) { | |
| 124 | + $objPesquisaProtocoloDTO = new PesquisaProtocoloDTO(); | |
| 125 | + $objPesquisaProtocoloDTO->setStrStaTipo(ProtocoloRN::$TPP_DOCUMENTOS); | |
| 126 | + $objPesquisaProtocoloDTO->setStrStaAcesso(ProtocoloRN::$TAP_AUTORIZADO); | |
| 127 | + $objPesquisaProtocoloDTO->setDblIdProtocolo(array($objDocumentoDTO->getDblIdDocumento())); | |
| 128 | + | |
| 129 | + $objProtocoloRN = new ProtocoloRN(); | |
| 130 | + if (count($objProtocoloRN->pesquisarRN0967($objPesquisaProtocoloDTO)) == 0) { | |
| 131 | + $objInfraException->lancarValidacao('Unidade [' . $objUnidadeDTO->getStrSigla() . '] não possui acesso ao documento [' . $objDocumentoDTO->getStrProtocoloDocumentoFormatado() . '].'); | |
| 132 | + } | |
| 133 | + }*/ | |
| 134 | + | |
| 135 | + $objProcedimentoDTO = new ProcedimentoDTO(); | |
| 136 | + $objProcedimentoDTO->retDblIdProcedimento(); | |
| 137 | + $objProcedimentoDTO->retNumIdTipoProcedimento(); | |
| 138 | + $objProcedimentoDTO->setDblIdProcedimento($objDocumentoDTO->getDblIdProcedimento()); | |
| 139 | + | |
| 140 | + $objProcedimentoRN = new ProcedimentoRN(); | |
| 141 | + $objProcedimentoDTO = $objProcedimentoRN->consultarRN0201($objProcedimentoDTO); | |
| 142 | + | |
| 143 | + $objOperacaoServicoDTO = new OperacaoServicoDTO(); | |
| 144 | + | |
| 145 | + if ($objUnidadeDTO == null) { | |
| 146 | + $this->adicionarCriteriosProcessoDocumento($objOperacaoServicoDTO, $objProcedimentoDTO, $objDocumentoDTO); | |
| 147 | + } else { | |
| 148 | + $this->adicionarCriteriosUnidadeProcessoDocumento($objOperacaoServicoDTO, $objUnidadeDTO, $objProcedimentoDTO, $objDocumentoDTO); | |
| 149 | + } | |
| 150 | + $objOperacaoServicoDTO->setNumStaOperacaoServico(OperacaoServicoRN::$TS_CONSULTAR_DOCUMENTO); | |
| 151 | + $objOperacaoServicoDTO->setNumIdServico($objServicoDTO->getNumIdServico()); | |
| 152 | + | |
| 153 | + $objOperacaoServicoRN = new OperacaoServicoRN(); | |
| 154 | + if ($objOperacaoServicoRN->contar($objOperacaoServicoDTO) == 0) { | |
| 155 | + if ($objUnidadeDTO == null) { | |
| 156 | + $objInfraException->lancarValidacao('Nenhum serviço configurado para consulta deste documento [' . $objDocumentoDTO->getStrProtocoloDocumentoFormatado() . '] pelo Serviço [' . $objServicoDTO->getStrIdentificacao() . '].'); | |
| 157 | + } else { | |
| 158 | + $objInfraException->lancarValidacao('Nenhum serviço configurado para consulta deste documento [' . $objDocumentoDTO->getStrProtocoloDocumentoFormatado() . '] na unidade [' . $objUnidadeDTO->getStrSigla() . '] pelo Serviço [' . $objServicoDTO->getStrIdentificacao() . '].'); | |
| 159 | + } | |
| 160 | + | |
| 161 | + } | |
| 162 | + | |
| 163 | + $objInfraException->lancarValidacoes(); | |
| 164 | + | |
| 165 | + //verifica se o usuário já tem acesso ao processo | |
| 166 | + $objAcessoExternoDTO = new AcessoExternoDTO(); | |
| 167 | + $objAcessoExternoDTO->retNumIdAcessoExterno(); | |
| 168 | + $objAcessoExternoDTO->setDblIdProtocoloAtividade($objDocumentoDTO->getDblIdProcedimento()); | |
| 169 | + $objAcessoExternoDTO->setNumIdContatoParticipante($objServicoDTO->getNumIdContatoUsuario()); | |
| 170 | + $objAcessoExternoDTO->setStrStaTipo(AcessoExternoRN::$TA_SISTEMA); | |
| 171 | + | |
| 172 | + $objAcessoExternoRN = new AcessoExternoRN(); | |
| 173 | + $objAcessoExternoDTO = $objAcessoExternoRN->consultar($objAcessoExternoDTO); | |
| 174 | + | |
| 175 | + if ($objAcessoExternoDTO == null) { | |
| 176 | + | |
| 177 | + $objParticipanteDTO = new ParticipanteDTO(); | |
| 178 | + $objParticipanteDTO->setDblIdProtocolo($objDocumentoDTO->getDblIdProcedimento()); | |
| 179 | + $objParticipanteDTO->setNumIdContato($objServicoDTO->getNumIdContatoUsuario()); | |
| 180 | + $objParticipanteDTO->setStrStaParticipacao(ParticipanteRN::$TP_ACESSO_EXTERNO); | |
| 181 | + $objParticipanteDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); | |
| 182 | + $objParticipanteDTO->setNumSequencia(0); | |
| 183 | + | |
| 184 | + $objParticipanteRN = new ParticipanteRN(); | |
| 185 | + $objParticipanteDTO = $objParticipanteRN->cadastrarRN0170($objParticipanteDTO); | |
| 186 | + | |
| 187 | + $objAcessoExternoDTO = new AcessoExternoDTO(); | |
| 188 | + $objAcessoExternoDTO->setNumIdParticipante($objParticipanteDTO->getNumIdParticipante()); | |
| 189 | + $objAcessoExternoDTO->setStrStaTipo(AcessoExternoRN::$TA_SISTEMA); | |
| 190 | + | |
| 191 | + $objAcessoExternoRN = new AcessoExternoRN(); | |
| 192 | + $objAcessoExternoDTO = $objAcessoExternoRN->cadastrar($objAcessoExternoDTO); | |
| 193 | + } | |
| 194 | + | |
| 195 | + $arrObjWSRetornoConsultarDocumentoDTO[$i] = new WSCguRetornoConsultarDocumentoDTO(); | |
| 196 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setDblIdProcedimento($objDocumentoDTO->getDblIdProcedimento()); | |
| 197 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setStrProcedimentoFormatado($objDocumentoDTO->getStrProtocoloProcedimentoFormatado()); | |
| 198 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setDblIdDocumento($objDocumentoDTO->getDblIdDocumento()); | |
| 199 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setStrDocumentoFormatado($objDocumentoDTO->getStrProtocoloDocumentoFormatado()); | |
| 200 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setNumIdSerie($objDocumentoDTO->getNumIdSerie()); | |
| 201 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setStrNomeSerie($objDocumentoDTO->getStrNomeSerie()); | |
| 202 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setStrNumero($objDocumentoDTO->getStrNumero()); | |
| 203 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setDtaGeracaoProtocolo($objDocumentoDTO->getDtaGeracaoProtocolo()); | |
| 204 | + | |
| 205 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setNumIdUnidadeGeradora($objDocumentoDTO->getNumIdUnidadeGeradoraProtocolo()); | |
| 206 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setStrSiglaUnidadeGeradora($objDocumentoDTO->getStrSiglaUnidadeGeradoraProtocolo()); | |
| 207 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setStrDescricaoUnidadeGeradora($objDocumentoDTO->getStrDescricaoUnidadeGeradoraProtocolo()); | |
| 208 | + | |
| 209 | + if ($objWSEntradaListarDocumentoDTO->getStrSinRetornarAndamentoGeracao() == 'S') { | |
| 210 | + $objProcedimentoHistoricoDTO = new ProcedimentoHistoricoDTO(); | |
| 211 | + $objProcedimentoHistoricoDTO->setDblIdProcedimento($objProcedimentoDTO->getDblIdProcedimento()); | |
| 212 | + $objProcedimentoHistoricoDTO->setDblIdDocumento($objDocumentoDTO->getDblIdDocumento()); | |
| 213 | + $objProcedimentoHistoricoDTO->setStrStaHistorico(ProcedimentoRN::$TH_PERSONALIZADO); | |
| 214 | + $objProcedimentoHistoricoDTO->setStrSinGerarLinksHistorico('N'); | |
| 215 | + $objProcedimentoHistoricoDTO->setNumIdTarefa(array(TarefaRN::$TI_GERACAO_DOCUMENTO, TarefaRN::$TI_RECEBIMENTO_DOCUMENTO), InfraDTO::$OPER_IN); | |
| 216 | + $objProcedimentoHistoricoDTO->setNumMaxRegistrosRetorno(1); | |
| 217 | + $objProcedimentoDTOHistorico = $objProcedimentoRN->consultarHistoricoRN1025($objProcedimentoHistoricoDTO); | |
| 218 | + $arrObjAtividadeDTOHistorico = $objProcedimentoDTOHistorico->getArrObjAtividadeDTO(); | |
| 219 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setObjAtividadeDTOGeracao($arrObjAtividadeDTOHistorico[0]); | |
| 220 | + } else { | |
| 221 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setObjAtividadeDTOGeracao(null); | |
| 222 | + } | |
| 223 | + | |
| 224 | + | |
| 225 | + if ($objWSEntradaListarDocumentoDTO->getStrSinRetornarAssinaturas() == 'S') { | |
| 226 | + $objAssinaturaDTO = new AssinaturaDTO(); | |
| 227 | + $objAssinaturaDTO->retNumIdAssinatura(); | |
| 228 | + $objAssinaturaDTO->retStrNome(); | |
| 229 | + $objAssinaturaDTO->retStrTratamento(); | |
| 230 | + $objAssinaturaDTO->retDthAberturaAtividade(); | |
| 231 | + $objAssinaturaDTO->setDblIdDocumento($objDocumentoDTO->getDblIdDocumento()); | |
| 232 | + $objAssinaturaDTO->setOrdNumIdAssinatura(InfraDTO::$TIPO_ORDENACAO_ASC); | |
| 233 | + | |
| 234 | + $objAssinaturaRN = new AssinaturaRN(); | |
| 235 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setArrObjAssinaturaDTO($objAssinaturaRN->listarRN1323($objAssinaturaDTO)); | |
| 236 | + } else { | |
| 237 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setArrObjAssinaturaDTO(array()); | |
| 238 | + } | |
| 239 | + | |
| 240 | + if ($objWSEntradaListarDocumentoDTO->getStrSinRetornarPublicacao() == 'S') { | |
| 241 | + $objPublicacaoDTO = new PublicacaoDTO(); | |
| 242 | + $objPublicacaoDTO->retNumIdPublicacao(); | |
| 243 | + $objPublicacaoDTO->retDtaDisponibilizacao(); | |
| 244 | + $objPublicacaoDTO->retNumIdVeiculoIO(); | |
| 245 | + $objPublicacaoDTO->retDtaPublicacaoIO(); | |
| 246 | + $objPublicacaoDTO->retStrPaginaIO(); | |
| 247 | + $objPublicacaoDTO->retDtaPublicacao(); | |
| 248 | + $objPublicacaoDTO->retNumNumero(); | |
| 249 | + $objPublicacaoDTO->retStrNomeVeiculoPublicacao(); | |
| 250 | + $objPublicacaoDTO->retStrDescricaoVeiculoImprensaNacional(); | |
| 251 | + $objPublicacaoDTO->retStrStaEstado(); | |
| 252 | + $objPublicacaoDTO->retStrSiglaVeiculoImprensaNacional(); | |
| 253 | + $objPublicacaoDTO->retStrNomeSecaoImprensaNacional(); | |
| 254 | + $objPublicacaoDTO->setDblIdDocumento($objDocumentoDTO->getDblIdDocumento()); | |
| 255 | + | |
| 256 | + $objPublicacaoRN = new PublicacaoRN(); | |
| 257 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setObjPublicacaoDTO($objPublicacaoRN->consultarRN1044($objPublicacaoDTO)); | |
| 258 | + } else { | |
| 259 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setObjPublicacaoDTO(null); | |
| 260 | + } | |
| 261 | + | |
| 262 | + if ($objWSEntradaListarDocumentoDTO->getStrSinRetornarDestinatarios() == 'S') { | |
| 263 | + | |
| 264 | + $objParticipanteDTO = new ParticipanteDTO(); | |
| 265 | + $objParticipanteDTO->retNumIdContato(); | |
| 266 | + $objParticipanteDTO->retStrNomeContato(); | |
| 267 | + $objParticipanteDTO->retStrEmailContato(); | |
| 268 | + $objParticipanteDTO->retStrSiglaUnidade(); | |
| 269 | + | |
| 270 | + $objParticipanteDTO->setDblIdProtocolo($objDocumentoDTO->getDblIdDocumento()); | |
| 271 | + $objParticipanteDTO->setStrStaParticipacao(array(ParticipanteRN::$TP_DESTINATARIO),InfraDTO::$OPER_IN); | |
| 272 | + | |
| 273 | + $objParticipanteDTO->setOrdNumSequencia(InfraDTO::$TIPO_ORDENACAO_ASC); | |
| 274 | + | |
| 275 | + $objParticipanteRN = new ParticipanteRN(); | |
| 276 | + //$arrObjParticipanteDTO = $objParticipanteRN->listarRN0189($objParticipanteDTO); | |
| 277 | + | |
| 278 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setArrObjParticipanteDTO($objParticipanteRN->listarRN0189($objParticipanteDTO)); | |
| 279 | + } else { | |
| 280 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setArrObjParticipanteDTO(array()); | |
| 281 | + } | |
| 282 | + | |
| 283 | + if ($objServicoDTO->getStrSinLinkExterno() == 'S') { | |
| 284 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setStrLinkAcesso(SessaoSEIExterna::getInstance($objAcessoExternoDTO->getNumIdAcessoExterno())->assinarLink(ConfiguracaoSEI::getInstance()->getValor('SEI', 'URL') . '/documento_consulta_externa.php?id_acesso_externo=' . $objAcessoExternoDTO->getNumIdAcessoExterno() . '&id_documento=' . $objDocumentoDTO->getDblIdDocumento())); | |
| 285 | + } else { | |
| 286 | + $arrObjWSRetornoConsultarDocumentoDTO[$i]->setStrLinkAcesso(ConfiguracaoSEI::getInstance()->getValor('SEI', 'URL') . '/controlador.php?acao=procedimento_trabalhar&id_procedimento=' . $objDocumentoDTO->getDblIdProcedimento() . '&id_documento=' . $objDocumentoDTO->getDblIdDocumento()); | |
| 287 | + } | |
| 288 | + | |
| 289 | + $i++; | |
| 290 | + | |
| 291 | + } | |
| 292 | + | |
| 293 | + return $arrObjWSRetornoConsultarDocumentoDTO; | |
| 294 | + | |
| 295 | + }catch(Exception $e){ | |
| 296 | + throw new InfraException('Erro no serviço de consulta de documento.',$e); | |
| 297 | + } | |
| 298 | + } | |
| 299 | + | |
| 300 | + protected function listarProcedimentoControlado(WSEntradaListarProcedimentoDTO $objWSEntradaListarProcedimentoDTO){ | |
| 301 | + | |
| 302 | + | |
| 303 | + try{ | |
| 304 | + | |
| 305 | + $objInfraException = new InfraException(); | |
| 306 | + | |
| 307 | + $objAtividadeRN = new AtividadeRN(); | |
| 308 | + $objProcedimentoRN = new ProcedimentoRN(); | |
| 309 | + | |
| 310 | + $objServicoDTO = $objWSEntradaListarProcedimentoDTO->getObjServicoDTO(); | |
| 311 | + $objProcedimentoDTO = $objWSEntradaListarProcedimentoDTO->getObjProcedimentoDTO(); | |
| 312 | + $objUnidadeDTO = $objWSEntradaListarProcedimentoDTO->getObjUnidadeDTO(); | |
| 313 | + | |
| 314 | + $dto = new ProcedimentoDTO(); | |
| 315 | + | |
| 316 | + $dto->retDblIdProcedimento(); | |
| 317 | + $dto->retStrProtocoloProcedimentoFormatado(); | |
| 318 | + $dto->retStrStaNivelAcessoGlobalProtocolo(); | |
| 319 | + $dto->retNumIdTipoProcedimento(); | |
| 320 | + $dto->retStrNomeTipoProcedimento(); | |
| 321 | + $dto->retStrDescricaoProtocolo(); | |
| 322 | + $dto->retDtaGeracaoProtocolo(); | |
| 323 | + | |
| 324 | + if ($objProcedimentoDTO->getStrProtocoloProcedimentoFormatado()!='') { | |
| 325 | + $dto->setStrProtocoloProcedimentoFormatadoPesquisa(InfraUtil::retirarFormatacao($objProcedimentoDTO->getStrProtocoloProcedimentoFormatado())); | |
| 326 | + } | |
| 327 | + | |
| 328 | + if(trim($objWSEntradaListarProcedimentoDTO->getStrClassificacaoAssunto())!=null){ | |
| 329 | + $arrProtocolosResultadoAssuntos = $this->prepararClassificacaoAssunto($objWSEntradaListarProcedimentoDTO->getStrClassificacaoAssunto()); | |
| 330 | + } | |
| 331 | + else{ | |
| 332 | + $arrProtocolosResultadoAssuntos = array(); | |
| 333 | + } | |
| 334 | + | |
| 335 | + if(trim($objWSEntradaListarProcedimentoDTO->getStrInteressado())!=null){ | |
| 336 | + $arrProtocolosResultadoInteressados = $this->prepararParticipantes($objWSEntradaListarProcedimentoDTO->getStrInteressado()); | |
| 337 | + } | |
| 338 | + else{ | |
| 339 | + $arrProtocolosResultadoInteressados = array(); | |
| 340 | + } | |
| 341 | + | |
| 342 | + if($objWSEntradaListarProcedimentoDTO->getNumUnidadeProcedimentoAberto()!=null) { | |
| 343 | + $arrProtocolosResultadoAbertos = $this->prepararUnidadeProcedimentoAberto($objWSEntradaListarProcedimentoDTO->getNumUnidadeProcedimentoAberto(), $objServicoDTO->getNumIdContatoUsuario()); | |
| 344 | + } | |
| 345 | + else{ | |
| 346 | + $arrProtocolosResultadoAbertos = array(); | |
| 347 | + } | |
| 348 | + | |
| 349 | + $arrJuncaoProtocolos = array('arrProtocolosResultadoAssuntos', 'arrProtocolosResultadoInteressados','arrProtocolosResultadoAbertos'); | |
| 350 | + $arrResultadoProtocolos = $arrProtocolosResultadoAssuntos; | |
| 351 | + | |
| 352 | + foreach($arrJuncaoProtocolos as $k){ | |
| 353 | + if(!empty(${$k})) $out = array_intersect($arrResultadoProtocolos,${$k}); | |
| 354 | + }; | |
| 355 | + | |
| 356 | + if (count($arrResultadoProtocolos)>0) { | |
| 357 | + $dto->setDblIdProcedimento($arrResultadoProtocolos, InfraDTO::$OPER_IN); | |
| 358 | + } | |
| 359 | + | |
| 360 | + if($objProcedimentoDTO->getStrDescricaoProtocolo()!='') { | |
| 361 | + $dto->setStrDescricaoProtocolo('%'.$objProcedimentoDTO->getStrDescricaoProtocolo().'%',InfraDTO::$OPER_LIKE); | |
| 362 | + } | |
| 363 | + | |
| 364 | + if($objProcedimentoDTO->getNumIdTipoProcedimento()!='') { | |
| 365 | + $dto->setNumIdTipoProcedimento($objProcedimentoDTO->getNumIdTipoProcedimento()); | |
| 366 | + } | |
| 367 | + | |
| 368 | + if($objProcedimentoDTO->getStrNomeTipoProcedimento()!='') { | |
| 369 | + $dto->setStrNomeTipoProcedimento('%'.$objProcedimentoDTO->getStrNomeTipoProcedimento().'%',InfraDTO::$OPER_LIKE); | |
| 370 | + } | |
| 371 | + | |
| 372 | + if(trim($objWSEntradaListarProcedimentoDTO->getDtaDataInicialRegistroProcedimento())!=null&&trim($objWSEntradaListarProcedimentoDTO->getDtaDataFinalRegistroProcedimento())!=null) { | |
| 373 | + $dto->adicionarCriterio(array('GeracaoProtocolo', 'GeracaoProtocolo'), | |
| 374 | + array(InfraDTO::$OPER_MAIOR_IGUAL, InfraDTO::$OPER_MENOR_IGUAL), | |
| 375 | + array($objWSEntradaListarProcedimentoDTO->getDtaDataInicialRegistroProcedimento(), $objWSEntradaListarProcedimentoDTO->getDtaDataFinalRegistroProcedimento()), | |
| 376 | + array(InfraDTO::$OPER_LOGICO_AND)); | |
| 377 | + } | |
| 378 | + else{ | |
| 379 | + if(trim($objWSEntradaListarProcedimentoDTO->getDtaDataInicialRegistroProcedimento())!=null){ | |
| 380 | + $dto->setDtaGeracaoProtocolo($objWSEntradaListarProcedimentoDTO->getDtaDataInicialRegistroProcedimento(), InfraDTO::$OPER_MAIOR_IGUAL); | |
| 381 | + } | |
| 382 | + if(trim($objWSEntradaListarProcedimentoDTO->getDtaDataFinalRegistroProcedimento())!=null){ | |
| 383 | + $dto->setDtaGeracaoProtocolo($objWSEntradaListarProcedimentoDTO->getDtaDataFinalRegistroProcedimento(), InfraDTO::$OPER_MENOR_IGUAL); | |
| 384 | + } | |
| 385 | + } | |
| 386 | + | |
| 387 | + //$dto->setStrProtocoloProcedimentoFormatadoPesquisa(InfraUtil::retirarFormatacao($objProcedimentoDTO->getStrProtocoloProcedimentoFormatado())); | |
| 388 | + $dto->setStrStaNivelAcessoGlobalProtocolo(ProtocoloRN::$NA_SIGILOSO, InfraDTO::$OPER_DIFERENTE); | |
| 389 | + | |
| 390 | + $dto->setNumMaxRegistrosRetorno(1000); | |
| 391 | + | |
| 392 | + $arrDto = $objProcedimentoRN->listarRN0278($dto); | |
| 393 | + | |
| 394 | + if ($arrDto==null){ | |
| 395 | + $objInfraException->lancarValidacao('Nenhum processo encontrado para os parâmetros informados.'); | |
| 396 | + } | |
| 397 | + | |
| 398 | + $i = 0; | |
| 399 | + | |
| 400 | + foreach($arrDto as $objProcedimentoDTO) { | |
| 401 | + | |
| 402 | + //$objProcedimentoDTO = $dto; | |
| 403 | + | |
| 404 | + if ($objUnidadeDTO != null) { | |
| 405 | + $objPesquisaProtocoloDTO = new PesquisaProtocoloDTO(); | |
| 406 | + $objPesquisaProtocoloDTO->setStrStaTipo(ProtocoloRN::$TPP_PROCEDIMENTOS); | |
| 407 | + $objPesquisaProtocoloDTO->setStrStaAcesso(ProtocoloRN::$TAP_AUTORIZADO); | |
| 408 | + $objPesquisaProtocoloDTO->setDblIdProtocolo(array($objProcedimentoDTO->getDblIdProcedimento())); | |
| 409 | + | |
| 410 | + $objProtocoloRN = new ProtocoloRN(); | |
| 411 | + if (count($objProtocoloRN->pesquisarRN0967($objPesquisaProtocoloDTO)) == 0) { | |
| 412 | + $objInfraException->lancarValidacao('Unidade [' . $objUnidadeDTO->getStrSigla() . '] não possui acesso ao processo [' . $objProcedimentoDTO->getStrProtocoloProcedimentoFormatado() . '].'); | |
| 413 | + } | |
| 414 | + } | |
| 415 | + | |
| 416 | + | |
| 417 | + $objOperacaoServicoDTO = new OperacaoServicoDTO(); | |
| 418 | + | |
| 419 | + if ($objUnidadeDTO == null) { | |
| 420 | + $this->adicionarCriteriosProcesso($objOperacaoServicoDTO, $objProcedimentoDTO); | |
| 421 | + } else { | |
| 422 | + $this->adicionarCriteriosUnidadeProcesso($objOperacaoServicoDTO, $objUnidadeDTO, $objProcedimentoDTO); | |
| 423 | + } | |
| 424 | + | |
| 425 | + $objOperacaoServicoDTO->setNumStaOperacaoServico(OperacaoServicoRN::$TS_CONSULTAR_PROCEDIMENTO); | |
| 426 | + $objOperacaoServicoDTO->setNumIdServico($objServicoDTO->getNumIdServico()); | |
| 427 | + | |
| 428 | + | |
| 429 | + $objOperacaoServicoRN = new OperacaoServicoRN(); | |
| 430 | + if ($objOperacaoServicoRN->contar($objOperacaoServicoDTO) == 0) { | |
| 431 | + if ($objUnidadeDTO == null) { | |
| 432 | + $objInfraException->lancarValidacao('Nenhum serviço configurado para consulta deste processo [' . $objProcedimentoDTO->getStrProtocoloProcedimentoFormatado() . '] pelo Serviço [' . $objServicoDTO->getStrIdentificacao() . '].'); | |
| 433 | + } else { | |
| 434 | + $objInfraException->lancarValidacao('Nenhum serviço configurado para consulta deste processo [' . $objProcedimentoDTO->getStrProtocoloProcedimentoFormatado() . '] na unidade [' . $objUnidadeDTO->getStrSigla() . '] pelo Serviço [' . $objServicoDTO->getStrIdentificacao() . '].'); | |
| 435 | + } | |
| 436 | + } | |
| 437 | + | |
| 438 | + $objInfraException->lancarValidacoes(); | |
| 439 | + | |
| 440 | + //verifica se o usuário já tem acesso ao processo | |
| 441 | + $objAcessoExternoDTO = new AcessoExternoDTO(); | |
| 442 | + $objAcessoExternoDTO->retNumIdAcessoExterno(); | |
| 443 | + $objAcessoExternoDTO->setDblIdProtocoloAtividade($objProcedimentoDTO->getDblIdProcedimento()); | |
| 444 | + $objAcessoExternoDTO->setNumIdContatoParticipante($objServicoDTO->getNumIdContatoUsuario()); | |
| 445 | + $objAcessoExternoDTO->setStrStaTipo(AcessoExternoRN::$TA_SISTEMA); | |
| 446 | + | |
| 447 | + $objAcessoExternoRN = new AcessoExternoRN(); | |
| 448 | + $objAcessoExternoDTO = $objAcessoExternoRN->consultar($objAcessoExternoDTO); | |
| 449 | + | |
| 450 | + if ($objAcessoExternoDTO == null) { | |
| 451 | + | |
| 452 | + $objParticipanteDTO = new ParticipanteDTO(); | |
| 453 | + $objParticipanteDTO->setDblIdProtocolo($objProcedimentoDTO->getDblIdProcedimento()); | |
| 454 | + $objParticipanteDTO->setNumIdContato($objServicoDTO->getNumIdContatoUsuario()); | |
| 455 | + $objParticipanteDTO->setStrStaParticipacao(ParticipanteRN::$TP_ACESSO_EXTERNO); | |
| 456 | + $objParticipanteDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); | |
| 457 | + $objParticipanteDTO->setNumSequencia(0); | |
| 458 | + | |
| 459 | + $objParticipanteRN = new ParticipanteRN(); | |
| 460 | + $objParticipanteDTO = $objParticipanteRN->cadastrarRN0170($objParticipanteDTO); | |
| 461 | + | |
| 462 | + $objAcessoExternoDTO = new AcessoExternoDTO(); | |
| 463 | + $objAcessoExternoDTO->setNumIdParticipante($objParticipanteDTO->getNumIdParticipante()); | |
| 464 | + $objAcessoExternoDTO->setStrStaTipo(AcessoExternoRN::$TA_SISTEMA); | |
| 465 | + | |
| 466 | + $objAcessoExternoRN = new AcessoExternoRN(); | |
| 467 | + $objAcessoExternoDTO = $objAcessoExternoRN->cadastrar($objAcessoExternoDTO); | |
| 468 | + } | |
| 469 | + | |
| 470 | + $ArrObjWSRetornoConsultarProcedimentoDTO[$i] = new WSRetornoConsultarProcedimentoDTO(); | |
| 471 | + $ArrObjWSRetornoConsultarProcedimentoDTO[$i]->setDblIdProcedimento($objProcedimentoDTO->getDblIdProcedimento()); | |
| 472 | + $ArrObjWSRetornoConsultarProcedimentoDTO[$i]->setStrProcedimentoFormatado($objProcedimentoDTO->getStrProtocoloProcedimentoFormatado()); | |
| 473 | + $ArrObjWSRetornoConsultarProcedimentoDTO[$i]->setNumIdTipoProcedimento($objProcedimentoDTO->getNumIdTipoProcedimento()); | |
| 474 | + $ArrObjWSRetornoConsultarProcedimentoDTO[$i]->setStrNomeTipoProcedimento($objProcedimentoDTO->getStrNomeTipoProcedimento()); | |
| 475 | + $ArrObjWSRetornoConsultarProcedimentoDTO[$i]->setDtaAutuacao($objProcedimentoDTO->getDtaGeracaoProtocolo()); | |
| 476 | + $ArrObjWSRetornoConsultarProcedimentoDTO[$i]->setStrEspecificacao($objProcedimentoDTO->getStrDescricaoProtocolo()); | |
| 477 | + | |
| 478 | + $i++; | |
| 479 | + } | |
| 480 | + | |
| 481 | + return $ArrObjWSRetornoConsultarProcedimentoDTO; | |
| 482 | + | |
| 483 | + }catch(Exception $e){ | |
| 484 | + throw new InfraException('Erro no serviço de consulta de procedimento.',$e); | |
| 485 | + } | |
| 486 | + } | |
| 487 | + | |
| 488 | + protected function listarAndamentosControlado(WSEntradaListarAndamentosDTO $objWSEntradaListarAndamentosDTO){ | |
| 489 | + try{ | |
| 490 | + | |
| 491 | + $objInfraException = new InfraException(); | |
| 492 | + | |
| 493 | + $objAtividadeRN = new AtividadeRN(); | |
| 494 | + $objProcedimentoRN = new ProcedimentoRN(); | |
| 495 | + | |
| 496 | + $objServicoDTO = $objWSEntradaListarAndamentosDTO->getObjServicoDTO(); | |
| 497 | + $objProcedimentoDTO = $objWSEntradaListarAndamentosDTO->getObjProcedimentoDTO(); | |
| 498 | + $objUnidadeDTO = $objWSEntradaListarAndamentosDTO->getObjUnidadeDTO(); | |
| 499 | + | |
| 500 | + $dto = new ProcedimentoDTO(); | |
| 501 | + $dto->retDblIdProcedimento(); | |
| 502 | + $dto->retStrProtocoloProcedimentoFormatado(); | |
| 503 | + $dto->retStrStaNivelAcessoGlobalProtocolo(); | |
| 504 | + $dto->retNumIdTipoProcedimento(); | |
| 505 | + $dto->retStrNomeTipoProcedimento(); | |
| 506 | + $dto->retStrDescricaoProtocolo(); | |
| 507 | + $dto->retDtaGeracaoProtocolo(); | |
| 508 | + $dto->setStrProtocoloProcedimentoFormatadoPesquisa(InfraUtil::retirarFormatacao($objProcedimentoDTO->getStrProtocoloProcedimentoFormatado())); | |
| 509 | + $dto->setStrStaNivelAcessoGlobalProtocolo(ProtocoloRN::$NA_SIGILOSO, InfraDTO::$OPER_DIFERENTE); | |
| 510 | + | |
| 511 | + $dto = $objProcedimentoRN->consultarRN0201($dto); | |
| 512 | + | |
| 513 | + if ($dto==null){ | |
| 514 | + $objInfraException->lancarValidacao('Processo '.$objProcedimentoDTO->getStrProtocoloProcedimentoFormatado().' não encontrado.'); | |
| 515 | + } | |
| 516 | + | |
| 517 | + $objProcedimentoDTO = $dto; | |
| 518 | + | |
| 519 | + $objWSRetornoListarAndamentosDTO = new WSCguRetornoListarAndamentosDTO(); | |
| 520 | + | |
| 521 | + $objWSRetornoListarAndamentosDTO->setDblIdProcedimento($objProcedimentoDTO->getDblIdProcedimento()); | |
| 522 | + $objWSRetornoListarAndamentosDTO->setStrProcedimentoFormatado($objProcedimentoDTO->getStrProtocoloProcedimentoFormatado()); | |
| 523 | + $objWSRetornoListarAndamentosDTO->setNumIdTipoProcedimento($objProcedimentoDTO->getNumIdTipoProcedimento()); | |
| 524 | + $objWSRetornoListarAndamentosDTO->setStrNomeTipoProcedimento($objProcedimentoDTO->getStrNomeTipoProcedimento()); | |
| 525 | + | |
| 526 | + $objProcedimentoHistoricoDTO = new ProcedimentoHistoricoDTO(); | |
| 527 | + $objProcedimentoHistoricoDTO->setDblIdProcedimento($objProcedimentoDTO->getDblIdProcedimento()); | |
| 528 | + $objProcedimentoHistoricoDTO->setStrStaHistorico(ProcedimentoRN::$TH_RESUMIDO); | |
| 529 | + $objProcedimentoHistoricoDTO->setStrSinGerarLinksHistorico('N'); | |
| 530 | + //$objProcedimentoHistoricoDTO->setNumMaxRegistrosRetorno(1); | |
| 531 | + $objProcedimentoDTOHistorico = $objProcedimentoRN->consultarHistoricoRN1025($objProcedimentoHistoricoDTO); | |
| 532 | + $arrObjAtividadeDTOHistorico = $objProcedimentoDTOHistorico->getArrObjAtividadeDTO(); | |
| 533 | + | |
| 534 | + $objWSRetornoListarAndamentosDTO->setArrObjAtividadeDTO($arrObjAtividadeDTOHistorico); | |
| 535 | + | |
| 536 | + return $objWSRetornoListarAndamentosDTO; | |
| 537 | + | |
| 538 | + }catch(Exception $e){ | |
| 539 | + throw new InfraException('Erro no serviço de consulta de andamentos.',$e); | |
| 540 | + } | |
| 541 | + } | |
| 542 | + | |
| 543 | + | |
| 544 | + protected function listarProcedimentosTramitadosParaAreaControlado(WSEntradaListarProcedimentosTramitadosDTO $objWsEntradaListarProcedimentosTramitadosDTO){ | |
| 545 | + try{ | |
| 546 | + | |
| 547 | + $objInfraException = new InfraException(); | |
| 548 | + | |
| 549 | + $objAtividadeRN = new AtividadeRN(); | |
| 550 | + $objProcedimentoRN = new ProcedimentoRN(); | |
| 551 | + | |
| 552 | + /*$dto = new ProcedimentoDTO(); | |
| 553 | + $dto->retDblIdProcedimento(); | |
| 554 | + $dto->retStrProtocoloProcedimentoFormatado(); | |
| 555 | + $dto->retStrStaNivelAcessoGlobalProtocolo(); | |
| 556 | + $dto->retNumIdTipoProcedimento(); | |
| 557 | + $dto->retStrNomeTipoProcedimento(); | |
| 558 | + $dto->retStrDescricaoProtocolo(); | |
| 559 | + $dto->retDtaGeracaoProtocolo(); | |
| 560 | + $dto->setStrProtocoloProcedimentoFormatadoPesquisa(InfraUtil::retirarFormatacao($objProcedimentoDTO->getStrProtocoloProcedimentoFormatado())); | |
| 561 | + $dto->setStrStaNivelAcessoGlobalProtocolo(ProtocoloRN::$NA_SIGILOSO, InfraDTO::$OPER_DIFERENTE); | |
| 562 | + | |
| 563 | + $dto = $objProcedimentoRN->consultarRN0201($dto); | |
| 564 | + | |
| 565 | + if ($dto==null){ | |
| 566 | + $objInfraException->lancarValidacao('Processo '.$objProcedimentoDTO->getStrProtocoloProcedimentoFormatado().' não encontrado.'); | |
| 567 | + } | |
| 568 | + | |
| 569 | + $objProcedimentoDTO = $dto;*/ | |
| 570 | + | |
| 571 | + $objWSRetornoListarAndamentosDTO = new WSCguRetornoListarAndamentosDTO(); | |
| 572 | + | |
| 573 | + /*$objWSRetornoListarAndamentosDTO->setDblIdProcedimento($objProcedimentoDTO->getDblIdProcedimento()); | |
| 574 | + $objWSRetornoListarAndamentosDTO->setStrProcedimentoFormatado($objProcedimentoDTO->getStrProtocoloProcedimentoFormatado()); | |
| 575 | + $objWSRetornoListarAndamentosDTO->setNumIdTipoProcedimento($objProcedimentoDTO->getNumIdTipoProcedimento()); | |
| 576 | + $objWSRetornoListarAndamentosDTO->setStrNomeTipoProcedimento($objProcedimentoDTO->getStrNomeTipoProcedimento());*/ | |
| 577 | + | |
| 578 | + $objProcedimentoHistoricoDTO = new ProcedimentoHistoricoDTO(); | |
| 579 | + $objProcedimentoHistoricoDTO->setDblIdProcedimento($objWsEntradaListarProcedimentosTramitadosDTO->getDblIdProcedimento()); | |
| 580 | + $objProcedimentoHistoricoDTO->setStrStaHistorico(ProcedimentoRN::$TH_RESUMIDO); | |
| 581 | + $objProcedimentoHistoricoDTO->setStrSinGerarLinksHistorico('N'); | |
| 582 | + //$objProcedimentoHistoricoDTO->setNumMaxRegistrosRetorno(1); | |
| 583 | + $objProcedimentoDTOHistorico = $objProcedimentoRN->consultarHistoricoRN1025($objProcedimentoHistoricoDTO); | |
| 584 | + $arrObjAtividadeDTOHistorico = $objProcedimentoDTOHistorico->getArrObjAtividadeDTO(); | |
| 585 | + | |
| 586 | + $objWSRetornoListarAndamentosDTO->setArrObjAtividadeDTO($arrObjAtividadeDTOHistorico); | |
| 587 | + | |
| 588 | + return $objWSRetornoListarAndamentosDTO; | |
| 589 | + | |
| 590 | + }catch(Exception $e){ | |
| 591 | + throw new InfraException('Erro no serviço de consulta de andamentos.',$e); | |
| 592 | + } | |
| 593 | + } | |
| 594 | + | |
| 595 | + private function prepararParticipantes($Interessado){ | |
| 596 | + | |
| 597 | + $objParticipanteDTO = new ParticipanteDTO(); | |
| 598 | + $objParticipanteDTO->retDblIdProtocolo(); | |
| 599 | + $objParticipanteDTO->retNumIdParticipante(); | |
| 600 | + $objParticipanteDTO->retNumIdContato(); | |
| 601 | + $objParticipanteDTO->retStrNomeContato(); | |
| 602 | + $objParticipanteDTO->retStrSiglaContato(); | |
| 603 | + $objParticipanteDTO->setStrNomeContato('%'.$Interessado.'%',InfraDTO::$OPER_LIKE); | |
| 604 | + | |
| 605 | + //filtra somente processos | |
| 606 | + $objParticipanteDTO->setStrStaProtocoloProtocolo(ProtocoloRN::$TP_PROCEDIMENTO); | |
| 607 | + | |
| 608 | + //como não tem paginação é bom limitar | |
| 609 | + $objParticipanteDTO->setNumMaxRegistrosRetorno(500); | |
| 610 | + | |
| 611 | + $objParticipanteRN = new ParticipanteRN(); | |
| 612 | + $arrObjParticipanteDTO = $objParticipanteRN->listarRN0189($objParticipanteDTO); | |
| 613 | + | |
| 614 | + if (count($arrObjParticipanteDTO)==0){ | |
| 615 | + throw new InfraException('Nenhum interessado encontrado!'); } | |
| 616 | + | |
| 617 | + $ret = array(); | |
| 618 | + | |
| 619 | + foreach($arrObjParticipanteDTO as $Participante){ | |
| 620 | + $ret[] = $Participante->getDblIdProtocolo(); | |
| 621 | + } | |
| 622 | + | |
| 623 | + return $ret; | |
| 624 | + } | |
| 625 | + | |
| 626 | + private function prepararClassificacaoAssunto($ClassificacaoAssunto){ | |
| 627 | + | |
| 628 | + | |
| 629 | + $objRelProtocoloAssuntoDTO = new RelProtocoloAssuntoDTO(); | |
| 630 | + $objRelProtocoloAssuntoDTO->retDblIdProtocolo(); | |
| 631 | + $objRelProtocoloAssuntoDTO->retNumIdAssunto(); | |
| 632 | + $objRelProtocoloAssuntoDTO->setStrCodigoEstruturadoAssunto($ClassificacaoAssunto); | |
| 633 | + | |
| 634 | + //como não tem paginação é bom limitar | |
| 635 | + $objRelProtocoloAssuntoDTO->setNumMaxRegistrosRetorno(500); | |
| 636 | + | |
| 637 | + $objRelProtocoloAssuntoRN = new RelProtocoloAssuntoRN(); | |
| 638 | + $arrAssuntos = $objRelProtocoloAssuntoRN->listarRN0188($objRelProtocoloAssuntoDTO); | |
| 639 | + | |
| 640 | + if (count($arrAssuntos)==0){ | |
| 641 | + throw new InfraException('Nenhuma Classificação de Assunto encontrado!'); } | |
| 642 | + | |
| 643 | + $ret = array(); | |
| 644 | + foreach($arrAssuntos as $Assuntos){ | |
| 645 | + $ret[] = $Assuntos->getDblIdProtocolo(); | |
| 646 | + } | |
| 647 | + | |
| 648 | + return $ret; | |
| 649 | + } | |
| 650 | + | |
| 651 | + private function prepararUnidadeProcedimentoAberto($numIdUnidade, $numIdUsuario){ | |
| 652 | + | |
| 653 | + $objPesquisaPendenciaDTO = new PesquisaPendenciaDTO(); | |
| 654 | + $objPesquisaPendenciaDTO->retDblIdProtocolo(); | |
| 655 | + $objPesquisaPendenciaDTO->retNumIdUsuario(); | |
| 656 | + $objPesquisaPendenciaDTO->setNumIdUsuario($numIdUsuario); | |
| 657 | + $objPesquisaPendenciaDTO->setNumIdUnidade($numIdUnidade); | |
| 658 | + | |
| 659 | + $objAtividadeRN = new AtividadeRN(); | |
| 660 | + | |
| 661 | + $arrObjPendenciaDTO = $objAtividadeRN->listarPendenciasRN0754($objPesquisaPendenciaDTO); | |
| 662 | + | |
| 663 | + if (count($arrObjPendenciaDTO)==0){ | |
| 664 | + throw new InfraException('Nenhum Procedimento com Pendência para a Unidade Informada!'); } | |
| 665 | + | |
| 666 | + $ret = array(); | |
| 667 | + | |
| 668 | + foreach($arrObjPendenciaDTO as $objPendenciaDTO){ | |
| 669 | + $ret[] = $objPendenciaDTO->getDblIdProcedimento(); | |
| 670 | + } | |
| 671 | + | |
| 672 | + return $ret; | |
| 673 | + } | |
| 674 | + | |
| 675 | + private function adicionarCriteriosProcesso(OperacaoServicoDTO $objOperacaoServicoDTO, ProcedimentoDTO $objProcedimentoDTO){ | |
| 676 | + | |
| 677 | + //tipo informado ou qualquer um | |
| 678 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdTipoProcedimento','IdTipoProcedimento'), | |
| 679 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 680 | + array($objProcedimentoDTO->getNumIdTipoProcedimento(),null), | |
| 681 | + InfraDTO::$OPER_LOGICO_OR); | |
| 682 | + } | |
| 683 | + | |
| 684 | + private function adicionarCriteriosUnidade(OperacaoServicoDTO $objOperacaoServicoDTO, UnidadeDTO $objUnidadeDTO){ | |
| 685 | + | |
| 686 | + //unidade informada ou qualquer uma | |
| 687 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdUnidade','IdUnidade'), | |
| 688 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 689 | + array($objUnidadeDTO->getNumIdUnidade(),null), | |
| 690 | + InfraDTO::$OPER_LOGICO_OR); | |
| 691 | + } | |
| 692 | + | |
| 693 | + private function adicionarCriteriosUnidadeProcesso(OperacaoServicoDTO $objOperacaoServicoDTO, UnidadeDTO $objUnidadeDTO, ProcedimentoDTO $objProcedimentoDTO){ | |
| 694 | + | |
| 695 | + //qualquer tipo em qualquer unidade | |
| 696 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdTipoProcedimento','IdUnidade'), | |
| 697 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 698 | + array(null,null), | |
| 699 | + InfraDTO::$OPER_LOGICO_AND, | |
| 700 | + 'c1'); | |
| 701 | + | |
| 702 | + //este tipo em qualquer unidade | |
| 703 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdTipoProcedimento','IdUnidade'), | |
| 704 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 705 | + array($objProcedimentoDTO->getNumIdTipoProcedimento(),null), | |
| 706 | + InfraDTO::$OPER_LOGICO_AND, | |
| 707 | + 'c2'); | |
| 708 | + | |
| 709 | + //qualquer tipo nesta unidade | |
| 710 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdTipoProcedimento','IdUnidade'), | |
| 711 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 712 | + array(null, $objUnidadeDTO->getNumIdUnidade()), | |
| 713 | + InfraDTO::$OPER_LOGICO_AND, | |
| 714 | + 'c3'); | |
| 715 | + | |
| 716 | + //este tipo nesta unidade | |
| 717 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdTipoProcedimento','IdUnidade'), | |
| 718 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 719 | + array($objProcedimentoDTO->getNumIdTipoProcedimento(), $objUnidadeDTO->getNumIdUnidade()), | |
| 720 | + InfraDTO::$OPER_LOGICO_AND, | |
| 721 | + 'c4'); | |
| 722 | + | |
| 723 | + $objOperacaoServicoDTO->agruparCriterios(array('c1','c2','c3','c4'), | |
| 724 | + array(InfraDTO::$OPER_LOGICO_OR, InfraDTO::$OPER_LOGICO_OR, InfraDTO::$OPER_LOGICO_OR)); | |
| 725 | + } | |
| 726 | + | |
| 727 | + private function adicionarCriteriosProcessoDocumento(OperacaoServicoDTO $objOperacaoServicoDTO, ProcedimentoDTO $objProcedimentoDTO, DocumentoDTO $objDocumentoDTO){ | |
| 728 | + | |
| 729 | + //qualquer série em qualquer tipo de procedimento | |
| 730 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdSerie','IdTipoProcedimento'), | |
| 731 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 732 | + array(null,null), | |
| 733 | + array(InfraDTO::$OPER_LOGICO_AND), | |
| 734 | + 'c1'); | |
| 735 | + | |
| 736 | + //esta série em qualquer tipo de procedimento | |
| 737 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdSerie','IdTipoProcedimento'), | |
| 738 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 739 | + array($objDocumentoDTO->getNumIdSerie(),null), | |
| 740 | + array(InfraDTO::$OPER_LOGICO_AND), | |
| 741 | + 'c2'); | |
| 742 | + | |
| 743 | + //qualquer série neste tipo de procedimento | |
| 744 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdSerie','IdTipoProcedimento'), | |
| 745 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 746 | + array(null, $objProcedimentoDTO->getNumIdTipoProcedimento()), | |
| 747 | + array(InfraDTO::$OPER_LOGICO_AND), | |
| 748 | + 'c3'); | |
| 749 | + | |
| 750 | + //esta série neste tipo de procedimento | |
| 751 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdSerie','IdTipoProcedimento'), | |
| 752 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 753 | + array($objDocumentoDTO->getNumIdSerie(), $objProcedimentoDTO->getNumIdTipoProcedimento()), | |
| 754 | + array(InfraDTO::$OPER_LOGICO_AND), | |
| 755 | + 'c4'); | |
| 756 | + | |
| 757 | + $objOperacaoServicoDTO->agruparCriterios(array('c1','c2','c3','c4'), | |
| 758 | + array(InfraDTO::$OPER_LOGICO_OR, | |
| 759 | + InfraDTO::$OPER_LOGICO_OR, | |
| 760 | + InfraDTO::$OPER_LOGICO_OR)); | |
| 761 | + } | |
| 762 | + | |
| 763 | + private function adicionarCriteriosUnidadeProcessoDocumento(OperacaoServicoDTO $objOperacaoServicoDTO, UnidadeDTO $objUnidadeDTO, ProcedimentoDTO $objProcedimentoDTO, DocumentoDTO $objDocumentoDTO){ | |
| 764 | + | |
| 765 | + //qualquer série em qualquer unidade em qualquer tipo de procedimento | |
| 766 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdSerie','IdUnidade','IdTipoProcedimento'), | |
| 767 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 768 | + array(null,null,null), | |
| 769 | + array(InfraDTO::$OPER_LOGICO_AND,InfraDTO::$OPER_LOGICO_AND), | |
| 770 | + 'c1'); | |
| 771 | + | |
| 772 | + //esta série em qualquer unidade em qualquer tipo de procedimento | |
| 773 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdSerie','IdUnidade','IdTipoProcedimento'), | |
| 774 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 775 | + array($objDocumentoDTO->getNumIdSerie(),null,null), | |
| 776 | + array(InfraDTO::$OPER_LOGICO_AND,InfraDTO::$OPER_LOGICO_AND), | |
| 777 | + 'c2'); | |
| 778 | + | |
| 779 | + //qualquer série nesta unidade em qualquer tipo de procedimento | |
| 780 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdSerie','IdUnidade','IdTipoProcedimento'), | |
| 781 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 782 | + array(null, $objUnidadeDTO->getNumIdUnidade(),null), | |
| 783 | + array(InfraDTO::$OPER_LOGICO_AND,InfraDTO::$OPER_LOGICO_AND), | |
| 784 | + 'c3'); | |
| 785 | + | |
| 786 | + //qualquer série em qualquer unidade neste tipo de procedimento | |
| 787 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdSerie','IdUnidade','IdTipoProcedimento'), | |
| 788 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 789 | + array(null, null ,$objProcedimentoDTO->getNumIdTipoProcedimento()), | |
| 790 | + array(InfraDTO::$OPER_LOGICO_AND,InfraDTO::$OPER_LOGICO_AND), | |
| 791 | + 'c4'); | |
| 792 | + | |
| 793 | + //esta série nesta unidade em qualquer tipo de procedimento | |
| 794 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdSerie','IdUnidade','IdTipoProcedimento'), | |
| 795 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 796 | + array($objDocumentoDTO->getNumIdSerie(), $objUnidadeDTO->getNumIdUnidade(),null), | |
| 797 | + array(InfraDTO::$OPER_LOGICO_AND,InfraDTO::$OPER_LOGICO_AND), | |
| 798 | + 'c5'); | |
| 799 | + | |
| 800 | + //esta série em qualquer unidade neste tipo de procedimento | |
| 801 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdSerie','IdUnidade','IdTipoProcedimento'), | |
| 802 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 803 | + array($objDocumentoDTO->getNumIdSerie(), null,$objProcedimentoDTO->getNumIdTipoProcedimento()), | |
| 804 | + array(InfraDTO::$OPER_LOGICO_AND,InfraDTO::$OPER_LOGICO_AND), | |
| 805 | + 'c6'); | |
| 806 | + | |
| 807 | + //qualquer série nesta unidade neste tipo de procedimento | |
| 808 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdSerie','IdUnidade','IdTipoProcedimento'), | |
| 809 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 810 | + array(null, $objUnidadeDTO->getNumIdUnidade(),$objProcedimentoDTO->getNumIdTipoProcedimento()), | |
| 811 | + array(InfraDTO::$OPER_LOGICO_AND,InfraDTO::$OPER_LOGICO_AND), | |
| 812 | + 'c7'); | |
| 813 | + | |
| 814 | + //esta série nesta unidade neste tipo de procedimento | |
| 815 | + $objOperacaoServicoDTO->adicionarCriterio(array('IdSerie','IdUnidade','IdTipoProcedimento'), | |
| 816 | + array(InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL,InfraDTO::$OPER_IGUAL), | |
| 817 | + array($objDocumentoDTO->getNumIdSerie(), $objUnidadeDTO->getNumIdUnidade(),$objProcedimentoDTO->getNumIdTipoProcedimento()), | |
| 818 | + array(InfraDTO::$OPER_LOGICO_AND,InfraDTO::$OPER_LOGICO_AND), | |
| 819 | + 'c8'); | |
| 820 | + | |
| 821 | + $objOperacaoServicoDTO->agruparCriterios(array('c1','c2','c3','c4','c5','c6','c7','c8'), | |
| 822 | + array(InfraDTO::$OPER_LOGICO_OR, | |
| 823 | + InfraDTO::$OPER_LOGICO_OR, | |
| 824 | + InfraDTO::$OPER_LOGICO_OR, | |
| 825 | + InfraDTO::$OPER_LOGICO_OR, | |
| 826 | + InfraDTO::$OPER_LOGICO_OR, | |
| 827 | + InfraDTO::$OPER_LOGICO_OR, | |
| 828 | + InfraDTO::$OPER_LOGICO_OR)); | |
| 829 | + } | |
| 830 | +} | |
| 831 | +?> | |
| 0 | 832 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,596 @@ |
| 1 | +<? | |
| 2 | +/* | |
| 3 | + * CONTROLADORIA GERAL DA UNIÃO - CGU | |
| 4 | + * | |
| 5 | + * 23/06/2015 - criado por Rafael Leandro Ferreira | |
| 6 | + * | |
| 7 | + * | |
| 8 | + *Este WebService tem o objetivo de atender a necessidade da CGU que não está suportada dentro dos métodos | |
| 9 | + *existentes em SeiWS.php. | |
| 10 | + *Foi criado este arquivo para não fazer alterações neste arquivo. O ideal é que posteriormente estes métodos sejam incorporados | |
| 11 | + *ao SeiWS para estar disponível como um método homologado pelo SEI. | |
| 12 | + */ | |
| 13 | + | |
| 14 | +require_once dirname(__FILE__) . '/../../../../SEI.php'; | |
| 15 | + | |
| 16 | +class CguWS extends InfraWS { | |
| 17 | + | |
| 18 | + public function getObjInfraLog(){ | |
| 19 | + return LogSEI::getInstance(); | |
| 20 | + } | |
| 21 | + | |
| 22 | + public function listarDocumentos($SiglaSistema, $IdentificacaoServico, $IdUnidade, $ProtocoloProcedimento, $ProtocoloDocumento, $NumeroDocumento, $Serie, $UnidadeElaboradora, $DataInicial, $DataFinal, $SinRetornarAndamentoGeracao,$SinRetornarAssinaturas,$SinRetornarPublicacao, $SinRetornarDestinatarios){ | |
| 23 | + | |
| 24 | + try{ | |
| 25 | + | |
| 26 | + InfraDebug::getInstance()->setBolLigado(false); | |
| 27 | + InfraDebug::getInstance()->setBolDebugInfra(false); | |
| 28 | + InfraDebug::getInstance()->limpar(); | |
| 29 | + | |
| 30 | + InfraDebug::getInstance()->gravar(__METHOD__); | |
| 31 | + InfraDebug::getInstance()->gravar('SIGLA SISTEMA:'.$SiglaSistema); | |
| 32 | + InfraDebug::getInstance()->gravar('IDENTIFICACAO SERVICO:'.$IdentificacaoServico); | |
| 33 | + InfraDebug::getInstance()->gravar('ID UNIDADE:'.$IdUnidade); | |
| 34 | + InfraDebug::getInstance()->gravar('PROTOCOLO PROCEDIMENTO:'.$ProtocoloProcedimento); | |
| 35 | + InfraDebug::getInstance()->gravar('PROTOCOLO DOCUMENTO:'.$ProtocoloDocumento); | |
| 36 | + InfraDebug::getInstance()->gravar('NUMERO DOCUMENTO:'.$NumeroDocumento); | |
| 37 | + InfraDebug::getInstance()->gravar('SERIE:'.$Serie); | |
| 38 | + InfraDebug::getInstance()->gravar('UNIDADE ELABORADORA:'.$UnidadeElaboradora); | |
| 39 | + InfraDebug::getInstance()->gravar('DATA INICIAL:'.$DataInicial); | |
| 40 | + InfraDebug::getInstance()->gravar('DATA FINAL:'.$DataFinal); | |
| 41 | + InfraDebug::getInstance()->gravar('RETORNAR ANDAMENTO GERACAO:'.$SinRetornarAndamentoGeracao); | |
| 42 | + InfraDebug::getInstance()->gravar('RETORNAR ASSINATURAS:'.$SinRetornarAssinaturas); | |
| 43 | + InfraDebug::getInstance()->gravar('RETORNAR PUBLICACAO:'.$SinRetornarPublicacao); | |
| 44 | + InfraDebug::getInstance()->gravar('RETORNAR DESTINATARIOS:'.$SinRetornarDestinatarios); | |
| 45 | + | |
| 46 | + SessaoSEI::getInstance(false); | |
| 47 | + | |
| 48 | + $objServicoDTO = $this->obterServico($SiglaSistema, $IdentificacaoServico); | |
| 49 | + | |
| 50 | + if ($IdUnidade!=null){ | |
| 51 | + $objUnidadeDTO = $this->obterUnidade($IdUnidade,null); | |
| 52 | + }else{ | |
| 53 | + $objUnidadeDTO = null; | |
| 54 | + } | |
| 55 | + | |
| 56 | + $this->validarAcessoAutorizado(explode(',',str_replace(' ','',$objServicoDTO->getStrServidor()))); | |
| 57 | + | |
| 58 | + if ($objUnidadeDTO==null){ | |
| 59 | + SessaoSEI::getInstance()->simularLogin(null, SessaoSEI::$UNIDADE_TESTE, $objServicoDTO->getNumIdUsuario(), null); | |
| 60 | + }else{ | |
| 61 | + SessaoSEI::getInstance()->simularLogin(null, null, $objServicoDTO->getNumIdUsuario(), $objUnidadeDTO->getNumIdUnidade()); | |
| 62 | + } | |
| 63 | + | |
| 64 | + $objDocumentoDTO = new DocumentoDTO(); | |
| 65 | + if($ProtocoloDocumento!='') { | |
| 66 | + $objDocumentoDTO->setStrProtocoloDocumentoFormatado($ProtocoloDocumento); | |
| 67 | + } | |
| 68 | + if($ProtocoloProcedimento!='') { | |
| 69 | + $objDocumentoDTO->setStrProtocoloProcedimentoFormatado($ProtocoloProcedimento); | |
| 70 | + } | |
| 71 | + if($NumeroDocumento!='') { | |
| 72 | + $objDocumentoDTO->setStrNumero($NumeroDocumento); | |
| 73 | + } | |
| 74 | + | |
| 75 | + $objDocumentoDTO->setNumIdSerie($Serie); | |
| 76 | + $objDocumentoDTO->setNumIdUnidadeGeradoraProtocolo($UnidadeElaboradora); | |
| 77 | + | |
| 78 | + $objWSEntradaListarDocumentoDTO = new WSEntradaListarDocumentoDTO(); | |
| 79 | + $objWSEntradaListarDocumentoDTO->setObjServicoDTO($objServicoDTO); | |
| 80 | + $objWSEntradaListarDocumentoDTO->setObjDocumentoDTO($objDocumentoDTO); | |
| 81 | + $objWSEntradaListarDocumentoDTO->setObjUnidadeDTO($objUnidadeDTO); | |
| 82 | + | |
| 83 | + if($DataInicial!='') { | |
| 84 | + $objWSEntradaListarDocumentoDTO->setDtaDataInicialGeracaoProtocolo($DataInicial); | |
| 85 | + } | |
| 86 | + else{ | |
| 87 | + $objWSEntradaListarDocumentoDTO->setDtaDataInicialGeracaoProtocolo(null); | |
| 88 | + } | |
| 89 | + | |
| 90 | + if($DataFinal!='') { | |
| 91 | + $objWSEntradaListarDocumentoDTO->setDtaDataFinalGeracaoProtocolo($DataFinal); | |
| 92 | + } | |
| 93 | + else{ | |
| 94 | + $objWSEntradaListarDocumentoDTO->setDtaDataFinalGeracaoProtocolo(null); | |
| 95 | + } | |
| 96 | + | |
| 97 | + if (trim($SinRetornarAndamentoGeracao)!=''){ | |
| 98 | + $objWSEntradaListarDocumentoDTO->setStrSinRetornarAndamentoGeracao($SinRetornarAndamentoGeracao); | |
| 99 | + }else{ | |
| 100 | + $objWSEntradaListarDocumentoDTO->setStrSinRetornarAndamentoGeracao('N'); | |
| 101 | + } | |
| 102 | + | |
| 103 | + if (trim($SinRetornarAssinaturas)!=''){ | |
| 104 | + $objWSEntradaListarDocumentoDTO->setStrSinRetornarAssinaturas($SinRetornarAssinaturas); | |
| 105 | + }else{ | |
| 106 | + $objWSEntradaListarDocumentoDTO->setStrSinRetornarAssinaturas('N'); | |
| 107 | + } | |
| 108 | + | |
| 109 | + if (trim($SinRetornarPublicacao)!=''){ | |
| 110 | + $objWSEntradaListarDocumentoDTO->setStrSinRetornarPublicacao($SinRetornarPublicacao); | |
| 111 | + }else{ | |
| 112 | + $objWSEntradaListarDocumentoDTO->setStrSinRetornarPublicacao('N'); | |
| 113 | + } | |
| 114 | + | |
| 115 | + if (trim($SinRetornarDestinatarios)!=''){ | |
| 116 | + $objWSEntradaListarDocumentoDTO->setStrSinRetornarDestinatarios($SinRetornarDestinatarios); | |
| 117 | + }else{ | |
| 118 | + $objWSEntradaListarDocumentoDTO->setStrSinRetornarDestinatarios('N'); | |
| 119 | + } | |
| 120 | + | |
| 121 | + $objCguRN = new CguRN(); | |
| 122 | + $objWSRetornoListarDocumentoDTO = $objCguRN->listarDocumento($objWSEntradaListarDocumentoDTO); | |
| 123 | + | |
| 124 | + $i = 0; | |
| 125 | + $ret = array(); | |
| 126 | + foreach($objWSRetornoListarDocumentoDTO as $retObjWSRetornoListarDocumentoDTO) { | |
| 127 | + | |
| 128 | + $ret[$i]['IdProcedimento'] = $retObjWSRetornoListarDocumentoDTO->getDblIdProcedimento(); | |
| 129 | + $ret[$i]['ProcedimentoFormatado'] = $retObjWSRetornoListarDocumentoDTO->getStrProcedimentoFormatado(); | |
| 130 | + $ret[$i]['IdDocumento'] = $retObjWSRetornoListarDocumentoDTO->getDblIdDocumento(); | |
| 131 | + $ret[$i]['DocumentoFormatado'] = $retObjWSRetornoListarDocumentoDTO->getStrDocumentoFormatado(); | |
| 132 | + $ret[$i]['LinkAcesso'] = $retObjWSRetornoListarDocumentoDTO->getStrLinkAcesso(); | |
| 133 | + | |
| 134 | + $ret[$i]['Serie'] = (object)array('IdSerie' => $retObjWSRetornoListarDocumentoDTO->getNumIdSerie(), | |
| 135 | + 'Nome' => $retObjWSRetornoListarDocumentoDTO->getStrNomeSerie()); | |
| 136 | + | |
| 137 | + $ret[$i]['Numero'] = $retObjWSRetornoListarDocumentoDTO->getStrNumero(); | |
| 138 | + $ret[$i]['Data'] = $retObjWSRetornoListarDocumentoDTO->getDtaGeracaoProtocolo(); | |
| 139 | + | |
| 140 | + $ret[$i]['UnidadeElaboradora'] = (object)array('IdUnidade' => $retObjWSRetornoListarDocumentoDTO->getNumIdUnidadeGeradora(), | |
| 141 | + 'Sigla' => $retObjWSRetornoListarDocumentoDTO->getStrSiglaUnidadeGeradora(), | |
| 142 | + 'Descricao' => $retObjWSRetornoListarDocumentoDTO->getStrDescricaoUnidadeGeradora()); | |
| 143 | + | |
| 144 | + | |
| 145 | + $objAtividadeDTO = $retObjWSRetornoListarDocumentoDTO->getObjAtividadeDTOGeracao(); | |
| 146 | + if ($objAtividadeDTO != null) { | |
| 147 | + $ret[$i]['AndamentoGeracao'] = (object)array('Descricao' => $objAtividadeDTO->getStrNomeTarefa(), | |
| 148 | + 'DataHora' => $objAtividadeDTO->getDthAbertura(), | |
| 149 | + 'Unidade' => (object)array('IdUnidade' => $objAtividadeDTO->getNumIdUnidade(), | |
| 150 | + 'Sigla' => $objAtividadeDTO->getStrSiglaUnidade(), | |
| 151 | + 'Descricao' => $objAtividadeDTO->getStrDescricaoUnidade()), | |
| 152 | + 'Usuario' => (object)array('IdUsuario' => $objAtividadeDTO->getNumIdUsuarioOrigem(), | |
| 153 | + 'Sigla' => $objAtividadeDTO->getStrSiglaUsuarioOrigem(), | |
| 154 | + 'Nome' => $objAtividadeDTO->getStrNomeUsuarioOrigem())); | |
| 155 | + } else { | |
| 156 | + $ret[$i]['AndamentoGeracao'] = null; | |
| 157 | + } | |
| 158 | + | |
| 159 | + | |
| 160 | + $arrObjAssinaturaDTO = $retObjWSRetornoListarDocumentoDTO->getArrObjAssinaturaDTO(); | |
| 161 | + $arrAssinaturas = array(); | |
| 162 | + foreach ($arrObjAssinaturaDTO as $objAssinaturaDTO) { | |
| 163 | + $arrAssinaturas[] = (object)array('Nome' => $objAssinaturaDTO->getStrNome(), | |
| 164 | + 'CargoFuncao' => $objAssinaturaDTO->getStrTratamento(), | |
| 165 | + 'DataHora' => $objAssinaturaDTO->getDthAberturaAtividade()); | |
| 166 | + } | |
| 167 | + $ret[$i]['Assinaturas'] = $arrAssinaturas; | |
| 168 | + | |
| 169 | + $objPublicacaoDTO = $retObjWSRetornoListarDocumentoDTO->getObjPublicacaoDTO(); | |
| 170 | + if ($objPublicacaoDTO != null) { | |
| 171 | + $ret[$i]['Publicacao'] = (object)array('NomeVeiculo' => $objPublicacaoDTO->getStrNomeVeiculoPublicacao(), | |
| 172 | + 'Numero' => $objPublicacaoDTO->getNumNumero(), | |
| 173 | + 'DataDisponibilizacao' => $objPublicacaoDTO->getDtaDisponibilizacao(), | |
| 174 | + 'DataPublicacao' => $objPublicacaoDTO->getDtaPublicacao(), | |
| 175 | + 'Estado' => $objPublicacaoDTO->getStrStaEstado(), | |
| 176 | + 'ImprensaNacional' => null); | |
| 177 | + | |
| 178 | + if (!InfraString::isBolVazia($objPublicacaoDTO->getNumIdVeiculoIO())) { | |
| 179 | + $ret[$i]['Publicacao']->ImprensaNacional = (object)array('SiglaVeiculo' => $objPublicacaoDTO->getStrSiglaVeiculoImprensaNacional(), | |
| 180 | + 'DescricaoVeiculo' => $objPublicacaoDTO->getStrDescricaoVeiculoImprensaNacional(), | |
| 181 | + 'Pagina' => $objPublicacaoDTO->getStrPaginaIO(), | |
| 182 | + 'Secao' => $objPublicacaoDTO->getStrNomeSecaoImprensaNacional(), | |
| 183 | + 'Data' => $objPublicacaoDTO->getDtaPublicacaoIO()); | |
| 184 | + } | |
| 185 | + } else { | |
| 186 | + $ret[$i]['Publicacao'] = null; | |
| 187 | + } | |
| 188 | + | |
| 189 | + $arrObjDestinatarioDTO = $retObjWSRetornoListarDocumentoDTO->getArrObjParticipanteDTO(); | |
| 190 | + $arrDestinatarios = array(); | |
| 191 | + foreach ($arrObjDestinatarioDTO as $objDestinatarioDTO) { | |
| 192 | + $arrDestinatarios[] = (object)array('IdContato' => $objDestinatarioDTO->getNumIdContato(), | |
| 193 | + 'NomeContato' => $objDestinatarioDTO->getStrNomeContato(), | |
| 194 | + 'EmailContato' => $objDestinatarioDTO->getStrEmailContato(), | |
| 195 | + 'SiglaUnidade' => $objDestinatarioDTO->getStrSiglaUnidade()); | |
| 196 | + | |
| 197 | + } | |
| 198 | + $ret[$i]['Destinatarios'] = $arrDestinatarios; | |
| 199 | + | |
| 200 | + $i++; | |
| 201 | + } | |
| 202 | + | |
| 203 | + //LogSEI::getInstance()->gravar(InfraDebug::getInstance()->getStrDebug()); | |
| 204 | + | |
| 205 | + return $ret; | |
| 206 | + | |
| 207 | + }catch(Exception $e){ | |
| 208 | + $this->processarExcecao($e); | |
| 209 | + } | |
| 210 | + } | |
| 211 | + | |
| 212 | + /** | |
| 213 | + * @param $SiglaSistema | |
| 214 | + * @param $IdentificacaoServico | |
| 215 | + * @param $IdUnidade | |
| 216 | + * @param $ProtocoloProcedimento | |
| 217 | + * @param $Interessado | |
| 218 | + * @param $DescricaoAssunto | |
| 219 | + * @param $IdTipoProcedimento | |
| 220 | + * @param $NomeTipoProcedimento | |
| 221 | + * @param $ClassificacaoAssunto | |
| 222 | + * @param $DataInicialRegistroProcedimento | |
| 223 | + * @param $DataFinalRegistroProcedimento | |
| 224 | + * @param $UnidadeProcedimentoAberto | |
| 225 | + * @return array | |
| 226 | + * @throws InfraException | |
| 227 | + * @throws SoapFault | |
| 228 | + */ | |
| 229 | + public function listarProcedimentos($SiglaSistema, $IdentificacaoServico, $IdUnidade, $ProtocoloProcedimento, $Interessado, $DescricaoAssunto, $IdTipoProcedimento, $NomeTipoProcedimento, $ClassificacaoAssunto, $DataInicialRegistroProcedimento, $DataFinalRegistroProcedimento, $UnidadeProcedimentoAberto ){ | |
| 230 | + | |
| 231 | + try{ | |
| 232 | + | |
| 233 | + InfraDebug::getInstance()->setBolLigado(false); | |
| 234 | + InfraDebug::getInstance()->setBolDebugInfra(false); | |
| 235 | + InfraDebug::getInstance()->limpar(); | |
| 236 | + | |
| 237 | + InfraDebug::getInstance()->gravar(__METHOD__); | |
| 238 | + InfraDebug::getInstance()->gravar('SIGLA SISTEMA:'.$SiglaSistema); | |
| 239 | + InfraDebug::getInstance()->gravar('IDENTIFICACAO SERVICO:'.$IdentificacaoServico); | |
| 240 | + InfraDebug::getInstance()->gravar('ID UNIDADE:'.$IdUnidade); | |
| 241 | + InfraDebug::getInstance()->gravar('PROTOCOLO PROCEDIMENTO:'.$ProtocoloProcedimento); | |
| 242 | + InfraDebug::getInstance()->gravar('INTERESSADO:'.$Interessado); | |
| 243 | + InfraDebug::getInstance()->gravar('DESCRICAO ASSUNTO:'.$DescricaoAssunto); | |
| 244 | + InfraDebug::getInstance()->gravar('ID TIPO PROCEDIMENTO:'.$IdTipoProcedimento); | |
| 245 | + InfraDebug::getInstance()->gravar('NOME TIPO PROCEDIMENTO:'.$NomeTipoProcedimento); | |
| 246 | + InfraDebug::getInstance()->gravar('CLASSIFICACAO ASSUNTO:'.$ClassificacaoAssunto); | |
| 247 | + InfraDebug::getInstance()->gravar('DATA INICIAL REGISTRO PROCEDIMENTO:'.$DataInicialRegistroProcedimento); | |
| 248 | + InfraDebug::getInstance()->gravar('DATA FINAL REGISTRO PROCEDIMENTO:'.$DataFinalRegistroProcedimento); | |
| 249 | + InfraDebug::getInstance()->gravar('UNIDADE PROCEDIMENTO ABERTO:'.$UnidadeProcedimentoAberto); | |
| 250 | + | |
| 251 | + SessaoSEI::getInstance(false); | |
| 252 | + | |
| 253 | + $objServicoDTO = $this->obterServico($SiglaSistema, $IdentificacaoServico); | |
| 254 | + | |
| 255 | + if ($IdUnidade!=null){ | |
| 256 | + $objUnidadeDTO = $this->obterUnidade($IdUnidade, null); | |
| 257 | + }else{ | |
| 258 | + $objUnidadeDTO = null; | |
| 259 | + } | |
| 260 | + | |
| 261 | + $this->validarAcessoAutorizado(explode(',',str_replace(' ','',$objServicoDTO->getStrServidor()))); | |
| 262 | + | |
| 263 | + if ($objUnidadeDTO==null){ | |
| 264 | + SessaoSEI::getInstance()->simularLogin(null, SessaoSEI::$UNIDADE_TESTE, $objServicoDTO->getNumIdUsuario(), null); | |
| 265 | + }else{ | |
| 266 | + SessaoSEI::getInstance()->simularLogin(null, null, $objServicoDTO->getNumIdUsuario(), $objUnidadeDTO->getNumIdUnidade()); | |
| 267 | + } | |
| 268 | + | |
| 269 | + $objProcedimentoDTO = new ProcedimentoDTO(); | |
| 270 | + $objProcedimentoDTO->setStrProtocoloProcedimentoFormatado($ProtocoloProcedimento); | |
| 271 | + | |
| 272 | + $objProcedimentoDTO->setStrDescricaoProtocolo($DescricaoAssunto); | |
| 273 | + $objProcedimentoDTO->setNumIdTipoProcedimento($IdTipoProcedimento); | |
| 274 | + $objProcedimentoDTO->setStrNomeTipoProcedimento($NomeTipoProcedimento); | |
| 275 | + | |
| 276 | + $objWSEntradaListarProcedimentoDTO = new WSEntradaListarProcedimentoDTO(); | |
| 277 | + $objWSEntradaListarProcedimentoDTO->setObjServicoDTO($objServicoDTO); | |
| 278 | + $objWSEntradaListarProcedimentoDTO->setObjProcedimentoDTO($objProcedimentoDTO); | |
| 279 | + $objWSEntradaListarProcedimentoDTO->setObjUnidadeDTO($objUnidadeDTO); | |
| 280 | + | |
| 281 | + if($Interessado!='') { | |
| 282 | + $objWSEntradaListarProcedimentoDTO->setStrInteressado($Interessado); | |
| 283 | + } | |
| 284 | + else{ | |
| 285 | + $objWSEntradaListarProcedimentoDTO->setStrInteressado(null); | |
| 286 | + } | |
| 287 | + | |
| 288 | + if($ClassificacaoAssunto!='') { | |
| 289 | + $objWSEntradaListarProcedimentoDTO->setStrClassificacaoAssunto($ClassificacaoAssunto); | |
| 290 | + } | |
| 291 | + else{ | |
| 292 | + $objWSEntradaListarProcedimentoDTO->setStrClassificacaoAssunto(null); | |
| 293 | + } | |
| 294 | + | |
| 295 | + if($DataInicialRegistroProcedimento!='') { | |
| 296 | + $objWSEntradaListarProcedimentoDTO->setDtaDataInicialRegistroProcedimento($DataInicialRegistroProcedimento); | |
| 297 | + } | |
| 298 | + else{ | |
| 299 | + $objWSEntradaListarProcedimentoDTO->setDtaDataInicialRegistroProcedimento(null); | |
| 300 | + } | |
| 301 | + | |
| 302 | + if($DataFinalRegistroProcedimento!='') { | |
| 303 | + $objWSEntradaListarProcedimentoDTO->setDtaDataFinalRegistroProcedimento($DataFinalRegistroProcedimento); | |
| 304 | + } | |
| 305 | + else{ | |
| 306 | + $objWSEntradaListarProcedimentoDTO->setDtaDataFinalRegistroProcedimento(null); | |
| 307 | + } | |
| 308 | + | |
| 309 | + if($UnidadeProcedimentoAberto!='') { | |
| 310 | + $objUnidadeProcedimentoAberto = $this->obterUnidade(null,$UnidadeProcedimentoAberto); | |
| 311 | + $objWSEntradaListarProcedimentoDTO->setNumUnidadeProcedimentoAberto($objUnidadeProcedimentoAberto->getNumIdUnidade()); | |
| 312 | + } | |
| 313 | + else{ | |
| 314 | + $objWSEntradaListarProcedimentoDTO->setNumUnidadeProcedimentoAberto(null); | |
| 315 | + } | |
| 316 | + | |
| 317 | + $objCguRN = new CguRN(); | |
| 318 | + $objWSRetornoListarProcedimentoDTO = $objCguRN->listarProcedimento($objWSEntradaListarProcedimentoDTO); | |
| 319 | + | |
| 320 | + $ret = array(); | |
| 321 | + $i = 0; | |
| 322 | + | |
| 323 | + foreach($objWSRetornoListarProcedimentoDTO as $retObjWSRetornoListarProcedimentoDTO) { | |
| 324 | + | |
| 325 | + $ret[$i]['IdProcedimento'] = $retObjWSRetornoListarProcedimentoDTO->getDblIdProcedimento(); | |
| 326 | + $ret[$i]['ProcedimentoFormatado'] = $retObjWSRetornoListarProcedimentoDTO->getStrProcedimentoFormatado(); | |
| 327 | + | |
| 328 | + $ret[$i]['TipoProcedimento'] = (object)array('IdTipoProcedimento' => $retObjWSRetornoListarProcedimentoDTO->getNumIdTipoProcedimento(), | |
| 329 | + 'Nome' => $retObjWSRetornoListarProcedimentoDTO->getStrNomeTipoProcedimento()); | |
| 330 | + | |
| 331 | + //LogSEI::getInstance()->gravar(InfraDebug::getInstance()->getStrDebug()); | |
| 332 | + $i++; | |
| 333 | + } | |
| 334 | + return $ret; | |
| 335 | + | |
| 336 | + }catch(Exception $e){ | |
| 337 | + $this->processarExcecao($e); | |
| 338 | + } | |
| 339 | + } | |
| 340 | + | |
| 341 | + /** | |
| 342 | + * @param $SiglaSistema | |
| 343 | + * @param $IdentificacaoServico | |
| 344 | + * @param $IdUnidade | |
| 345 | + * @param $ProtocoloProcedimento | |
| 346 | + * @return array | |
| 347 | + * @throws InfraException | |
| 348 | + * @throws SoapFault | |
| 349 | + */ | |
| 350 | + public function listarAndamentos($SiglaSistema, $IdentificacaoServico, $IdUnidade, $ProtocoloProcedimento ) | |
| 351 | + { | |
| 352 | + | |
| 353 | + try { | |
| 354 | + | |
| 355 | + InfraDebug::getInstance()->setBolLigado(false); | |
| 356 | + InfraDebug::getInstance()->setBolDebugInfra(false); | |
| 357 | + InfraDebug::getInstance()->limpar(); | |
| 358 | + | |
| 359 | + InfraDebug::getInstance()->gravar(__METHOD__); | |
| 360 | + InfraDebug::getInstance()->gravar('SIGLA SISTEMA:' . $SiglaSistema); | |
| 361 | + InfraDebug::getInstance()->gravar('IDENTIFICACAO SERVICO:' . $IdentificacaoServico); | |
| 362 | + InfraDebug::getInstance()->gravar('ID UNIDADE:' . $IdUnidade); | |
| 363 | + InfraDebug::getInstance()->gravar('PROTOCOLO PROCEDIMENTO:' . $ProtocoloProcedimento); | |
| 364 | + | |
| 365 | + SessaoSEI::getInstance(false); | |
| 366 | + | |
| 367 | + $objServicoDTO = $this->obterServico($SiglaSistema, $IdentificacaoServico); | |
| 368 | + | |
| 369 | + if ($IdUnidade != null) { | |
| 370 | + $objUnidadeDTO = $this->obterUnidade($IdUnidade, null); | |
| 371 | + } else { | |
| 372 | + $objUnidadeDTO = null; | |
| 373 | + } | |
| 374 | + | |
| 375 | + $this->validarAcessoAutorizado(explode(',', str_replace(' ', '', $objServicoDTO->getStrServidor()))); | |
| 376 | + | |
| 377 | + if ($objUnidadeDTO == null) { | |
| 378 | + SessaoSEI::getInstance()->simularLogin(null, SessaoSEI::$UNIDADE_TESTE, $objServicoDTO->getNumIdUsuario(), null); | |
| 379 | + } else { | |
| 380 | + SessaoSEI::getInstance()->simularLogin(null, null, $objServicoDTO->getNumIdUsuario(), $objUnidadeDTO->getNumIdUnidade()); | |
| 381 | + } | |
| 382 | + | |
| 383 | + $objProcedimentoDTO = new ProcedimentoDTO(); | |
| 384 | + $objProcedimentoDTO->setStrProtocoloProcedimentoFormatado($ProtocoloProcedimento); | |
| 385 | + | |
| 386 | + $objWSEntradaListarAndamentosDTO = new WSEntradaListarAndamentosDTO(); | |
| 387 | + $objWSEntradaListarAndamentosDTO->setObjServicoDTO($objServicoDTO); | |
| 388 | + $objWSEntradaListarAndamentosDTO->setObjProcedimentoDTO($objProcedimentoDTO); | |
| 389 | + $objWSEntradaListarAndamentosDTO->setObjUnidadeDTO($objUnidadeDTO); | |
| 390 | + | |
| 391 | + $objCguRN = new CguRN(); | |
| 392 | + $objWSRetornoListarAndamentosDTO = $objCguRN->listarAndamentos($objWSEntradaListarAndamentosDTO); | |
| 393 | + | |
| 394 | + $ret = array(); | |
| 395 | + $i = 0; | |
| 396 | + | |
| 397 | + /*?> <pre> <? echo var_dump($objWSRetornoListarAndamentosDTO);?> </pre> <?*/ | |
| 398 | + | |
| 399 | + $ret['IdProcedimento'] = $objWSRetornoListarAndamentosDTO->getDblIdProcedimento(); | |
| 400 | + $ret['ProcedimentoFormatado'] = $objWSRetornoListarAndamentosDTO->getStrProcedimentoFormatado(); | |
| 401 | + | |
| 402 | + $ret['TipoProcedimento'] = (object) array('IdTipoProcedimento' => $objWSRetornoListarAndamentosDTO->getNumIdTipoProcedimento(), | |
| 403 | + 'Nome' => $objWSRetornoListarAndamentosDTO->getStrNomeTipoProcedimento()); | |
| 404 | + | |
| 405 | + $arrObjAtividadeDTO = $objWSRetornoListarAndamentosDTO->getArrObjAtividadeDTO(); | |
| 406 | + $arrAtividades = array(); | |
| 407 | + | |
| 408 | + foreach ($arrObjAtividadeDTO as $objAtividadeDTO) { | |
| 409 | + | |
| 410 | + $arrAtividades[] = (object)array('Descricao' => $objAtividadeDTO->getStrNomeTarefa(), | |
| 411 | + 'DataHora' => $objAtividadeDTO->getDthAbertura(), | |
| 412 | + 'Unidade' => (object)array('IdUnidade'=> $objAtividadeDTO->getNumIdUnidade(), | |
| 413 | + 'Sigla' => $objAtividadeDTO->getStrSiglaUnidade(), | |
| 414 | + 'Descricao' => $objAtividadeDTO->getStrDescricaoUnidade()), | |
| 415 | + 'Usuario' => (object)array('IdUsuario'=> $objAtividadeDTO->getNumIdUsuarioOrigem(), | |
| 416 | + 'Sigla' => $objAtividadeDTO->getStrSiglaUsuarioOrigem(), | |
| 417 | + 'Nome' => $objAtividadeDTO->getStrNomeUsuarioOrigem())); | |
| 418 | + | |
| 419 | + //LogSEI::getInstance()->gravar(InfraDebug::getInstance()->getStrDebug()); | |
| 420 | + $i++; | |
| 421 | + } | |
| 422 | + $ret['Andamentos'] = $arrAtividades; | |
| 423 | + | |
| 424 | + return $ret; | |
| 425 | + | |
| 426 | + | |
| 427 | + }catch(Exception $e){ | |
| 428 | + $this->processarExcecao($e); | |
| 429 | + } | |
| 430 | + } | |
| 431 | + | |
| 432 | + /** | |
| 433 | + * @param $SiglaSistema | |
| 434 | + * @param $IdentificacaoServico | |
| 435 | + * @param $IdUnidade | |
| 436 | + * @param $ProtocoloProcedimento | |
| 437 | + * @return array | |
| 438 | + * @throws InfraException | |
| 439 | + * @throws SoapFault | |
| 440 | + */ | |
| 441 | + public function listarProcedimentosTramitadosParaArea($SiglaSistema, $IdentificacaoServico, $IdUnidade, $arrRequisicaoConsultaTramite, $idUnidadePesquisa ) | |
| 442 | + { | |
| 443 | + | |
| 444 | + try { | |
| 445 | + | |
| 446 | + InfraDebug::getInstance()->setBolLigado(false); | |
| 447 | + InfraDebug::getInstance()->setBolDebugInfra(false); | |
| 448 | + InfraDebug::getInstance()->limpar(); | |
| 449 | + | |
| 450 | + InfraDebug::getInstance()->gravar(__METHOD__); | |
| 451 | + InfraDebug::getInstance()->gravar('SIGLA SISTEMA:' . $SiglaSistema); | |
| 452 | + InfraDebug::getInstance()->gravar('IDENTIFICACAO SERVICO:' . $IdentificacaoServico); | |
| 453 | + InfraDebug::getInstance()->gravar('ID UNIDADE:' . $IdUnidade); | |
| 454 | + | |
| 455 | + SessaoSEI::getInstance(false); | |
| 456 | + | |
| 457 | + $objServicoDTO = $this->obterServico($SiglaSistema, $IdentificacaoServico); | |
| 458 | + | |
| 459 | + if ($IdUnidade != null) { | |
| 460 | + $objUnidadeDTO = $this->obterUnidade($IdUnidade, null); | |
| 461 | + } else { | |
| 462 | + $objUnidadeDTO = null; | |
| 463 | + } | |
| 464 | + | |
| 465 | + $this->validarAcessoAutorizado(explode(',', str_replace(' ', '', $objServicoDTO->getStrServidor()))); | |
| 466 | + | |
| 467 | + if ($objUnidadeDTO == null) { | |
| 468 | + SessaoSEI::getInstance()->simularLogin(null, SessaoSEI::$UNIDADE_TESTE, $objServicoDTO->getNumIdUsuario(), null); | |
| 469 | + } else { | |
| 470 | + SessaoSEI::getInstance()->simularLogin(null, null, $objServicoDTO->getNumIdUsuario(), $objUnidadeDTO->getNumIdUnidade()); | |
| 471 | + } | |
| 472 | + | |
| 473 | + $arrProtocolos = array(); | |
| 474 | + $ret = array(); | |
| 475 | + | |
| 476 | + $i = 0; | |
| 477 | + | |
| 478 | + foreach($arrRequisicaoConsultaTramite as $requisicaoConsultaTramite){ | |
| 479 | + | |
| 480 | + $idProcedimento = $requisicaoConsultaTramite->IdProcedimento; | |
| 481 | + $dataAbertura = strtotime($requisicaoConsultaTramite->DataAbertura); | |
| 482 | + //$idProcedimento = $requisicaoConsultaTramite['IdProcedimento']; | |
| 483 | + //$dataAbertura = strtotime($requisicaoConsultaTramite['DataAbertura']); | |
| 484 | + | |
| 485 | + $objWSEntradaListarProcedimentosTramitadosDTO = new WSEntradaListarProcedimentosTramitadosDTO(); | |
| 486 | + $objWSEntradaListarProcedimentosTramitadosDTO->setDblIdProcedimento($idProcedimento); | |
| 487 | + $objWSEntradaListarProcedimentosTramitadosDTO->setDthDataReferencia($dataAbertura); | |
| 488 | + $objWSEntradaListarProcedimentosTramitadosDTO->setNumIdUnidadePesquisa($idUnidadePesquisa); | |
| 489 | + | |
| 490 | + $objCguRN = new CguRN(); | |
| 491 | + $objWSRetornoListarAndamentosDTO = $objCguRN->listarProcedimentosTramitadosParaArea($objWSEntradaListarProcedimentosTramitadosDTO); | |
| 492 | + | |
| 493 | + $arrObjAtividadeDTO = $objWSRetornoListarAndamentosDTO->getArrObjAtividadeDTO(); | |
| 494 | + | |
| 495 | + //echo "<br><br>Procedimento" . $idProcedimento . "<br>"; | |
| 496 | + //var_dump($arrObjAtividadeDTO); | |
| 497 | + | |
| 498 | + foreach ($arrObjAtividadeDTO as $objAtividadeDTO) { | |
| 499 | + if($objAtividadeDTO->getDthAbertura() >= $dataAbertura){ | |
| 500 | + if($objAtividadeDTO->getNumIdUnidade() == $idUnidadePesquisa){ | |
| 501 | + $ret[$i]['IdProtocolo'] = $idProcedimento; | |
| 502 | + //$arrProtocolos[] = (object)array('IdProtocolo'=>$requisicaoConsultaTramite->IdProcedimentoPesquisa); | |
| 503 | + } | |
| 504 | + } | |
| 505 | + } | |
| 506 | + $i++; | |
| 507 | + } | |
| 508 | + //$ret['IdProtocolo'] = $arrProtocolos; | |
| 509 | + | |
| 510 | + return $ret; | |
| 511 | + | |
| 512 | + }catch(Exception $e){ | |
| 513 | + $this->processarExcecao($e); | |
| 514 | + } | |
| 515 | + } | |
| 516 | + | |
| 517 | + private function obterServico($SiglaSistema, $IdentificacaoServico){ | |
| 518 | + | |
| 519 | + $objUsuarioDTO = new UsuarioDTO(); | |
| 520 | + $objUsuarioDTO->retNumIdUsuario(); | |
| 521 | + $objUsuarioDTO->setStrSigla($SiglaSistema); | |
| 522 | + $objUsuarioDTO->setStrStaTipo(UsuarioRN::$TU_SISTEMA); | |
| 523 | + | |
| 524 | + $objUsuarioRN = new UsuarioRN(); | |
| 525 | + $objUsuarioDTO = $objUsuarioRN->consultarRN0489($objUsuarioDTO); | |
| 526 | + | |
| 527 | + if ($objUsuarioDTO==null){ | |
| 528 | + throw new InfraException('Sistema ['.$SiglaSistema.'] não encontrado.'); | |
| 529 | + } | |
| 530 | + | |
| 531 | + $objServicoDTO = new ServicoDTO(); | |
| 532 | + $objServicoDTO->retNumIdServico(); | |
| 533 | + $objServicoDTO->retStrIdentificacao(); | |
| 534 | + $objServicoDTO->retStrSiglaUsuario(); | |
| 535 | + $objServicoDTO->retNumIdUsuario(); | |
| 536 | + $objServicoDTO->retStrServidor(); | |
| 537 | + $objServicoDTO->retStrSinLinkExterno(); | |
| 538 | + $objServicoDTO->retNumIdContatoUsuario(); | |
| 539 | + $objServicoDTO->setNumIdUsuario($objUsuarioDTO->getNumIdUsuario()); | |
| 540 | + $objServicoDTO->setStrIdentificacao($IdentificacaoServico); | |
| 541 | + | |
| 542 | + $objServicoRN = new ServicoRN(); | |
| 543 | + $objServicoDTO = $objServicoRN->consultar($objServicoDTO); | |
| 544 | + | |
| 545 | + if ($objServicoDTO==null){ | |
| 546 | + throw new InfraException('Serviço ['.$IdentificacaoServico.'] do sistema ['.$SiglaSistema.'] não encontrado.'); | |
| 547 | + } | |
| 548 | + | |
| 549 | + return $objServicoDTO; | |
| 550 | + } | |
| 551 | + | |
| 552 | + private function obterUnidade($IdUnidade, $SiglaUnidade){ | |
| 553 | + | |
| 554 | + $objUnidadeDTO = new UnidadeDTO(); | |
| 555 | + $objUnidadeDTO->retNumIdUnidade(); | |
| 556 | + $objUnidadeDTO->retStrSigla(); | |
| 557 | + $objUnidadeDTO->retStrDescricao(); | |
| 558 | + | |
| 559 | + if($IdUnidade!=null) { | |
| 560 | + $objUnidadeDTO->setNumIdUnidade($IdUnidade); | |
| 561 | + } | |
| 562 | + if($SiglaUnidade!=null){ | |
| 563 | + $objUnidadeDTO->setStrSigla($SiglaUnidade); | |
| 564 | + } | |
| 565 | + | |
| 566 | + $objUnidadeRN = new UnidadeRN(); | |
| 567 | + $objUnidadeDTO = $objUnidadeRN->consultarRN0125($objUnidadeDTO); | |
| 568 | + | |
| 569 | + if ($objUnidadeDTO==null){ | |
| 570 | + throw new InfraException('Unidade ['.$IdUnidade.'] não encontrada.'); | |
| 571 | + } | |
| 572 | + | |
| 573 | + return $objUnidadeDTO; | |
| 574 | + } | |
| 575 | +} | |
| 576 | + | |
| 577 | +/* | |
| 578 | + $servidorSoap = new SoapServer("sei.wsdl",array('encoding'=>'ISO-8859-1')); | |
| 579 | + $servidorSoap->setClass("SeiWS"); | |
| 580 | + | |
| 581 | + //Só processa se acessado via POST | |
| 582 | + if ($_SERVER['REQUEST_METHOD']=='POST') { | |
| 583 | + $servidorSoap->handle(); | |
| 584 | + } | |
| 585 | +*/ | |
| 586 | + | |
| 587 | +$servidorSoap = new BeSimple\SoapServer\SoapServer( "cgu.wsdl", array ('encoding'=>'ISO-8859-1', | |
| 588 | + 'soap_version' => SOAP_1_1, | |
| 589 | + 'attachment_type'=>BeSimple\SoapCommon\Helper::ATTACHMENTS_TYPE_MTOM)); | |
| 590 | +$servidorSoap->setClass ( "CguWS" ); | |
| 591 | + | |
| 592 | +//Só processa se acessado via POST | |
| 593 | +if ($_SERVER['REQUEST_METHOD']=='POST') { | |
| 594 | + $servidorSoap->handle($HTTP_RAW_POST_DATA); | |
| 595 | +} | |
| 596 | +?> | |
| 0 | 597 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,411 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
| 2 | + | |
| 3 | +<wsdl:definitions | |
| 4 | + name="CguWS" | |
| 5 | + targetNamespace="Cgu" | |
| 6 | + xmlns="http://schemas.xmlsoap.org/wsdl/" | |
| 7 | + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" | |
| 8 | + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" | |
| 9 | + xmlns:xsd="http://www.w3.org/2001/XMLSchema" | |
| 10 | + xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" | |
| 11 | + xmlns:xmime="http://www.w3.org/2005/05/xmlmime" | |
| 12 | + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" | |
| 13 | + xmlns:tns="Cgu"> | |
| 14 | + | |
| 15 | + <wsdl:types> | |
| 16 | + <xsd:schema targetNamespace="Cgu"> | |
| 17 | + | |
| 18 | + <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> | |
| 19 | + | |
| 20 | + <xsd:complexType name="Unidade"> | |
| 21 | + <xsd:all> | |
| 22 | + <xsd:element name="IdUnidade" type="xsd:string"/> | |
| 23 | + <xsd:element name="Sigla" type="xsd:string"/> | |
| 24 | + <xsd:element name="Descricao" type="xsd:string"/> | |
| 25 | + </xsd:all> | |
| 26 | + </xsd:complexType> | |
| 27 | + | |
| 28 | + <xsd:complexType name="ArrayOfUnidade"> | |
| 29 | + <xsd:complexContent> | |
| 30 | + <xsd:restriction base="SOAP-ENC:Array"> | |
| 31 | + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Unidade[]" /> | |
| 32 | + </xsd:restriction> | |
| 33 | + </xsd:complexContent> | |
| 34 | + </xsd:complexType> | |
| 35 | + | |
| 36 | + <xsd:complexType name="Usuario"> | |
| 37 | + <xsd:all> | |
| 38 | + <xsd:element name="IdUsuario" type="xsd:string"/> | |
| 39 | + <xsd:element name="Sigla" type="xsd:string"/> | |
| 40 | + <xsd:element name="Nome" type="xsd:string"/> | |
| 41 | + </xsd:all> | |
| 42 | + </xsd:complexType> | |
| 43 | + | |
| 44 | + <xsd:complexType name="ArrayOfUsuario"> | |
| 45 | + <xsd:complexContent> | |
| 46 | + <xsd:restriction base="SOAP-ENC:Array"> | |
| 47 | + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Usuario[]" /> | |
| 48 | + </xsd:restriction> | |
| 49 | + </xsd:complexContent> | |
| 50 | + </xsd:complexType> | |
| 51 | + | |
| 52 | + <xsd:complexType name="TipoProcedimento"> | |
| 53 | + <xsd:all> | |
| 54 | + <xsd:element name="IdTipoProcedimento" type="xsd:string"/> | |
| 55 | + <xsd:element name="Nome" type="xsd:string"/> | |
| 56 | + </xsd:all> | |
| 57 | + </xsd:complexType> | |
| 58 | + | |
| 59 | + <xsd:complexType name="ArrayOfTipoProcedimento"> | |
| 60 | + <xsd:complexContent> | |
| 61 | + <xsd:restriction base="SOAP-ENC:Array"> | |
| 62 | + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:TipoProcedimento[]" /> | |
| 63 | + </xsd:restriction> | |
| 64 | + </xsd:complexContent> | |
| 65 | + </xsd:complexType> | |
| 66 | + | |
| 67 | + <xsd:complexType name="Serie"> | |
| 68 | + <xsd:all> | |
| 69 | + <xsd:element name="IdSerie" type="xsd:string"/> | |
| 70 | + <xsd:element name="Nome" type="xsd:string"/> | |
| 71 | + </xsd:all> | |
| 72 | + </xsd:complexType> | |
| 73 | + | |
| 74 | + <xsd:complexType name="ArrayOfSerie"> | |
| 75 | + <xsd:complexContent> | |
| 76 | + <xsd:restriction base="SOAP-ENC:Array"> | |
| 77 | + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Serie[]" /> | |
| 78 | + </xsd:restriction> | |
| 79 | + </xsd:complexContent> | |
| 80 | + </xsd:complexType> | |
| 81 | + | |
| 82 | + <xsd:complexType name="Andamento"> | |
| 83 | + <xsd:all> | |
| 84 | + <xsd:element name="Descricao" type="xsd:string"/> | |
| 85 | + <xsd:element name="DataHora" type="xsd:string"/> | |
| 86 | + <xsd:element name="Unidade" type="tns:Unidade"/> | |
| 87 | + <xsd:element name="Usuario" type="tns:Usuario"/> | |
| 88 | + </xsd:all> | |
| 89 | + </xsd:complexType> | |
| 90 | + | |
| 91 | + <xsd:complexType name="ArrayOfAndamento"> | |
| 92 | + <xsd:complexContent> | |
| 93 | + <xsd:restriction base="SOAP-ENC:Array"> | |
| 94 | + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Andamento[]" /> | |
| 95 | + </xsd:restriction> | |
| 96 | + </xsd:complexContent> | |
| 97 | + </xsd:complexType> | |
| 98 | + | |
| 99 | + <xsd:complexType name="UnidadeProcedimentoAberto"> | |
| 100 | + <xsd:all> | |
| 101 | + <xsd:element name="Unidade" type="tns:Unidade"/> | |
| 102 | + <xsd:element name="UsuarioAtribuicao" type="tns:Usuario"/> | |
| 103 | + </xsd:all> | |
| 104 | + </xsd:complexType> | |
| 105 | + | |
| 106 | + <xsd:complexType name="ArrayOfUnidadeProcedimentoAberto"> | |
| 107 | + <xsd:complexContent> | |
| 108 | + <xsd:restriction base="SOAP-ENC:Array"> | |
| 109 | + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:UnidadeProcedimentoAberto[]" /> | |
| 110 | + </xsd:restriction> | |
| 111 | + </xsd:complexContent> | |
| 112 | + </xsd:complexType> | |
| 113 | + | |
| 114 | + <xsd:complexType name="ProcedimentoResumido"> | |
| 115 | + <xsd:all> | |
| 116 | + <xsd:element name="IdProcedimento" type="xsd:string"/> | |
| 117 | + <xsd:element name="ProcedimentoFormatado" type="xsd:string"/> | |
| 118 | + <xsd:element name="TipoProcedimento" type="tns:TipoProcedimento"/> | |
| 119 | + </xsd:all> | |
| 120 | + </xsd:complexType> | |
| 121 | + | |
| 122 | + <xsd:complexType name="ArrayOfProcedimentoResumido"> | |
| 123 | + <xsd:complexContent> | |
| 124 | + <xsd:restriction base="SOAP-ENC:Array"> | |
| 125 | + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:ProcedimentoResumido[]" /> | |
| 126 | + </xsd:restriction> | |
| 127 | + </xsd:complexContent> | |
| 128 | + </xsd:complexType> | |
| 129 | + | |
| 130 | + <xsd:complexType name="Assinatura"> | |
| 131 | + <xsd:all> | |
| 132 | + <xsd:element name="Nome" type="xsd:string"/> | |
| 133 | + <xsd:element name="CargoFuncao" type="xsd:string"/> | |
| 134 | + <xsd:element name="DataHora" type="xsd:string"/> | |
| 135 | + </xsd:all> | |
| 136 | + </xsd:complexType> | |
| 137 | + | |
| 138 | + <xsd:complexType name="ArrayOfAssinatura"> | |
| 139 | + <xsd:complexContent> | |
| 140 | + <xsd:restriction base="SOAP-ENC:Array"> | |
| 141 | + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Assinatura[]" /> | |
| 142 | + </xsd:restriction> | |
| 143 | + </xsd:complexContent> | |
| 144 | + </xsd:complexType> | |
| 145 | + | |
| 146 | + <xsd:complexType name="Destinatario"> | |
| 147 | + <xsd:all> | |
| 148 | + <xsd:element name="IdContato" type="xsd:string"/> | |
| 149 | + <xsd:element name="NomeContato" type="xsd:string"/> | |
| 150 | + <xsd:element name="EmailContato" type="xsd:string"/> | |
| 151 | + <xsd:element name="SiglaUnidade" type="xsd:string"/> | |
| 152 | + </xsd:all> | |
| 153 | + </xsd:complexType> | |
| 154 | + | |
| 155 | + <xsd:complexType name="ArrayOfDestinatario"> | |
| 156 | + <xsd:complexContent> | |
| 157 | + <xsd:restriction base="SOAP-ENC:Array"> | |
| 158 | + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:Destinatario[]" /> | |
| 159 | + </xsd:restriction> | |
| 160 | + </xsd:complexContent> | |
| 161 | + </xsd:complexType> | |
| 162 | + | |
| 163 | + <xsd:complexType name="PublicacaoImprensaNacional"> | |
| 164 | + <xsd:all> | |
| 165 | + <xsd:element name="SiglaVeiculo" type="xsd:string"/> | |
| 166 | + <xsd:element name="DescricaoVeiculo" type="xsd:string"/> | |
| 167 | + <xsd:element name="Pagina" type="xsd:string"/> | |
| 168 | + <xsd:element name="Secao" type="xsd:string"/> | |
| 169 | + <xsd:element name="Data" type="xsd:string"/> | |
| 170 | + </xsd:all> | |
| 171 | + </xsd:complexType> | |
| 172 | + | |
| 173 | + <xsd:complexType name="Publicacao"> | |
| 174 | + <xsd:all> | |
| 175 | + <xsd:element name="NomeVeiculo" type="xsd:string"/> | |
| 176 | + <xsd:element name="Numero" type="xsd:string"/> | |
| 177 | + <xsd:element name="DataDisponibilizacao" type="xsd:string"/> | |
| 178 | + <xsd:element name="DataPublicacao" type="xsd:string"/> | |
| 179 | + <xsd:element name="Estado" type="xsd:string"/> | |
| 180 | + <xsd:element name="ImprensaNacional" type="tns:PublicacaoImprensaNacional"/> | |
| 181 | + </xsd:all> | |
| 182 | + </xsd:complexType> | |
| 183 | + | |
| 184 | + | |
| 185 | + <xsd:complexType name="RetornoConsultaDocumento"> | |
| 186 | + <xsd:all> | |
| 187 | + <xsd:element name="IdProcedimento" type="xsd:string"/> | |
| 188 | + <xsd:element name="ProcedimentoFormatado" type="xsd:string"/> | |
| 189 | + <xsd:element name="IdDocumento" type="xsd:string"/> | |
| 190 | + <xsd:element name="DocumentoFormatado" type="xsd:string"/> | |
| 191 | + <xsd:element name="LinkAcesso" type="xsd:string"/> | |
| 192 | + <xsd:element name="Serie" type="tns:Serie"/> | |
| 193 | + <xsd:element name="Numero" type="xsd:string"/> | |
| 194 | + <xsd:element name="Data" type="xsd:string"/> | |
| 195 | + <xsd:element name="UnidadeElaboradora" type="tns:Unidade"/> | |
| 196 | + <xsd:element name="AndamentoGeracao" type="tns:Andamento"/> | |
| 197 | + <xsd:element name="Assinaturas" type="tns:ArrayOfAssinatura"/> | |
| 198 | + <xsd:element name="Publicacao" type="tns:Publicacao"/> | |
| 199 | + <xsd:element name="Destinatarios" type="tns:ArrayOfDestinatario"/> | |
| 200 | + </xsd:all> | |
| 201 | + </xsd:complexType> | |
| 202 | + | |
| 203 | + <xsd:complexType name="ArrayOfRetornoConsultaDocumento"> | |
| 204 | + <xsd:complexContent> | |
| 205 | + <xsd:restriction base="SOAP-ENC:Array"> | |
| 206 | + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:RetornoConsultaDocumento[]" /> | |
| 207 | + </xsd:restriction> | |
| 208 | + </xsd:complexContent> | |
| 209 | + </xsd:complexType> | |
| 210 | + | |
| 211 | + <xsd:complexType name="RetornoListaAndamentos"> | |
| 212 | + <xsd:all> | |
| 213 | + <xsd:element name="IdProcedimento" type="xsd:string"/> | |
| 214 | + <xsd:element name="ProcedimentoFormatado" type="xsd:string"/> | |
| 215 | + <xsd:element name="TipoProcedimento" type="tns:TipoProcedimento"/> | |
| 216 | + <xsd:element name="Andamentos" type="tns:ArrayOfAndamento"/> | |
| 217 | + </xsd:all> | |
| 218 | + </xsd:complexType> | |
| 219 | + | |
| 220 | + <xsd:complexType name="RequisicaoConsultaTramite"> | |
| 221 | + <xsd:all> | |
| 222 | + <xsd:element name="IdProcedimento" type="xsd:string"/> | |
| 223 | + <xsd:element name="DataAbertura" type="xsd:string"/> | |
| 224 | + </xsd:all> | |
| 225 | + </xsd:complexType> | |
| 226 | + | |
| 227 | + | |
| 228 | + <!--<element name="ArrayOfRequisicaoConsultaTramite"> | |
| 229 | + <complexType base="SOAP-ENC:Array"> | |
| 230 | + <element name="requisicaoConsultaTramite" type="tns:RequisicaoConsultaTramite" maxOccurs="unbounded"/> | |
| 231 | + </complexType> | |
| 232 | + <anyAttribute/> | |
| 233 | + </element>--> | |
| 234 | + | |
| 235 | + <xsd:complexType name="ArrayOfRequisicaoConsultaTramite"> | |
| 236 | + <xsd:complexContent> | |
| 237 | + <xsd:restriction base="SOAP-ENC:Array"> | |
| 238 | + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:RequisicaoConsultaTramite[]" /> | |
| 239 | + </xsd:restriction> | |
| 240 | + </xsd:complexContent> | |
| 241 | + </xsd:complexType> | |
| 242 | + | |
| 243 | + <xsd:complexType name="ListaDeProcedimentos"> | |
| 244 | + <xsd:all> | |
| 245 | + <xsd:element name="IdProtocolo" type="xsd:string"/> | |
| 246 | + </xsd:all> | |
| 247 | + </xsd:complexType> | |
| 248 | + | |
| 249 | + <!--<element name="ArrayOfListaDeProcedimentos"> | |
| 250 | + <complexType base="SOAP-ENC:Array"> | |
| 251 | + <element name="listaDeProcedimentos" type="tns:ListaDeProcedimentos" maxOccurs="unbounded"/> | |
| 252 | + </complexType> | |
| 253 | + <anyAttribute/> | |
| 254 | + </element>--> | |
| 255 | + | |
| 256 | + <xsd:complexType name="ArrayOfListaDeProcedimentos"> | |
| 257 | + <xsd:complexContent> | |
| 258 | + <xsd:restriction base="SOAP-ENC:Array"> | |
| 259 | + <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="tns:ListaDeProcedimentos[]" /> | |
| 260 | + </xsd:restriction> | |
| 261 | + </xsd:complexContent> | |
| 262 | + </xsd:complexType> | |
| 263 | + | |
| 264 | + </xsd:schema> | |
| 265 | + | |
| 266 | + </wsdl:types> | |
| 267 | + | |
| 268 | + | |
| 269 | + <wsdl:message name="listarProcedimentosRequest"> | |
| 270 | + <wsdl:part name="SiglaSistema" type="xsd:string"/> | |
| 271 | + <wsdl:part name="IdentificacaoServico" type="xsd:string"/> | |
| 272 | + <wsdl:part name="IdUnidade" type="xsd:string"/> | |
| 273 | + <wsdl:part name="ProtocoloProcedimento" type="xsd:string"/> | |
| 274 | + <wsdl:part name="Interessado" type="xsd:string"/> | |
| 275 | + <wsdl:part name="DescricaoAssunto" type="xsd:string"/> | |
| 276 | + <wsdl:part name="IdTipoProcedimento" type="xsd:string"/> | |
| 277 | + <wsdl:part name="NomeTipoProcedimento" type="xsd:string"/> | |
| 278 | + <wsdl:part name="ClassificacaoAssunto" type="xsd:string"/> | |
| 279 | + <wsdl:part name="DataInicialRegistroProcedimento" type="xsd:string"/> | |
| 280 | + <wsdl:part name="DataFinalRegistroProcedimento" type="xsd:string"/> | |
| 281 | + <wsdl:part name="UnidadeProcedimentoAberto" type="xsd:string"/> | |
| 282 | + </wsdl:message> | |
| 283 | + | |
| 284 | + <wsdl:message name="listarProcedimentosResponse"> | |
| 285 | + <wsdl:part name="parametros" type="tns:ArrayOfProcedimentoResumido"/> | |
| 286 | + </wsdl:message> | |
| 287 | + | |
| 288 | + <wsdl:message name="listarDocumentosRequest"> | |
| 289 | + <wsdl:part name="SiglaSistema" type="xsd:string"/> | |
| 290 | + <wsdl:part name="IdentificacaoServico" type="xsd:string"/> | |
| 291 | + <wsdl:part name="IdUnidade" type="xsd:string"/> | |
| 292 | + <wsdl:part name="ProtocoloProcedimento" type="xsd:string"/> | |
| 293 | + <wsdl:part name="ProtocoloDocumento" type="xsd:string"/> | |
| 294 | + <wsdl:part name="NumeroDocumento" type="xsd:string"/> | |
| 295 | + <wsdl:part name="Serie" type="xsd:string"/> | |
| 296 | + <wsdl:part name="UnidadeElaboradora" type="xsd:string"/> | |
| 297 | + <wsdl:part name="DataInicial" type="xsd:string"/> | |
| 298 | + <wsdl:part name="DataFinal" type="xsd:string"/> | |
| 299 | + <wsdl:part name="SinRetornarAndamentoGeracao" type="xsd:string"/> | |
| 300 | + <wsdl:part name="SinRetornarAssinaturas" type="xsd:string"/> | |
| 301 | + <wsdl:part name="SinRetornarPublicacao" type="xsd:string"/> | |
| 302 | + <wsdl:part name="SinRetornarDestinatarios" type="xsd:string"/> | |
| 303 | + </wsdl:message> | |
| 304 | + | |
| 305 | + <wsdl:message name="listarDocumentosResponse"> | |
| 306 | + <wsdl:part name="parametros" type="tns:ArrayOfRetornoConsultaDocumento"/> | |
| 307 | + </wsdl:message> | |
| 308 | + | |
| 309 | + <wsdl:message name="listarAndamentosRequest"> | |
| 310 | + <wsdl:part name="SiglaSistema" type="xsd:string"/> | |
| 311 | + <wsdl:part name="IdentificacaoServico" type="xsd:string"/> | |
| 312 | + <wsdl:part name="IdUnidade" type="xsd:string"/> | |
| 313 | + <wsdl:part name="ProtocoloProcedimento" type="xsd:string"/> | |
| 314 | + </wsdl:message> | |
| 315 | + | |
| 316 | + <wsdl:message name="listarAndamentosResponse"> | |
| 317 | + <wsdl:part name="parametros" type="tns:RetornoListaAndamentos"/> | |
| 318 | + </wsdl:message> | |
| 319 | + | |
| 320 | + <wsdl:message name="listarProcedimentosTramitadosParaAreaRequest"> | |
| 321 | + <wsdl:part name="SiglaSistema" type="xsd:string"/> | |
| 322 | + <wsdl:part name="IdentificacaoServico" type="xsd:string"/> | |
| 323 | + <wsdl:part name="IdUnidade" type="xsd:string"/> | |
| 324 | + <wsdl:part name="RequisicaoTramite" type="tns:ArrayOfRequisicaoConsultaTramite"/> | |
| 325 | + <wsdl:part name="IdUnidadePesquisa" type="xsd:string"/> | |
| 326 | + </wsdl:message> | |
| 327 | + | |
| 328 | + <wsdl:message name="listarProcedimentosTramitadosParaAreaResponse"> | |
| 329 | + <wsdl:part name="parametros" type="tns:ArrayOfListaDeProcedimentos"/> | |
| 330 | + </wsdl:message> | |
| 331 | + | |
| 332 | + <wsdl:portType name="CguPortType"> | |
| 333 | + <wsdl:operation name="listarProcedimentos"> | |
| 334 | + <wsdl:documentation>Consulta de processos</wsdl:documentation> | |
| 335 | + <wsdl:input message="tns:listarProcedimentosRequest"/> | |
| 336 | + <wsdl:output message="tns:listarProcedimentosResponse"/> | |
| 337 | + </wsdl:operation> | |
| 338 | + | |
| 339 | + <wsdl:operation name="listarDocumentos"> | |
| 340 | + <wsdl:documentation>Consulta de documentos</wsdl:documentation> | |
| 341 | + <wsdl:input message="tns:listarDocumentosRequest"/> | |
| 342 | + <wsdl:output message="tns:listarDocumentosResponse"/> | |
| 343 | + </wsdl:operation> | |
| 344 | + | |
| 345 | + <wsdl:operation name="listarAndamentos"> | |
| 346 | + <wsdl:documentation>Consulta de andamentos</wsdl:documentation> | |
| 347 | + <wsdl:input message="tns:listarAndamentosRequest"/> | |
| 348 | + <wsdl:output message="tns:listarAndamentosResponse"/> | |
| 349 | + </wsdl:operation> | |
| 350 | + | |
| 351 | + <wsdl:operation name="listarProcedimentosTramitadosParaArea"> | |
| 352 | + <wsdl:documentation>Consulta de andamentos Tramitados para determinada Área</wsdl:documentation> | |
| 353 | + <wsdl:input message="tns:listarProcedimentosTramitadosParaAreaRequest"/> | |
| 354 | + <wsdl:output message="tns:listarProcedimentosTramitadosParaAreaResponse"/> | |
| 355 | + </wsdl:operation> | |
| 356 | + | |
| 357 | + </wsdl:portType> | |
| 358 | + | |
| 359 | + <wsdl:binding name="CguBinding" type="tns:CguPortType"> | |
| 360 | + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> | |
| 361 | + | |
| 362 | + <wsdl:operation name="listarProcedimentos"> | |
| 363 | + <soap:operation soapAction="CguAction" /> | |
| 364 | + <wsdl:input> | |
| 365 | + <soap:body namespace="Cgu" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> | |
| 366 | + </wsdl:input> | |
| 367 | + <wsdl:output> | |
| 368 | + <soap:body namespace="Cgu" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> | |
| 369 | + </wsdl:output> | |
| 370 | + </wsdl:operation> | |
| 371 | + | |
| 372 | + <wsdl:operation name="listarDocumentos"> | |
| 373 | + <soap:operation soapAction="CguAction" /> | |
| 374 | + <wsdl:input> | |
| 375 | + <soap:body namespace="Cgu" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> | |
| 376 | + </wsdl:input> | |
| 377 | + <wsdl:output> | |
| 378 | + <soap:body namespace="Cgu" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> | |
| 379 | + </wsdl:output> | |
| 380 | + </wsdl:operation> | |
| 381 | + | |
| 382 | + <wsdl:operation name="listarAndamentos"> | |
| 383 | + <soap:operation soapAction="CguAction" /> | |
| 384 | + <wsdl:input> | |
| 385 | + <soap:body namespace="Cgu" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> | |
| 386 | + </wsdl:input> | |
| 387 | + <wsdl:output> | |
| 388 | + <soap:body namespace="Cgu" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> | |
| 389 | + </wsdl:output> | |
| 390 | + </wsdl:operation> | |
| 391 | + | |
| 392 | + <wsdl:operation name="listarProcedimentosTramitadosParaArea"> | |
| 393 | + <soap:operation soapAction="CguAction" /> | |
| 394 | + <wsdl:input> | |
| 395 | + <soap:body namespace="Cgu" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> | |
| 396 | + </wsdl:input> | |
| 397 | + <wsdl:output> | |
| 398 | + <soap:body namespace="Cgu" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> | |
| 399 | + </wsdl:output> | |
| 400 | + </wsdl:operation> | |
| 401 | + | |
| 402 | + </wsdl:binding> | |
| 403 | + | |
| 404 | + <wsdl:service name="CguService"> | |
| 405 | + <wsdl:port name="CguPortService" binding="tns:CguBinding"> | |
| 406 | + <soap:address location="https://sei.cgu.gov.br/sei/modulos/cgu/wscomplementar/ws/CguWS.php"/> | |
| 407 | + </wsdl:port> | |
| 408 | + </wsdl:service> | |
| 409 | + | |
| 410 | + | |
| 411 | +</wsdl:definitions> | |
| 0 | 412 | \ No newline at end of file | ... | ... |