Commit e1a76b345bfd89bd77b7c1a6e9958e5e49b377a1
1 parent
47c01a11
Exists in
master
and in
1 other branch
Correções de erros pela Cast.
Showing
4 changed files
with
320 additions
and
179 deletions
Show diff stats
sei/institucional/peticionamento/peticionamento_usuario_externo_cadastro_bloco_documentos.php
@@ -297,6 +297,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -297,6 +297,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
297 | <th class="infraTh" style="display: none;"> Formato de documento </th> | 297 | <th class="infraTh" style="display: none;"> Formato de documento </th> |
298 | <th class="infraTh" style="display: none;"> Tipo de Conferencia </th> | 298 | <th class="infraTh" style="display: none;"> Tipo de Conferencia </th> |
299 | <th class="infraTh" style="display: none;"> Nome Upload servidor </th> | 299 | <th class="infraTh" style="display: none;"> Nome Upload servidor </th> |
300 | + <th class="infraTh" style="display: none;"> ID Tipo de Documento </th> | ||
300 | 301 | ||
301 | <!-- Coluna de ações (Baixar, remover) da grid --> | 302 | <!-- Coluna de ações (Baixar, remover) da grid --> |
302 | <th align="center" class="infraTh" style="width:70px;"> Ações </th> | 303 | <th align="center" class="infraTh" style="width:70px;"> Ações </th> |
@@ -492,6 +493,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -492,6 +493,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
492 | <th class="infraTh" style="display: none;"> Formato de documento </th> | 493 | <th class="infraTh" style="display: none;"> Formato de documento </th> |
493 | <th class="infraTh" style="display: none;"> Tipo de Conferencia </th> | 494 | <th class="infraTh" style="display: none;"> Tipo de Conferencia </th> |
494 | <th class="infraTh" style="display: none;"> Nome Upload servidor </th> | 495 | <th class="infraTh" style="display: none;"> Nome Upload servidor </th> |
496 | + <th class="infraTh" style="display: none;"> ID Tipo de Documento </th> | ||
495 | 497 | ||
496 | <!-- Coluna de ações (Baixar, remover) da grid --> | 498 | <!-- Coluna de ações (Baixar, remover) da grid --> |
497 | <th class="infraTh" style="width: 70px;">Ações</th> | 499 | <th class="infraTh" style="width: 70px;">Ações</th> |
@@ -680,6 +682,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | @@ -680,6 +682,7 @@ $strLinkUploadDocComplementar = SessaoSEIExterna::getInstance()->assinarLink('co | ||
680 | <th class="infraTh" style="display: none;"> Formato de documento </th> | 682 | <th class="infraTh" style="display: none;"> Formato de documento </th> |
681 | <th class="infraTh" style="display: none;"> Tipo de Conferencia </th> | 683 | <th class="infraTh" style="display: none;"> Tipo de Conferencia </th> |
682 | <th class="infraTh" style="display: none;"> Nome Upload servidor </th> | 684 | <th class="infraTh" style="display: none;"> Nome Upload servidor </th> |
685 | + <th class="infraTh" style="display: none;"> ID Tipo de Documento </th> | ||
683 | 686 | ||
684 | <!-- Coluna de ações (Baixar, remover) da grid --> | 687 | <!-- Coluna de ações (Baixar, remover) da grid --> |
685 | <th class="infraTh" style="width: 70px;">Ações</th> | 688 | <th class="infraTh" style="width: 70px;">Ações</th> |
sei/institucional/peticionamento/peticionamento_usuario_externo_cadastro_js.php
@@ -864,7 +864,7 @@ function carregarCamposDocPrincipalUpload(){ | @@ -864,7 +864,7 @@ function carregarCamposDocPrincipalUpload(){ | ||
864 | //TipoConferenciaPrincipal / TipoConferenciaEssencial | 864 | //TipoConferenciaPrincipal / TipoConferenciaEssencial |
865 | var tipoConferencia = document.getElementById('TipoConferenciaPrincipal').value; | 865 | var tipoConferencia = document.getElementById('TipoConferenciaPrincipal').value; |
866 | 866 | ||
867 | - objTabelaDocPrincipal.adicionar([ nome , dataHora , tamanhoFormatado , documento , nivelAcesso , hipoteseLegal, formatoDocumento, tipoConferencia, nomeUpload, '' ]); | 867 | + objTabelaDocPrincipal.adicionar([ nome , dataHora , tamanhoFormatado , documento , nivelAcesso , hipoteseLegal, formatoDocumento, tipoConferencia, nomeUpload, cbTpoPrincipal.value, '' ]); |
868 | 868 | ||
869 | var strHashPrincipal = document.getElementById('hdnDocPrincipal').value; | 869 | var strHashPrincipal = document.getElementById('hdnDocPrincipal').value; |
870 | var arrHashPrincipal = strHashPrincipal.split('±'); | 870 | var arrHashPrincipal = strHashPrincipal.split('±'); |
@@ -977,7 +977,7 @@ function carregarCamposDocEssencialUpload(){ | @@ -977,7 +977,7 @@ function carregarCamposDocEssencialUpload(){ | ||
977 | //TipoConferenciaPrincipal / TipoConferenciaEssencial | 977 | //TipoConferenciaPrincipal / TipoConferenciaEssencial |
978 | var tipoConferencia = document.getElementById('TipoConferenciaEssencial').value; | 978 | var tipoConferencia = document.getElementById('TipoConferenciaEssencial').value; |
979 | 979 | ||
980 | - objTabelaDocEssencial.adicionar([ nome , nome , dataHora , '4', tamanhoFormatado , documento , nivelAcesso, hipoteseLegal, formatoDocumento, tipoConferencia, nomeUpload, '' ]); | 980 | + objTabelaDocEssencial.adicionar([ nome , nome , dataHora , '4', tamanhoFormatado , documento , nivelAcesso, hipoteseLegal, formatoDocumento, tipoConferencia, nomeUpload, cbTpoEssencial, '' ]); |
981 | //objTabelaDocEssencial.adicionar([ nomeUpload , nomeUpload, dataHora , '4', '5', '6', '7']); | 981 | //objTabelaDocEssencial.adicionar([ nomeUpload , nomeUpload, dataHora , '4', '5', '6', '7']); |
982 | //objTabelaDocEssencial.adicionar([ nomeUpload , dataHora , tamanhoFormatado , documento , nivelAcesso , '']); | 982 | //objTabelaDocEssencial.adicionar([ nomeUpload , dataHora , tamanhoFormatado , documento , nivelAcesso , '']); |
983 | //objTabelaDocEssencial.adicionar([ '-' , nomeUpload , dataHora , dataHora , tamanhoFormatado, documento, 'nivel de acesso', 'acoes' ]); | 983 | //objTabelaDocEssencial.adicionar([ '-' , nomeUpload , dataHora , dataHora , tamanhoFormatado, documento, 'nivel de acesso', 'acoes' ]); |
@@ -1070,7 +1070,7 @@ function carregarCamposDocComplementarUpload(){ | @@ -1070,7 +1070,7 @@ function carregarCamposDocComplementarUpload(){ | ||
1070 | var formatoDocumento = $('input[name="formatoDocumentoComplementar"]:checked').val(); | 1070 | var formatoDocumento = $('input[name="formatoDocumentoComplementar"]:checked').val(); |
1071 | var tipoConferencia = document.getElementById('TipoConferenciaComplementar').value; | 1071 | var tipoConferencia = document.getElementById('TipoConferenciaComplementar').value; |
1072 | 1072 | ||
1073 | - objTabelaDocComplementar.adicionar([ nome , nome , dataHora , '4', tamanhoFormatado , documento , nivelAcesso, hipoteseLegal, formatoDocumento, tipoConferencia, nomeUpload, '' ]); | 1073 | + objTabelaDocComplementar.adicionar([ nome , nome , dataHora , '4', tamanhoFormatado , documento , nivelAcesso, hipoteseLegal, formatoDocumento, tipoConferencia, nomeUpload, cbTpoComplementar.value, '' ]); |
1074 | //objTabelaDocComplementar.adicionar([ '-' , nomeUpload , dataHora , dataHora , tamanhoFormatado, documento, 'nivel de acesso', 'acoes' ]); | 1074 | //objTabelaDocComplementar.adicionar([ '-' , nomeUpload , dataHora , dataHora , tamanhoFormatado, documento, 'nivel de acesso', 'acoes' ]); |
1075 | //objTabelaDocComplementar.adicionar([arr['nome_upload'],arr['nome'],arr['data_hora'],arr['tamanho'],infraFormatarTamanhoBytes(arr['tamanho']),'<?= time() ?>']); | 1075 | //objTabelaDocComplementar.adicionar([arr['nome_upload'],arr['nome'],arr['data_hora'],arr['tamanho'],infraFormatarTamanhoBytes(arr['tamanho']),'<?= time() ?>']); |
1076 | 1076 |
sei/institucional/peticionamento/rn/ProcessoPeticionamentoRN.php
@@ -139,7 +139,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -139,7 +139,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
139 | $objProtocoloDTO->setArrObjObservacaoDTO( array() ); | 139 | $objProtocoloDTO->setArrObjObservacaoDTO( array() ); |
140 | 140 | ||
141 | //Atribuição de dados do procedimento | 141 | //Atribuição de dados do procedimento |
142 | - //TODO: Validar cada uma das informações de entrada do webservice | ||
143 | $objProcedimentoDTO = new ProcedimentoDTO(); | 142 | $objProcedimentoDTO = new ProcedimentoDTO(); |
144 | $objProcedimentoDTO->setNumIdUnidadeGeradoraProtocolo( $unidadeDTO->getNumIdUnidade() ); | 143 | $objProcedimentoDTO->setNumIdUnidadeGeradoraProtocolo( $unidadeDTO->getNumIdUnidade() ); |
145 | $objProcedimentoDTO->setDblIdProcedimento(null); | 144 | $objProcedimentoDTO->setDblIdProcedimento(null); |
@@ -159,9 +158,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -159,9 +158,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
159 | $objUnidadeDTO = $this->atribuirDadosUnidade($objProcedimentoDTO, $unidadeDTO); | 158 | $objUnidadeDTO = $this->atribuirDadosUnidade($objProcedimentoDTO, $unidadeDTO); |
160 | $objProcedimentoDTO->setNumIdUnidadeGeradoraProtocolo( $objUnidadeDTO->getNumIdUnidade() ); | 159 | $objProcedimentoDTO->setNumIdUnidadeGeradoraProtocolo( $objUnidadeDTO->getNumIdUnidade() ); |
161 | 160 | ||
162 | - //TODO: Finalizar criação do procedimento | ||
163 | $objProcedimentoRN = new ProcedimentoPeticionamentoRN(); | 161 | $objProcedimentoRN = new ProcedimentoPeticionamentoRN(); |
164 | - //print_r( $objProcedimentoDTO->getObjProtocoloDTO() ); die(); | ||
165 | $objProcedimentoDTOGerado = $objProcedimentoRN->gerarRN0156($objProcedimentoDTO); | 162 | $objProcedimentoDTOGerado = $objProcedimentoRN->gerarRN0156($objProcedimentoDTO); |
166 | $objProcedimentoDTO->setDblIdProcedimento($objProcedimentoDTOGerado->getDblIdProcedimento()); | 163 | $objProcedimentoDTO->setDblIdProcedimento($objProcedimentoDTOGerado->getDblIdProcedimento()); |
167 | 164 | ||
@@ -206,8 +203,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -206,8 +203,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
206 | 203 | ||
207 | private function montarArrDocumentos( $arrParametros, $objUnidadeDTO, $objProcedimentoDTO, $arrParticipantesParametro, $reciboDTOBasico ){ | 204 | private function montarArrDocumentos( $arrParametros, $objUnidadeDTO, $objProcedimentoDTO, $arrParticipantesParametro, $reciboDTOBasico ){ |
208 | 205 | ||
209 | - //print_r( $reciboDTOBasico ); die(); | ||
210 | - | ||
211 | //tentando simular sessao de usuario interno do SEI | 206 | //tentando simular sessao de usuario interno do SEI |
212 | SessaoSEI::getInstance()->setNumIdUnidadeAtual( $objUnidadeDTO->getNumIdUnidade() ); | 207 | SessaoSEI::getInstance()->setNumIdUnidadeAtual( $objUnidadeDTO->getNumIdUnidade() ); |
213 | SessaoSEI::getInstance()->setNumIdUsuario( SessaoSEIExterna::getInstance()->getNumIdUsuarioExterno() ); | 208 | SessaoSEI::getInstance()->setNumIdUsuario( SessaoSEIExterna::getInstance()->getNumIdUsuarioExterno() ); |
@@ -216,9 +211,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -216,9 +211,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
216 | 211 | ||
217 | //verificar se foi editado documento principal gerado pelo editor do SEI | 212 | //verificar se foi editado documento principal gerado pelo editor do SEI |
218 | if( isset( $arrParametros['docPrincipalConteudoHTML'] ) && $arrParametros['docPrincipalConteudoHTML'] != "" ){ | 213 | if( isset( $arrParametros['docPrincipalConteudoHTML'] ) && $arrParametros['docPrincipalConteudoHTML'] != "" ){ |
219 | - | ||
220 | - //echo "aqui"; die(); | ||
221 | - | 214 | + |
222 | $idTipoProc = $arrParametros['id_tipo_procedimento']; | 215 | $idTipoProc = $arrParametros['id_tipo_procedimento']; |
223 | $objTipoProcDTO = new TipoProcessoPeticionamentoDTO(); | 216 | $objTipoProcDTO = new TipoProcessoPeticionamentoDTO(); |
224 | $objTipoProcDTO->retTodos(true); | 217 | $objTipoProcDTO->retTodos(true); |
@@ -262,19 +255,10 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -262,19 +255,10 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
262 | } | 255 | } |
263 | 256 | ||
264 | //tratando documentos essenciais e complementares | 257 | //tratando documentos essenciais e complementares |
265 | - //hdnDocPrincipal | ||
266 | - //echo "aqui 3"; die(); | ||
267 | - //print_r( $objProcedimentoDTO ); die(); | ||
268 | $anexoRN = new AnexoPeticionamentoRN(); | 258 | $anexoRN = new AnexoPeticionamentoRN(); |
269 | $strSiglaUsuario = SessaoSEIExterna::getInstance()->getStrSiglaUsuarioExterno(); | 259 | $strSiglaUsuario = SessaoSEIExterna::getInstance()->getStrSiglaUsuarioExterno(); |
270 | 260 | ||
271 | - //print_r( $arrParametros['hdnDocPrincipal'] ); echo " <hr/> "; | ||
272 | - //print_r( $arrParametros['hdnDocEssencial'] ); echo " <hr/> "; | ||
273 | - //print_r( $arrParametros['hdnDocComplementar'] ); echo " <hr/> "; die(); | ||
274 | - | ||
275 | if( isset( $arrParametros['hdnDocPrincipal'] ) && $arrParametros['hdnDocPrincipal'] != "") { | 261 | if( isset( $arrParametros['hdnDocPrincipal'] ) && $arrParametros['hdnDocPrincipal'] != "") { |
276 | - | ||
277 | - //echo $arrParametros['hdnDocPrincipal']; die(); | ||
278 | 262 | ||
279 | $arrAnexoDocPrincipal = $this->processarStringAnexos( $arrParametros['hdnDocPrincipal'] , | 263 | $arrAnexoDocPrincipal = $this->processarStringAnexos( $arrParametros['hdnDocPrincipal'] , |
280 | $objUnidadeDTO->getNumIdUnidade() , | 264 | $objUnidadeDTO->getNumIdUnidade() , |
@@ -283,34 +267,128 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -283,34 +267,128 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
283 | $objProcedimentoDTO->getDblIdProcedimento() ); | 267 | $objProcedimentoDTO->getDblIdProcedimento() ); |
284 | 268 | ||
285 | $arrAnexoPrincipalVinculacaoProcesso = array(); | 269 | $arrAnexoPrincipalVinculacaoProcesso = array(); |
286 | - | 270 | + $arrLinhasAnexos = PaginaSEI::getInstance()->getArrItensTabelaDinamica( $arrParametros['hdnDocPrincipal'] ); |
271 | + $contador = 0; | ||
272 | + $objDocumentoRN = new DocumentoRN(); | ||
273 | + | ||
287 | foreach( $arrAnexoDocPrincipal as $itemAnexo ){ | 274 | foreach( $arrAnexoDocPrincipal as $itemAnexo ){ |
288 | 275 | ||
289 | - //print_r( $itemAnexo ); die(); | 276 | + //================================ |
277 | + //PROTOCOLO / DOCUMENTO DO ANEXO | ||
278 | + //================================= | ||
279 | + | ||
280 | + $idSerieAnexo = $arrLinhasAnexos[ $contador ][9]; | ||
281 | + $idTipoConferencia = $arrLinhasAnexos[ $contador ][7]; | ||
282 | + | ||
283 | + $idNivelAcesso = null; | ||
284 | + | ||
285 | + if( $arrLinhasAnexos[ $contador ][4] == "Público" ){ | ||
286 | + $idNivelAcesso = ProtocoloRN::$NA_PUBLICO; | ||
287 | + } else if( $arrLinhasAnexos[ $contador ][4] == "Restrito" ){ | ||
288 | + $idNivelAcesso = ProtocoloRN::$NA_RESTRITO; | ||
289 | + } | ||
290 | + | ||
291 | + $idHipoteseLegal = $arrLinhasAnexos[ $contador ][5]; | ||
292 | + $idGrauSigilo = null; | ||
293 | + | ||
294 | + //criando registro em protocolo | ||
295 | + $objDocumentoDTO = new DocumentoDTO(); | ||
296 | + $objDocumentoDTO->setDblIdDocumento(null); | ||
297 | + $objDocumentoDTO->setDblIdProcedimento( $objProcedimentoDTO->getDblIdProcedimento() ); | ||
298 | + | ||
299 | + $objProtocoloDTO = new ProtocoloDTO(); | ||
300 | + $objProtocoloDTO->setDblIdProtocolo(null); | ||
301 | + | ||
302 | + $objDocumentoDTO->setNumIdSerie( $idSerieAnexo ); | ||
303 | + $objProtocoloDTO->setNumIdSerieDocumento( $idSerieAnexo ); | ||
304 | + | ||
305 | + $objDocumentoDTO->setDblIdDocumentoEdoc( null ); | ||
306 | + $objDocumentoDTO->setDblIdDocumentoEdocBase( null ); | ||
307 | + $objDocumentoDTO->setNumIdUnidadeResponsavel( SessaoSEI::getInstance()->getNumIdUnidadeAtual() ); | ||
308 | + $objDocumentoDTO->setStrNumero(null); | ||
309 | + $objDocumentoDTO->setNumIdTipoConferencia( $idTipoConferencia ); | ||
310 | + $objDocumentoDTO->setStrSinFormulario('N'); | ||
311 | + $objDocumentoDTO->setStrSinBloqueado('N'); | ||
312 | + | ||
313 | + $objDocumentoDTO->setStrStaEditor( null ); | ||
314 | + | ||
315 | + $objDocumentoDTO->setNumVersaoLock(0); | ||
316 | + | ||
317 | + $arrObjUnidadeDTOReabertura = array(); | ||
318 | + //se setar array da unidade pode cair na regra: "Unidade <nome-Unidade> não está sinalizada como protocolo." | ||
319 | + //nao esta fazendo reabertura de processo - trata-se de processo novo | ||
320 | + //$arrObjUnidadeDTOReabertura[] = $objUnidadeDTO; | ||
321 | + $objDocumentoDTO->setArrObjUnidadeDTO($arrObjUnidadeDTOReabertura); | ||
322 | + | ||
323 | + $objProtocoloDTO->setStrStaNivelAcessoLocal( $idNivelAcesso ); | ||
324 | + $objProtocoloDTO->setNumIdHipoteseLegal( $idHipoteseLegal ); | ||
325 | + $objProtocoloDTO->setStrStaGrauSigilo( $idGrauSigilo ); | ||
326 | + | ||
327 | + $objProtocoloDTO->setStrDescricao(''); | ||
328 | + $objProtocoloDTO->setDtaGeracao(InfraData::getStrDataAtual()); | ||
329 | + | ||
330 | + //$arrAssuntos = PaginaSEI::getInstance()->getArrValuesSelect($_POST['hdnAssuntos']); | ||
331 | + //ASSUNTOS | ||
332 | + $arrObjAssuntosDTO = array(); | ||
333 | + $objProtocoloDTO->setArrObjRelProtocoloAssuntoDTO($arrObjAssuntosDTO); | ||
334 | + | ||
335 | + //INTERESSADOS | ||
336 | + $arrObjParticipantesDTO = array(); | ||
337 | + $objProtocoloDTO->setArrObjParticipanteDTO($arrObjParticipantesDTO); | ||
338 | + | ||
339 | + //OBSERVACOES | ||
340 | + $objObservacaoDTO = new ObservacaoDTO(); | ||
341 | + $objObservacaoDTO->setStrDescricao(''); | ||
342 | + $objProtocoloDTO->setArrObjObservacaoDTO(array($objObservacaoDTO)); | ||
343 | + | ||
344 | + //ATRIBUTOS | ||
345 | + $arrRelProtocoloAtributo = AtributoINT::processarRI0691(); | ||
346 | + $arrObjRelProtocoloAtributoDTO = array(); | ||
347 | + for($x = 0;$x<count($arrRelProtocoloAtributo);$x++){ | ||
348 | + $arrRelProtocoloAtributoDTO = new RelProtocoloAtributoDTO(); | ||
349 | + $arrRelProtocoloAtributoDTO->setStrValor($arrRelProtocoloAtributo[$x]->getStrValor()); | ||
350 | + $arrRelProtocoloAtributoDTO->setNumIdAtributo($arrRelProtocoloAtributo[$x]->getNumIdAtributo()); | ||
351 | + $arrObjRelProtocoloAtributoDTO[$x] = $arrRelProtocoloAtributoDTO; | ||
352 | + } | ||
353 | + $objProtocoloDTO->setArrObjRelProtocoloAtributoDTO($arrObjRelProtocoloAtributoDTO); | ||
354 | + | ||
355 | + //ANEXOS | ||
356 | + $objProtocoloDTO->setArrObjAnexoDTO( array() ); | ||
357 | + //$objProtocoloDTO->setArrObjAnexoDTO(AnexoINT::processarRI0872($_POST['hdnAnexos'])); | ||
358 | + | ||
359 | + $objDocumentoDTO->setObjProtocoloDTO($objProtocoloDTO); | ||
360 | + | ||
361 | + $objDocumentoDTO->setNumIdTextoPadraoInterno(''); | ||
362 | + $objDocumentoDTO->setStrProtocoloDocumentoTextoBase(''); | ||
363 | + $objDocumentoDTO = $objDocumentoRN->receberRN0991($objDocumentoDTO); | ||
364 | + | ||
365 | + //============================= | ||
366 | + //criando registro em anexo | ||
367 | + //============================= | ||
290 | $strTamanho = str_replace("","Kb", $itemAnexo->getNumTamanho() ); | 368 | $strTamanho = str_replace("","Kb", $itemAnexo->getNumTamanho() ); |
291 | - $itemAnexo->setDblIdProtocolo( $objProcedimentoDTO->getDblIdProcedimento() ); | 369 | + $strTamanho = str_replace("","Mb", $strTamanho ); |
370 | + | ||
371 | + //TODO aplicar regra para validar tamanho do anexo enviado | ||
372 | + | ||
373 | + $itemAnexo->setDblIdProtocolo( $objDocumentoDTO->getDblIdDocumento() ); | ||
292 | $itemAnexo->setNumIdUnidade( $objUnidadeDTO->getNumIdUnidade() ); | 374 | $itemAnexo->setNumIdUnidade( $objUnidadeDTO->getNumIdUnidade() ); |
293 | $itemAnexo->setNumTamanho( (int)$strTamanho ); | 375 | $itemAnexo->setNumTamanho( (int)$strTamanho ); |
294 | $itemAnexo->setNumIdUsuario( SessaoSEIExterna::getInstance()->getNumIdUsuarioExterno() ); | 376 | $itemAnexo->setNumIdUsuario( SessaoSEIExterna::getInstance()->getNumIdUsuarioExterno() ); |
295 | $itemAnexo->setStrSinAtivo('S'); | 377 | $itemAnexo->setStrSinAtivo('S'); |
296 | - //print_r( $itemAnexo ); die(); | ||
297 | $itemAnexo = $anexoRN->cadastrarRN0172( $itemAnexo ); | 378 | $itemAnexo = $anexoRN->cadastrarRN0172( $itemAnexo ); |
298 | $arrAnexoPrincipalVinculacaoProcesso[] = $itemAnexo; | 379 | $arrAnexoPrincipalVinculacaoProcesso[] = $itemAnexo; |
380 | + $contador = $contador+1; | ||
299 | 381 | ||
300 | } | 382 | } |
301 | 383 | ||
302 | //cria o protocolo, cria o documento, e no documento aponta o procedimento (o processo) | 384 | //cria o protocolo, cria o documento, e no documento aponta o procedimento (o processo) |
303 | $arrParametros['CLASSIFICACAO_RECIBO'] = ReciboDocumentoAnexoPeticionamentoRN::$TP_PRINCIPAL; | 385 | $arrParametros['CLASSIFICACAO_RECIBO'] = ReciboDocumentoAnexoPeticionamentoRN::$TP_PRINCIPAL; |
304 | 386 | ||
305 | - //print_r( $reciboDTOBasico ); die(); | ||
306 | - | ||
307 | $this->montarProtocoloDocumentoAnexo( $arrParametros, $objUnidadeDTO, $objProcedimentoDTO, | 387 | $this->montarProtocoloDocumentoAnexo( $arrParametros, $objUnidadeDTO, $objProcedimentoDTO, |
308 | $arrParticipantesParametro, $arrAnexoPrincipalVinculacaoProcesso, $reciboDTOBasico ); | 388 | $arrParticipantesParametro, $arrAnexoPrincipalVinculacaoProcesso, $reciboDTOBasico ); |
309 | 389 | ||
310 | } | 390 | } |
311 | 391 | ||
312 | - //echo "aqui = passou do principal"; die(); | ||
313 | - | ||
314 | if( isset( $arrParametros['hdnDocEssencial'] ) && $arrParametros['hdnDocEssencial'] != "") { | 392 | if( isset( $arrParametros['hdnDocEssencial'] ) && $arrParametros['hdnDocEssencial'] != "") { |
315 | 393 | ||
316 | $arrAnexoDocEssencial = $this->processarStringAnexos( $arrParametros['hdnDocEssencial'] , | 394 | $arrAnexoDocEssencial = $this->processarStringAnexos( $arrParametros['hdnDocEssencial'] , |
@@ -323,10 +401,106 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -323,10 +401,106 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
323 | $arrAnexoEssencialVinculacaoProcesso = array(); | 401 | $arrAnexoEssencialVinculacaoProcesso = array(); |
324 | $arrAnexoComplementarVinculacaoProcesso = array(); | 402 | $arrAnexoComplementarVinculacaoProcesso = array(); |
325 | 403 | ||
404 | + $arrLinhasAnexos = PaginaSEI::getInstance()->getArrItensTabelaDinamica( $arrParametros['hdnDocEssencial'] ); | ||
405 | + $contador = 0; | ||
406 | + | ||
326 | foreach( $arrAnexoDocEssencial as $itemAnexo ){ | 407 | foreach( $arrAnexoDocEssencial as $itemAnexo ){ |
327 | 408 | ||
328 | - //print_r($itemAnexo);die(); | 409 | + //================================ |
410 | + //PROTOCOLO / DOCUMENTO DO ANEXO | ||
411 | + //================================= | ||
412 | + | ||
413 | + $idSerieAnexo = $arrLinhasAnexos[ $contador ][9]; | ||
414 | + $idTipoConferencia = $arrLinhasAnexos[ $contador ][7]; | ||
415 | + | ||
416 | + $idNivelAcesso = null; | ||
417 | + | ||
418 | + if( $arrLinhasAnexos[ $contador ][4] == "Público" ){ | ||
419 | + $idNivelAcesso = ProtocoloRN::$NA_PUBLICO; | ||
420 | + } else if( $arrLinhasAnexos[ $contador ][4] == "Restrito" ){ | ||
421 | + $idNivelAcesso = ProtocoloRN::$NA_RESTRITO; | ||
422 | + } | ||
423 | + | ||
424 | + $idHipoteseLegal = $arrLinhasAnexos[ $contador ][5]; | ||
425 | + $idGrauSigilo = null; | ||
426 | + | ||
427 | + //criando registro em protocolo | ||
428 | + $objDocumentoDTO = new DocumentoDTO(); | ||
429 | + $objDocumentoDTO->setDblIdDocumento(null); | ||
430 | + $objDocumentoDTO->setDblIdProcedimento( $objProcedimentoDTO->getDblIdProcedimento() ); | ||
431 | + | ||
432 | + $objProtocoloDTO = new ProtocoloDTO(); | ||
433 | + $objProtocoloDTO->setDblIdProtocolo(null); | ||
434 | + | ||
435 | + $objDocumentoDTO->setNumIdSerie( $idSerieAnexo ); | ||
436 | + $objProtocoloDTO->setNumIdSerieDocumento( $idSerieAnexo ); | ||
437 | + | ||
438 | + $objDocumentoDTO->setDblIdDocumentoEdoc( null ); | ||
439 | + $objDocumentoDTO->setDblIdDocumentoEdocBase( null ); | ||
440 | + $objDocumentoDTO->setNumIdUnidadeResponsavel( SessaoSEI::getInstance()->getNumIdUnidadeAtual() ); | ||
441 | + $objDocumentoDTO->setStrNumero(null); | ||
442 | + $objDocumentoDTO->setNumIdTipoConferencia( $idTipoConferencia ); | ||
443 | + $objDocumentoDTO->setStrSinFormulario('N'); | ||
444 | + $objDocumentoDTO->setStrSinBloqueado('N'); | ||
445 | + | ||
446 | + $objDocumentoDTO->setStrStaEditor( null ); | ||
447 | + | ||
448 | + $objDocumentoDTO->setNumVersaoLock(0); | ||
449 | + | ||
450 | + $arrObjUnidadeDTOReabertura = array(); | ||
451 | + //se setar array da unidade pode cair na regra: "Unidade <nome-Unidade> não está sinalizada como protocolo." | ||
452 | + //nao esta fazendo reabertura de processo - trata-se de processo novo | ||
453 | + //$arrObjUnidadeDTOReabertura[] = $objUnidadeDTO; | ||
454 | + $objDocumentoDTO->setArrObjUnidadeDTO($arrObjUnidadeDTOReabertura); | ||
455 | + | ||
456 | + $objProtocoloDTO->setStrStaNivelAcessoLocal( $idNivelAcesso ); | ||
457 | + $objProtocoloDTO->setNumIdHipoteseLegal( $idHipoteseLegal ); | ||
458 | + $objProtocoloDTO->setStrStaGrauSigilo( $idGrauSigilo ); | ||
459 | + | ||
460 | + $objProtocoloDTO->setStrDescricao(''); | ||
461 | + $objProtocoloDTO->setDtaGeracao(InfraData::getStrDataAtual()); | ||
462 | + | ||
463 | + //$arrAssuntos = PaginaSEI::getInstance()->getArrValuesSelect($_POST['hdnAssuntos']); | ||
464 | + //ASSUNTOS | ||
465 | + $arrObjAssuntosDTO = array(); | ||
466 | + $objProtocoloDTO->setArrObjRelProtocoloAssuntoDTO($arrObjAssuntosDTO); | ||
467 | + | ||
468 | + //INTERESSADOS | ||
469 | + $arrObjParticipantesDTO = array(); | ||
470 | + $objProtocoloDTO->setArrObjParticipanteDTO($arrObjParticipantesDTO); | ||
471 | + | ||
472 | + //OBSERVACOES | ||
473 | + $objObservacaoDTO = new ObservacaoDTO(); | ||
474 | + $objObservacaoDTO->setStrDescricao(''); | ||
475 | + $objProtocoloDTO->setArrObjObservacaoDTO(array($objObservacaoDTO)); | ||
476 | + | ||
477 | + //ATRIBUTOS | ||
478 | + $arrRelProtocoloAtributo = AtributoINT::processarRI0691(); | ||
479 | + $arrObjRelProtocoloAtributoDTO = array(); | ||
480 | + for($x = 0;$x<count($arrRelProtocoloAtributo);$x++){ | ||
481 | + $arrRelProtocoloAtributoDTO = new RelProtocoloAtributoDTO(); | ||
482 | + $arrRelProtocoloAtributoDTO->setStrValor($arrRelProtocoloAtributo[$x]->getStrValor()); | ||
483 | + $arrRelProtocoloAtributoDTO->setNumIdAtributo($arrRelProtocoloAtributo[$x]->getNumIdAtributo()); | ||
484 | + $arrObjRelProtocoloAtributoDTO[$x] = $arrRelProtocoloAtributoDTO; | ||
485 | + } | ||
486 | + $objProtocoloDTO->setArrObjRelProtocoloAtributoDTO($arrObjRelProtocoloAtributoDTO); | ||
487 | + | ||
488 | + //ANEXOS | ||
489 | + $objProtocoloDTO->setArrObjAnexoDTO( array() ); | ||
490 | + //$objProtocoloDTO->setArrObjAnexoDTO(AnexoINT::processarRI0872($_POST['hdnAnexos'])); | ||
491 | + | ||
492 | + $objDocumentoDTO->setObjProtocoloDTO($objProtocoloDTO); | ||
493 | + | ||
494 | + $objDocumentoDTO->setNumIdTextoPadraoInterno(''); | ||
495 | + $objDocumentoDTO->setStrProtocoloDocumentoTextoBase(''); | ||
496 | + $objDocumentoDTO = $objDocumentoRN->receberRN0991($objDocumentoDTO); | ||
497 | + | ||
498 | + //================================== | ||
499 | + //CRIANDO ANEXOS | ||
500 | + //================================= | ||
501 | + | ||
329 | $strTamanho = str_replace("","Kb", $itemAnexo->getNumTamanho() ); | 502 | $strTamanho = str_replace("","Kb", $itemAnexo->getNumTamanho() ); |
503 | + $strTamanho = str_replace("","Mb", $strTamanho ); | ||
330 | $itemAnexo->setDblIdProtocolo( $objProcedimentoDTO->getDblIdProcedimento() ); | 504 | $itemAnexo->setDblIdProtocolo( $objProcedimentoDTO->getDblIdProcedimento() ); |
331 | $itemAnexo->setNumIdUnidade( $objUnidadeDTO->getNumIdUnidade() ); | 505 | $itemAnexo->setNumIdUnidade( $objUnidadeDTO->getNumIdUnidade() ); |
332 | $itemAnexo->setNumTamanho( (int)$strTamanho ); | 506 | $itemAnexo->setNumTamanho( (int)$strTamanho ); |
@@ -335,14 +509,13 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -335,14 +509,13 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
335 | //print_r( $itemAnexo ); die(); | 509 | //print_r( $itemAnexo ); die(); |
336 | $itemAnexo = $anexoRN->cadastrarRN0172( $itemAnexo ); | 510 | $itemAnexo = $anexoRN->cadastrarRN0172( $itemAnexo ); |
337 | $arrAnexoEssencialVinculacaoProcesso[] = $itemAnexo; | 511 | $arrAnexoEssencialVinculacaoProcesso[] = $itemAnexo; |
512 | + $contador = $contador+1; | ||
338 | 513 | ||
339 | } | 514 | } |
340 | 515 | ||
341 | //cria o protocolo, cria o documento, e no documento aponta o procedimento (o processo) | 516 | //cria o protocolo, cria o documento, e no documento aponta o procedimento (o processo) |
342 | $arrParametros['CLASSIFICACAO_RECIBO'] = ReciboDocumentoAnexoPeticionamentoRN::$TP_ESSENCIAL; | 517 | $arrParametros['CLASSIFICACAO_RECIBO'] = ReciboDocumentoAnexoPeticionamentoRN::$TP_ESSENCIAL; |
343 | 518 | ||
344 | - //print_r( $reciboDTOBasico ); die(); | ||
345 | - | ||
346 | $this->montarProtocoloDocumentoAnexo( $arrParametros, $objUnidadeDTO, $objProcedimentoDTO, | 519 | $this->montarProtocoloDocumentoAnexo( $arrParametros, $objUnidadeDTO, $objProcedimentoDTO, |
347 | $arrParticipantesParametro, $arrAnexoEssencialVinculacaoProcesso, $reciboDTOBasico ); | 520 | $arrParticipantesParametro, $arrAnexoEssencialVinculacaoProcesso, $reciboDTOBasico ); |
348 | 521 | ||
@@ -358,149 +531,146 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -358,149 +531,146 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
358 | 531 | ||
359 | //$arrAnexoDocComplementar = AnexoINT::processarRI0872( $arrParametros['hdnDocComplementar'] ); | 532 | //$arrAnexoDocComplementar = AnexoINT::processarRI0872( $arrParametros['hdnDocComplementar'] ); |
360 | 533 | ||
534 | + $arrLinhasAnexos = PaginaSEI::getInstance()->getArrItensTabelaDinamica( $arrParametros['hdnDocComplementar'] ); | ||
535 | + $contador = 0; | ||
536 | + | ||
361 | foreach( $arrAnexoDocComplementar as $itemAnexoComplementar ){ | 537 | foreach( $arrAnexoDocComplementar as $itemAnexoComplementar ){ |
362 | 538 | ||
539 | + //================================ | ||
540 | + //PROTOCOLO / DOCUMENTO DO ANEXO | ||
541 | + //================================= | ||
542 | + | ||
543 | + $idSerieAnexo = $arrLinhasAnexos[ $contador ][9]; | ||
544 | + $idTipoConferencia = $arrLinhasAnexos[ $contador ][7]; | ||
545 | + | ||
546 | + $idNivelAcesso = null; | ||
547 | + | ||
548 | + if( $arrLinhasAnexos[ $contador ][4] == "Público" ){ | ||
549 | + $idNivelAcesso = ProtocoloRN::$NA_PUBLICO; | ||
550 | + } else if( $arrLinhasAnexos[ $contador ][4] == "Restrito" ){ | ||
551 | + $idNivelAcesso = ProtocoloRN::$NA_RESTRITO; | ||
552 | + } | ||
553 | + | ||
554 | + $idHipoteseLegal = $arrLinhasAnexos[ $contador ][5]; | ||
555 | + $idGrauSigilo = null; | ||
556 | + | ||
557 | + //criando registro em protocolo | ||
558 | + $objDocumentoDTO = new DocumentoDTO(); | ||
559 | + $objDocumentoDTO->setDblIdDocumento(null); | ||
560 | + $objDocumentoDTO->setDblIdProcedimento( $objProcedimentoDTO->getDblIdProcedimento() ); | ||
561 | + | ||
562 | + $objProtocoloDTO = new ProtocoloDTO(); | ||
563 | + $objProtocoloDTO->setDblIdProtocolo(null); | ||
564 | + | ||
565 | + $objDocumentoDTO->setNumIdSerie( $idSerieAnexo ); | ||
566 | + $objProtocoloDTO->setNumIdSerieDocumento( $idSerieAnexo ); | ||
567 | + | ||
568 | + $objDocumentoDTO->setDblIdDocumentoEdoc( null ); | ||
569 | + $objDocumentoDTO->setDblIdDocumentoEdocBase( null ); | ||
570 | + $objDocumentoDTO->setNumIdUnidadeResponsavel( SessaoSEI::getInstance()->getNumIdUnidadeAtual() ); | ||
571 | + $objDocumentoDTO->setStrNumero(null); | ||
572 | + $objDocumentoDTO->setNumIdTipoConferencia( $idTipoConferencia ); | ||
573 | + $objDocumentoDTO->setStrSinFormulario('N'); | ||
574 | + $objDocumentoDTO->setStrSinBloqueado('N'); | ||
575 | + | ||
576 | + $objDocumentoDTO->setStrStaEditor( null ); | ||
577 | + | ||
578 | + $objDocumentoDTO->setNumVersaoLock(0); | ||
579 | + | ||
580 | + $arrObjUnidadeDTOReabertura = array(); | ||
581 | + //se setar array da unidade pode cair na regra: "Unidade <nome-Unidade> não está sinalizada como protocolo." | ||
582 | + //nao esta fazendo reabertura de processo - trata-se de processo novo | ||
583 | + //$arrObjUnidadeDTOReabertura[] = $objUnidadeDTO; | ||
584 | + $objDocumentoDTO->setArrObjUnidadeDTO($arrObjUnidadeDTOReabertura); | ||
585 | + | ||
586 | + $objProtocoloDTO->setStrStaNivelAcessoLocal( $idNivelAcesso ); | ||
587 | + $objProtocoloDTO->setNumIdHipoteseLegal( $idHipoteseLegal ); | ||
588 | + $objProtocoloDTO->setStrStaGrauSigilo( $idGrauSigilo ); | ||
589 | + | ||
590 | + $objProtocoloDTO->setStrDescricao(''); | ||
591 | + $objProtocoloDTO->setDtaGeracao(InfraData::getStrDataAtual()); | ||
592 | + | ||
593 | + //$arrAssuntos = PaginaSEI::getInstance()->getArrValuesSelect($_POST['hdnAssuntos']); | ||
594 | + //ASSUNTOS | ||
595 | + $arrObjAssuntosDTO = array(); | ||
596 | + $objProtocoloDTO->setArrObjRelProtocoloAssuntoDTO($arrObjAssuntosDTO); | ||
597 | + | ||
598 | + //INTERESSADOS | ||
599 | + $arrObjParticipantesDTO = array(); | ||
600 | + $objProtocoloDTO->setArrObjParticipanteDTO($arrObjParticipantesDTO); | ||
601 | + | ||
602 | + //OBSERVACOES | ||
603 | + $objObservacaoDTO = new ObservacaoDTO(); | ||
604 | + $objObservacaoDTO->setStrDescricao(''); | ||
605 | + $objProtocoloDTO->setArrObjObservacaoDTO(array($objObservacaoDTO)); | ||
606 | + | ||
607 | + //ATRIBUTOS | ||
608 | + $arrRelProtocoloAtributo = AtributoINT::processarRI0691(); | ||
609 | + $arrObjRelProtocoloAtributoDTO = array(); | ||
610 | + for($x = 0;$x<count($arrRelProtocoloAtributo);$x++){ | ||
611 | + $arrRelProtocoloAtributoDTO = new RelProtocoloAtributoDTO(); | ||
612 | + $arrRelProtocoloAtributoDTO->setStrValor($arrRelProtocoloAtributo[$x]->getStrValor()); | ||
613 | + $arrRelProtocoloAtributoDTO->setNumIdAtributo($arrRelProtocoloAtributo[$x]->getNumIdAtributo()); | ||
614 | + $arrObjRelProtocoloAtributoDTO[$x] = $arrRelProtocoloAtributoDTO; | ||
615 | + } | ||
616 | + $objProtocoloDTO->setArrObjRelProtocoloAtributoDTO($arrObjRelProtocoloAtributoDTO); | ||
617 | + | ||
618 | + //ANEXOS | ||
619 | + $objProtocoloDTO->setArrObjAnexoDTO( array() ); | ||
620 | + //$objProtocoloDTO->setArrObjAnexoDTO(AnexoINT::processarRI0872($_POST['hdnAnexos'])); | ||
621 | + | ||
622 | + $objDocumentoDTO->setObjProtocoloDTO($objProtocoloDTO); | ||
623 | + | ||
624 | + $objDocumentoDTO->setNumIdTextoPadraoInterno(''); | ||
625 | + $objDocumentoDTO->setStrProtocoloDocumentoTextoBase(''); | ||
626 | + $objDocumentoDTO = $objDocumentoRN->receberRN0991($objDocumentoDTO); | ||
627 | + | ||
628 | + //======================== | ||
629 | + //CRIANDO ANEXOS | ||
630 | + //======================== | ||
363 | $strTamanho = str_replace("","Kb", $itemAnexo->getNumTamanho() ); | 631 | $strTamanho = str_replace("","Kb", $itemAnexo->getNumTamanho() ); |
364 | - $itemAnexoComplementar->setDblIdProtocolo( $objProcedimentoDTO->getDblIdProcedimento() ); | 632 | + $strTamanho = str_replace("","Mb", $strTamanho ); |
633 | + $itemAnexoComplementar->setDblIdProtocolo( $objDocumentoDTO->getDblIdDocumento() ); | ||
365 | $itemAnexoComplementar->setNumIdUnidade( $objUnidadeDTO->getNumIdUnidade() ); | 634 | $itemAnexoComplementar->setNumIdUnidade( $objUnidadeDTO->getNumIdUnidade() ); |
366 | $itemAnexoComplementar->setNumTamanho( (int)$strTamanho ); | 635 | $itemAnexoComplementar->setNumTamanho( (int)$strTamanho ); |
367 | $itemAnexoComplementar->setNumIdUsuario( SessaoSEIExterna::getInstance()->getNumIdUsuarioExterno() ); | 636 | $itemAnexoComplementar->setNumIdUsuario( SessaoSEIExterna::getInstance()->getNumIdUsuarioExterno() ); |
368 | $itemAnexoComplementar->setStrSinAtivo('S'); | 637 | $itemAnexoComplementar->setStrSinAtivo('S'); |
369 | $itemAnexoComplementar = $anexoRN->cadastrarRN0172( $itemAnexoComplementar ); | 638 | $itemAnexoComplementar = $anexoRN->cadastrarRN0172( $itemAnexoComplementar ); |
370 | $arrAnexoComplementarVinculacaoProcesso[] = $itemAnexoComplementar; | 639 | $arrAnexoComplementarVinculacaoProcesso[] = $itemAnexoComplementar; |
640 | + $contador = $contador+1; | ||
371 | } | 641 | } |
372 | 642 | ||
373 | //cria o protocolo, cria o documento, e no documento aponta o procedimento (o processo) | 643 | //cria o protocolo, cria o documento, e no documento aponta o procedimento (o processo) |
374 | $arrParametros['CLASSIFICACAO_RECIBO'] = ReciboDocumentoAnexoPeticionamentoRN::$TP_COMPLEMENTAR; | 644 | $arrParametros['CLASSIFICACAO_RECIBO'] = ReciboDocumentoAnexoPeticionamentoRN::$TP_COMPLEMENTAR; |
375 | 645 | ||
376 | - //print_r( $reciboDTOBasico ); die(); | ||
377 | - | ||
378 | $this->montarProtocoloDocumentoAnexo( $arrParametros, $objUnidadeDTO, $objProcedimentoDTO, | 646 | $this->montarProtocoloDocumentoAnexo( $arrParametros, $objUnidadeDTO, $objProcedimentoDTO, |
379 | $arrParticipantesParametro, $arrAnexoComplementarVinculacaoProcesso, $reciboDTOBasico ); | 647 | $arrParticipantesParametro, $arrAnexoComplementarVinculacaoProcesso, $reciboDTOBasico ); |
380 | 648 | ||
381 | - | ||
382 | - | ||
383 | } | 649 | } |
384 | 650 | ||
385 | } | 651 | } |
386 | 652 | ||
387 | private function montarProtocoloDocumentoAnexo( $arrParametros, $objUnidadeDTO, $objProcedimentoDTO, | 653 | private function montarProtocoloDocumentoAnexo( $arrParametros, $objUnidadeDTO, $objProcedimentoDTO, |
388 | $arrParticipantesParametro, $arrAnexos, $reciboDTOBasico ){ | 654 | $arrParticipantesParametro, $arrAnexos, $reciboDTOBasico ){ |
389 | - | ||
390 | - | 655 | + |
391 | $reciboAnexoRN = new ReciboDocumentoAnexoPeticionamentoRN(); | 656 | $reciboAnexoRN = new ReciboDocumentoAnexoPeticionamentoRN(); |
392 | - $strClassificacao = $arrParametros['CLASSIFICACAO_RECIBO']; | ||
393 | - //print_r( $reciboDTOBasico ); die(); | ||
394 | - | 657 | + $strClassificacao = $arrParametros['CLASSIFICACAO_RECIBO']; |
658 | + | ||
395 | foreach( $arrAnexos as $anexoDTOVinculado){ | 659 | foreach( $arrAnexos as $anexoDTOVinculado){ |
396 | - | ||
397 | - $protocoloRN = new ProtocoloPeticionamentoRN(); | ||
398 | - $numeroDocumento = $protocoloRN->gerarNumeracaoDocumento(); | ||
399 | - | ||
400 | - // ============================================= | ||
401 | - // MONTAGEM DO PROTOCOLODTO DO DOCUMENTO | ||
402 | - // ============================================= | ||
403 | - | ||
404 | - $strChave = "ID_SERIE_RECIBO_MODULO_PETICIONAMENTO"; | ||
405 | - $objInfraParametro = new InfraParametro( $this->getObjInfraIBanco() ); | ||
406 | - $idSerieParametro = $objInfraParametro->getValor($strChave); | ||
407 | - | ||
408 | - $protocoloReciboDocumentoDTO = new ProtocoloDTO(); | ||
409 | - | ||
410 | - $protocoloReciboDocumentoDTO->setDblIdProtocolo(null); | ||
411 | - $protocoloReciboDocumentoDTO->setStrDescricao( null ); | ||
412 | - $protocoloReciboDocumentoDTO->setStrStaNivelAcessoLocal( ProtocoloRN::$NA_PUBLICO ); | ||
413 | - $protocoloReciboDocumentoDTO->setStrProtocoloFormatado( $numeroDocumento ); | ||
414 | - $protocoloReciboDocumentoDTO->setStrProtocoloFormatadoPesquisa( $numeroDocumento ); | ||
415 | - $protocoloReciboDocumentoDTO->setNumIdUnidadeGeradora( $objUnidadeDTO->getNumIdUnidade() ); | ||
416 | - $protocoloReciboDocumentoDTO->setNumIdUsuarioGerador( SessaoSEIExterna::getInstance()->getNumIdUsuarioExterno() ); | ||
417 | - $protocoloReciboDocumentoDTO->setStrStaProtocolo( ProtocoloRN::$TP_DOCUMENTO_GERADO ); | ||
418 | - | ||
419 | - $protocoloReciboDocumentoDTO->setStrStaNivelAcessoLocal( ProtocoloRN::$NA_PUBLICO ); | ||
420 | - $protocoloReciboDocumentoDTO->setNumIdHipoteseLegal( $hipoteseLegalDocPrincipal ); | ||
421 | - $protocoloReciboDocumentoDTO->setStrStaGrauSigilo(''); | ||
422 | - | ||
423 | - $protocoloReciboDocumentoDTO->setDtaGeracao( InfraData::getStrDataAtual() ); | ||
424 | - $protocoloReciboDocumentoDTO->setArrObjAnexoDTO(array()); | ||
425 | - $protocoloReciboDocumentoDTO->setArrObjRelProtocoloAssuntoDTO(array()); | ||
426 | - $protocoloReciboDocumentoDTO->setArrObjRelProtocoloProtocoloDTO(array()); | ||
427 | - | ||
428 | - $protocoloReciboDocumentoDTO->setStrStaEstado( ProtocoloRN::$TE_NORMAL ); | ||
429 | - $protocoloReciboDocumentoDTO->setStrStaArquivamento(ProtocoloRN::$TA_NAO_ARQUIVADO); | ||
430 | - $protocoloReciboDocumentoDTO->setNumIdLocalizador(null); | ||
431 | - $protocoloReciboDocumentoDTO->setNumIdUnidadeArquivamento(null); | ||
432 | - $protocoloReciboDocumentoDTO->setNumIdUsuarioArquivamento(null); | ||
433 | - $protocoloReciboDocumentoDTO->setDthArquivamento(null); | ||
434 | - $protocoloReciboDocumentoDTO->setArrObjObservacaoDTO( array() ); | ||
435 | - $protocoloReciboDocumentoDTO->setArrObjParticipanteDTO( $arrParticipantesParametro ); | ||
436 | - $protocoloReciboDocumentoDTO->setNumIdSerieDocumento( $idSerieParametro ); | ||
437 | - | ||
438 | - //========================== | ||
439 | - //ATRIBUTOS | ||
440 | - //========================== | ||
441 | - | ||
442 | - $arrRelProtocoloAtributo = AtributoINT::processarRI0691(); | ||
443 | - $arrObjRelProtocoloAtributoDTO = array(); | ||
444 | - | ||
445 | - for($x = 0;$x<count($arrRelProtocoloAtributo);$x++){ | ||
446 | - $arrRelProtocoloAtributoDTO = new RelProtocoloAtributoDTO(); | ||
447 | - $arrRelProtocoloAtributoDTO->setStrValor($arrRelProtocoloAtributo[$x]->getStrValor()); | ||
448 | - $arrRelProtocoloAtributoDTO->setNumIdAtributo($arrRelProtocoloAtributo[$x]->getNumIdAtributo()); | ||
449 | - $arrObjRelProtocoloAtributoDTO[$x] = $arrRelProtocoloAtributoDTO; | ||
450 | - } | ||
451 | - | ||
452 | - $protocoloReciboDocumentoDTO->setArrObjRelProtocoloAtributoDTO($arrObjRelProtocoloAtributoDTO); | ||
453 | - | ||
454 | - //============================================= | ||
455 | - //MONTAGEM DO DOCUMENTODTO | ||
456 | - //============================================= | ||
457 | - | ||
458 | - //TESTE COMENTADO $documentoBD = new DocumentoBD( $this->getObjInfraIBanco() ); | ||
459 | - $docRN = new DocumentoPeticionamentoRN(); | ||
460 | - | ||
461 | - $documentoReciboDTO = new DocumentoDTO(); | ||
462 | - $documentoReciboDTO->setDblIdDocumento( $protocoloReciboDocumentoDTO->getDblIdProtocolo() ); | ||
463 | - $documentoReciboDTO->setDblIdProcedimento( $objProcedimentoDTO->getDblIdProcedimento() ); | ||
464 | - $documentoReciboDTO->setNumIdSerie( $idSerieParametro ); | ||
465 | - $documentoReciboDTO->setNumIdUnidadeResponsavel( $objUnidadeDTO->getNumIdUnidade() ); | ||
466 | - $documentoReciboDTO->setObjProtocoloDTO( $protocoloReciboDocumentoDTO ); | ||
467 | - | ||
468 | - $documentoReciboDTO->setNumIdConjuntoEstilos(null); | ||
469 | - | ||
470 | - //TODO de onde pega o tipo conferencia? | ||
471 | - $documentoReciboDTO->setNumIdTipoConferencia( 4 ); | ||
472 | - $documentoReciboDTO->setStrNumero( null ); | ||
473 | - $documentoReciboDTO->setStrConteudo( null ); | ||
474 | - | ||
475 | - $documentoReciboDTO->setStrConteudoAssinatura(null); | ||
476 | - $documentoReciboDTO->setStrCrcAssinatura(null); | ||
477 | - $documentoReciboDTO->setStrQrCodeAssinatura(null); | ||
478 | - | ||
479 | - $documentoReciboDTO->setStrSinBloqueado('N'); | ||
480 | - $documentoReciboDTO->setStrStaEditor( EditorRN::$TE_NENHUM ); | ||
481 | - $documentoReciboDTO->setStrSinFormulario('N'); | ||
482 | - $documentoReciboDTO->setNumVersaoLock(0); | ||
483 | - | ||
484 | - $documentoReciboDTO->setNumIdTextoPadraoInterno(null); | ||
485 | - $documentoReciboDTO->setStrStaProtocoloProtocolo( ProtocoloRN::$TP_DOCUMENTO_GERADO ); | ||
486 | - $documentoReciboDTO = $docRN->gerarRN0003Customizado( $documentoReciboDTO ); | ||
487 | 660 | ||
488 | $anexoBD = new AnexoBD( $this->getObjInfraIBanco() ); | 661 | $anexoBD = new AnexoBD( $this->getObjInfraIBanco() ); |
489 | - $anexoDTOVinculado->setDblIdProtocolo( $documentoReciboDTO->getDblIdDocumento() ); | 662 | + //$anexoDTOVinculado->setDblIdProtocolo( $documentoReciboDTO->getDblIdDocumento() ); |
490 | $anexoBD->alterar( $anexoDTOVinculado ); | 663 | $anexoBD->alterar( $anexoDTOVinculado ); |
491 | 664 | ||
492 | - $this->assinarETravarDocumento($objUnidadeDTO, $arrParametros, $documentoReciboDTO, $objProcedimentoDTO); | ||
493 | - | ||
494 | - //disponibilizando no recibo consultavel (nao na versao HTML Documento do processo) | ||
495 | - | ||
496 | $reciboAnexoDTO = new ReciboDocumentoAnexoPeticionamentoDTO(); | 665 | $reciboAnexoDTO = new ReciboDocumentoAnexoPeticionamentoDTO(); |
497 | $reciboAnexoDTO->setNumIdAnexo( $anexoDTOVinculado->getNumIdAnexo() ); | 666 | $reciboAnexoDTO->setNumIdAnexo( $anexoDTOVinculado->getNumIdAnexo() ); |
498 | $reciboAnexoDTO->setNumIdReciboPeticionamento( $reciboDTOBasico->getNumIdReciboPeticionamento() ); | 667 | $reciboAnexoDTO->setNumIdReciboPeticionamento( $reciboDTOBasico->getNumIdReciboPeticionamento() ); |
499 | - $reciboAnexoDTO->setNumIdDocumento( $objProcedimentoDTO->getDblIdProcedimento() ); | ||
500 | - $reciboAnexoDTO->setStrClassificacaoDocumento( $strClassificacao ); | 668 | + $reciboAnexoDTO->setNumIdDocumento( null ); |
669 | + $reciboAnexoDTO->setStrClassificacaoDocumento( $strClassificacao ); | ||
670 | + $reciboAnexoDTO = $reciboAnexoRN->cadastrar( $reciboAnexoDTO ); | ||
501 | 671 | ||
502 | - //$reciboAnexoDTO = $reciboAnexoRN->cadastrar( $reciboAnexoDTO ); | ||
503 | } | 672 | } |
673 | + | ||
504 | } | 674 | } |
505 | 675 | ||
506 | private function montarDocumentoPrincipal( $objProcedimentoDTO, | 676 | private function montarDocumentoPrincipal( $objProcedimentoDTO, |
@@ -589,7 +759,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -589,7 +759,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
589 | $objConjuntoEstilosDTO = $objConjuntoEstilosRN->consultar($objConjuntoEstilosDTO); | 759 | $objConjuntoEstilosDTO = $objConjuntoEstilosRN->consultar($objConjuntoEstilosDTO); |
590 | $documentoDTOPrincipal->setNumIdConjuntoEstilos( $objConjuntoEstilosDTO->getNumIdConjuntoEstilos() ); | 760 | $documentoDTOPrincipal->setNumIdConjuntoEstilos( $objConjuntoEstilosDTO->getNumIdConjuntoEstilos() ); |
591 | 761 | ||
592 | - //TODO de onde pega o tipo conferencia? | ||
593 | $documentoDTOPrincipal->setNumIdTipoConferencia( null ); | 762 | $documentoDTOPrincipal->setNumIdTipoConferencia( null ); |
594 | $documentoDTOPrincipal->setStrNumero(''); //sistema atribui numeracao sequencial automatica | 763 | $documentoDTOPrincipal->setStrNumero(''); //sistema atribui numeracao sequencial automatica |
595 | $documentoDTOPrincipal->setStrConteudo( $arrParametros['docPrincipalConteudoHTML'] ); | 764 | $documentoDTOPrincipal->setStrConteudo( $arrParametros['docPrincipalConteudoHTML'] ); |
@@ -654,12 +823,9 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -654,12 +823,9 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
654 | $objParticipanteDTO->setNumIdUnidade( $objUnidadeDTO->getNumIdUnidade() ); | 823 | $objParticipanteDTO->setNumIdUnidade( $objUnidadeDTO->getNumIdUnidade() ); |
655 | $objParticipanteDTO->setNumIdContato( $idContato ); | 824 | $objParticipanteDTO->setNumIdContato( $idContato ); |
656 | $objParticipanteDTO->setDblIdProtocolo( $objProcedimentoDTO->getDblIdProcedimento() ); | 825 | $objParticipanteDTO->setDblIdProtocolo( $objProcedimentoDTO->getDblIdProcedimento() ); |
657 | - | ||
658 | - //print_r( $objParticipanteDTO ); die(); | ||
659 | - | 826 | + |
660 | $objParticipanteRN = new ParticipanteRN(); | 827 | $objParticipanteRN = new ParticipanteRN(); |
661 | $arrObjParticipanteDTO = $objParticipanteRN->listarRN0189($objParticipanteDTO); | 828 | $arrObjParticipanteDTO = $objParticipanteRN->listarRN0189($objParticipanteDTO); |
662 | - //print_r( $objParticipanteDTO ); die(); | ||
663 | 829 | ||
664 | if( $arrObjParticipanteDTO == null || count( $arrObjParticipanteDTO ) == 0){ | 830 | if( $arrObjParticipanteDTO == null || count( $arrObjParticipanteDTO ) == 0){ |
665 | 831 | ||
@@ -679,9 +845,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -679,9 +845,6 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
679 | $idParticipante = $arrObjParticipanteDTO[0]->getNumIdParticipante(); | 845 | $idParticipante = $arrObjParticipanteDTO[0]->getNumIdParticipante(); |
680 | } | 846 | } |
681 | 847 | ||
682 | - //echo $idParticipante; | ||
683 | - //die(); | ||
684 | - | ||
685 | $objAcessoExternoDTO->setStrEmailUnidade($orgaoDTO->getStrEmail() ); //informando o email do orgao associado a unidade | 848 | $objAcessoExternoDTO->setStrEmailUnidade($orgaoDTO->getStrEmail() ); //informando o email do orgao associado a unidade |
686 | $objAcessoExternoDTO->setDblIdDocumento( $documentoDTO->getDblIdDocumento() ); | 849 | $objAcessoExternoDTO->setDblIdDocumento( $documentoDTO->getDblIdDocumento() ); |
687 | $objAcessoExternoDTO->setNumIdParticipante( $idParticipante ); | 850 | $objAcessoExternoDTO->setNumIdParticipante( $idParticipante ); |
@@ -878,10 +1041,11 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -878,10 +1041,11 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
878 | 1041 | ||
879 | $objProcedimentoRN = new ProcedimentoRN(); | 1042 | $objProcedimentoRN = new ProcedimentoRN(); |
880 | $objProcedimentoDTO = $objProcedimentoRN->consultarRN0201($objProcedimentoDTO); | 1043 | $objProcedimentoDTO = $objProcedimentoRN->consultarRN0201($objProcedimentoDTO); |
881 | - | ||
882 | - if ($objProcedimentoDTO == null || $objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo()==ProtocoloRN::$NA_SIGILOSO) { | ||
883 | - $objInfraException->lancarValidacao('Processo ['.$parObjProcedimentoDTO->getStrProtocoloProcedimentoFormatado().'] não encontrado.'); | ||
884 | - } | 1044 | + |
1045 | + //PETICIONAMENTO NAO VAI ACEITAR NIVEL SIGILOSO | ||
1046 | + //if ($objProcedimentoDTO == null || $objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo()==ProtocoloRN::$NA_SIGILOSO) { | ||
1047 | + //$objInfraException->lancarValidacao('Processo ['.$parObjProcedimentoDTO->getStrProtocoloProcedimentoFormatado().'] não encontrado.'); | ||
1048 | + //} | ||
885 | 1049 | ||
886 | if ($objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo()==ProtocoloRN::$NA_RESTRITO) { | 1050 | if ($objProcedimentoDTO->getStrStaNivelAcessoGlobalProtocolo()==ProtocoloRN::$NA_RESTRITO) { |
887 | $objAcessoDTO = new AcessoDTO(); | 1051 | $objAcessoDTO = new AcessoDTO(); |
@@ -1073,7 +1237,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | @@ -1073,7 +1237,7 @@ class ProcessoPeticionamentoRN extends InfraRN { | ||
1073 | 1237 | ||
1074 | foreach($arrAnexos as $anexo){ | 1238 | foreach($arrAnexos as $anexo){ |
1075 | 1239 | ||
1076 | - print_r( $anexo );die(); | 1240 | + //print_r( $anexo );die(); |
1077 | $objAnexoDTO = new AnexoDTO(); | 1241 | $objAnexoDTO = new AnexoDTO(); |
1078 | $objAnexoDTO->setNumIdAnexo( null ); | 1242 | $objAnexoDTO->setNumIdAnexo( null ); |
1079 | $objAnexoDTO->setStrSinAtivo('S'); | 1243 | $objAnexoDTO->setStrSinAtivo('S'); |
sei/institucional/peticionamento/rn/ReciboPeticionamentoRN.php
@@ -164,29 +164,6 @@ class ReciboPeticionamentoRN extends InfraRN { | @@ -164,29 +164,6 @@ class ReciboPeticionamentoRN extends InfraRN { | ||
164 | $objBD = new ReciboPeticionamentoBD($this->getObjInfraIBanco()); | 164 | $objBD = new ReciboPeticionamentoBD($this->getObjInfraIBanco()); |
165 | $ret = $objBD->cadastrar( $reciboDTO ); | 165 | $ret = $objBD->cadastrar( $reciboDTO ); |
166 | 166 | ||
167 | - //agora vinculando interessados ao recibo | ||
168 | - if( $arrParticipantesParametro != null && count( $arrParticipantesParametro ) > 0 ){ | ||
169 | - | ||
170 | - //foreach( $arrParticipantesParametro as $itemParticipante ){ | ||
171 | - | ||
172 | - //} | ||
173 | - } | ||
174 | - | ||
175 | - //TODO vinculando documento principal ao recibo | ||
176 | - if( $arrDocsPrincipais != null && count( $arrDocsPrincipais ) > 0 ){ | ||
177 | - | ||
178 | - } | ||
179 | - | ||
180 | - //TODO vinculando documento essecial ao recibo (caso exista) md_pet_rel_recibo_docanexo | ||
181 | - if( $arrDocsEssenciais != null && count( $arrDocsEssenciais ) > 0 ){ | ||
182 | - | ||
183 | - } | ||
184 | - | ||
185 | - //TODO vinculando documento complementar ao recibo (caso exista) md_pet_rel_recibo_docanexo | ||
186 | - if( $arrDocsComplementares != null && count( $arrDocsComplementares ) > 0 ){ | ||
187 | - | ||
188 | - } | ||
189 | - | ||
190 | return $ret; | 167 | return $ret; |
191 | 168 | ||
192 | } | 169 | } |
@@ -194,9 +171,6 @@ class ReciboPeticionamentoRN extends InfraRN { | @@ -194,9 +171,6 @@ class ReciboPeticionamentoRN extends InfraRN { | ||
194 | //método utilizado para gerar recibo ao final do cadastramento de um processo de peticionamento de usuario externo | 171 | //método utilizado para gerar recibo ao final do cadastramento de um processo de peticionamento de usuario externo |
195 | protected function montarReciboControlado( $arrParams ){ | 172 | protected function montarReciboControlado( $arrParams ){ |
196 | 173 | ||
197 | - //echo " <br/><br/><br/><hr/>"; | ||
198 | - //print_r( $arrParams ); die(); | ||
199 | - | ||
200 | $reciboDTO = $this->cadastrar( $arrParams ); | 174 | $reciboDTO = $this->cadastrar( $arrParams ); |
201 | 175 | ||
202 | //gerando documento recibo (nao assinado) dentro do processo do SEI | 176 | //gerando documento recibo (nao assinado) dentro do processo do SEI |