Commit 8b03f07130ae1fe13005945623324cc2779e4dd9
1 parent
6bb12695
Exists in
master
and in
21 other branches
Ajuste na exibição do botão de cancelar trâmite externo, labels do botões e bug …
…na expedição de um processo com dois documentos iguais porém um cancelado
Showing
7 changed files
with
146 additions
and
128 deletions
Show diff stats
PENIntegracao.php
... | ... | @@ -32,14 +32,7 @@ class PENIntegracao extends SeiIntegracao { |
32 | 32 | $dblIdProcedimento = $objProcedimentoDTO->getDblIdProcedimento(); |
33 | 33 | $numIdUsuario = SessaoSEI::getInstance()->getNumIdUsuario(); |
34 | 34 | $numIdUnidadeAtual = SessaoSEI::getInstance()->getNumIdUnidadeAtual(); |
35 | - $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); | |
36 | - | |
37 | - if(!file_exists($objInfraParametro->getValor('PEN_LOCALIZACAO_CERTIFICADO_DIGITAL'))){ | |
38 | - return array(); | |
39 | - } | |
40 | - | |
41 | - /* $objProcessoEletronicoRN = new ProcessoEletronicoRN();*/ | |
42 | - | |
35 | + $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); | |
43 | 36 | |
44 | 37 | //Verifica se o processo encontra-se aberto na unidade atual |
45 | 38 | $objAtividadeRN = new AtividadeRN(); |
... | ... | @@ -65,7 +58,7 @@ class PENIntegracao extends SeiIntegracao { |
65 | 58 | //Apresenta o botão de expedir processo |
66 | 59 | if ($bolFlagAberto && $bolAcaoExpedirProcesso && $bolProcessoEstadoNormal && $objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo() != ProtocoloRN::$NA_SIGILOSO) { |
67 | 60 | $numTabBotao = $objPaginaSEI->getProxTabBarraComandosSuperior(); |
68 | - $strAcoesProcedimento .= '<a id="validar_expedir_processo" href="' . $objPaginaSEI->formatarXHTML($objSessaoSEI->assinarLink('controlador.php?acao=pen_procedimento_expedir&acao_origem=procedimento_visualizar&acao_retorno=arvore_visualizar&id_procedimento=' . $dblIdProcedimento . '&arvore=1')) . '" tabindex="' . $numTabBotao . '" class="botaoSEI"><img class="infraCorBarraSistema" src="' . $this->getDiretorioImagens() . '/pen_expedir_procedimento.gif" alt="Expedir Processo" title="Expedir Processo" /></a>'; | |
61 | + $strAcoesProcedimento .= '<a id="validar_expedir_processo" href="' . $objPaginaSEI->formatarXHTML($objSessaoSEI->assinarLink('controlador.php?acao=pen_procedimento_expedir&acao_origem=procedimento_visualizar&acao_retorno=arvore_visualizar&id_procedimento=' . $dblIdProcedimento . '&arvore=1')) . '" tabindex="' . $numTabBotao . '" class="botaoSEI"><img class="infraCorBarraSistema" src="' . $this->getDiretorioImagens() . '/pen_expedir_procedimento.gif" alt="Tramitar Externamente" title="Tramitar Externamente" /></a>'; | |
69 | 62 | } |
70 | 63 | |
71 | 64 | //Apresenta o botão da página de recibos |
... | ... | @@ -74,11 +67,14 @@ class PENIntegracao extends SeiIntegracao { |
74 | 67 | $strAcoesProcedimento .= '</a>'; |
75 | 68 | |
76 | 69 | //Apresenta o botão de cancelar trâmite |
77 | - // if ($objProcessoEletronicoRN->isDisponivelCancelarTramite($objProcedimentoDTO->getStrProtocoloProcedimentoFormatado())) { | |
70 | + $objAtividadeDTO = $objExpedirProcedimentoRN->verificarProcessoEmExpedicao($objSeiIntegracaoDTO->getIdProcedimento()); | |
71 | + | |
72 | + if ($objAtividadeDTO && $objAtividadeDTO->getNumIdTarefa() == ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO)) { | |
73 | + | |
78 | 74 | $strAcoesProcedimento .= '<a href="' . $objPaginaSEI->formatarXHTML($objSessaoSEI->assinarLink('controlador.php?acao=pen_procedimento_cancelar_expedir&acao_origem=procedimento_visualizar&acao_retorno=arvore_visualizar&id_procedimento=' . $dblIdProcedimento . '&arvore=1')) . '" tabindex="' . $numTabBotao . '" class="botaoSEI">'; |
79 | - $strAcoesProcedimento .= '<img class="infraCorBarraSistema" src="' . $this->getDiretorioImagens() . '/sei_desanexar_processo.gif" alt="Cancelar Expedição" title="Cancelar Expedição" />'; | |
75 | + $strAcoesProcedimento .= '<img class="infraCorBarraSistema" src="' . $this->getDiretorioImagens() . '/sei_desanexar_processo.gif" alt="Cancelar Tramitação Externa" title="Cancelar Tramitação Externa" />'; | |
80 | 76 | $strAcoesProcedimento .= '</a>'; |
81 | - // } | |
77 | + } | |
82 | 78 | |
83 | 79 | return array($strAcoesProcedimento); |
84 | 80 | } |
... | ... | @@ -132,51 +128,21 @@ class PENIntegracao extends SeiIntegracao { |
132 | 128 | } |
133 | 129 | |
134 | 130 | public function montarMensagemProcesso(ProcedimentoAPI $objProcedimentoAPI) { |
135 | - | |
136 | - $objProcedimentoDTO = new ProcedimentoDTO(); | |
137 | - $objProcedimentoDTO->setDblIdProcedimento($objProcedimentoAPI->getIdProcedimento()); | |
138 | - $objProcedimentoDTO->retStrStaEstadoProtocolo(); | |
139 | - $objProcedimentoDTO->retDblIdProcedimento(); | |
140 | - | |
141 | - $objProcedimentoRN = new ProcedimentoRN(); | |
142 | - $objProcedimentoDTO = $objProcedimentoRN->consultarRN0201($objProcedimentoDTO); | |
143 | - | |
144 | - if ($objProcedimentoDTO->getStrStaEstadoProtocolo() == ProtocoloRN::$TE_PROCEDIMENTO_BLOQUEADO) { | |
145 | - | |
146 | - $objAtividadeDTO = new AtividadeDTO(); | |
147 | - $objAtividadeDTO->setDblIdProtocolo($objProcedimentoDTO->getDblIdProcedimento()); | |
148 | - $objAtividadeDTO->setNumIdTarefa( | |
149 | - array(ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO), | |
150 | - ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_RECEBIDO)), | |
151 | - InfraDTO::$OPER_IN); | |
152 | - $objAtividadeDTO->setNumMaxRegistrosRetorno(1); | |
153 | - $objAtividadeDTO->setOrdDthAbertura(InfraDTO::$TIPO_ORDENACAO_DESC); | |
154 | - $objAtividadeDTO->retNumIdAtividade(); | |
155 | - $objAtividadeDTO->retNumIdTarefa(); | |
156 | - | |
157 | - $objAtividadeRN = new AtividadeRN(); | |
158 | - $arrAtividadeDTO = (array) $objAtividadeRN->listarRN0036($objAtividadeDTO); | |
159 | - | |
160 | - if (isset($arrAtividadeDTO[0])) { | |
161 | - $objAtividadeDTO = $arrAtividadeDTO[0]; | |
162 | - | |
163 | - if($objAtividadeDTO->getNumIdTarefa() == ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO)){ | |
164 | - | |
165 | - $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); | |
166 | - $objAtributoAndamentoDTO->setStrNome('UNIDADE_DESTINO'); | |
167 | - $objAtributoAndamentoDTO->setNumIdAtividade($objAtividadeDTO->getNumIdAtividade()); | |
168 | - $objAtributoAndamentoDTO->retStrValor(); | |
169 | - | |
170 | - $objAtributoAndamentoRN = new AtributoAndamentoRN(); | |
171 | - $objAtributoAndamentoDTO = $objAtributoAndamentoRN->consultarRN1366($objAtributoAndamentoDTO); | |
172 | - | |
173 | - return sprintf('Processo em trâmite externo para "%s".', $objAtributoAndamentoDTO->getStrValor()); | |
174 | - | |
175 | - | |
176 | - } | |
177 | - | |
178 | - } | |
179 | 131 | |
132 | + $objExpedirProcedimentoRN = new ExpedirProcedimentoRN(); | |
133 | + $objAtividadeDTO = $objExpedirProcedimentoRN->verificarProcessoEmExpedicao($objProcedimentoAPI->getIdProcedimento()); | |
134 | + | |
135 | + if ($objAtividadeDTO && $objAtividadeDTO->getNumIdTarefa() == ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO)) { | |
136 | + | |
137 | + $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); | |
138 | + $objAtributoAndamentoDTO->setStrNome('UNIDADE_DESTINO'); | |
139 | + $objAtributoAndamentoDTO->setNumIdAtividade($objAtividadeDTO->getNumIdAtividade()); | |
140 | + $objAtributoAndamentoDTO->retStrValor(); | |
141 | + | |
142 | + $objAtributoAndamentoRN = new AtributoAndamentoRN(); | |
143 | + $objAtributoAndamentoDTO = $objAtributoAndamentoRN->consultarRN1366($objAtributoAndamentoDTO); | |
144 | + | |
145 | + return sprintf('Processo em trâmite externo para "%s".', $objAtributoAndamentoDTO->getStrValor()); | |
180 | 146 | } |
181 | 147 | } |
182 | 148 | ... | ... |
dto/ComponenteDigitalDTO.php
... | ... | @@ -29,6 +29,7 @@ class ComponenteDigitalDTO extends InfraDTO { |
29 | 29 | $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM, 'TicketEnvioComponentes', 'ticket_envio_componentes', 'md_pen_tramite'); |
30 | 30 | $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'ConteudoAssinaturaDocumento', 'conteudo_assinatura', 'documento_conteudo'); |
31 | 31 | $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'ProtocoloDocumentoFormatado', 'protocolo_formatado', 'protocolo'); |
32 | + $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'StaEstadoProtocolo', 'sta_estado', 'protocolo'); | |
32 | 33 | |
33 | 34 | $this->configurarPK('NumeroRegistro', InfraDTO::$TIPO_PK_INFORMADO); |
34 | 35 | $this->configurarPK('IdDocumento', InfraDTO::$TIPO_PK_INFORMADO); | ... | ... |
rn/ExpedirProcedimentoRN.php
... | ... | @@ -195,7 +195,6 @@ class ExpedirProcedimentoRN extends InfraRN { |
195 | 195 | |
196 | 196 | |
197 | 197 | $this->objProcessoEletronicoRN->cadastrarTramitePendente($objTramite->IDT, $idAtividadeExpedicao); |
198 | - | |
199 | 198 | //error_log('TRAMITE: ' . print_r($objTramite, true)); |
200 | 199 | //error_log('before enviarComponentesDigitais'); |
201 | 200 | |
... | ... | @@ -881,7 +880,7 @@ class ExpedirProcedimentoRN extends InfraRN { |
881 | 880 | $penComponenteDigitalDTO->setDblIdDocumento($documentoDTO->getDblIdDocumento()); |
882 | 881 | |
883 | 882 | $penComponenteDigitalBD = new ComponenteDigitalBD($this->getObjInfraIBanco()); |
884 | - | |
883 | + | |
885 | 884 | if($penComponenteDigitalBD->contar($penComponenteDigitalDTO) > 0){ |
886 | 885 | |
887 | 886 | $arrPenComponenteDigitalDTO = $penComponenteDigitalBD->listar($penComponenteDigitalDTO); |
... | ... | @@ -1394,20 +1393,19 @@ class ExpedirProcedimentoRN extends InfraRN { |
1394 | 1393 | return $this->objDocumentoRN->consultarRN0005($documentoDTO); |
1395 | 1394 | } |
1396 | 1395 | |
1397 | - private function enviarComponentesDigitais($strNumeroRegistro, $numIdTramite, $strProtocolo) | |
1398 | - { | |
1399 | - if(!isset($strNumeroRegistro)){ | |
1400 | - throw new InfraException('Parâmetro $strNumeroRegistro não informado.'); | |
1396 | + private function enviarComponentesDigitais($strNumeroRegistro, $numIdTramite, $strProtocolo) { | |
1397 | + if (!isset($strNumeroRegistro)) { | |
1398 | + throw new InfraException('Parâmetro $strNumeroRegistro não informado.'); | |
1401 | 1399 | } |
1402 | 1400 | |
1403 | - if(!isset($numIdTramite)){ | |
1404 | - throw new InfraException('Parâmetro $numIdTramite não informado.'); | |
1401 | + if (!isset($numIdTramite)) { | |
1402 | + throw new InfraException('Parâmetro $numIdTramite não informado.'); | |
1405 | 1403 | } |
1406 | 1404 | |
1407 | - if(!isset($strProtocolo)){ | |
1408 | - throw new InfraException('Parâmetro $strProtocolo não informado.'); | |
1405 | + if (!isset($strProtocolo)) { | |
1406 | + throw new InfraException('Parâmetro $strProtocolo não informado.'); | |
1409 | 1407 | } |
1410 | - | |
1408 | + | |
1411 | 1409 | //Obter dados dos componetes digitais |
1412 | 1410 | $objComponenteDigitalBD = new ComponenteDigitalBD($this->getObjInfraIBanco()); |
1413 | 1411 | $objComponenteDigitalDTO = new ComponenteDigitalDTO(); |
... | ... | @@ -1417,67 +1415,66 @@ class ExpedirProcedimentoRN extends InfraRN { |
1417 | 1415 | $objComponenteDigitalDTO->setOrdNumOrdem(InfraDTO::$TIPO_ORDENACAO_ASC); |
1418 | 1416 | $objComponenteDigitalDTO->retDblIdDocumento(); |
1419 | 1417 | $objComponenteDigitalDTO->retNumTicketEnvioComponentes(); |
1420 | - // $objComponenteDigitalDTO->retStrConteudoAssinaturaDocumento(); | |
1418 | + // $objComponenteDigitalDTO->retStrConteudoAssinaturaDocumento(); | |
1421 | 1419 | $objComponenteDigitalDTO->retStrProtocoloDocumentoFormatado(); |
1422 | 1420 | $objComponenteDigitalDTO->retStrHashConteudo(); |
1423 | 1421 | $objComponenteDigitalDTO->retStrProtocolo(); |
1424 | 1422 | $objComponenteDigitalDTO->retStrNome(); |
1425 | 1423 | $objComponenteDigitalDTO->retDblIdProcedimento(); |
1426 | - | |
1424 | + | |
1427 | 1425 | $arrComponentesDigitaisDTO = $objComponenteDigitalBD->listar($objComponenteDigitalDTO); |
1428 | 1426 | |
1429 | 1427 | if (isset($arrComponentesDigitaisDTO) && count($arrComponentesDigitaisDTO) > 0) { |
1430 | - | |
1428 | + | |
1431 | 1429 | //TODO: Valida inconsistência da quantidade de documentos solicitados e aqueles cadastrados no SEI |
1432 | 1430 | |
1433 | 1431 | |
1434 | 1432 | //Construir objeto Componentes digitais |
1435 | - foreach ($arrComponentesDigitaisDTO as $objComponenteDigitalDTO) { | |
1436 | - | |
1437 | - $this->barraProgresso->mover(ProcessoEletronicoINT::NEE_EXPEDICAO_ETAPA_DOCUMENTO); | |
1438 | - $this->barraProgresso->setStrRotulo(sprintf(ProcessoEletronicoINT::TEE_EXPEDICAO_ETAPA_DOCUMENTO, $objComponenteDigitalDTO->getStrProtocoloDocumentoFormatado())); | |
1439 | - | |
1440 | - $dadosDoComponenteDigital = new stdClass(); | |
1441 | - $dadosDoComponenteDigital->ticketParaEnvioDeComponentesDigitais = $objComponenteDigitalDTO->getNumTicketEnvioComponentes(); | |
1442 | - | |
1443 | - //TODO: Problema no barramento de serviços quando um mesmo arquivo está contido em dois diferentes | |
1444 | - //processos apensados. Mesmo erro relatado com dois arquivos iguais em docs diferentes no mesmo processo | |
1445 | - $dadosDoComponenteDigital->protocolo = $objComponenteDigitalDTO->getStrProtocolo(); | |
1446 | - $dadosDoComponenteDigital->hashDoComponenteDigital = $objComponenteDigitalDTO->getStrHashConteudo(); | |
1447 | - | |
1448 | - //TODO: Particionar o arquivo em várias partes caso for muito grande seu tamanho | |
1449 | - //TODO: Obter dados do conteudo do documento, sendo Interno ou Externo | |
1450 | - //$strConteudoDocumento = $this->consultarConteudoDocumento($objComponenteDigitalDTO->getDblIdDocumento()); | |
1451 | - //$strConteudoAssinatura = $objComponenteDigitalDTO->getStrConteudoAssinaturaDocumento(); | |
1452 | - $objDocumentoDTO = $this->consultarDocumento($objComponenteDigitalDTO->getDblIdDocumento()); | |
1453 | - $strNomeDocumento = $this->consultarNomeDocumentoPEN($objDocumentoDTO); | |
1454 | - $arrInformacaoArquivo = $this->obterDadosArquivo($objDocumentoDTO); | |
1455 | - $dadosDoComponenteDigital->conteudoDoComponenteDigital = new SoapVar($arrInformacaoArquivo['CONTEUDO'], XSD_BASE64BINARY); | |
1456 | - | |
1457 | - | |
1433 | + foreach ($arrComponentesDigitaisDTO as $objComponenteDigitalDTO) { | |
1434 | + | |
1435 | + $this->barraProgresso->mover(ProcessoEletronicoINT::NEE_EXPEDICAO_ETAPA_DOCUMENTO); | |
1436 | + $this->barraProgresso->setStrRotulo(sprintf(ProcessoEletronicoINT::TEE_EXPEDICAO_ETAPA_DOCUMENTO, $objComponenteDigitalDTO->getStrProtocoloDocumentoFormatado())); | |
1437 | + | |
1438 | + $dadosDoComponenteDigital = new stdClass(); | |
1439 | + $dadosDoComponenteDigital->ticketParaEnvioDeComponentesDigitais = $objComponenteDigitalDTO->getNumTicketEnvioComponentes(); | |
1440 | + | |
1441 | + //TODO: Problema no barramento de serviços quando um mesmo arquivo está contido em dois diferentes | |
1442 | + //processos apensados. Mesmo erro relatado com dois arquivos iguais em docs diferentes no mesmo processo | |
1443 | + $dadosDoComponenteDigital->protocolo = $objComponenteDigitalDTO->getStrProtocolo(); | |
1444 | + $dadosDoComponenteDigital->hashDoComponenteDigital = $objComponenteDigitalDTO->getStrHashConteudo(); | |
1445 | + | |
1446 | + //TODO: Particionar o arquivo em várias partes caso for muito grande seu tamanho | |
1447 | + //TODO: Obter dados do conteudo do documento, sendo Interno ou Externo | |
1448 | + //$strConteudoDocumento = $this->consultarConteudoDocumento($objComponenteDigitalDTO->getDblIdDocumento()); | |
1449 | + //$strConteudoAssinatura = $objComponenteDigitalDTO->getStrConteudoAssinaturaDocumento(); | |
1450 | + $objDocumentoDTO = $this->consultarDocumento($objComponenteDigitalDTO->getDblIdDocumento()); | |
1451 | + $strNomeDocumento = $this->consultarNomeDocumentoPEN($objDocumentoDTO); | |
1452 | + $arrInformacaoArquivo = $this->obterDadosArquivo($objDocumentoDTO); | |
1453 | + $dadosDoComponenteDigital->conteudoDoComponenteDigital = new SoapVar($arrInformacaoArquivo['CONTEUDO'], XSD_BASE64BINARY); | |
1454 | + | |
1455 | + | |
1458 | 1456 | |
1459 | - try { | |
1460 | - //Enviar componentes digitais | |
1461 | - $parametros = new stdClass(); | |
1462 | - $parametros->dadosDoComponenteDigital = $dadosDoComponenteDigital; | |
1463 | - $result = $this->objProcessoEletronicoRN->enviarComponenteDigital($parametros); | |
1464 | - | |
1465 | - //Bloquea documento para atualização, já que ele foi visualizado | |
1466 | - $this->objDocumentoRN->bloquearConteudo($objDocumentoDTO); | |
1467 | - // @join_tec US008.05 (#23092) | |
1468 | - $this->objProcedimentoAndamentoRN->cadastrar(sprintf('Enviando %s %s', $strNomeDocumento, $objComponenteDigitalDTO->getStrProtocoloDocumentoFormatado()), 'S'); | |
1457 | + try { | |
1458 | + //Enviar componentes digitais | |
1459 | + $parametros = new stdClass(); | |
1460 | + $parametros->dadosDoComponenteDigital = $dadosDoComponenteDigital; | |
1461 | + $result = $this->objProcessoEletronicoRN->enviarComponenteDigital($parametros); | |
1462 | + | |
1463 | + //Bloquea documento para atualização, já que ele foi visualizado | |
1464 | + $this->objDocumentoRN->bloquearConteudo($objDocumentoDTO); | |
1465 | + // @join_tec US008.05 (#23092) | |
1466 | + $this->objProcedimentoAndamentoRN->cadastrar(sprintf('Enviando %s %s', $strNomeDocumento, $objComponenteDigitalDTO->getStrProtocoloDocumentoFormatado()), 'S'); | |
1467 | + } catch (Exception $e) { | |
1468 | + // @join_tec US008.05 (#23092) | |
1469 | + $this->objProcedimentoAndamentoRN->cadastrar(sprintf('Enviando %s %s', $strNomeDocumento, $objComponenteDigitalDTO->getStrProtocoloDocumentoFormatado()), 'N'); | |
1470 | + throw new InfraException("Error Processing Request", $e); | |
1471 | + } | |
1469 | 1472 | } |
1470 | - catch (Exception $e) { | |
1471 | - // @join_tec US008.05 (#23092) | |
1472 | - $this->objProcedimentoAndamentoRN->cadastrar(sprintf('Enviando %s %s', $strNomeDocumento, $objComponenteDigitalDTO->getStrProtocoloDocumentoFormatado()), 'N'); | |
1473 | - throw new InfraException("Error Processing Request", $e); | |
1474 | - } | |
1475 | - } | |
1476 | - } | |
1477 | 1473 | |
1478 | - } | |
1474 | + } | |
1475 | + } | |
1479 | 1476 | |
1480 | - private function validarParametrosExpedicao(InfraException $objInfraException, ExpedirProcedimentoDTO $objExpedirProcedimentoDTO) | |
1477 | + private function validarParametrosExpedicao(InfraException $objInfraException, ExpedirProcedimentoDTO $objExpedirProcedimentoDTO) | |
1481 | 1478 | { |
1482 | 1479 | if(!isset($objExpedirProcedimentoDTO)){ |
1483 | 1480 | $objInfraException->adicionarValidacao('Parâmetro $objExpedirProcedimentoDTO não informado.'); |
... | ... | @@ -2216,6 +2213,58 @@ class ExpedirProcedimentoRN extends InfraRN { |
2216 | 2213 | $objAtividadeRN = new AtividadeRN(); |
2217 | 2214 | $objAtividadeRN->gerarInternaRN0727($objAtividadeDTO); |
2218 | 2215 | } |
2216 | + | |
2217 | + /** | |
2218 | + * Verifica se o processo se encontra em expedição | |
2219 | + * | |
2220 | + * @param integer $parNumIdProcedimento | |
2221 | + * @return boolean|object | |
2222 | + */ | |
2223 | + public function verificarProcessoEmExpedicao($parNumIdProcedimento){ | |
2224 | + | |
2225 | + $objProcedimentoDTO = new ProcedimentoDTO(); | |
2226 | + $objProcedimentoDTO->setDblIdProcedimento($parNumIdProcedimento); | |
2227 | + $objProcedimentoDTO->retStrStaEstadoProtocolo(); | |
2228 | + $objProcedimentoDTO->retDblIdProcedimento(); | |
2229 | + | |
2230 | + $objProcedimentoRN = new ProcedimentoRN(); | |
2231 | + $objProcedimentoDTO = $objProcedimentoRN->consultarRN0201($objProcedimentoDTO); | |
2232 | + | |
2233 | + | |
2234 | + if($objProcedimentoDTO && $objProcedimentoDTO->getStrStaEstadoProtocolo() == ProtocoloRN::$TE_PROCEDIMENTO_BLOQUEADO){ | |
2235 | + | |
2236 | + $objAtividadeDTO = new AtividadeDTO(); | |
2237 | + $objAtividadeDTO->setDblIdProtocolo($objProcedimentoDTO->getDblIdProcedimento()); | |
2238 | + $objAtividadeDTO->setNumIdTarefa( | |
2239 | + array(ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO), | |
2240 | + ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_RECEBIDO), | |
2241 | + ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_TRAMITE_CANCELADO), | |
2242 | + ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_TRAMITE_RECUSADO), | |
2243 | + ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_TRAMITE_EXTERNO), | |
2244 | + ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_ABORTADO), | |
2245 | + ), | |
2246 | + InfraDTO::$OPER_IN); | |
2247 | + $objAtividadeDTO->setNumMaxRegistrosRetorno(1); | |
2248 | + $objAtividadeDTO->setOrdDthAbertura(InfraDTO::$TIPO_ORDENACAO_DESC); | |
2249 | + $objAtividadeDTO->retNumIdAtividade(); | |
2250 | + $objAtividadeDTO->retNumIdTarefa(); | |
2251 | + | |
2252 | + $objAtividadeRN = new AtividadeRN(); | |
2253 | + $arrAtividadeDTO = (array) $objAtividadeRN->listarRN0036($objAtividadeDTO); | |
2254 | + | |
2255 | + if($arrAtividadeDTO){ | |
2256 | + return $arrAtividadeDTO[0]; | |
2257 | + }else{ | |
2258 | + return false; | |
2259 | + } | |
2260 | + | |
2261 | + | |
2262 | + }else{ | |
2263 | + return false; | |
2264 | + } | |
2265 | + | |
2266 | + } | |
2267 | + | |
2219 | 2268 | |
2220 | 2269 | // // private function validarStrSinGerarPendenciaRN0901(ProcedimentoDTO $objProcedimentoDTO, InfraException $objInfraException){ |
2221 | 2270 | // // if (InfraString::isBolVazia($objProcedimentoDTO->getStrSinGerarPendencia())){ | ... | ... |
rn/PenAtualizarSeiRN.php
... | ... | @@ -518,10 +518,10 @@ class PenAtualizarSeiRN extends PenAtualizadorRN { |
518 | 518 | }; |
519 | 519 | |
520 | 520 | |
521 | - $fnCadastrar('Processo expedido para a entidade @UNIDADE_DESTINO@ - @REPOSITORIO_DESTINO@ (@PROCESSO@, @UNIDADE@, @USUARIO@)', 'S', 'S', 'N', 'S', 'N', 'PEN_PROCESSO_EXPEDIDO'); | |
521 | + $fnCadastrar('Processo trâmitado externamente para a entidade @UNIDADE_DESTINO@ - @REPOSITORIO_DESTINO@ (@PROCESSO@, @UNIDADE@, @USUARIO@)', 'S', 'S', 'N', 'S', 'N', 'PEN_PROCESSO_EXPEDIDO'); | |
522 | 522 | $fnCadastrar('Processo recebido da entidade @ENTIDADE_ORIGEM@ - @REPOSITORIO_ORIGEM@ (@PROCESSO@, @ENTIDADE_ORIGEM@, @UNIDADE_DESTINO@, @USUARIO@)', 'S', 'S', 'N', 'S', 'N', 'PEN_PROCESSO_RECEBIDO'); |
523 | 523 | $fnCadastrar('O processo foi recusado pelo orgão @UNIDADE_DESTINO@ pelo seguinte motivo: @MOTIVO@', 'S', 'S', 'N', 'N', 'S', 'PEN_PROCESSO_RECUSADO'); |
524 | - $fnCadastrar('Expedição do Processo Cancelada em @DATA_HORA@ pelo Usuário @USUARIO@', 'S', 'S', 'N', 'S', 'N', 'PEN_PROCESSO_CANCELADO'); | |
524 | + $fnCadastrar('Trâmite externo do processo cancelado em @DATA_HORA@ pelo Usuário @USUARIO@', 'S', 'S', 'N', 'S', 'N', 'PEN_PROCESSO_CANCELADO'); | |
525 | 525 | $fnCadastrar('Operacao externa de @OPERACAO@ registrada em @DATA_HORA@ (@PESSOA_IDENTIFICACAO@ - @PESSOA_NOME@)\n @COMPLEMENTO@', 'S', 'S', 'S', 'S', 'N', 'PEN_OPERACAO_EXTERNA'); |
526 | 526 | |
527 | 527 | //---------------------------------------------------------------------- |
... | ... | @@ -578,7 +578,6 @@ class PenAtualizarSeiRN extends PenAtualizadorRN { |
578 | 578 | } |
579 | 579 | }; |
580 | 580 | |
581 | - $fnCadastrar('PENAgendamentoRN::verificarTramitesRecusados', 'Verificação de processos recusados'); | |
582 | 581 | $fnCadastrar('PENAgendamentoRN::seiVerificarServicosBarramento', 'Verificação dos serviços de fila de processamento estão em execução'); |
583 | 582 | |
584 | 583 | //---------------------------------------------------------------------- |
... | ... | @@ -854,7 +853,7 @@ class PenAtualizarSeiRN extends PenAtualizadorRN { |
854 | 853 | } |
855 | 854 | }; |
856 | 855 | |
857 | - $fnCadastrar('Expedição do processo foi abortada manualmente devido a falha no trâmite', 'S', 'S', 'N', 'N', 'S', 'PEN_EXPEDICAO_PROCESSO_ABORTADA'); | |
856 | + $fnCadastrar('O trâmite externo do processo foi abortado manualmente devido a falha no trâmite', 'S', 'S', 'N', 'N', 'S', 'PEN_EXPEDICAO_PROCESSO_ABORTADA'); | |
858 | 857 | } |
859 | 858 | |
860 | 859 | /** | ... | ... |
rn/ProcessoEletronicoRN.php
... | ... | @@ -89,9 +89,9 @@ class ProcessoEletronicoRN extends InfraRN { |
89 | 89 | throw new InfraException('Endereço do serviço de integração do Processo Eletrônico Nacional (PEN) não informado.'); |
90 | 90 | } |
91 | 91 | |
92 | - if (!@file_get_contents($strLocalizacaoCertificadoDigital)) { | |
92 | + /* if (!@file_get_contents($strLocalizacaoCertificadoDigital)) { | |
93 | 93 | throw new InfraException("Certificado digital de autenticação do serviço de integração do Processo Eletrônico Nacional(PEN) não encontrado."); |
94 | - } | |
94 | + }*/ | |
95 | 95 | |
96 | 96 | //TODO: Urgente - Remover senha do certificado de autenticação dos serviços do PEN da tabela de parâmetros |
97 | 97 | if (InfraString::isBolVazia($strSenhaCertificadoDigital)) { |
... | ... | @@ -822,7 +822,7 @@ class ProcessoEletronicoRN extends InfraRN { |
822 | 822 | if(!is_null($objItemSolicitado)){ |
823 | 823 | $objItemSolicitado->hash = is_array($objItemSolicitado->hash) ? $objItemSolicitado->hash : array($objItemSolicitado->hash); |
824 | 824 | |
825 | - if($objItemSolicitado->protocolo == $objComponenteDigitalDTO->getStrProtocolo() && in_array($strHashConteudo, $objItemSolicitado->hash)) { | |
825 | + if($objItemSolicitado->protocolo == $objComponenteDigitalDTO->getStrProtocolo() && in_array($strHashConteudo, $objItemSolicitado->hash) && !$objDocumento->retirado) { | |
826 | 826 | $objComponenteDigitalDTO->setStrSinEnviar("S"); |
827 | 827 | } |
828 | 828 | } | ... | ... |
rn/ReceberProcedimentoRN.php
... | ... | @@ -237,7 +237,8 @@ class ReceberProcedimentoRN extends InfraRN |
237 | 237 | $objComponenteDigitalDTO->retStrNumeroRegistro(); |
238 | 238 | $objComponenteDigitalDTO->retNumIdTramite(); |
239 | 239 | $objComponenteDigitalDTO->retStrNome(); |
240 | - | |
240 | + $objComponenteDigitalDTO->retStrStaEstadoProtocolo(); | |
241 | + | |
241 | 242 | $objComponenteDigitalBD = new ComponenteDigitalBD($this->getObjInfraIBanco()); |
242 | 243 | $arrObjComponentesDigitaisDTO = $objComponenteDigitalBD->listar($objComponenteDigitalDTO); |
243 | 244 | |
... | ... | @@ -248,14 +249,16 @@ class ReceberProcedimentoRN extends InfraRN |
248 | 249 | $objReceberComponenteDigitalRN = $receberComponenteDigitalRN; |
249 | 250 | |
250 | 251 | foreach($arrObjComponentesDigitaisDTO as $objComponenteDigitalDTOEnviado) { |
252 | + if($objComponenteDigitalDTOEnviado->getStrStaEstadoProtocolo() != ProtocoloRN::$TE_DOCUMENTO_CANCELADO){ | |
253 | + $strHash = $objComponenteDigitalDTOEnviado->getStrHashConteudo(); | |
254 | + $strNomeDocumento = (array_key_exists($strHash, $arrStrNomeDocumento)) ? $arrStrNomeDocumento[$strHash]['especieNome'] : '[Desconhecido]'; | |
251 | 255 | |
252 | - $strHash = $objComponenteDigitalDTOEnviado->getStrHashConteudo(); | |
253 | - $strNomeDocumento = (array_key_exists($strHash, $arrStrNomeDocumento)) ? $arrStrNomeDocumento[$strHash]['especieNome'] : '[Desconhecido]'; | |
254 | - | |
255 | - $objReceberComponenteDigitalRN->receberComponenteDigital($objComponenteDigitalDTOEnviado); | |
256 | + $objReceberComponenteDigitalRN->receberComponenteDigital($objComponenteDigitalDTOEnviado); | |
256 | 257 | |
257 | - // @join_tec US008.09 (#23092) | |
258 | - $this->objProcedimentoAndamentoRN->cadastrar(sprintf('Recebendo %s %s', $strNomeDocumento, $objComponenteDigitalDTOEnviado->getStrProtocoloDocumentoFormatado()), 'S'); | |
258 | + // @join_tec US008.09 (#23092) | |
259 | + $this->objProcedimentoAndamentoRN->cadastrar(sprintf('Recebendo %s %s', $strNomeDocumento, $objComponenteDigitalDTOEnviado->getStrProtocoloDocumentoFormatado()), 'S'); | |
260 | + } | |
261 | + | |
259 | 262 | } |
260 | 263 | // @join_tec US008.10 (#23092) |
261 | 264 | $this->objProcedimentoAndamentoRN->cadastrar('Todos os componentes digitais foram recebidos', 'S'); | ... | ... |
sip_atualizar_versao_modulo_pen.php
... | ... | @@ -967,8 +967,8 @@ class PenAtualizarSipRN extends PenAtualizadorRN { |
967 | 967 | //---------------------------------------------------------------------- |
968 | 968 | $this->criarRecurso('pen_procedimento_expedir', 'Expedir Procedimento', $numIdSistema); |
969 | 969 | $this->criarRecurso('apensados_selecionar_expedir_procedimento', 'Processos Apensados', $numIdSistema); |
970 | - $numIdRecurso = $this->criarRecurso('pen_procedimento_expedido_listar', 'Processos Expedidos', $numIdSistema); | |
971 | - $this->criarMenu('Processos Expedidos', 55, null, $numIdMenu, $numIdRecurso, $numIdSistema); | |
970 | + $numIdRecurso = $this->criarRecurso('pen_procedimento_expedido_listar', 'Processos Trâmitados Externamente', $numIdSistema); | |
971 | + $this->criarMenu('Processos Trâmitados Externamente', 55, null, $numIdMenu, $numIdRecurso, $numIdSistema); | |
972 | 972 | //---------------------------------------------------------------------- |
973 | 973 | // Mapeamento de documentos enviados |
974 | 974 | //---------------------------------------------------------------------- | ... | ... |