Commit e182b772c8e168f99da1868840412c1bbc6b1e0d
1 parent
a86b0522
Exists in
Marctmp
Debug ligado
Showing
3 changed files
with
11 additions
and
5 deletions
Show diff stats
rn/PenTramiteProcessadoRN.php
| @@ -70,13 +70,16 @@ class PenTramiteProcessadoRN extends InfraRN { | @@ -70,13 +70,16 @@ class PenTramiteProcessadoRN extends InfraRN { | ||
| 70 | 70 | ||
| 71 | // Verifica o número de tentativas já realizadas é igual ao configurado | 71 | // Verifica o número de tentativas já realizadas é igual ao configurado |
| 72 | // no parâmetro | 72 | // no parâmetro |
| 73 | + $this->gravarLogDebug("NumTentativas " . $numTentativas, 0, true); | ||
| 73 | if($objDTO->getNumTentativas() >= $numTentativas) { | 74 | if($objDTO->getNumTentativas() >= $numTentativas) { |
| 74 | // Somente faz a recusa se estiver recebendo o procedimento, pois | 75 | // Somente faz a recusa se estiver recebendo o procedimento, pois |
| 75 | // ao receber o recibo não pode mais recursar | 76 | // ao receber o recibo não pode mais recursar |
| 76 | if($objDTO->getStrTipo() == self::STR_TIPO_PROCESSO) { | 77 | if($objDTO->getStrTipo() == self::STR_TIPO_PROCESSO) { |
| 77 | // Recusa o tramite | 78 | // Recusa o tramite |
| 78 | $objProcessoEletronicoRN = new ProcessoEletronicoRN(); | 79 | $objProcessoEletronicoRN = new ProcessoEletronicoRN(); |
| 80 | + $this->gravarLogDebug("Vou processar recusarTramite " . $dblIdTramite, 0, true); | ||
| 79 | $objProcessoEletronicoRN->recusarTramite($dblIdTramite, 'Tramite recusado por falha do destinatário', ProcessoEletronicoRN::MTV_RCSR_TRAM_CD_OUTROU); | 81 | $objProcessoEletronicoRN->recusarTramite($dblIdTramite, 'Tramite recusado por falha do destinatário', ProcessoEletronicoRN::MTV_RCSR_TRAM_CD_OUTROU); |
| 82 | + $this->gravarLogDebug("Processei recusarTramite " . $dblIdTramite, 0, true); | ||
| 80 | } | 83 | } |
| 81 | return true;// Mente que já foi recebido para não executar novamente | 84 | return true;// Mente que já foi recebido para não executar novamente |
| 82 | } | 85 | } |
rn/PendenciasTramiteRN.php
| @@ -52,7 +52,7 @@ class PendenciasTramiteRN extends InfraRN { | @@ -52,7 +52,7 @@ class PendenciasTramiteRN extends InfraRN { | ||
| 52 | ini_set('memory_limit','-1'); | 52 | ini_set('memory_limit','-1'); |
| 53 | 53 | ||
| 54 | InfraDebug::getInstance()->setBolLigado(true); | 54 | InfraDebug::getInstance()->setBolLigado(true); |
| 55 | - InfraDebug::getInstance()->setBolDebugInfra(false); | 55 | + InfraDebug::getInstance()->setBolDebugInfra(true); |
| 56 | InfraDebug::getInstance()->setBolEcho(true); | 56 | InfraDebug::getInstance()->setBolEcho(true); |
| 57 | InfraDebug::getInstance()->limpar(); | 57 | InfraDebug::getInstance()->limpar(); |
| 58 | 58 | ||
| @@ -85,9 +85,9 @@ class PendenciasTramiteRN extends InfraRN { | @@ -85,9 +85,9 @@ class PendenciasTramiteRN extends InfraRN { | ||
| 85 | } | 85 | } |
| 86 | } | 86 | } |
| 87 | catch(Exception $e) { | 87 | catch(Exception $e) { |
| 88 | - InfraDebug::getInstance()->setBolLigado(false); | ||
| 89 | - InfraDebug::getInstance()->setBolDebugInfra(false); | ||
| 90 | - InfraDebug::getInstance()->setBolEcho(false); | 88 | + InfraDebug::getInstance()->setBolLigado(true); |
| 89 | + InfraDebug::getInstance()->setBolDebugInfra(true); | ||
| 90 | + InfraDebug::getInstance()->setBolEcho(true); | ||
| 91 | LogSEI::getInstance()->gravar(InfraException::inspecionar($e)); | 91 | LogSEI::getInstance()->gravar(InfraException::inspecionar($e)); |
| 92 | throw $e; | 92 | throw $e; |
| 93 | } | 93 | } |
rn/ProcessarPendenciasRN.php
| @@ -34,7 +34,7 @@ class ProcessarPendenciasRN extends InfraAgendamentoTarefa | @@ -34,7 +34,7 @@ class ProcessarPendenciasRN extends InfraAgendamentoTarefa | ||
| 34 | ini_set('memory_limit','-1'); | 34 | ini_set('memory_limit','-1'); |
| 35 | 35 | ||
| 36 | InfraDebug::getInstance()->setBolLigado(true); | 36 | InfraDebug::getInstance()->setBolLigado(true); |
| 37 | - InfraDebug::getInstance()->setBolDebugInfra(false); | 37 | + InfraDebug::getInstance()->setBolDebugInfra(true); |
| 38 | InfraDebug::getInstance()->setBolEcho(true); | 38 | InfraDebug::getInstance()->setBolEcho(true); |
| 39 | InfraDebug::getInstance()->limpar(); | 39 | InfraDebug::getInstance()->limpar(); |
| 40 | 40 | ||
| @@ -82,9 +82,12 @@ class ProcessarPendenciasRN extends InfraAgendamentoTarefa | @@ -82,9 +82,12 @@ class ProcessarPendenciasRN extends InfraAgendamentoTarefa | ||
| 82 | $this->gravarLogDebug("Processando recebimento de recibo de trâmite [receberReciboTramite] com IDT " . $job->workload(), 0, true); | 82 | $this->gravarLogDebug("Processando recebimento de recibo de trâmite [receberReciboTramite] com IDT " . $job->workload(), 0, true); |
| 83 | $numIdentificacaoTramite = intval($job->workload()); | 83 | $numIdentificacaoTramite = intval($job->workload()); |
| 84 | $objPenTramiteProcessadoRN = new PenTramiteProcessadoRN(PenTramiteProcessadoRN::STR_TIPO_RECIBO); | 84 | $objPenTramiteProcessadoRN = new PenTramiteProcessadoRN(PenTramiteProcessadoRN::STR_TIPO_RECIBO); |
| 85 | + $this->gravarLogDebug("Vou processar isProcedimentoRecebido " . $job->workload(), 0, true); | ||
| 85 | if(!$objPenTramiteProcessadoRN->isProcedimentoRecebido($numIdentificacaoTramite)){ | 86 | if(!$objPenTramiteProcessadoRN->isProcedimentoRecebido($numIdentificacaoTramite)){ |
| 86 | $objReceberReciboTramiteRN = new ReceberReciboTramiteRN(); | 87 | $objReceberReciboTramiteRN = new ReceberReciboTramiteRN(); |
| 88 | + $this->gravarLogDebug("Vou processar receber ReciboTram " . $job->workload(), 0, true); | ||
| 87 | $objReceberReciboTramiteRN->receberReciboDeTramite($numIdentificacaoTramite); | 89 | $objReceberReciboTramiteRN->receberReciboDeTramite($numIdentificacaoTramite); |
| 90 | + $this->gravarLogDebug("Processei receberrecibodetramite " . $job->workload(), 0, true); | ||
| 88 | } | 91 | } |
| 89 | 92 | ||
| 90 | } | 93 | } |