Commit c7b68e602c60da349188828fb684d0bce4b567e7

Authored by Eduardo Heinske
1 parent 80e504b2

Adaptação no primeiro recebimento de um processo

rn/PenAtividadeRN.php
@@ -12,7 +12,7 @@ class PenAtividadeRN extends AtividadeRN { @@ -12,7 +12,7 @@ class PenAtividadeRN extends AtividadeRN {
12 12
13 $this->statusPesquisa = $statusPesquisa; 13 $this->statusPesquisa = $statusPesquisa;
14 } 14 }
15 - 15 + /*
16 protected function listarPendenciasRN0754Conectado(PesquisaPendenciaDTO $objPesquisaPendenciaDTO) { 16 protected function listarPendenciasRN0754Conectado(PesquisaPendenciaDTO $objPesquisaPendenciaDTO) {
17 17
18 if ($this->statusPesquisa) { 18 if ($this->statusPesquisa) {
@@ -333,7 +333,7 @@ class PenAtividadeRN extends AtividadeRN { @@ -333,7 +333,7 @@ class PenAtividadeRN extends AtividadeRN {
333 } 333 }
334 */ 334 */
335 335
336 - foreach ($arrObjAcessoDTO as $objAcessoDTO) { 336 + /* foreach ($arrObjAcessoDTO as $objAcessoDTO) {
337 if ($objAcessoDTO->getStrStaTipo() == AcessoRN::$TA_CREDENCIAL_PROCESSO) { 337 if ($objAcessoDTO->getStrStaTipo() == AcessoRN::$TA_CREDENCIAL_PROCESSO) {
338 $arr[$objAcessoDTO->getDblIdProtocolo()]->setStrSinCredencialProcesso('S'); 338 $arr[$objAcessoDTO->getDblIdProtocolo()]->setStrSinCredencialProcesso('S');
339 } else if ($objAcessoDTO->getStrStaTipo() == AcessoRN::$TA_CREDENCIAL_ASSINATURA_PROCESSO) { 339 } else if ($objAcessoDTO->getStrStaTipo() == AcessoRN::$TA_CREDENCIAL_ASSINATURA_PROCESSO) {
@@ -344,7 +344,7 @@ class PenAtividadeRN extends AtividadeRN { @@ -344,7 +344,7 @@ class PenAtividadeRN extends AtividadeRN {
344 } 344 }
345 345
346 return $arrProcedimentos; 346 return $arrProcedimentos;
347 - } 347 + }*/
348 348
349 /** 349 /**
350 * Retorna a atividade da ação do tramite, ou seja, se estava enviando 350 * Retorna a atividade da ação do tramite, ou seja, se estava enviando
rn/ReceberComponenteDigitalRN.php
@@ -146,7 +146,7 @@ class ReceberComponenteDigitalRN extends InfraRN @@ -146,7 +146,7 @@ class ReceberComponenteDigitalRN extends InfraRN
146 146
147 $objDocumentoDTO->setObjProtocoloDTO($objProtocoloDTO); 147 $objDocumentoDTO->setObjProtocoloDTO($objProtocoloDTO);
148 $objProtocoloDTO->setArrObjAnexoDTO(array($parObjAnexoDTO)); 148 $objProtocoloDTO->setArrObjAnexoDTO(array($parObjAnexoDTO));
149 - $objDocumentoDTO = $objDocumentoRN->alterarRecebidoRN0992($objDocumentoDTO); 149 + $objDocumentoDTO = $objDocumentoRN->alterarRN0004($objDocumentoDTO);
150 150
151 // @join_tec US029 (#3790) 151 // @join_tec US029 (#3790)
152 /*$objObservacaoDTO = new ObservacaoDTO(); 152 /*$objObservacaoDTO = new ObservacaoDTO();
rn/ReceberProcedimentoRN.php
@@ -11,7 +11,6 @@ class ReceberProcedimentoRN extends InfraRN @@ -11,7 +11,6 @@ class ReceberProcedimentoRN extends InfraRN
11 private $objInfraParametro; 11 private $objInfraParametro;
12 private $objProcedimentoAndamentoRN; 12 private $objProcedimentoAndamentoRN;
13 private $documentosRetirados = array(); 13 private $documentosRetirados = array();
14 - private $flgReaberturaProcesso = false;  
15 14
16 public function __construct() 15 public function __construct()
17 { 16 {
@@ -167,18 +166,6 @@ class ReceberProcedimentoRN extends InfraRN @@ -167,18 +166,6 @@ class ReceberProcedimentoRN extends InfraRN
167 if($objTramite->situacaoAtual == ProcessoEletronicoRN::$STA_SITUACAO_TRAMITE_RECUSADO) { 166 if($objTramite->situacaoAtual == ProcessoEletronicoRN::$STA_SITUACAO_TRAMITE_RECUSADO) {
168 return; 167 return;
169 } 168 }
170 -  
171 - // Mudar o estado para normal caso o procedimento seja reenviado para a unidade  
172 - // que a gerou, pois o procedimento esta como bloqueado e deve voltar a estar  
173 - // como normal  
174 - $dblIdProcedimento = $this->consultarProcedimentoExistente($strNumeroRegistro);  
175 -  
176 - if(!empty($dblIdProcedimento)){  
177 - $objProcessoRetransmitido = new stdClass();  
178 - $objProcessoRetransmitido->idProcedimentoSEI = $dblIdProcedimento;  
179 -  
180 - ExpedirProcedimentoRN::mudarEstadoProcedimentoNormal($objProcessoRetransmitido, ProtocoloRN::$TE_NORMAL);  
181 - }  
182 169
183 $objProcedimentoDTO = $this->registrarProcesso($strNumeroRegistro, $parNumIdentificacaoTramite, $objProcesso, $objMetadadosProcedimento); 170 $objProcedimentoDTO = $this->registrarProcesso($strNumeroRegistro, $parNumIdentificacaoTramite, $objProcesso, $objMetadadosProcedimento);
184 171
@@ -234,7 +221,10 @@ class ReceberProcedimentoRN extends InfraRN @@ -234,7 +221,10 @@ class ReceberProcedimentoRN extends InfraRN
234 if($objTramite->situacaoAtual != ProcessoEletronicoRN::$STA_SITUACAO_TRAMITE_COMPONENTES_RECEBIDOS_DESTINATARIO) { 221 if($objTramite->situacaoAtual != ProcessoEletronicoRN::$STA_SITUACAO_TRAMITE_COMPONENTES_RECEBIDOS_DESTINATARIO) {
235 return; 222 return;
236 } 223 }
237 - 224 +
  225 +
  226 +
  227 + // throw new InfraException("COMPONENTES DIGITAIS A SEREM ANEXADOS: ".var_export($arrayHash, true));
238 if(count($arrayHash) > 0){ 228 if(count($arrayHash) > 0){
239 229
240 //Obter dados dos componetes digitais 230 //Obter dados dos componetes digitais
@@ -245,7 +235,7 @@ class ReceberProcedimentoRN extends InfraRN @@ -245,7 +235,7 @@ class ReceberProcedimentoRN extends InfraRN
245 $objComponenteDigitalDTO->setOrdNumOrdem(InfraDTO::$TIPO_ORDENACAO_ASC); 235 $objComponenteDigitalDTO->setOrdNumOrdem(InfraDTO::$TIPO_ORDENACAO_ASC);
246 $objComponenteDigitalDTO->retDblIdDocumento(); 236 $objComponenteDigitalDTO->retDblIdDocumento();
247 $objComponenteDigitalDTO->retNumTicketEnvioComponentes(); 237 $objComponenteDigitalDTO->retNumTicketEnvioComponentes();
248 - $objComponenteDigitalDTO->retStrConteudoAssinaturaDocumento(); 238 + // $objComponenteDigitalDTO->retStrConteudoAssinaturaDocumento();
249 $objComponenteDigitalDTO->retStrProtocoloDocumentoFormatado(); 239 $objComponenteDigitalDTO->retStrProtocoloDocumentoFormatado();
250 $objComponenteDigitalDTO->retStrHashConteudo(); 240 $objComponenteDigitalDTO->retStrHashConteudo();
251 $objComponenteDigitalDTO->retStrProtocolo(); 241 $objComponenteDigitalDTO->retStrProtocolo();
@@ -255,9 +245,11 @@ class ReceberProcedimentoRN extends InfraRN @@ -255,9 +245,11 @@ class ReceberProcedimentoRN extends InfraRN
255 245
256 $objComponenteDigitalBD = new ComponenteDigitalBD($this->getObjInfraIBanco()); 246 $objComponenteDigitalBD = new ComponenteDigitalBD($this->getObjInfraIBanco());
257 $arrObjComponentesDigitaisDTO = $objComponenteDigitalBD->listar($objComponenteDigitalDTO); 247 $arrObjComponentesDigitaisDTO = $objComponenteDigitalBD->listar($objComponenteDigitalDTO);
258 -  
259 - if (isset($arrObjComponentesDigitaisDTO) && count($arrObjComponentesDigitaisDTO) > 0) {  
260 - 248 +
  249 + // throw new InfraException('Componentes encontrados: '.var_export($arrObjComponentesDigitaisDTO, true));
  250 +
  251 + if ($objComponenteDigitalBD->contar($objComponenteDigitalDTO) > 0) {
  252 +
261 $objReceberComponenteDigitalRN = $receberComponenteDigitalRN; 253 $objReceberComponenteDigitalRN = $receberComponenteDigitalRN;
262 254
263 foreach($arrObjComponentesDigitaisDTO as $objComponenteDigitalDTOEnviado) { 255 foreach($arrObjComponentesDigitaisDTO as $objComponenteDigitalDTOEnviado) {
@@ -279,7 +271,7 @@ class ReceberProcedimentoRN extends InfraRN @@ -279,7 +271,7 @@ class ReceberProcedimentoRN extends InfraRN
279 } 271 }
280 } 272 }
281 273
282 - $this->fecharProcedimentoEmOutraUnidades($objProcedimentoDTO, $objMetadadosProcedimento); 274 + //$this->fecharProcedimentoEmOutraUnidades($objProcedimentoDTO, $objMetadadosProcedimento);
283 275
284 $objEnviarReciboTramiteRN = new EnviarReciboTramiteRN(); 276 $objEnviarReciboTramiteRN = new EnviarReciboTramiteRN();
285 $objEnviarReciboTramiteRN->enviarReciboTramiteProcesso($parNumIdentificacaoTramite, $arrayHash); 277 $objEnviarReciboTramiteRN->enviarReciboTramiteProcesso($parNumIdentificacaoTramite, $arrayHash);
@@ -475,6 +467,13 @@ class ReceberProcedimentoRN extends InfraRN @@ -475,6 +467,13 @@ class ReceberProcedimentoRN extends InfraRN
475 //} 467 //}
476 468
477 //$objProcedimentoDTO = $arrObjProcedimentoDTO[0]; 469 //$objProcedimentoDTO = $arrObjProcedimentoDTO[0];
  470 +
  471 + //REALIZA O DESBLOQUEIO DO PROCESSO
  472 + $objEntradaDesbloquearProcessoAPI = new EntradaDesbloquearProcessoAPI();
  473 + $objEntradaDesbloquearProcessoAPI->setIdProcedimento($parDblIdProcedimento);
  474 +
  475 + $objSeiRN = new SeiRN();
  476 + $objSeiRN->desbloquearProcesso($objEntradaDesbloquearProcessoAPI);
478 477
479 478
480 $objProcedimentoDTO = new ProcedimentoDTO(); 479 $objProcedimentoDTO = new ProcedimentoDTO();
@@ -560,7 +559,7 @@ class ReceberProcedimentoRN extends InfraRN @@ -560,7 +559,7 @@ class ReceberProcedimentoRN extends InfraRN
560 $objProcedimentoDTO->setDtaGeracaoProtocolo($this->objProcessoEletronicoRN->converterDataSEI($objProcesso->dataHoraDeProducao)); 559 $objProcedimentoDTO->setDtaGeracaoProtocolo($this->objProcessoEletronicoRN->converterDataSEI($objProcesso->dataHoraDeProducao));
561 $objProcedimentoDTO->setStrProtocoloProcedimentoFormatado(utf8_decode($objProcesso->protocolo)); 560 $objProcedimentoDTO->setStrProtocoloProcedimentoFormatado(utf8_decode($objProcesso->protocolo));
562 $objProcedimentoDTO->setStrSinGerarPendencia('S'); 561 $objProcedimentoDTO->setStrSinGerarPendencia('S');
563 - $objProcedimentoDTO->setNumVersaoLock(0); //TODO: Avaliar o comportamento desse campo no cadastro do processo 562 + // $objProcedimentoDTO->setNumVersaoLock(0); //TODO: Avaliar o comportamento desse campo no cadastro do processo
564 $objProcedimentoDTO->setArrObjDocumentoDTO(array()); 563 $objProcedimentoDTO->setArrObjDocumentoDTO(array());
565 564
566 //TODO: Identificar o tipo de procedimento correto para atribuição ao novo processo 565 //TODO: Identificar o tipo de procedimento correto para atribuição ao novo processo
@@ -707,7 +706,7 @@ class ReceberProcedimentoRN extends InfraRN @@ -707,7 +706,7 @@ class ReceberProcedimentoRN extends InfraRN
707 $objAtividadeDTO->setDblIdProtocolo($objProcedimentoDTO->getDblIdProcedimento()); 706 $objAtividadeDTO->setDblIdProtocolo($objProcedimentoDTO->getDblIdProcedimento());
708 $objAtividadeDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); 707 $objAtividadeDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual());
709 $objAtividadeDTO->setNumIdUsuario(SessaoSEI::getInstance()->getNumIdUsuario()); 708 $objAtividadeDTO->setNumIdUsuario(SessaoSEI::getInstance()->getNumIdUsuario());
710 - $objAtividadeDTO->setNumIdTarefa(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_RECEBIDO); 709 + $objAtividadeDTO->setNumIdTarefa(ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_RECEBIDO));
711 $objAtividadeDTO->setArrObjAtributoAndamentoDTO($arrObjAtributoAndamentoDTO); 710 $objAtividadeDTO->setArrObjAtributoAndamentoDTO($arrObjAtributoAndamentoDTO);
712 711
713 $objAtividadeRN = new AtividadeRN(); 712 $objAtividadeRN = new AtividadeRN();
@@ -961,8 +960,8 @@ class ReceberProcedimentoRN extends InfraRN @@ -961,8 +960,8 @@ class ReceberProcedimentoRN extends InfraRN
961 $objDocumentoDTO->setNumIdUnidadeResponsavel($objUnidadeDTO->getNumIdUnidade()); 960 $objDocumentoDTO->setNumIdUnidadeResponsavel($objUnidadeDTO->getNumIdUnidade());
962 $objDocumentoDTO->setNumIdTipoConferencia(null); 961 $objDocumentoDTO->setNumIdTipoConferencia(null);
963 $objDocumentoDTO->setStrConteudo(null); 962 $objDocumentoDTO->setStrConteudo(null);
964 -  
965 - $objDocumentoDTO->setNumVersaoLock(0); 963 + $objDocumentoDTO->setStrStaDocumento(DocumentoRN::$TD_EXTERNO);
  964 + // $objDocumentoDTO->setNumVersaoLock(0);
966 965
967 $objProtocoloDTO = new ProtocoloDTO(); 966 $objProtocoloDTO = new ProtocoloDTO();
968 $objDocumentoDTO->setObjProtocoloDTO($objProtocoloDTO); 967 $objDocumentoDTO->setObjProtocoloDTO($objProtocoloDTO);
@@ -1053,7 +1052,7 @@ class ReceberProcedimentoRN extends InfraRN @@ -1053,7 +1052,7 @@ class ReceberProcedimentoRN extends InfraRN
1053 1052
1054 $strConteudoCodificado = $objDocumentoDTO->getStrConteudo(); 1053 $strConteudoCodificado = $objDocumentoDTO->getStrConteudo();
1055 $objDocumentoDTO->setStrConteudo(null); 1054 $objDocumentoDTO->setStrConteudo(null);
1056 - $objDocumentoDTO->setStrSinFormulario('N'); 1055 + //$objDocumentoDTO->setStrSinFormulario('N');
1057 1056
1058 // @join_tec US027 (#3498) 1057 // @join_tec US027 (#3498)
1059 $numIdUnidadeGeradora = $this->objInfraParametro->getValor('PEN_UNIDADE_GERADORA_DOCUMENTO_RECEBIDO', false); 1058 $numIdUnidadeGeradora = $this->objInfraParametro->getValor('PEN_UNIDADE_GERADORA_DOCUMENTO_RECEBIDO', false);
@@ -1065,7 +1064,7 @@ class ReceberProcedimentoRN extends InfraRN @@ -1065,7 +1064,7 @@ class ReceberProcedimentoRN extends InfraRN
1065 1064
1066 //TODO: Fazer a atribuição dos componentes digitais do processo a partir desse ponto 1065 //TODO: Fazer a atribuição dos componentes digitais do processo a partir desse ponto
1067 $this->atribuirComponentesDigitais($objDocumentoDTO, $objDocumento->componenteDigital); 1066 $this->atribuirComponentesDigitais($objDocumentoDTO, $objDocumento->componenteDigital);
1068 - $objDocumentoDTOGerado = $objDocumentoRN->receberRN0991($objDocumentoDTO); 1067 + $objDocumentoDTOGerado = $objDocumentoRN->cadastrarRN0003($objDocumentoDTO);
1069 1068
1070 $objAtividadeDTOVisualizacao = new AtividadeDTO(); 1069 $objAtividadeDTOVisualizacao = new AtividadeDTO();
1071 $objAtividadeDTOVisualizacao->setDblIdProtocolo($objDocumentoDTO->getDblIdProcedimento()); 1070 $objAtividadeDTOVisualizacao->setDblIdProtocolo($objDocumentoDTO->getDblIdProcedimento());