Commit 142cd32a5a04bd1004aa37fda4512b80e2b40815
1 parent
c7b68e60
Exists in
master
and in
21 other branches
Adaptação da Recusa, cancelamento e correção do bug no NRE
Showing
16 changed files
with
617 additions
and
436 deletions
Show diff stats
PENIntegracao.php
... | ... | @@ -17,14 +17,14 @@ class PENIntegracao extends SeiIntegracao { |
17 | 17 | } |
18 | 18 | |
19 | 19 | public function montarBotaoProcesso(ProcedimentoAPI $objSeiIntegracaoDTO) { |
20 | - | |
20 | + | |
21 | 21 | $objProcedimentoDTO = new ProcedimentoDTO(); |
22 | 22 | $objProcedimentoDTO->setDblIdProcedimento($objSeiIntegracaoDTO->getIdProcedimento()); |
23 | 23 | $objProcedimentoDTO->retTodos(); |
24 | 24 | |
25 | 25 | $objProcedimentoRN = new ProcedimentoRN(); |
26 | 26 | $objProcedimentoDTO = $objProcedimentoRN->consultarRN0201($objProcedimentoDTO); |
27 | - | |
27 | + | |
28 | 28 | $objSessaoSEI = SessaoSEI::getInstance(); |
29 | 29 | $objPaginaSEI = PaginaSEI::getInstance(); |
30 | 30 | $strAcoesProcedimento = ""; |
... | ... | @@ -32,7 +32,8 @@ class PENIntegracao extends SeiIntegracao { |
32 | 32 | $dblIdProcedimento = $objProcedimentoDTO->getDblIdProcedimento(); |
33 | 33 | $numIdUsuario = SessaoSEI::getInstance()->getNumIdUsuario(); |
34 | 34 | $numIdUnidadeAtual = SessaoSEI::getInstance()->getNumIdUnidadeAtual(); |
35 | - | |
35 | + $objProcessoEletronicoRN = new ProcessoEletronicoRN(); | |
36 | + | |
36 | 37 | //Verifica se o processo encontra-se aberto na unidade atual |
37 | 38 | $objAtividadeRN = new AtividadeRN(); |
38 | 39 | $objPesquisaPendenciaDTO = new PesquisaPendenciaDTO(); |
... | ... | @@ -43,64 +44,38 @@ class PENIntegracao extends SeiIntegracao { |
43 | 44 | $arrObjProcedimentoDTO = $objAtividadeRN->listarPendenciasRN0754($objPesquisaPendenciaDTO); |
44 | 45 | $bolFlagAberto = count($arrObjProcedimentoDTO) == 1; |
45 | 46 | |
46 | - | |
47 | 47 | //Verificação da Restrição de Acesso à Funcionalidade |
48 | 48 | $bolAcaoExpedirProcesso = $objSessaoSEI->verificarPermissao('pen_procedimento_expedir'); |
49 | 49 | |
50 | - // ExpedirProcedimentoRN::__construct() criar a instância do ProcessoEletronicoRN | |
51 | - // e este pode lançar exceções caso alguma configuração dele não estaja correta | |
52 | - // invalidando demais ações na tela do Controle de Processo, então ecapsulamos | |
53 | - // no try/catch para prevenir o erro em tela adicionamos no log | |
54 | - // try { | |
55 | - | |
56 | - $objExpedirProcedimentoRN = new ExpedirProcedimentoRN(); | |
57 | - $objProcedimentoDTO = $objExpedirProcedimentoRN->consultarProcedimento($dblIdProcedimento); | |
58 | - | |
59 | - /* $bolProcessoEstadoNormal = !in_array($objProcedimentoDTO->getStrStaEstadoProtocolo(), array( | |
60 | - ProtocoloRN::$TE_PROCEDIMENTO_SOBRESTADO, | |
61 | - ProtocoloRN::$TE_EM_PROCESSAMENTO, | |
62 | - ProtocoloRn::$TE_BLOQUEADO | |
63 | - ));*/ | |
64 | - | |
65 | - //TODO: Não apresentar | |
66 | - //$bolFlagAberto && $bolAcaoProcedimentoEnviar && $objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo()!=ProtocoloRN::$NA_SIGILOSO | |
67 | - // if ($bolFlagAberto && $bolAcaoExpedirProcesso && $bolProcessoEstadoNormal && $objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo() != ProtocoloRN::$NA_SIGILOSO) { | |
68 | - $numTabBotao = $objPaginaSEI->getProxTabBarraComandosSuperior(); | |
69 | - $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>'; | |
70 | - //} | |
71 | - | |
72 | - /* if ($objProcedimentoDTO->getStrStaEstadoProtocolo() == ProtocoloRN::$TE_EM_PROCESSAMENTO) { | |
50 | + $objExpedirProcedimentoRN = new ExpedirProcedimentoRN(); | |
51 | + $objProcedimentoDTO = $objExpedirProcedimentoRN->consultarProcedimento($dblIdProcedimento); | |
73 | 52 | |
74 | - $objProcessoEletronicoRN = new ProcessoEletronicoRN(); | |
53 | + $bolProcessoEstadoNormal = !in_array($objProcedimentoDTO->getStrStaEstadoProtocolo(), array( | |
54 | + ProtocoloRN::$TE_PROCEDIMENTO_SOBRESTADO, | |
55 | + ProtocoloRN::$TE_PROCEDIMENTO_BLOQUEADO | |
56 | + )); | |
75 | 57 | |
76 | - if ($objProcessoEletronicoRN->isDisponivelCancelarTramite($objProcedimentoDTO->getStrProtocoloProcedimentoFormatado())) { | |
77 | - $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">'; | |
78 | - $strAcoesProcedimento .= '<img class="infraCorBarraSistema" src="' . $this->getDiretorioImagens() . '/sei_desanexar_processo.gif" alt="Cancelar Expedição" title="Cancelar Expedição" />'; | |
79 | - $strAcoesProcedimento .= '</a>'; | |
80 | - } | |
81 | - } | |
82 | - $objProcedimentoAndamentoDTO = new ProcedimentoAndamentoDTO(); | |
83 | - $objProcedimentoAndamentoDTO->setDblIdProcedimento($dblIdProcedimento); | |
84 | - | |
85 | - $objGenericoBD = new GenericoBD(BancoSEI::getInstance()); | |
86 | - | |
87 | - if ($objGenericoBD->contar($objProcedimentoAndamentoDTO) > 0) { | |
88 | - | |
89 | - $strAcoesProcedimento .= '<a href="' . $objSessaoSEI->assinarLink('controlador.php?acao=pen_procedimento_estado&acao_origem=procedimento_visualizar&acao_retorno=arvore_visualizar&id_procedimento=' . $dblIdProcedimento . '&arvore=1') . '" tabindex="' . $numTabBotao . '" class="botaoSEI">'; | |
90 | - $strAcoesProcedimento .= '<img class="infraCorBarraSistema" src="' . $this->getDiretorioImagens() . '/pen_consultar_recibos.png" alt="Consultar Recibos" title="Consultar Recibos"/>'; | |
91 | - $strAcoesProcedimento .= '</a>'; | |
92 | - } | |
93 | - | |
94 | - /* } catch (InfraException $e) { | |
95 | - LogSEI::getInstance()->gravar($e->getStrDescricao()); | |
96 | - } catch (Exception $e) { | |
97 | - LogSEI::getInstance()->gravar($e->getMessage()); | |
98 | - }*/ | |
58 | + //Apresenta o botão de expedir processo | |
59 | + if ($bolFlagAberto && $bolAcaoExpedirProcesso && $bolProcessoEstadoNormal && $objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo() != ProtocoloRN::$NA_SIGILOSO) { | |
60 | + $numTabBotao = $objPaginaSEI->getProxTabBarraComandosSuperior(); | |
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="Expedir Processo" title="Expedir Processo" /></a>'; | |
62 | + } | |
99 | 63 | |
64 | + //Apresenta o botão da página de recibos | |
65 | + $strAcoesProcedimento .= '<a href="' . $objSessaoSEI->assinarLink('controlador.php?acao=pen_procedimento_estado&acao_origem=procedimento_visualizar&acao_retorno=arvore_visualizar&id_procedimento=' . $dblIdProcedimento . '&arvore=1') . '" tabindex="' . $numTabBotao . '" class="botaoSEI">'; | |
66 | + $strAcoesProcedimento .= '<img class="infraCorBarraSistema" src="' . $this->getDiretorioImagens() . '/pen_consultar_recibos.png" alt="Consultar Recibos" title="Consultar Recibos"/>'; | |
67 | + $strAcoesProcedimento .= '</a>'; | |
68 | + | |
69 | + //Apresenta o botão de cancelar trâmite | |
70 | + if ($objProcessoEletronicoRN->isDisponivelCancelarTramite($objProcedimentoDTO->getStrProtocoloProcedimentoFormatado())) { | |
71 | + $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">'; | |
72 | + $strAcoesProcedimento .= '<img class="infraCorBarraSistema" src="' . $this->getDiretorioImagens() . '/sei_desanexar_processo.gif" alt="Cancelar Expedição" title="Cancelar Expedição" />'; | |
73 | + $strAcoesProcedimento .= '</a>'; | |
74 | + } | |
75 | + | |
100 | 76 | return array($strAcoesProcedimento); |
101 | 77 | } |
102 | 78 | |
103 | - | |
104 | 79 | public function montarIconeControleProcessos($arrObjProcedimentoAPI = array()) { |
105 | 80 | |
106 | 81 | $arrStrIcone = array(); |
... | ... | @@ -123,23 +98,18 @@ class PENIntegracao extends SeiIntegracao { |
123 | 98 | foreach ($arrObjProcedimentoDTO as $objProcedimentoDTO) { |
124 | 99 | |
125 | 100 | $dblIdProcedimento = $objProcedimentoDTO->getDblIdProcedimento(); |
101 | + $objPenProtocoloDTO = new PenProtocoloDTO(); | |
102 | + $objPenProtocoloDTO->setDblIdProtocolo($dblIdProcedimento); | |
103 | + $objPenProtocoloDTO->retStrSinObteveRecusa(); | |
104 | + $objPenProtocoloDTO->setNumMaxRegistrosRetorno(1); | |
126 | 105 | |
127 | - if ($objProcedimentoDTO->getStrStaEstadoProtocolo() == ProtocoloRN::$TE_PROCEDIMENTO_BLOQUEADO) { | |
128 | - $arrStrIcone[$dblIdProcedimento] = array('<img src="' . $this->getDiretorioImagens() . '/pen_em_processamento.png" title="Em Tramitação Externa" />'); | |
129 | - } else { | |
130 | - $objPenProtocoloDTO = new PenProtocoloDTO(); | |
131 | - $objPenProtocoloDTO->setDblIdProtocolo($dblIdProcedimento); | |
132 | - $objPenProtocoloDTO->retStrSinObteveRecusa(); | |
133 | - $objPenProtocoloDTO->setNumMaxRegistrosRetorno(1); | |
134 | - | |
135 | - $objProtocoloBD = new ProtocoloBD(BancoSEI::getInstance()); | |
136 | - $objPenProtocoloDTO = $objProtocoloBD->consultar($objPenProtocoloDTO); | |
137 | - | |
138 | - if (!empty($objPenProtocoloDTO) && $objPenProtocoloDTO->getStrSinObteveRecusa() == 'S') { | |
106 | + $objProtocoloBD = new ProtocoloBD(BancoSEI::getInstance()); | |
107 | + $objPenProtocoloDTO = $objProtocoloBD->consultar($objPenProtocoloDTO); | |
139 | 108 | |
140 | - $arrStrIcone[$dblIdProcedimento] = array('<img src="' . $this->getDiretorioImagens() . '/pen_tramite_recusado.png" title="Um trâmite para esse processo foi recusado" />'); | |
141 | - } | |
109 | + if (!empty($objPenProtocoloDTO) && $objPenProtocoloDTO->getStrSinObteveRecusa() == 'S') { | |
110 | + $arrStrIcone[$dblIdProcedimento] = array('<img src="' . $this->getDiretorioImagens() . '/pen_tramite_recusado.png" title="Um trâmite para esse processo foi recusado" />'); | |
142 | 111 | } |
112 | + | |
143 | 113 | } |
144 | 114 | } |
145 | 115 | |
... | ... | @@ -154,43 +124,52 @@ class PENIntegracao extends SeiIntegracao { |
154 | 124 | return static::getDiretorio() . '/imagens'; |
155 | 125 | } |
156 | 126 | |
157 | - public function montarMensagemSituacaoProcedimento(ProcedimentoDTO $objProcedimentoDTO) { | |
158 | - if ($objProcedimentoDTO->getStrStaEstadoProtocolo() == ProtocoloRN::$TE_EM_PROCESSAMENTO || $objProcedimentoDTO->getStrStaEstadoProtocolo() == ProtocoloRN::$TE_BLOQUEADO) { | |
127 | + public function montarMensagemProcesso(ProcedimentoAPI $objProcedimentoAPI) { | |
128 | + | |
129 | + $objProcedimentoDTO = new ProcedimentoDTO(); | |
130 | + $objProcedimentoDTO->setDblIdProcedimento($objProcedimentoAPI->getIdProcedimento()); | |
131 | + $objProcedimentoDTO->retStrStaEstadoProtocolo(); | |
132 | + $objProcedimentoDTO->retDblIdProcedimento(); | |
133 | + | |
134 | + $objProcedimentoRN = new ProcedimentoRN(); | |
135 | + $objProcedimentoDTO = $objProcedimentoRN->consultarRN0201($objProcedimentoDTO); | |
136 | + | |
137 | + if ($objProcedimentoDTO->getStrStaEstadoProtocolo() == ProtocoloRN::$TE_PROCEDIMENTO_BLOQUEADO) { | |
138 | + | |
159 | 139 | $objAtividadeDTO = new AtividadeDTO(); |
160 | 140 | $objAtividadeDTO->setDblIdProtocolo($objProcedimentoDTO->getDblIdProcedimento()); |
141 | + $objAtividadeDTO->setNumIdTarefa( | |
142 | + array(ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO), | |
143 | + ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_RECEBIDO)), | |
144 | + InfraDTO::$OPER_IN); | |
145 | + $objAtividadeDTO->setNumMaxRegistrosRetorno(1); | |
146 | + $objAtividadeDTO->setOrdDthAbertura(InfraDTO::$TIPO_ORDENACAO_DESC); | |
161 | 147 | $objAtividadeDTO->retNumIdAtividade(); |
162 | - | |
148 | + $objAtividadeDTO->retNumIdTarefa(); | |
149 | + | |
163 | 150 | $objAtividadeRN = new AtividadeRN(); |
164 | 151 | $arrAtividadeDTO = (array) $objAtividadeRN->listarRN0036($objAtividadeDTO); |
165 | 152 | |
166 | - if (empty($arrAtividadeDTO)) { | |
167 | - | |
168 | - throw new InfraException('Não foi possivel localizar as atividades executadas nesse procedimento'); | |
169 | - } | |
170 | - | |
171 | - $objFiltroAtributoAndamentoDTO = new AtributoAndamentoDTO(); | |
172 | - $objFiltroAtributoAndamentoDTO->setStrNome('UNIDADE_DESTINO'); | |
173 | - $objFiltroAtributoAndamentoDTO->retStrValor(); | |
174 | - $objFiltroAtributoAndamentoDTO->setOrdNumIdAtributoAndamento(InfraDTO::$TIPO_ORDENACAO_DESC); | |
175 | - | |
176 | - $objAtributoAndamentoRN = new AtributoAndamentoRN(); | |
177 | - $objAtributoAndamentoFinal = null; | |
178 | - | |
179 | - foreach ($arrAtividadeDTO as $objAtividadeDTO) { | |
180 | - | |
181 | - $objFiltroAtributoAndamentoDTO->setNumIdAtividade($objAtividadeDTO->getNumIdAtividade()); | |
182 | - $objAtributoAndamentoDTO = $objAtributoAndamentoRN->consultarRN1366($objFiltroAtributoAndamentoDTO); | |
183 | - | |
184 | - if (!empty($objAtributoAndamentoDTO)) { | |
185 | - $objAtributoAndamentoFinal = $objAtributoAndamentoDTO; | |
153 | + if (isset($arrAtividadeDTO[0])) { | |
154 | + $objAtividadeDTO = $arrAtividadeDTO[0]; | |
155 | + | |
156 | + if($objAtividadeDTO->getNumIdTarefa() == ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO)){ | |
157 | + | |
158 | + $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); | |
159 | + $objAtributoAndamentoDTO->setStrNome('UNIDADE_DESTINO'); | |
160 | + $objAtributoAndamentoDTO->setNumIdAtividade($objAtividadeDTO->getNumIdAtividade()); | |
161 | + $objAtributoAndamentoDTO->retStrValor(); | |
162 | + | |
163 | + $objAtributoAndamentoRN = new AtributoAndamentoRN(); | |
164 | + $objAtributoAndamentoDTO = $objAtributoAndamentoRN->consultarRN1366($objAtributoAndamentoDTO); | |
165 | + | |
166 | + return sprintf('Processo em trâmite externo para "%s".', $objAtributoAndamentoDTO->getStrValor()); | |
167 | + | |
168 | + | |
186 | 169 | } |
170 | + | |
187 | 171 | } |
188 | - $objAtributoAndamentoDTO = $objAtributoAndamentoFinal; | |
189 | - | |
190 | - //@TODOJOIN: Retirar esse array_pop(array_pop) pois a versão 5.6 não permite realizar esse tipo de aninhamento. | |
191 | - $strUnidadeDestino = array_pop(array_pop(PaginaSEI::getInstance()->getArrOptionsSelect($objAtributoAndamentoDTO->getStrValor()))); | |
192 | 172 | |
193 | - return "<br/>" . sprintf('Processo em trâmite externo para "%s".', $strUnidadeDestino); | |
194 | 173 | } |
195 | 174 | } |
196 | 175 | ... | ... |
bd/TramiteBD.php
dto/ProcessoExpedidoDTO.php
... | ... | @@ -40,8 +40,8 @@ class ProcessoExpedidoDTO extends InfraDTO { |
40 | 40 | $this->configurarFK('IdUsuario', 'usuario', 'id_usuario'); |
41 | 41 | $this->configurarFK('IdAtividade', 'atributo_andamento', 'id_atividade'); |
42 | 42 | |
43 | - $this->setStrStaEstado(ProtocoloRN::$TE_BLOQUEADO); | |
44 | - $this->setNumTarefa(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO); | |
43 | + //$this->setStrStaEstado(ProtocoloRN::$TE_PROCEDIMENTO_BLOQUEADO); | |
44 | + //$this->setNumTarefa(ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO)); | |
45 | 45 | $this->setOrd('Expedido', InfraDTO::$TIPO_ORDENACAO_DESC); |
46 | 46 | } |
47 | 47 | } | ... | ... |
dto/ReceberTramiteRecusadoDTO.php
1 | 1 | <?php |
2 | 2 | |
3 | -require_once dirname(__FILE__).'/../../../SEI.php'; | |
3 | +require_once dirname(__FILE__) . '/../../../SEI.php'; | |
4 | 4 | |
5 | 5 | class ReceberTramiteRecusadoDTO extends InfraDTO { |
6 | 6 | |
7 | 7 | public function getStrNomeTabela() { |
8 | - return 'md_pen_tramite_recusado'; | |
8 | + return null; | |
9 | 9 | } |
10 | 10 | |
11 | 11 | public function montar() { |
12 | - | |
13 | - $this->adicionarAtributo(InfraDTO::$PREFIXO_DBL, 'IdTramite', 'id_tramite'); | |
14 | - $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'Registro', 'numero_registro'); | |
15 | 12 | |
16 | - $this->configurarPK('IdTramite', InfraDTO::$TIPO_PK_INFORMADO); | |
13 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdTramite', 'id_tramite'); | |
14 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdProtocolo', 'id_protocolo'); | |
15 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdUnidadeOrigem', 'id_unidade_origem'); | |
16 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdTarefa', 'id_tarefa'); | |
17 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'MotivoRecusa', 'motivo_recusa'); | |
18 | + $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'NomeUnidadeDestino', 'nome_unidade_destino'); | |
19 | + | |
17 | 20 | } |
21 | + | |
18 | 22 | } | ... | ... |
dto/TramiteDTO.php
... | ... | @@ -2,22 +2,29 @@ |
2 | 2 | |
3 | 3 | class TramiteDTO extends InfraDTO { |
4 | 4 | |
5 | - public function getStrNomeTabela() { | |
6 | - return 'md_pen_tramite'; | |
7 | - } | |
5 | + public function getStrNomeTabela() { | |
6 | + return 'md_pen_tramite'; | |
7 | + } | |
8 | 8 | |
9 | - public function montar() { | |
9 | + public function montar() { | |
10 | 10 | $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'NumeroRegistro', 'numero_registro'); |
11 | 11 | $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdTramite', 'id_tramite'); |
12 | 12 | $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'TicketEnvioComponentes', 'ticket_envio_componentes'); |
13 | 13 | $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_DTH, 'Registro', 'dth_registro'); |
14 | 14 | $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdAndamento', 'id_andamento'); |
15 | - | |
15 | + $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdUsuario', 'id_usuario'); | |
16 | + $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdUnidade', 'id_unidade'); | |
16 | 17 | $this->adicionarAtributo(InfraDTO::$PREFIXO_ARR, 'ObjComponenteDigitalDTO'); |
17 | - | |
18 | + | |
19 | + $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'NomeUsuario', 'nome', 'usuario'); | |
20 | + $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'NomeUnidade', 'nome', 'unidade'); | |
21 | + | |
18 | 22 | $this->configurarPK('NumeroRegistro', InfraDTO::$TIPO_PK_INFORMADO); |
19 | 23 | $this->configurarPK('IdTramite', InfraDTO::$TIPO_PK_INFORMADO); |
24 | + | |
20 | 25 | $this->configurarFK('NumeroRegistro', 'md_pen_tramite', 'numero_registro', InfraDTO::$TIPO_FK_OBRIGATORIA); |
26 | + $this->configurarFK('IdUsuario', 'usuario u', 'u.id_usuario'); | |
27 | + $this->configurarFK('IdUnidade', 'unidade u', 'u.id_unidade'); | |
21 | 28 | } |
22 | 29 | |
23 | 30 | } | ... | ... |
pen_procedimento_estado.php
... | ... | @@ -211,7 +211,7 @@ try { |
211 | 211 | |
212 | 212 | // @join_tec US008.03 (#23092) | @join_tec US008.13 (#23092) |
213 | 213 | |
214 | - if($numTarefa == ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO){ | |
214 | + if($numTarefa == ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO)){ | |
215 | 215 | $strResultado .= '<a href="'.$objSessaoSEI->assinarLink($strProprioLink.'&metodo=baixarReciboEnvio&id_tarefa='.$numTarefa.'&id_tramite='.$dblIdTramite).'"><img class="infraImg" src="'.PENIntegracao::getDiretorio().'/imagens/page_red.png" alt="Recibo de Confirmação de Envio" title="Recibo de Confirmação de Envio" /></a>'; |
216 | 216 | } |
217 | 217 | // @join_tec US008.01 (#23092) | ... | ... |
pen_procedimento_expedido_listar.php
1 | -<?php | |
2 | -/** | |
3 | - * @author Join Tecnologia | |
4 | - */ | |
5 | -require_once dirname(__FILE__) . '/../../SEI.php'; | |
6 | - | |
7 | -try { | |
8 | - | |
9 | - session_start(); | |
10 | - | |
11 | - $objPaginaSEI = PaginaSEI::getInstance(); | |
12 | - $objSessaoSEI = SessaoSEI::getInstance(); | |
13 | - | |
14 | - $objSessaoSEI->validarLink(); | |
15 | - $objSessaoSEI->validarPermissao($_GET['acao']); | |
16 | - $arrComandos = array(); | |
17 | - | |
18 | - $strTitulo = 'Processos Expedidos'; | |
19 | - | |
20 | - $objFiltroDTO = new ProtocoloDTO(); | |
21 | - $objFiltroDTO->setStrStaEstado(ProtocoloRN::$TE_BLOQUEADO); | |
22 | - $objFiltroDTO->setNumIdTarefaAtividade(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO); | |
23 | - // $objFiltroDTO->setDistinct(true); | |
24 | - $objFiltroDTO->retDblIdProtocolo(); | |
25 | - $objFiltroDTO->retStrProtocoloFormatado(); | |
26 | - | |
27 | - // Verificar no DTO sobre funções de agragação para clausula DISTINCT | |
28 | - if(get_parent_class(BancoSEI::getInstance()) != 'InfraMySqli') { | |
29 | - $objFiltroDTO->retDthConclusaoAtividade(); | |
30 | - } | |
31 | - $objPaginaSEI->prepararPaginacao($objFiltroDTO, 10); | |
32 | - $objPaginaSEI->prepararOrdenacao($objFiltroDTO, 'ConclusaoAtividade', InfraDTO::$TIPO_ORDENACAO_DESC); | |
33 | - | |
34 | - BancoSEI::getInstance()->abrirConexao(); | |
35 | - | |
36 | - $objProtocoloBD = new ProtocoloBD(BancoSEI::getInstance()); | |
37 | - $arrObjFiltroDTO = $objProtocoloBD->listar($objFiltroDTO); | |
38 | - | |
39 | - $arrObjProcessoExpedidoDTO = array(); | |
40 | - $numRegistros = 0; | |
41 | - | |
42 | - if(!empty($arrObjFiltroDTO)) { | |
43 | - | |
44 | - $arrIdProtocolo = InfraArray::converterArrInfraDTO($arrObjFiltroDTO, 'IdProtocolo'); | |
45 | - | |
46 | - $objProcessoExpedido = new ProcessoExpedidoDTO(); | |
47 | - $objProcessoExpedido->setDblIdProtocolo($arrIdProtocolo, InfraDTO::$OPER_IN); | |
48 | - $objProcessoExpedido->retTodos(); | |
49 | - | |
50 | - $objGenericoBD = new ProcessoExpedidoBD(BancoSEI::getInstance()); | |
51 | - $arrObjProcessoExpedidoDTO = $objGenericoBD->listar($objProcessoExpedido); | |
52 | - | |
53 | - if(!empty($arrObjProcessoExpedidoDTO)) { | |
54 | - | |
55 | - $arrObjProcessoExpedidoDTO = InfraArray::distinctArrInfraDTO($arrObjProcessoExpedidoDTO, 'IdProtocolo'); | |
56 | - | |
57 | - $numRegistros = count($arrObjProcessoExpedidoDTO); | |
58 | - } | |
59 | - } | |
60 | - | |
61 | - $objPaginaSEI->processarPaginacao($objFiltroDTO); | |
62 | - | |
63 | - if (!empty($arrObjProcessoExpedidoDTO)) { | |
64 | - | |
65 | - $arrComandos[] = '<button type="button" accesskey="I" id="btnImprimir" value="Imprimir" onclick="infraImprimirTabela();" class="infraButton"><span class="infraTeclaAtalho">I</span>mprimir</button>'; | |
66 | - | |
67 | - $strSumarioTabela = 'Tabela de Processos.'; | |
68 | - $strCaptionTabela = 'Processos'; | |
69 | - | |
70 | - $strResultado .= '<table width="99%" class="infraTable" summary="' . $strSumarioTabela . '">' . "\n"; | |
71 | - $strResultado .= '<caption class="infraCaption">' . $objPaginaSEI->gerarCaptionTabela($strCaptionTabela, $numRegistros) . '</caption>'; | |
72 | - $strResultado .= '<tr>'; | |
73 | - $strResultado .= '<th class="infraTh" width="1%">' . $objPaginaSEI->getThCheck() . '</th>' . "\n"; | |
74 | - $strResultado .= '<th class="infraTh">Processo</th>' . "\n"; | |
75 | - $strResultado .= '<th class="infraTh">Usuário</th>' . "\n"; | |
76 | - $strResultado .= '<th class="infraTh">Data de Expedição</th>' . "\n"; | |
77 | - $strResultado .= '<th class="infraTh">Unidade Destino</th>' . "\n"; | |
78 | - $strResultado .= '</tr>' . "\n"; | |
79 | - $strCssTr = ''; | |
80 | - | |
81 | - $numIndice = 1; | |
82 | - | |
83 | - foreach($arrObjProcessoExpedidoDTO as $objProcessoExpedidoDTO) { | |
84 | - | |
85 | - $strCssTr = ($strCssTr == '<tr class="infraTrClara">') ? '<tr class="infraTrEscura">' : '<tr class="infraTrClara">'; | |
86 | - $strResultado .= $strCssTr; | |
87 | - | |
88 | - $strResultado .= '<td valign="top">'.$objPaginaSEI->getTrCheck($numIndice,$objProcessoExpedidoDTO->getDblIdProtocolo(),$objProcessoExpedidoDTO->getStrProtocoloFormatado()).'</td>'."\n"; | |
89 | - $strResultado .= '<td width="17%" align="center"><a onclick="abrirProcesso(\'' .$objPaginaSEI->formatarXHTML($objSessaoSEI->assinarLink('controlador.php?acao=procedimento_trabalhar&acao_origem=' . $_GET['acao'] . '&acao_retorno=' . $_GET['acao'] . '&id_procedimento=' . $objProcessoExpedidoDTO->getDblIdProtocolo())).'\');" tabindex="' . $objPaginaSEI->getProxTabTabela() . '" title="" class="protocoloNormal" style="font-size:1em !important;">'.$objProcessoExpedidoDTO->getStrProtocoloFormatado().'</a></td>' . "\n"; | |
90 | - $strResultado .= '<td align="center"><a alt="Teste" title="Teste" class="ancoraSigla">' . $objProcessoExpedidoDTO->getStrNomeUsuario() . '</a></td>'; | |
91 | - $strResultado .= '<td width="17%" align="center">' . $objProcessoExpedidoDTO->getDthExpedido() . '</td>'; | |
92 | - $strResultado .= '<td align="left">' . $objProcessoExpedidoDTO->getStrDestino(); | |
93 | - | |
94 | - | |
95 | - if ($bolAcaoRemoverSobrestamento) { | |
96 | - $strResultado .= '<a href="' . $objPaginaSEI->montarAncora($objProcessoExpedidoDTO->getDblIdProtocolo()) . '" onclick="acaoRemoverSobrestamento(\'' . $objProcessoExpedidoDTO->getDblIdProtocolo() . '\',\'' . $objProcessoExpedidoDTO->getStrProtocoloFormatado() . '\');" tabindex="' . $objPaginaSEI->getProxTabTabela() . '"><img src="imagens/sei_remover_sobrestamento_processo_pequeno.gif" title="Remover Sobrestamento" alt="Remover Sobrestamento" class="infraImg" /></a> '; | |
97 | - } | |
98 | - | |
99 | - $strResultado .= '</td></tr>' . "\n"; | |
100 | - | |
101 | - $numIndice++; | |
102 | - } | |
103 | - $strResultado .= '</table>'; | |
104 | - } | |
105 | -} | |
106 | -catch (Exception $e) { | |
107 | - $objPaginaSEI->processarExcecao($e); | |
108 | -} | |
109 | - | |
110 | - | |
111 | - | |
112 | -$objPaginaSEI->montarDocType(); | |
113 | -$objPaginaSEI->abrirHtml(); | |
114 | -$objPaginaSEI->abrirHead(); | |
115 | -$objPaginaSEI->montarMeta(); | |
116 | -$objPaginaSEI->montarTitle(':: ' . $objPaginaSEI->getStrNomeSistema() . ' - ' . $strTitulo . ' ::'); | |
117 | -$objPaginaSEI->montarStyle(); | |
118 | -?> | |
119 | -<style type="text/css"> | |
120 | - | |
121 | -table.tabelaProcessos { | |
122 | - background-color:white; | |
123 | - border:0px solid white; | |
124 | - border-spacing:.1em; | |
125 | -} | |
126 | - | |
127 | -table.tabelaProcessos tr{ | |
128 | - margin:0; | |
129 | - border:0; | |
130 | - padding:0; | |
131 | -} | |
132 | - | |
133 | -table.tabelaProcessos img{ | |
134 | - width:1.1em; | |
135 | - height:1.1em; | |
136 | -} | |
137 | - | |
138 | -table.tabelaProcessos a{ | |
139 | - text-decoration:none; | |
140 | -} | |
141 | - | |
142 | -table.tabelaProcessos a:hover{ | |
143 | - text-decoration:underline; | |
144 | -} | |
145 | - | |
146 | - | |
147 | -table.tabelaProcessos caption{ | |
148 | - font-size: 1em; | |
149 | - text-align: right; | |
150 | - color: #666; | |
151 | -} | |
152 | - | |
153 | -th.tituloProcessos{ | |
154 | - font-size:1em; | |
155 | - font-weight: bold; | |
156 | - text-align: center; | |
157 | - color: #000; | |
158 | - background-color: #dfdfdf; | |
159 | - border-spacing: 0; | |
160 | -} | |
161 | - | |
162 | -a.processoNaoVisualizado{ | |
163 | - color:red; | |
164 | -} | |
165 | - | |
166 | -#divTabelaRecebido { | |
167 | - margin:2em; | |
168 | - float:left; | |
169 | - display:inline; | |
170 | - width:40%; | |
171 | -} | |
172 | - | |
173 | -#divTabelaRecebido table{ | |
174 | - width:100%; | |
175 | -} | |
176 | - | |
177 | -#divTabelaGerado { | |
178 | - margin:2em; | |
179 | - float:right; | |
180 | - display:inline; | |
181 | - width:40%; | |
182 | -} | |
183 | - | |
184 | -#divTabelaGerado table{ | |
185 | - width:100%; | |
186 | -} | |
187 | -</style> | |
188 | -<?php $objPaginaSEI->montarJavaScript(); ?> | |
189 | -<script type="text/javascript"> | |
190 | - | |
191 | -function inicializar(){ | |
192 | - | |
193 | - infraEfeitoTabelas(); | |
194 | -} | |
195 | - | |
196 | -function abrirProcesso(link){ | |
197 | - document.getElementById('divInfraBarraComandosSuperior').style.visibility = 'hidden'; | |
198 | - document.getElementById('divInfraAreaTabela').style.visibility = 'hidden'; | |
199 | - infraOcultarMenuSistemaEsquema(); | |
200 | - document.getElementById('frmProcedimentoExpedido').action = link; | |
201 | - document.getElementById('frmProcedimentoExpedido').submit(); | |
202 | -} | |
203 | -</script> | |
204 | -<?php | |
205 | -$objPaginaSEI->fecharHead(); | |
206 | -$objPaginaSEI->abrirBody($strTitulo, 'onload="inicializar();"'); | |
207 | -?> | |
208 | -<form id="frmProcedimentoExpedido" method="post" action="<?= $objPaginaSEI->formatarXHTML($objSessaoSEI->assinarLink('controlador.php?acao=' . $_GET['acao'] . '&acao_origem=' . $_GET['acao'])) ?>"> | |
209 | -<?php | |
210 | - $objPaginaSEI->montarBarraComandosSuperior($arrComandos); | |
211 | - $objPaginaSEI->montarAreaTabela($strResultado, $numRegistros, true); | |
212 | - $objPaginaSEI->montarBarraComandosInferior($arrComandos); | |
213 | -?> | |
214 | -</form> | |
215 | -<?php | |
216 | -$objPaginaSEI->fecharBody(); | |
217 | -$objPaginaSEI->fecharHtml(); | |
218 | 1 | \ No newline at end of file |
2 | +<?php | |
3 | +/** | |
4 | + * @author Join Tecnologia | |
5 | + */ | |
6 | +require_once dirname(__FILE__) . '/../../SEI.php'; | |
7 | + | |
8 | +try { | |
9 | + | |
10 | + session_start(); | |
11 | + | |
12 | + $objPaginaSEI = PaginaSEI::getInstance(); | |
13 | + $objSessaoSEI = SessaoSEI::getInstance(); | |
14 | + | |
15 | + $objSessaoSEI->validarLink(); | |
16 | + $objSessaoSEI->validarPermissao($_GET['acao']); | |
17 | + $arrComandos = array(); | |
18 | + | |
19 | + $strTitulo = 'Processos Expedidos'; | |
20 | + | |
21 | + $objFiltroDTO = new ProtocoloDTO(); | |
22 | + $objFiltroDTO->setStrStaEstado(ProtocoloRN::$TE_PROCEDIMENTO_BLOQUEADO); | |
23 | + $objFiltroDTO->retDblIdProtocolo(); | |
24 | + $objFiltroDTO->retStrProtocoloFormatado(); | |
25 | + | |
26 | + // Verificar no DTO sobre funções de agragação para clausula DISTINCT | |
27 | + if(get_parent_class(BancoSEI::getInstance()) != 'InfraMySqli') { | |
28 | + $objFiltroDTO->retDthConclusaoAtividade(); | |
29 | + } | |
30 | + $objPaginaSEI->prepararPaginacao($objFiltroDTO, 10); | |
31 | + | |
32 | + BancoSEI::getInstance()->abrirConexao(); | |
33 | + | |
34 | + $objProcessoExpedidoRN = new ProcessoExpedidoRN(); | |
35 | + $arrObjProcessoExpedidoDTO = $objProcessoExpedidoRN->listarProcessoExpedido($objFiltroDTO); | |
36 | + | |
37 | + $numRegistros = 0; | |
38 | + | |
39 | + if(!empty($arrObjProcessoExpedidoDTO)) { | |
40 | + | |
41 | + $arrObjProcessoExpedidoDTO = InfraArray::distinctArrInfraDTO($arrObjProcessoExpedidoDTO, 'IdProtocolo'); | |
42 | + | |
43 | + $numRegistros = count($arrObjProcessoExpedidoDTO); | |
44 | + } | |
45 | + | |
46 | + $objPaginaSEI->processarPaginacao($objFiltroDTO); | |
47 | + | |
48 | + if (!empty($arrObjProcessoExpedidoDTO)) { | |
49 | + | |
50 | + $arrComandos[] = '<button type="button" accesskey="I" id="btnImprimir" value="Imprimir" onclick="infraImprimirTabela();" class="infraButton"><span class="infraTeclaAtalho">I</span>mprimir</button>'; | |
51 | + | |
52 | + $strSumarioTabela = 'Tabela de Processos.'; | |
53 | + $strCaptionTabela = 'Processos'; | |
54 | + | |
55 | + $strResultado .= '<table width="99%" class="infraTable" summary="' . $strSumarioTabela . '">' . "\n"; | |
56 | + $strResultado .= '<caption class="infraCaption">' . $objPaginaSEI->gerarCaptionTabela($strCaptionTabela, $numRegistros) . '</caption>'; | |
57 | + $strResultado .= '<tr>'; | |
58 | + $strResultado .= '<th class="infraTh" width="1%">' . $objPaginaSEI->getThCheck() . '</th>' . "\n"; | |
59 | + $strResultado .= '<th class="infraTh">Processo</th>' . "\n"; | |
60 | + $strResultado .= '<th class="infraTh">Usuário</th>' . "\n"; | |
61 | + $strResultado .= '<th class="infraTh">Data de Expedição</th>' . "\n"; | |
62 | + $strResultado .= '<th class="infraTh">Unidade Destino</th>' . "\n"; | |
63 | + $strResultado .= '</tr>' . "\n"; | |
64 | + $strCssTr = ''; | |
65 | + | |
66 | + $numIndice = 1; | |
67 | + | |
68 | + foreach($arrObjProcessoExpedidoDTO as $objProcessoExpedidoDTO) { | |
69 | + | |
70 | + $strCssTr = ($strCssTr == '<tr class="infraTrClara">') ? '<tr class="infraTrEscura">' : '<tr class="infraTrClara">'; | |
71 | + $strResultado .= $strCssTr; | |
72 | + | |
73 | + $strResultado .= '<td valign="top">'.$objPaginaSEI->getTrCheck($numIndice,$objProcessoExpedidoDTO->getDblIdProtocolo(),$objProcessoExpedidoDTO->getStrProtocoloFormatado()).'</td>'."\n"; | |
74 | + $strResultado .= '<td width="17%" align="center"><a onclick="abrirProcesso(\'' .$objPaginaSEI->formatarXHTML($objSessaoSEI->assinarLink('controlador.php?acao=procedimento_trabalhar&acao_origem=' . $_GET['acao'] . '&acao_retorno=' . $_GET['acao'] . '&id_procedimento=' . $objProcessoExpedidoDTO->getDblIdProtocolo())).'\');" tabindex="' . $objPaginaSEI->getProxTabTabela() . '" title="" class="protocoloNormal" style="font-size:1em !important;">'.$objProcessoExpedidoDTO->getStrProtocoloFormatado().'</a></td>' . "\n"; | |
75 | + $strResultado .= '<td align="center"><a alt="Teste" title="Teste" class="ancoraSigla">' . $objProcessoExpedidoDTO->getStrNomeUsuario() . '</a></td>'; | |
76 | + $strResultado .= '<td width="17%" align="center">' . $objProcessoExpedidoDTO->getDthExpedido() . '</td>'; | |
77 | + $strResultado .= '<td align="left">' . $objProcessoExpedidoDTO->getStrDestino(); | |
78 | + | |
79 | + | |
80 | + if ($bolAcaoRemoverSobrestamento) { | |
81 | + $strResultado .= '<a href="' . $objPaginaSEI->montarAncora($objProcessoExpedidoDTO->getDblIdProtocolo()) . '" onclick="acaoRemoverSobrestamento(\'' . $objProcessoExpedidoDTO->getDblIdProtocolo() . '\',\'' . $objProcessoExpedidoDTO->getStrProtocoloFormatado() . '\');" tabindex="' . $objPaginaSEI->getProxTabTabela() . '"><img src="imagens/sei_remover_sobrestamento_processo_pequeno.gif" title="Remover Sobrestamento" alt="Remover Sobrestamento" class="infraImg" /></a> '; | |
82 | + } | |
83 | + | |
84 | + $strResultado .= '</td></tr>' . "\n"; | |
85 | + | |
86 | + $numIndice++; | |
87 | + } | |
88 | + $strResultado .= '</table>'; | |
89 | + } | |
90 | +} | |
91 | +catch (Exception $e) { | |
92 | + $objPaginaSEI->processarExcecao($e); | |
93 | +} | |
94 | + | |
95 | + | |
96 | + | |
97 | +$objPaginaSEI->montarDocType(); | |
98 | +$objPaginaSEI->abrirHtml(); | |
99 | +$objPaginaSEI->abrirHead(); | |
100 | +$objPaginaSEI->montarMeta(); | |
101 | +$objPaginaSEI->montarTitle(':: ' . $objPaginaSEI->getStrNomeSistema() . ' - ' . $strTitulo . ' ::'); | |
102 | +$objPaginaSEI->montarStyle(); | |
103 | +?> | |
104 | +<style type="text/css"> | |
105 | + | |
106 | +table.tabelaProcessos { | |
107 | + background-color:white; | |
108 | + border:0px solid white; | |
109 | + border-spacing:.1em; | |
110 | +} | |
111 | + | |
112 | +table.tabelaProcessos tr{ | |
113 | + margin:0; | |
114 | + border:0; | |
115 | + padding:0; | |
116 | +} | |
117 | + | |
118 | +table.tabelaProcessos img{ | |
119 | + width:1.1em; | |
120 | + height:1.1em; | |
121 | +} | |
122 | + | |
123 | +table.tabelaProcessos a{ | |
124 | + text-decoration:none; | |
125 | +} | |
126 | + | |
127 | +table.tabelaProcessos a:hover{ | |
128 | + text-decoration:underline; | |
129 | +} | |
130 | + | |
131 | + | |
132 | +table.tabelaProcessos caption{ | |
133 | + font-size: 1em; | |
134 | + text-align: right; | |
135 | + color: #666; | |
136 | +} | |
137 | + | |
138 | +th.tituloProcessos{ | |
139 | + font-size:1em; | |
140 | + font-weight: bold; | |
141 | + text-align: center; | |
142 | + color: #000; | |
143 | + background-color: #dfdfdf; | |
144 | + border-spacing: 0; | |
145 | +} | |
146 | + | |
147 | +a.processoNaoVisualizado{ | |
148 | + color:red; | |
149 | +} | |
150 | + | |
151 | +#divTabelaRecebido { | |
152 | + margin:2em; | |
153 | + float:left; | |
154 | + display:inline; | |
155 | + width:40%; | |
156 | +} | |
157 | + | |
158 | +#divTabelaRecebido table{ | |
159 | + width:100%; | |
160 | +} | |
161 | + | |
162 | +#divTabelaGerado { | |
163 | + margin:2em; | |
164 | + float:right; | |
165 | + display:inline; | |
166 | + width:40%; | |
167 | +} | |
168 | + | |
169 | +#divTabelaGerado table{ | |
170 | + width:100%; | |
171 | +} | |
172 | +</style> | |
173 | +<?php $objPaginaSEI->montarJavaScript(); ?> | |
174 | +<script type="text/javascript"> | |
175 | + | |
176 | +function inicializar(){ | |
177 | + | |
178 | + infraEfeitoTabelas(); | |
179 | +} | |
180 | + | |
181 | +function abrirProcesso(link){ | |
182 | + document.getElementById('divInfraBarraComandosSuperior').style.visibility = 'hidden'; | |
183 | + document.getElementById('divInfraAreaTabela').style.visibility = 'hidden'; | |
184 | + infraOcultarMenuSistemaEsquema(); | |
185 | + document.getElementById('frmProcedimentoExpedido').action = link; | |
186 | + document.getElementById('frmProcedimentoExpedido').submit(); | |
187 | +} | |
188 | +</script> | |
189 | +<?php | |
190 | +$objPaginaSEI->fecharHead(); | |
191 | +$objPaginaSEI->abrirBody($strTitulo, 'onload="inicializar();"'); | |
192 | +?> | |
193 | +<form id="frmProcedimentoExpedido" method="post" action="<?= $objPaginaSEI->formatarXHTML($objSessaoSEI->assinarLink('controlador.php?acao=' . $_GET['acao'] . '&acao_origem=' . $_GET['acao'])) ?>"> | |
194 | +<?php | |
195 | + $objPaginaSEI->montarBarraComandosSuperior($arrComandos); | |
196 | + $objPaginaSEI->montarAreaTabela($strResultado, $numRegistros, true); | |
197 | + $objPaginaSEI->montarBarraComandosInferior($arrComandos); | |
198 | +?> | |
199 | +</form> | |
200 | +<?php | |
201 | +$objPaginaSEI->fecharBody(); | |
202 | +$objPaginaSEI->fecharHtml(); | ... | ... |
rn/ExpedirProcedimentoRN.php
... | ... | @@ -238,9 +238,6 @@ class ExpedirProcedimentoRN extends InfraRN { |
238 | 238 | $this->receberReciboDeEnvio($objTramite->IDT); |
239 | 239 | } |
240 | 240 | catch (\Exception $e) { |
241 | - echo "<pre>"; | |
242 | - var_dump($e); | |
243 | - die("</pre>"); | |
244 | 241 | $this->desbloquearProcessoExpedicao($objProcesso->idProcedimentoSEI); |
245 | 242 | $this->registrarAndamentoExpedicaoAbortada($objProtocolo->idProcedimentoSEI); |
246 | 243 | |
... | ... | @@ -343,7 +340,7 @@ class ExpedirProcedimentoRN extends InfraRN { |
343 | 340 | // Consultar se processo eletrônico existe no PEN algum trâmite CANCELADO, caso |
344 | 341 | // sim deve ser gerada uma nova NRE, pois a atual será recusada pelo PEN quando |
345 | 342 | // for enviado |
346 | - if(!InfraString::isBolVazia($strNumeroRegistro)) { | |
343 | + /* if(!InfraString::isBolVazia($strNumeroRegistro)) { | |
347 | 344 | $arrObjTramite = $this->objProcessoEletronicoRN->consultarTramites(null, $strNumeroRegistro); |
348 | 345 | if(!empty($arrObjTramite) && is_array($arrObjTramite) && count($arrObjTramite) === 1) { |
349 | 346 | $objTramite = current($arrObjTramite); |
... | ... | @@ -351,8 +348,9 @@ class ExpedirProcedimentoRN extends InfraRN { |
351 | 348 | $strNumeroRegistro = null; |
352 | 349 | } |
353 | 350 | } |
354 | - } | |
351 | + } */ | |
355 | 352 | |
353 | + | |
356 | 354 | return $this->objProcessoEletronicoRN->construirCabecalho( |
357 | 355 | //TODO: Desabilitado consulta do NRE para questões de teste |
358 | 356 | $strNumeroRegistro, |
... | ... | @@ -1367,7 +1365,7 @@ class ExpedirProcedimentoRN extends InfraRN { |
1367 | 1365 | if(!isset($strProtocolo)){ |
1368 | 1366 | throw new InfraException('Parâmetro $strProtocolo não informado.'); |
1369 | 1367 | } |
1370 | - | |
1368 | + | |
1371 | 1369 | //Obter dados dos componetes digitais |
1372 | 1370 | $objComponenteDigitalBD = new ComponenteDigitalBD($this->getObjInfraIBanco()); |
1373 | 1371 | $objComponenteDigitalDTO = new ComponenteDigitalDTO(); |
... | ... | @@ -1377,7 +1375,7 @@ class ExpedirProcedimentoRN extends InfraRN { |
1377 | 1375 | $objComponenteDigitalDTO->setOrdNumOrdem(InfraDTO::$TIPO_ORDENACAO_ASC); |
1378 | 1376 | $objComponenteDigitalDTO->retDblIdDocumento(); |
1379 | 1377 | $objComponenteDigitalDTO->retNumTicketEnvioComponentes(); |
1380 | - $objComponenteDigitalDTO->retStrConteudoAssinaturaDocumento(); | |
1378 | + // $objComponenteDigitalDTO->retStrConteudoAssinaturaDocumento(); | |
1381 | 1379 | $objComponenteDigitalDTO->retStrProtocoloDocumentoFormatado(); |
1382 | 1380 | $objComponenteDigitalDTO->retStrHashConteudo(); |
1383 | 1381 | $objComponenteDigitalDTO->retStrProtocolo(); |
... | ... | @@ -1385,11 +1383,12 @@ class ExpedirProcedimentoRN extends InfraRN { |
1385 | 1383 | $objComponenteDigitalDTO->retDblIdProcedimento(); |
1386 | 1384 | |
1387 | 1385 | $arrComponentesDigitaisDTO = $objComponenteDigitalBD->listar($objComponenteDigitalDTO); |
1388 | - | |
1386 | + | |
1389 | 1387 | if (isset($arrComponentesDigitaisDTO) && count($arrComponentesDigitaisDTO) > 0) { |
1390 | 1388 | |
1391 | 1389 | //TODO: Valida inconsistência da quantidade de documentos solicitados e aqueles cadastrados no SEI |
1392 | - | |
1390 | + | |
1391 | + | |
1393 | 1392 | //Construir objeto Componentes digitais |
1394 | 1393 | foreach ($arrComponentesDigitaisDTO as $objComponenteDigitalDTO) { |
1395 | 1394 | |
... | ... | @@ -1420,7 +1419,7 @@ class ExpedirProcedimentoRN extends InfraRN { |
1420 | 1419 | $parametros = new stdClass(); |
1421 | 1420 | $parametros->dadosDoComponenteDigital = $dadosDoComponenteDigital; |
1422 | 1421 | $result = $this->objProcessoEletronicoRN->enviarComponenteDigital($parametros); |
1423 | - | |
1422 | + | |
1424 | 1423 | //Bloquea documento para atualização, já que ele foi visualizado |
1425 | 1424 | $this->objDocumentoRN->bloquearConteudo($objDocumentoDTO); |
1426 | 1425 | // @join_tec US008.05 (#23092) |
... | ... | @@ -1571,7 +1570,7 @@ class ExpedirProcedimentoRN extends InfraRN { |
1571 | 1570 | |
1572 | 1571 | // Se o documento não tem assinatura e não foi cancelado então |
1573 | 1572 | // cai na regra de validação |
1574 | - if($objAssinaturaRN->contarRN1324($objAssinaturaDTO) == 0 && $objDocumentoDTO->getStrStaEstadoProtocolo() != ProtocoloRN::$TE_CANCELADO){ | |
1573 | + if($objAssinaturaRN->contarRN1324($objAssinaturaDTO) == 0 && $objDocumentoDTO->getStrStaEstadoProtocolo() != ProtocoloRN::$TE_DOCUMENTO_CANCELADO){ | |
1575 | 1574 | |
1576 | 1575 | //$bolAssinaturaCorretas = false; |
1577 | 1576 | } |
... | ... | @@ -2059,7 +2058,7 @@ class ExpedirProcedimentoRN extends InfraRN { |
2059 | 2058 | } |
2060 | 2059 | |
2061 | 2060 | $numSituacaoAtual = 0; |
2062 | - | |
2061 | + | |
2063 | 2062 | // Se o barramento possui alguma situação do tramite verificamos se o precedimento |
2064 | 2063 | // já esta em recebimento |
2065 | 2064 | if(!empty($arrObjMetaTramite)) { |
... | ... | @@ -2085,27 +2084,30 @@ class ExpedirProcedimentoRN extends InfraRN { |
2085 | 2084 | |
2086 | 2085 | $this->objProcessoEletronicoRN->cancelarTramite($objMetaTramite->IDT); |
2087 | 2086 | |
2088 | - // Muda o Status o procedimento para NORMAL | |
2089 | - $objProcesso = (object)array('idProcedimentoSEI' => $dblIdProcedimento); | |
2090 | - ExpedirProcedimentoRN::mudarEstadoProcedimentoNormal($objProcesso, ProtocoloRN::$TE_NORMAL); | |
2091 | - | |
2087 | + //Desbloqueia o processo | |
2088 | + $objEntradaDesbloquearProcessoAPI = new EntradaDesbloquearProcessoAPI(); | |
2089 | + $objEntradaDesbloquearProcessoAPI->setIdProcedimento($dblIdProcedimento); | |
2090 | + $objSeiRN = new SeiRN(); | |
2091 | + $objSeiRN->desbloquearProcesso($objEntradaDesbloquearProcessoAPI); | |
2092 | + | |
2092 | 2093 | $objDTOFiltro = new TramiteDTO(); |
2093 | 2094 | $objDTOFiltro->setNumIdTramite($objMetaTramite->IDT); |
2094 | 2095 | $objDTOFiltro->setNumMaxRegistrosRetorno(1); |
2095 | 2096 | $objDTOFiltro->setOrdNumIdTramite(InfraDTO::$TIPO_ORDENACAO_DESC); |
2096 | - $objDTOFiltro->retTodos(); | |
2097 | - | |
2097 | + $objDTOFiltro->retNumIdTramite(); | |
2098 | + $objDTOFiltro->retStrNumeroRegistro(); | |
2099 | + | |
2098 | 2100 | $objTramiteBD = new TramiteBD($this->getObjInfraIBanco()); |
2099 | 2101 | $objTramiteDTO = $objTramiteBD->consultar($objDTOFiltro); |
2100 | 2102 | |
2101 | 2103 | $objTramiteDTO->setNumIdAndamento(ProcessoEletronicoRN::$STA_SITUACAO_TRAMITE_CANCELADO); |
2102 | - $objTramiteBD->alterar($objTramiteDTO); | |
2103 | - | |
2104 | + $objTramiteDTO = $objTramiteBD->alterar($objTramiteDTO); | |
2105 | + | |
2104 | 2106 | //Cria o Objeto que registrará a Atividade de cancelamento |
2105 | 2107 | $objAtividadeDTO = new AtividadeDTO(); |
2106 | - $objAtividadeDTO->setDblIdProtocolo($objProcesso->idProcedimentoSEI); | |
2108 | + $objAtividadeDTO->setDblIdProtocolo($dblIdProcedimento); | |
2107 | 2109 | $objAtividadeDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); |
2108 | - $objAtividadeDTO->setNumIdTarefa(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_TRAMITE_CANCELADO); | |
2110 | + $objAtividadeDTO->setNumIdTarefa(ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_TRAMITE_CANCELADO)); | |
2109 | 2111 | |
2110 | 2112 | |
2111 | 2113 | //Seta os atributos do tamplate de descrição dessa atividade | ... | ... |
rn/PenAtividadeRN.php
... | ... | @@ -397,7 +397,7 @@ class PenAtividadeRN extends AtividadeRN { |
397 | 397 | } |
398 | 398 | |
399 | 399 | switch($numIdTarefa){ |
400 | - case ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO: | |
400 | + case ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO): | |
401 | 401 | $strMensagem = 'Expedição do Processo %s para %s'; |
402 | 402 | $strNome = 'UNIDADE_DESTINO'; |
403 | 403 | |
... | ... | @@ -409,7 +409,7 @@ class PenAtividadeRN extends AtividadeRN { |
409 | 409 | $objReturn->bolReciboExiste = ($objReciboTramiteBD->contar($objReciboTramiteDTO) > 0) ? true : false; |
410 | 410 | break; |
411 | 411 | |
412 | - case ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_RECEBIDO: | |
412 | + case ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_RECEBIDO): | |
413 | 413 | $strMensagem = 'Recebimento do Processo %s remetido por %s'; |
414 | 414 | $strNome = 'ENTIDADE_ORIGEM'; |
415 | 415 | |
... | ... | @@ -431,7 +431,7 @@ class PenAtividadeRN extends AtividadeRN { |
431 | 431 | $arrAtributoAndamentoDTO = $objAtributoAndamentoBD->listar($objAtributoAndamentoDTO); |
432 | 432 | |
433 | 433 | $objAtributoAndamentoDTO = current($arrAtributoAndamentoDTO); |
434 | - | |
434 | + | |
435 | 435 | $obProtocoloDTO = new ProtocoloDTO(); |
436 | 436 | $obProtocoloDTO->setDblIdProtocolo($objProcessoEletronicoDTO->getDblIdProcedimento()); |
437 | 437 | $obProtocoloDTO->retStrProtocoloFormatado(); | ... | ... |
rn/PenAtualizarSeiRN.php
... | ... | @@ -42,12 +42,16 @@ class PenAtualizarSeiRN extends PenAtualizadorRN { |
42 | 42 | 'id_tramite'=> array($objMetaBD->tipoNumeroGrande(), PenMetaBD::NNULLO), |
43 | 43 | 'ticket_envio_componentes'=> array($objMetaBD->tipoTextoGrande(), PenMetaBD::SNULLO), |
44 | 44 | 'dth_registro'=> array($objMetaBD->tipoDataHora(), PenMetaBD::SNULLO), |
45 | - 'id_andamento'=> array($objMetaBD->tipoNumero(), PenMetaBD::SNULLO) | |
45 | + 'id_andamento'=> array($objMetaBD->tipoNumero(), PenMetaBD::SNULLO), | |
46 | + 'id_usuario'=> array($objMetaBD->tipoNumero(), PenMetaBD::SNULLO), | |
47 | + 'id_unidade'=> array($objMetaBD->tipoNumero(), PenMetaBD::SNULLO) | |
46 | 48 | ), |
47 | 49 | 'pk' => array('id_tramite'), |
48 | 50 | 'uk' => array('numero_registro', 'id_tramite'), |
49 | 51 | 'fks' => array( |
50 | - 'md_pen_processo_eletronico' => array('numero_registro', 'numero_registro') | |
52 | + 'md_pen_processo_eletronico' => array('numero_registro', 'numero_registro'), | |
53 | + 'usuario' => array('id_usuario', 'id_usuario'), | |
54 | + 'unidade' => array('id_unidade', 'id_unidade') | |
51 | 55 | ) |
52 | 56 | )); |
53 | 57 | |
... | ... | @@ -110,14 +114,14 @@ class PenAtualizarSeiRN extends PenAtualizadorRN { |
110 | 114 | ) |
111 | 115 | )); |
112 | 116 | |
113 | - $objMetaBD->criarTabela(array( | |
117 | + /* $objMetaBD->criarTabela(array( | |
114 | 118 | 'tabela' => 'md_pen_tramite_recusado', |
115 | 119 | 'cols' => array( |
116 | 120 | 'numero_registro'=> array($objMetaBD->tipoTextoFixo(16), PenMetaBD::NNULLO), |
117 | 121 | 'id_tramite' => array($objMetaBD->tipoNumeroGrande(), PenMetaBD::NNULLO) |
118 | 122 | ), |
119 | 123 | 'pk' => array('id_tramite') |
120 | - )); | |
124 | + ));*/ | |
121 | 125 | |
122 | 126 | $objMetaBD->criarTabela(array( |
123 | 127 | 'tabela' => 'md_pen_recibo_tramite', | ... | ... |
rn/PendenciasTramiteRN.php
... | ... | @@ -74,7 +74,7 @@ class PendenciasTramiteRN extends InfraRN { |
74 | 74 | $objPendenciaDTO = $this->obterPendenciasTramite($numIdTramiteRecebido); |
75 | 75 | |
76 | 76 | if(isset($objPendenciaDTO)) { |
77 | - | |
77 | + | |
78 | 78 | if($numIdTramiteRecebido != $objPendenciaDTO->getNumIdentificacaoTramite()) { |
79 | 79 | |
80 | 80 | $numIdTramiteRecebido = $objPendenciaDTO->getNumIdentificacaoTramite(); |
... | ... | @@ -133,8 +133,9 @@ class PendenciasTramiteRN extends InfraRN { |
133 | 133 | $resultado = null; |
134 | 134 | $curl = $this->configurarRequisicao(); |
135 | 135 | |
136 | - try{ | |
137 | 136 | |
137 | + try{ | |
138 | + | |
138 | 139 | if(isset($parNumIdTramiteRecebido)) { |
139 | 140 | curl_setopt($curl, CURLOPT_URL, $this->strEnderecoServicoPendencias . "?idTramiteDaPendenciaRecebido=" . $parNumIdTramiteRecebido); |
140 | 141 | } | ... | ... |
rn/ProcessarPendenciasRN.php
... | ... | @@ -148,9 +148,10 @@ class ProcessarPendenciasRN extends InfraAgendamentoTarefa { |
148 | 148 | $this->objGearmanWorker->addFunction("receberTramitesRecusados", function ($job) { |
149 | 149 | |
150 | 150 | InfraDebug::getInstance()->gravar("[".date("d/m/Y H:i:s")."] Processando tarefa [receberRecusaTramite] " . $job->workload()); |
151 | - | |
151 | + $numIdentificacaoTramite = intval($job->workload()); | |
152 | + | |
152 | 153 | $objReceberProcedimentoRN = new ReceberProcedimentoRN(); |
153 | - $objReceberProcedimentoRN->receberTramitesRecusados(); | |
154 | + $objReceberProcedimentoRN->receberTramitesRecusados($numIdentificacaoTramite); | |
154 | 155 | }); |
155 | 156 | |
156 | 157 | //Processamento de pendências de recebimento dos componentes digitais do processo | ... | ... |
rn/ProcessoEletronicoRN.php
... | ... | @@ -34,7 +34,8 @@ class ProcessoEletronicoRN extends InfraRN { |
34 | 34 | public static $STA_SITUACAO_TRAMITE_RECIBO_ENVIADO_DESTINATARIO = 5; // Recibo de conclusão do trâmite enviado pelo destinatário do processo |
35 | 35 | public static $STA_SITUACAO_TRAMITE_RECIBO_RECEBIDO_REMETENTE = 6; // Recibo de conclusão do trâmite recebido pelo remetente do processo |
36 | 36 | public static $STA_SITUACAO_TRAMITE_CANCELADO = 7; // Trâmite do processo ou documento cancelado pelo usuário (Qualquer situação diferente de 5 e 6) |
37 | - public static $STA_SITUACAO_TRAMITE_RECUSADO = 9; // Trâmite do processo recusado pelo destinatário (Situações 2, 3, 4) | |
37 | + public static $STA_SITUACAO_TRAMITE_RECUSADO = 8; // Trâmite do processo recusado pelo destinatário (Situações 2, 3, 4) | |
38 | + public static $STA_SITUACAO_TRAMITE_CIENCIA_RECUSA = 9; // Remetente ciente da recusa do trâmite | |
38 | 39 | |
39 | 40 | /* OPERAÇÕES DO HISTÓRICO DO PROCESSO */ |
40 | 41 | // 02 a 18 estão registrados na tabela rel_tarefa_operacao |
... | ... | @@ -147,7 +148,7 @@ class ProcessoEletronicoRN extends InfraRN { |
147 | 148 | |
148 | 149 | if($this->objPenWs == null) { |
149 | 150 | $this->testaUrl($this->strWSDL, $this->options['local_cert']); |
150 | - // try { | |
151 | + try { | |
151 | 152 | |
152 | 153 | $objConfig = ConfiguracaoSEI::getInstance(); |
153 | 154 | |
... | ... | @@ -159,12 +160,9 @@ class ProcessoEletronicoRN extends InfraRN { |
159 | 160 | |
160 | 161 | $this->objPenWs = new BeSimple\SoapClient\SoapClient($this->strWSDL, $this->options); |
161 | 162 | } |
162 | - /* } catch (Exception $e) { | |
163 | - echo "<pre>"; | |
164 | - var_dump($e->getMessage()); | |
165 | - die("</pre>"); | |
163 | + } catch (Exception $e) { | |
166 | 164 | throw new InfraException('Erro acessando serviço.', $e); |
167 | - }*/ | |
165 | + } | |
168 | 166 | } |
169 | 167 | |
170 | 168 | return $this->objPenWs; |
... | ... | @@ -611,7 +609,9 @@ class ProcessoEletronicoRN extends InfraRN { |
611 | 609 | $objTramiteDTO->setStrNumeroRegistro($parStrNumeroRegistro); |
612 | 610 | $objTramiteDTO->setNumIdTramite($parNumIdentificacaoTramite); |
613 | 611 | $objTramiteDTO->setNumTicketEnvioComponentes($parNumTicketComponentesDigitais); |
614 | - $objTramiteDTO->setDthRegistro($this->converterDataSEI($parDthRegistroTramite)); | |
612 | + $objTramiteDTO->setDthRegistro($this->converterDataSEI($parDthRegistroTramite)); | |
613 | + $objTramiteDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); | |
614 | + $objTramiteDTO->setNumIdUsuario(SessaoSEI::getInstance()->getNumIdUsuario()); | |
615 | 615 | $objProcessoEletronicoDTO->setArrObjTramiteDTO(array($objTramiteDTO)); |
616 | 616 | |
617 | 617 | //Monta dados dos componentes digitais |
... | ... | @@ -798,7 +798,7 @@ class ProcessoEletronicoRN extends InfraRN { |
798 | 798 | $objComponenteDigitalDTO->setStrTipoConteudo($objComponenteDigital->tipoDeConteudo); |
799 | 799 | $objComponenteDigitalDTO->setStrMimeType($objComponenteDigital->mimeType); |
800 | 800 | $objComponenteDigitalDTO->setStrDadosComplementares($objComponenteDigital->dadosComplementaresDoTipoDeArquivo); |
801 | - | |
801 | + | |
802 | 802 | //Registrar componente digital necessita ser enviado pelo trâmite espefífico //TODO: Teste $parObjComponentesDigitaisSolicitados aqui |
803 | 803 | if(isset($parObjComponentesDigitaisSolicitados)){ |
804 | 804 | $arrObjItensSolicitados = is_array($parObjComponentesDigitaisSolicitados->processo) ? $parObjComponentesDigitaisSolicitados->processo : array($parObjComponentesDigitaisSolicitados->processo); |
... | ... | @@ -910,7 +910,10 @@ class ProcessoEletronicoRN extends InfraRN { |
910 | 910 | $parametro = new stdClass(); |
911 | 911 | $parametro->filtroDeConsultaDeTramites = new stdClass(); |
912 | 912 | $parametro->filtroDeConsultaDeTramites->IDT = $parNumIdTramite; |
913 | - $parametro->filtroDeConsultaDeTramites->NRE = $parNumeroRegistro; | |
913 | + | |
914 | + if(!is_null($parNumeroRegistro)){ | |
915 | + $parametro->filtroDeConsultaDeTramites->NRE = $parNumeroRegistro; | |
916 | + } | |
914 | 917 | |
915 | 918 | if(!is_null($parNumeroUnidadeRemetente) && !is_null($parNumeroRepositorioEstruturas)){ |
916 | 919 | $parametro->filtroDeConsultaDeTramites->remetente->identificacaoDoRepositorioDeEstruturas = $parNumeroRepositorioEstruturas; |
... | ... | @@ -977,6 +980,24 @@ class ProcessoEletronicoRN extends InfraRN { |
977 | 980 | } |
978 | 981 | } |
979 | 982 | |
983 | + public function cienciaRecusa($parNumIdTramite) | |
984 | + { | |
985 | + try | |
986 | + { | |
987 | + $parametro = new stdClass(); | |
988 | + $parametro->IDT = $parNumIdTramite; | |
989 | + | |
990 | + return $this->getObjPenWs()->cienciaRecusa($parametro); | |
991 | + | |
992 | + } catch (\SoapFault $fault) { | |
993 | + $mensagem = $this->tratarFalhaWebService($fault); | |
994 | + throw new InfraException(InfraString::formatarJavaScript($mensagem), $fault); | |
995 | + | |
996 | + } catch (\Exception $e) { | |
997 | + throw new InfraException("Error Processing Request", $e); | |
998 | + } | |
999 | + } | |
1000 | + | |
980 | 1001 | /** |
981 | 1002 | * Retorna o estado atual do procedimento no api-pen |
982 | 1003 | * |
... | ... | @@ -1192,7 +1213,7 @@ class ProcessoEletronicoRN extends InfraRN { |
1192 | 1213 | try { |
1193 | 1214 | $parametro = new stdClass(); |
1194 | 1215 | $parametro->IDT = $parNumIdTramite; |
1195 | - | |
1216 | + | |
1196 | 1217 | $resultado = $this->getObjPenWs()->receberReciboDeEnvio($parametro); |
1197 | 1218 | |
1198 | 1219 | if ($resultado && $resultado->conteudoDoReciboDeEnvio) { |
... | ... | @@ -1305,6 +1326,7 @@ class ProcessoEletronicoRN extends InfraRN { |
1305 | 1326 | //@TODOJOIN: Adicionar a seguinte linha abaixo dessa : $parametros->filtroDeConsultaDeTramites = new stdClass() |
1306 | 1327 | //Faz a consulta do tramite |
1307 | 1328 | $paramConsultaTramite = new stdClass(); |
1329 | + $paramConsultaTramite->filtroDeConsultaDeTramites = new stdClass(); | |
1308 | 1330 | $paramConsultaTramite->filtroDeConsultaDeTramites->IDT = $idTramite; |
1309 | 1331 | $dadosTramite = $this->getObjPenWs()->consultarTramites($paramConsultaTramite); |
1310 | 1332 | |
... | ... | @@ -1334,6 +1356,7 @@ class ProcessoEletronicoRN extends InfraRN { |
1334 | 1356 | |
1335 | 1357 | //@TODOJOIN: Adicionar a seguinte linha abaixo dessa : $parametros->recusaDeTramite = new stdClass() |
1336 | 1358 | $parametros = new stdClass(); |
1359 | + $parametros->recusaDeTramite = new stdClass(); | |
1337 | 1360 | $parametros->recusaDeTramite->IDT = $idTramite; |
1338 | 1361 | $parametros->recusaDeTramite->justificativa = utf8_encode($justificativa); |
1339 | 1362 | $parametros->recusaDeTramite->motivo = $motivo; |
... | ... | @@ -1416,10 +1439,10 @@ class ProcessoEletronicoRN extends InfraRN { |
1416 | 1439 | return false; |
1417 | 1440 | } |
1418 | 1441 | catch(SoapFault $e) { |
1419 | - throw new InfraException($e->getMessage()); | |
1442 | + return false; | |
1420 | 1443 | } |
1421 | 1444 | catch(Exception $e) { |
1422 | - throw new InfraException($e->getMessage()); | |
1445 | + return false; | |
1423 | 1446 | } |
1424 | 1447 | } |
1425 | 1448 | } | ... | ... |
... | ... | @@ -0,0 +1,98 @@ |
1 | +<?php | |
2 | + | |
3 | +require_once dirname(__FILE__) . '/../../../SEI.php'; | |
4 | + | |
5 | +class ProcessoExpedidoRN extends InfraRN { | |
6 | + | |
7 | + public function __construct() { | |
8 | + parent::__construct(); | |
9 | + } | |
10 | + | |
11 | + protected function inicializarObjInfraIBanco() { | |
12 | + return BancoSEI::getInstance(); | |
13 | + } | |
14 | + | |
15 | + public function listarProcessoExpedido(ProtocoloDTO &$objProtocoloDTO) { | |
16 | + | |
17 | + | |
18 | + $sql = "SELECT | |
19 | + p.id_protocolo, | |
20 | + p.protocolo_formatado, | |
21 | + a.id_unidade id_unidade, | |
22 | + atd.valor unidade_destino, | |
23 | + us.id_usuario id_usuario, | |
24 | + us.nome nome_usuario, | |
25 | + a.dth_abertura | |
26 | + FROM protocolo p | |
27 | + INNER JOIN atividade a ON a.id_protocolo = p.id_protocolo | |
28 | + INNER JOIN atributo_andamento atd ON a.id_atividade = atd.id_atividade AND atd.nome = 'UNIDADE_DESTINO' | |
29 | + INNER JOIN md_pen_processo_eletronico pe ON pe.id_procedimento = p.id_protocolo | |
30 | + INNER JOIN md_pen_tramite ptra ON ptra.numero_registro = pe.numero_registro | |
31 | + INNER JOIN usuario us ON ptra.id_usuario = us.id_usuario | |
32 | + WHERE | |
33 | + p.sta_estado = " . $objProtocoloDTO->getStrStaEstado() . " | |
34 | + AND | |
35 | + a.id_tarefa = ". ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_TRAMITE_EXTERNO) ." | |
36 | + AND | |
37 | + ptra.dth_registro = (SELECT MAX(pt.dth_registro) dth_registro FROM md_pen_tramite pt WHERE pt.numero_registro = pe.numero_registro) | |
38 | + AND | |
39 | + NOT EXISTS ( | |
40 | + SELECT at2.* FROM atividade as at2 | |
41 | + WHERE at2.id_protocolo = p.id_protocolo | |
42 | + AND at2.id_tarefa = ". ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_RECEBIDO) ." | |
43 | + AND at2.dth_abertura > a.dth_abertura ) | |
44 | + GROUP BY | |
45 | + p.id_protocolo, p.protocolo_formatado, a.id_unidade , atd.valor , us.id_usuario, us.nome, a.dth_abertura ORDER BY a.dth_abertura DESC LIMIT ".$objProtocoloDTO->getNumPaginaAtual() * $objProtocoloDTO->getNumMaxRegistrosRetorno().",".$objProtocoloDTO->getNumMaxRegistrosRetorno()." "; | |
46 | + | |
47 | + | |
48 | + $sqlCount = "SELECT | |
49 | + count(*) total | |
50 | + FROM protocolo p | |
51 | + INNER JOIN atividade a ON a.id_protocolo = p.id_protocolo | |
52 | + INNER JOIN atributo_andamento atd ON a.id_atividade = atd.id_atividade AND atd.nome = 'UNIDADE_DESTINO' | |
53 | + INNER JOIN md_pen_processo_eletronico pe ON pe.id_procedimento = p.id_protocolo | |
54 | + INNER JOIN md_pen_tramite ptra ON ptra.numero_registro = pe.numero_registro | |
55 | + INNER JOIN usuario us ON ptra.id_usuario = us.id_usuario | |
56 | + WHERE | |
57 | + p.sta_estado = " . $objProtocoloDTO->getStrStaEstado() . " | |
58 | + AND | |
59 | + a.id_tarefa = ". ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_TRAMITE_EXTERNO) ." | |
60 | + AND | |
61 | + ptra.dth_registro = (SELECT MAX(pt.dth_registro) dth_registro FROM md_pen_tramite pt WHERE pt.numero_registro = pe.numero_registro) | |
62 | + AND | |
63 | + NOT EXISTS ( | |
64 | + SELECT at2.* FROM atividade as at2 | |
65 | + WHERE at2.id_protocolo = p.id_protocolo | |
66 | + AND at2.id_tarefa = ". ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_RECEBIDO) ." | |
67 | + AND at2.dth_abertura > a.dth_abertura ) "; | |
68 | + | |
69 | + | |
70 | + | |
71 | + $pag = $this->getObjInfraIBanco()->consultarSql($sql); | |
72 | + $count = $this->getObjInfraIBanco()->consultarSql($sqlCount); | |
73 | + $total = $count ? $count[0]['total'] : 0; | |
74 | + | |
75 | + $arrProcessosExpedidos = array(); | |
76 | + | |
77 | + $objProtocoloDTO->setNumTotalRegistros($total); | |
78 | + $objProtocoloDTO->setNumRegistrosPaginaAtual(count($pag)); | |
79 | + | |
80 | + foreach ($pag as $res) { | |
81 | + $data = new \DateTime($res['dth_abertura']); | |
82 | + $objProcessoExpedidoDTO = new ProcessoExpedidoDTO(); | |
83 | + $objProcessoExpedidoDTO->setDblIdProtocolo($res['id_protocolo']); | |
84 | + $objProcessoExpedidoDTO->setStrProtocoloFormatado($res['protocolo_formatado']); | |
85 | + $objProcessoExpedidoDTO->setStrNomeUsuario($res['nome_usuario']); | |
86 | + $objProcessoExpedidoDTO->setDthExpedido($data->format('d/m/Y H:i:s')); | |
87 | + $objProcessoExpedidoDTO->setStrDestino($res['unidade_destino']); | |
88 | + | |
89 | + | |
90 | + | |
91 | + | |
92 | + $arrProcessosExpedidos[] = $objProcessoExpedidoDTO; | |
93 | + } | |
94 | + | |
95 | + return $arrProcessosExpedidos; | |
96 | + } | |
97 | + | |
98 | +} | ... | ... |
rn/ReceberProcedimentoRN.php
... | ... | @@ -468,12 +468,33 @@ class ReceberProcedimentoRN extends InfraRN |
468 | 468 | |
469 | 469 | //$objProcedimentoDTO = $arrObjProcedimentoDTO[0]; |
470 | 470 | |
471 | - //REALIZA O DESBLOQUEIO DO PROCESSO | |
471 | + $objSeiRN = new SeiRN(); | |
472 | + | |
473 | + $objAtividadeDTO = new AtividadeDTO(); | |
474 | + $objAtividadeDTO->retDthConclusao(); | |
475 | + $objAtividadeDTO->setDblIdProtocolo($parDblIdProcedimento); | |
476 | + $objAtividadeDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); | |
477 | + | |
478 | + $objAtividadeRN = new AtividadeRN(); | |
479 | + $arrObjAtividadeDTO = $objAtividadeRN->listarRN0036($objAtividadeDTO); | |
480 | + $flgReabrir = true; | |
481 | + | |
482 | + foreach ($arrObjAtividadeDTO as $objAtividadeDTO) { | |
483 | + if ($objAtividadeDTO->getDthConclusao() == null) { | |
484 | + $flgReabrir = false; | |
485 | + } | |
486 | + } | |
487 | + | |
488 | + if($flgReabrir){ | |
489 | + $objEntradaReabrirProcessoAPI = new EntradaReabrirProcessoAPI(); | |
490 | + $objEntradaReabrirProcessoAPI->setIdProcedimento($parDblIdProcedimento); | |
491 | + $objSeiRN->reabrirProcesso($objEntradaReabrirProcessoAPI); | |
492 | + } | |
493 | + | |
472 | 494 | $objEntradaDesbloquearProcessoAPI = new EntradaDesbloquearProcessoAPI(); |
473 | - $objEntradaDesbloquearProcessoAPI->setIdProcedimento($parDblIdProcedimento); | |
474 | - | |
475 | - $objSeiRN = new SeiRN(); | |
495 | + $objEntradaDesbloquearProcessoAPI->setIdProcedimento($parDblIdProcedimento); | |
476 | 496 | $objSeiRN->desbloquearProcesso($objEntradaDesbloquearProcessoAPI); |
497 | + | |
477 | 498 | |
478 | 499 | |
479 | 500 | $objProcedimentoDTO = new ProcedimentoDTO(); |
... | ... | @@ -1462,76 +1483,125 @@ class ReceberProcedimentoRN extends InfraRN |
1462 | 1483 | return $numOrdemDocumento1 - $numOrdemDocumento2; |
1463 | 1484 | } |
1464 | 1485 | |
1465 | - /**/ | |
1466 | - protected function receberTramitesRecusados($parNumIdentificacaoTramite) { | |
1486 | + | |
1487 | + public function receberTramitesRecusados($parNumIdentificacaoTramite) { | |
1467 | 1488 | |
1468 | - if(empty($parNumIdentificacaoTramite)) { | |
1489 | + if (empty($parNumIdentificacaoTramite)) { | |
1469 | 1490 | throw new InfraException('Parâmetro $parNumIdentificacaoTramite não informado.'); |
1470 | 1491 | } |
1471 | - | |
1472 | - $objInfraParametro = new InfraParametro(BancoSEI::getInstance()); | |
1473 | - $parNumIdRespositorio = $objInfraParametro->getValor('PEN_ID_REPOSITORIO_ORIGEM'); | |
1474 | - $parNumIdEstrutura = SessaoSEI::getInstance()->getNumIdUnidadeAtual(); | |
1475 | 1492 | |
1476 | - $arrObjTramite = (array)$this->objProcessoEletronicoRN->consultarTramitesRecusados($parNumIdRespositorio, $parNumIdEstrutura); | |
1493 | + //Busca os dados do trâmite no barramento | |
1494 | + $tramite = $this->objProcessoEletronicoRN->consultarTramites($parNumIdentificacaoTramite); | |
1477 | 1495 | |
1478 | - if(empty($arrObjTramite)) { | |
1479 | - return null; | |
1496 | + if(!isset($tramite[0])){ | |
1497 | + throw new InfraException("Não foi encontrado o trâmite de número {$parNumIdentificacaoTramite} para realizar a ciência da recusa"); | |
1480 | 1498 | } |
1481 | 1499 | |
1482 | - foreach($arrObjTramite as $objTramite) { | |
1483 | - | |
1484 | - $strNumeroRegistro = $objTramite->NRE; | |
1485 | - | |
1486 | - if(empty($strNumeroRegistro)) { | |
1487 | - throw new InfraException('Falha ao consultar número do registro na lista de tramites recusados'); | |
1488 | - } | |
1489 | - | |
1490 | - $objReceberTramiteRecusadoDTO = new ReceberTramiteRecusadoDTO(); | |
1491 | - $objReceberTramiteRecusadoDTO->retTodos(); | |
1492 | - $objReceberTramiteRecusadoDTO->setNumRegistro($strNumeroRegistro); | |
1493 | - | |
1494 | - $objReceberTramiteRecusadoBD = new ReceberTramiteRecusadoBD(BancoSEI::getInstance()); | |
1495 | - if($objReceberTramiteRecusadoBD->contar($objReceberTramiteRecusadoDTO) > 0){ | |
1496 | - // Já foi cadastrado no banco de dados, então já foi modificado para normal | |
1497 | - continue; | |
1498 | - } | |
1499 | - | |
1500 | - // Muda o estado de em processamento para bloqueado | |
1501 | - try { | |
1502 | - $objProcessoEletronicoDTO = new ProcessoEletronicoDTO(); | |
1503 | - $objProcessoEletronicoDTO->setStrNumeroRegistro($strNumeroRegistro); | |
1504 | - $objProcessoEletronicoDTO->retDblIdProcedimento(); | |
1500 | + $tramite = $tramite[0]; | |
1501 | + | |
1502 | + $objTramiteDTO = new TramiteDTO(); | |
1503 | + $objTramiteDTO->setNumIdTramite($parNumIdentificacaoTramite); | |
1504 | + $objTramiteDTO->retNumIdUnidade(); | |
1505 | + | |
1506 | + $objTramiteBD = new TramiteBD(BancoSEI::getInstance()); | |
1507 | + $objTramiteDTO = $objTramiteBD->consultar($objTramiteDTO); | |
1508 | + | |
1509 | + SessaoSEI::getInstance(false)->simularLogin('SEI', null, null, $objTramiteDTO->getNumIdUnidade()); | |
1510 | + | |
1511 | + //Busca os dados do procedimento | |
1512 | + $objProcessoEletronicoDTO = new ProcessoEletronicoDTO(); | |
1513 | + $objProcessoEletronicoDTO->setStrNumeroRegistro($tramite->NRE); | |
1514 | + $objProcessoEletronicoDTO->retDblIdProcedimento(); | |
1505 | 1515 | |
1506 | - $objProcessoEletronicoDB = new ProcessoEletronicoBD(BancoSEI::getInstance()); | |
1507 | - $objProcessoEletronicoDTO = $objProcessoEletronicoDB->consultar($objProcessoEletronicoDTO); | |
1516 | + $objProcessoEletronicoBD = new ProcessoEletronicoBD($this->getObjInfraIBanco()); | |
1517 | + $objProcessoEletronicoDTO = $objProcessoEletronicoBD->consultar($objProcessoEletronicoDTO); | |
1518 | + | |
1519 | + //Busca a última atividade de expedição | |
1520 | + $objAtividadeDTO = new AtividadeDTO(); | |
1521 | + $objAtividadeDTO->setDblIdProtocolo($objProcessoEletronicoDTO->getDblIdProcedimento()); | |
1522 | + $objAtividadeDTO->setNumIdTarefa(ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO)); | |
1523 | + $objAtividadeDTO->setNumMaxRegistrosRetorno(1); | |
1524 | + $objAtividadeDTO->setOrdDthAbertura(InfraDTO::$TIPO_ORDENACAO_DESC); | |
1525 | + $objAtividadeDTO->retNumIdAtividade(); | |
1508 | 1526 | |
1509 | - $objProtocoloDTO = new ProtocoloDTO(); | |
1510 | - $objProtocoloDTO->retTodos(); | |
1511 | - $objProtocoloDTO->setDblIdProtocolo($objProcessoEletronicoDTO->getDblIdProcedimento()); | |
1527 | + $objAtividadeBD = new AtividadeBD($this->getObjInfraIBanco()); | |
1528 | + $objAtividadeDTO = $objAtividadeBD->consultar($objAtividadeDTO); | |
1529 | + | |
1530 | + //Busca a unidade de destino | |
1531 | + $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); | |
1532 | + $objAtributoAndamentoDTO->setNumIdAtividade($objAtividadeDTO->getNumIdAtividade()); | |
1533 | + $objAtributoAndamentoDTO->setStrNome('UNIDADE_DESTINO'); | |
1534 | + $objAtributoAndamentoDTO->retStrValor(); | |
1512 | 1535 | |
1513 | - $objProtocoloBD = new ProtocoloBD(BancoSEI::getInstance()); | |
1514 | - $objProtocoloDTO = $objProtocoloBD->consultar($objProtocoloDTO); | |
1536 | + $objAtributoAndamentoBD = new AtributoAndamentoBD($this->getObjInfraIBanco()); | |
1537 | + $objAtributoAndamentoDTO = $objAtributoAndamentoBD->consultar($objAtributoAndamentoDTO); | |
1538 | + | |
1539 | + //Monta o DTO de receber tramite recusado | |
1540 | + $objReceberTramiteRecusadoDTO = new ReceberTramiteRecusadoDTO(); | |
1541 | + $objReceberTramiteRecusadoDTO->setNumIdTramite($parNumIdentificacaoTramite); | |
1542 | + $objReceberTramiteRecusadoDTO->setNumIdProtocolo($objProcessoEletronicoDTO->getDblIdProcedimento()); | |
1543 | + $objReceberTramiteRecusadoDTO->setNumIdUnidadeOrigem(null); | |
1544 | + $objReceberTramiteRecusadoDTO->setNumIdTarefa(ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_TRAMITE_RECUSADO)); | |
1545 | + $objReceberTramiteRecusadoDTO->setStrMotivoRecusa(ProcessoEletronicoRN::$MOTIVOS_RECUSA[$tramite->motivoDaRecusa]); | |
1546 | + $objReceberTramiteRecusadoDTO->setStrNomeUnidadeDestino($objAtributoAndamentoDTO->getStrValor()); | |
1547 | + | |
1548 | + //Faz o tratamento do processo e do trâmite recusado | |
1549 | + $this->receberTramiteRecusadoInterno($objReceberTramiteRecusadoDTO); | |
1550 | + | |
1551 | + | |
1552 | + } | |
1515 | 1553 | |
1516 | - $objProtocoloDTO->setStrStaProtocolo(ProtocoloRN::$TE_NORMAL); | |
1517 | - $objProtocoloBD->alterar($objProtocoloDTO); | |
1518 | - | |
1519 | - // Cadastra na tabela de histórico de | |
1520 | - $objReceberTramiteRecusadoDTO = new ReceberTramiteRecusadoDTO(); | |
1521 | - $objReceberTramiteRecusadoDTO->setNumRegistro($strNumeroRegistro); | |
1522 | - $objReceberTramiteRecusadoDTO->setDblIdTramite($objTramite->IDT); | |
1554 | + protected function receberTramiteRecusadoInternoControlado(ReceberTramiteRecusadoDTO $objReceberTramiteRecusadoDTO){ | |
1555 | + | |
1556 | + | |
1557 | + //Realiza o desbloqueio do processo | |
1558 | + $objEntradaDesbloquearProcessoAPI = new EntradaDesbloquearProcessoAPI(); | |
1559 | + $objEntradaDesbloquearProcessoAPI->setIdProcedimento($objReceberTramiteRecusadoDTO->getNumIdProtocolo()); | |
1560 | + | |
1561 | + $objSeiRN = new SeiRN(); | |
1562 | + $objSeiRN->desbloquearProcesso($objEntradaDesbloquearProcessoAPI); | |
1563 | + | |
1564 | + //Adiciona um andamento para o trâmite recusado | |
1565 | + $arrObjAtributoAndamentoDTO = array(); | |
1523 | 1566 | |
1524 | - $objReceberTramiteRecusadoBD->cadastrar($objReceberTramiteRecusadoDTO); | |
1525 | - } | |
1526 | - catch(Exception $e) { | |
1567 | + $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); | |
1568 | + $objAtributoAndamentoDTO->setStrNome('MOTIVO'); | |
1569 | + $objAtributoAndamentoDTO->setStrValor($objReceberTramiteRecusadoDTO->getStrMotivoRecusa()); | |
1570 | + $objAtributoAndamentoDTO->setStrIdOrigem($objReceberTramiteRecusadoDTO->getNumIdUnidadeOrigem()); | |
1571 | + $arrObjAtributoAndamentoDTO[] = $objAtributoAndamentoDTO; | |
1572 | + | |
1573 | + | |
1574 | + $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); | |
1575 | + $objAtributoAndamentoDTO->setStrNome('UNIDADE_DESTINO'); | |
1576 | + $objAtributoAndamentoDTO->setStrValor($objReceberTramiteRecusadoDTO->getStrNomeUnidadeDestino()); | |
1577 | + $objAtributoAndamentoDTO->setStrIdOrigem($objReceberTramiteRecusadoDTO->getNumIdUnidadeOrigem()); | |
1578 | + $arrObjAtributoAndamentoDTO[] = $objAtributoAndamentoDTO; | |
1527 | 1579 | |
1528 | - $strMessage = 'Falha ao mudar o estado do procedimento ao receber a lista de tramites recusados.'; | |
1580 | + | |
1581 | + $objAtividadeDTO = new AtividadeDTO(); | |
1582 | + $objAtividadeDTO->setDblIdProtocolo($objReceberTramiteRecusadoDTO->getNumIdProtocolo()); | |
1583 | + $objAtividadeDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); | |
1584 | + $objAtividadeDTO->setNumIdTarefa($objReceberTramiteRecusadoDTO->getNumIdTarefa()); | |
1585 | + $objAtividadeDTO->setArrObjAtributoAndamentoDTO($arrObjAtributoAndamentoDTO); | |
1586 | + | |
1587 | + $objAtividadeRN = new AtividadeRN(); | |
1588 | + $objAtividadeRN->gerarInternaRN0727($objAtividadeDTO); | |
1589 | + | |
1590 | + //Sinaliza na PenProtocolo que o processo obteve recusa | |
1591 | + $objProtocolo = new PenProtocoloDTO(); | |
1592 | + $objProtocolo->setDblIdProtocolo($objReceberTramiteRecusadoDTO->getNumIdProtocolo()); | |
1593 | + $objProtocolo->setStrSinObteveRecusa('S'); | |
1594 | + | |
1595 | + $objProtocoloBD = new ProtocoloBD($this->getObjInfraIBanco()); | |
1596 | + $objProtocoloBD->alterar($objProtocolo); | |
1597 | + | |
1598 | + | |
1599 | + $this->objProcessoEletronicoRN->cienciaRecusa($objReceberTramiteRecusadoDTO->getNumIdTramite()); | |
1600 | + | |
1529 | 1601 | |
1530 | - LogSEI::getInstance()->gravar($strMessage.PHP_EOL.$e->getMessage().PHP_EOL.$e->getTraceAsString()); | |
1531 | - throw new InfraException($strMessage, $e); | |
1532 | - } | |
1533 | - } | |
1534 | 1602 | } |
1603 | + | |
1604 | + | |
1535 | 1605 | |
1536 | 1606 | /** |
1537 | 1607 | * Método que realiza a validação da extensão dos componentes digitais a serem recebidos | ... | ... |
rn/ReceberReciboTramiteRN.php
... | ... | @@ -28,7 +28,7 @@ class ReceberReciboTramiteRN extends InfraRN |
28 | 28 | |
29 | 29 | $objSeiRN = new SeiRN(); |
30 | 30 | $objSeiRN->concluirProcesso($objEntradaConcluirProcessoAPI); |
31 | - | |
31 | + | |
32 | 32 | $arrObjAtributoAndamentoDTO = array(); |
33 | 33 | |
34 | 34 | $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); |
... | ... | @@ -111,7 +111,8 @@ class ReceberReciboTramiteRN extends InfraRN |
111 | 111 | } |
112 | 112 | |
113 | 113 | protected function receberReciboDeTramiteConectado($parNumIdTramite) { |
114 | - | |
114 | + | |
115 | + | |
115 | 116 | if (!isset($parNumIdTramite)) { |
116 | 117 | throw new InfraException('Parâmetro $parNumIdTramite não informado.'); |
117 | 118 | } |
... | ... | @@ -125,9 +126,14 @@ class ReceberReciboTramiteRN extends InfraRN |
125 | 126 | //Verifica se o trâmite do processo se encontra devidamente registrado no sistema |
126 | 127 | $objTramiteDTO = new TramiteDTO(); |
127 | 128 | $objTramiteDTO->setNumIdTramite($parNumIdTramite); |
129 | + $objTramiteDTO->retNumIdUnidade(); | |
130 | + | |
128 | 131 | $objTramiteBD = new TramiteBD(BancoSEI::getInstance()); |
129 | 132 | |
130 | 133 | if ($objTramiteBD->contar($objTramiteDTO) > 0) { |
134 | + | |
135 | + $objTramiteDTO = $objTramiteBD->consultar($objTramiteDTO); | |
136 | + SessaoSEI::getInstance(false)->simularLogin('SEI', null, null, $objTramiteDTO->getNumIdUnidade()); | |
131 | 137 | |
132 | 138 | $objReciboTramiteDTOExistente = new ReciboTramiteDTO(); |
133 | 139 | $objReciboTramiteDTOExistente->setNumIdTramite($parNumIdTramite); |
... | ... | @@ -172,6 +178,9 @@ class ReceberReciboTramiteRN extends InfraRN |
172 | 178 | //Registra o recbimento do recibo no histórico e realiza a conclusão do processo |
173 | 179 | $this->registrarRecebimentoRecibo($objProtocoloDTO->getDblIdProtocolo(), $objProtocoloDTO->getStrProtocoloFormatado(), $parNumIdTramite); |
174 | 180 | |
181 | + $objPenTramiteProcessadoRN = new PenTramiteProcessadoRN(PenTramiteProcessadoRN::STR_TIPO_RECIBO); | |
182 | + $objPenTramiteProcessadoRN->setRecebido($parNumIdTramite); | |
183 | + | |
175 | 184 | } catch (Exception $e) { |
176 | 185 | |
177 | 186 | $strMessage = 'Falha o modificar o estado do procedimento para bloqueado.'; |
... | ... | @@ -182,7 +191,6 @@ class ReceberReciboTramiteRN extends InfraRN |
182 | 191 | } |
183 | 192 | } |
184 | 193 | |
185 | - $objPenTramiteProcessadoRN = new PenTramiteProcessadoRN(PenTramiteProcessadoRN::STR_TIPO_RECIBO); | |
186 | - $objPenTramiteProcessadoRN->setRecebido($parNumIdTramite); | |
194 | + | |
187 | 195 | } |
188 | 196 | } |
189 | 197 | \ No newline at end of file | ... | ... |