Commit ecef531c4aaeea6a3844a67380369c725b797e67
1 parent
ba6fd4d7
Exists in
master
and in
1 other branch
Ajuste de tabulação
Showing
1 changed file
with
76 additions
and
76 deletions
Show diff stats
sei/web/modulos/peticionamento/rn/MdPetDocumentoRN.php
@@ -27,20 +27,20 @@ class MdPetDocumentoRN extends InfraRN { | @@ -27,20 +27,20 @@ class MdPetDocumentoRN extends InfraRN { | ||
27 | return BancoSEI::getInstance (); | 27 | return BancoSEI::getInstance (); |
28 | } | 28 | } |
29 | 29 | ||
30 | - //TODO: Grande parte da regra de negócio se baseou em SEIRN:199 - incluirDocumento. | ||
31 | - //Avaliar a refatoração para impedir a duplicação de código | 30 | + //TODO: Grande parte da regra de negócio se baseou em SEIRN:199 - incluirDocumento. |
31 | + //Avaliar a refatoração para impedir a duplicação de código | ||
32 | private function atribuirDocumentos($objProcedimentoDTO, $arrObjDocumentoDTO , $objUnidadeDTO, $parObjMetadadosProcedimento) | 32 | private function atribuirDocumentos($objProcedimentoDTO, $arrObjDocumentoDTO , $objUnidadeDTO, $parObjMetadadosProcedimento) |
33 | { | 33 | { |
34 | if(!isset($objProcesso)) { | 34 | if(!isset($objProcesso)) { |
35 | - throw new InfraException('Parâmetro $objProcesso não informado.'); | 35 | + throw new InfraException('Parâmetro $objProcesso não informado.'); |
36 | } | 36 | } |
37 | 37 | ||
38 | if(!isset($objUnidadeDTO)) { | 38 | if(!isset($objUnidadeDTO)) { |
39 | - throw new InfraException('Unidade responsável pelo documento não informada.'); | 39 | + throw new InfraException('Unidade responsável pelo documento não informada.'); |
40 | } | 40 | } |
41 | 41 | ||
42 | if(!isset($objProcesso->documento)) { | 42 | if(!isset($objProcesso->documento)) { |
43 | - throw new InfraException('Lista de documentos do processo não informada.'); | 43 | + throw new InfraException('Lista de documentos do processo não informada.'); |
44 | } | 44 | } |
45 | 45 | ||
46 | $arrObjDocumentos = $arrObjDocumentoDTO; | 46 | $arrObjDocumentos = $arrObjDocumentoDTO; |
@@ -52,10 +52,10 @@ class MdPetDocumentoRN extends InfraRN { | @@ -52,10 +52,10 @@ class MdPetDocumentoRN extends InfraRN { | ||
52 | $strNumeroRegistro = $parObjMetadadosProcedimento->metadados->NRE; | 52 | $strNumeroRegistro = $parObjMetadadosProcedimento->metadados->NRE; |
53 | //$numTramite = $parObjMetadadosProcedimento->metadados->IDT; | 53 | //$numTramite = $parObjMetadadosProcedimento->metadados->IDT; |
54 | 54 | ||
55 | - //Ordenação dos documentos conforme informado pelo remetente. Campo documento->ordem | 55 | + //Ordenação dos documentos conforme informado pelo remetente. Campo documento->ordem |
56 | usort($arrObjDocumentos, array("ReceberProcedimentoRN", "comparacaoOrdemDocumentos")); | 56 | usort($arrObjDocumentos, array("ReceberProcedimentoRN", "comparacaoOrdemDocumentos")); |
57 | 57 | ||
58 | - //Obter dados dos documentos já registrados no sistema | 58 | + //Obter dados dos documentos já registrados no sistema |
59 | $objComponenteDigitalDTO = new ComponenteDigitalDTO(); | 59 | $objComponenteDigitalDTO = new ComponenteDigitalDTO(); |
60 | $objComponenteDigitalDTO->retNumOrdem(); | 60 | $objComponenteDigitalDTO->retNumOrdem(); |
61 | $objComponenteDigitalDTO->retDblIdDocumento(); | 61 | $objComponenteDigitalDTO->retDblIdDocumento(); |
@@ -79,7 +79,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -79,7 +79,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
79 | 79 | ||
80 | $strHashConteudo = ProcessoEletronicoRN::getHashFromMetaDados($objDocumento->componenteDigital->hash); | 80 | $strHashConteudo = ProcessoEletronicoRN::getHashFromMetaDados($objDocumento->componenteDigital->hash); |
81 | 81 | ||
82 | - // Caso já esteja cadastrado, de um reenvio anterior, então move para bloqueado | 82 | + // Caso já esteja cadastrado, de um reenvio anterior, então move para bloqueado |
83 | if(array_key_exists($strHashConteudo, $arrStrHashConteudo)) { | 83 | if(array_key_exists($strHashConteudo, $arrStrHashConteudo)) { |
84 | 84 | ||
85 | //Busca o ID do protocolo | 85 | //Busca o ID do protocolo |
@@ -102,9 +102,9 @@ class MdPetDocumentoRN extends InfraRN { | @@ -102,9 +102,9 @@ class MdPetDocumentoRN extends InfraRN { | ||
102 | continue; | 102 | continue; |
103 | } | 103 | } |
104 | 104 | ||
105 | - //Validação dos dados dos documentos | 105 | + //Validação dos dados dos documentos |
106 | if(!isset($objDocumento->especie)){ | 106 | if(!isset($objDocumento->especie)){ |
107 | - throw new InfraException('Espécie do documento ['.$objDocumento->descricao.'] não informada.'); | 107 | + throw new InfraException('Espécie do documento ['.$objDocumento->descricao.'] não informada.'); |
108 | } | 108 | } |
109 | 109 | ||
110 | //--------------------------------------------------------------------------------------------------- | 110 | //--------------------------------------------------------------------------------------------------- |
@@ -116,12 +116,12 @@ class MdPetDocumentoRN extends InfraRN { | @@ -116,12 +116,12 @@ class MdPetDocumentoRN extends InfraRN { | ||
116 | $objSerieDTO = $this->obterSerieMapeada($objDocumento->especie->codigo); | 116 | $objSerieDTO = $this->obterSerieMapeada($objDocumento->especie->codigo); |
117 | 117 | ||
118 | if ($objSerieDTO==null){ | 118 | if ($objSerieDTO==null){ |
119 | - throw new InfraException('Tipo de documento [Espécie '.$objDocumento->especie->codigo.'] não encontrado.'); | 119 | + throw new InfraException('Tipo de documento [Espécie '.$objDocumento->especie->codigo.'] não encontrado.'); |
120 | } | 120 | } |
121 | 121 | ||
122 | if (InfraString::isBolVazia($objDocumento->dataHoraDeProducao)) { | 122 | if (InfraString::isBolVazia($objDocumento->dataHoraDeProducao)) { |
123 | - //$objInfraException->lancarValidacao('Data do documento não informada.'); | ||
124 | - throw new InfraException('Data do documento não informada.'); | 123 | + //$objInfraException->lancarValidacao('Data do documento não informada.'); |
124 | + throw new InfraException('Data do documento não informada.'); | ||
125 | } | 125 | } |
126 | 126 | ||
127 | $objProcedimentoDTO2 = new ProcedimentoDTO(); | 127 | $objProcedimentoDTO2 = new ProcedimentoDTO(); |
@@ -141,7 +141,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -141,7 +141,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
141 | $objProcedimentoDTO = $objProcedimentoRN->consultarRN0201($objProcedimentoDTO2); | 141 | $objProcedimentoDTO = $objProcedimentoRN->consultarRN0201($objProcedimentoDTO2); |
142 | 142 | ||
143 | if ($objProcedimentoDTO==null){ | 143 | if ($objProcedimentoDTO==null){ |
144 | - throw new InfraException('Processo ['.$objDocumentoDTO->getDblIdProcedimento().'] não encontrado.'); | 144 | + throw new InfraException('Processo ['.$objDocumentoDTO->getDblIdProcedimento().'] não encontrado.'); |
145 | } | 145 | } |
146 | 146 | ||
147 | $objDocumentoDTO->setDblIdProcedimento($objProcedimentoDTO->getDblIdProcedimento()); | 147 | $objDocumentoDTO->setDblIdProcedimento($objProcedimentoDTO->getDblIdProcedimento()); |
@@ -180,12 +180,12 @@ class MdPetDocumentoRN extends InfraRN { | @@ -180,12 +180,12 @@ class MdPetDocumentoRN extends InfraRN { | ||
180 | $objAtividadeDTO->setDblIdProtocolo($objDocumentoDTO->getDblIdProcedimento()); | 180 | $objAtividadeDTO->setDblIdProtocolo($objDocumentoDTO->getDblIdProcedimento()); |
181 | $objAtividadeDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); | 181 | $objAtividadeDTO->setNumIdUnidade(SessaoSEI::getInstance()->getNumIdUnidadeAtual()); |
182 | 182 | ||
183 | - //TODO: Possivelmente, essa regra é desnecessária já que o processo pode ser enviado para outra unidade do órgão através da expedição | 183 | + //TODO: Possivelmente, essa regra é desnecessária já que o processo pode ser enviado para outra unidade do órgão através da expedição |
184 | 184 | ||
185 | $objMdPetAtividadeRN = new MdPetAtividadeRN(); | 185 | $objMdPetAtividadeRN = new MdPetAtividadeRN(); |
186 | 186 | ||
187 | if ($objMdPetAtividadeRN->contarRN0035($objAtividadeDTO) == 0) { | 187 | if ($objMdPetAtividadeRN->contarRN0035($objAtividadeDTO) == 0) { |
188 | - throw new InfraException('Unidade '.$objUnidadeDTO->getStrSigla().' não possui acesso ao Procedimento '.$objProcedimentoDTO->getStrProtocoloProcedimentoFormatado().'.'); | 188 | + throw new InfraException('Unidade '.$objUnidadeDTO->getStrSigla().' não possui acesso ao Procedimento '.$objProcedimentoDTO->getStrProtocoloProcedimentoFormatado().'.'); |
189 | } | 189 | } |
190 | 190 | ||
191 | $objAtividadeDTO = new AtividadeDTO(); | 191 | $objAtividadeDTO = new AtividadeDTO(); |
@@ -226,7 +226,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -226,7 +226,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
226 | } | 226 | } |
227 | $objDocumentoDTO->setStrSinBloqueado('S'); | 227 | $objDocumentoDTO->setStrSinBloqueado('S'); |
228 | 228 | ||
229 | - //TODO: Fazer a atribuição dos componentes digitais do processo a partir desse ponto | 229 | + //TODO: Fazer a atribuição dos componentes digitais do processo a partir desse ponto |
230 | $this->atribuirComponentesDigitais($objDocumentoDTO, $objDocumento->componenteDigital); | 230 | $this->atribuirComponentesDigitais($objDocumentoDTO, $objDocumento->componenteDigital); |
231 | $objDocumentoDTOGerado = $objDocumentoRN->receberRN0991($objDocumentoDTO); | 231 | $objDocumentoDTOGerado = $objDocumentoRN->receberRN0991($objDocumentoDTO); |
232 | 232 | ||
@@ -249,15 +249,15 @@ class MdPetDocumentoRN extends InfraRN { | @@ -249,15 +249,15 @@ class MdPetDocumentoRN extends InfraRN { | ||
249 | $objProcedimentoDTO->setArrObjDocumentoDTO($arrObjDocumentoDTO); | 249 | $objProcedimentoDTO->setArrObjDocumentoDTO($arrObjDocumentoDTO); |
250 | } | 250 | } |
251 | 251 | ||
252 | - //TODO: Método deverá poderá ser transferido para a classe responsável por fazer o recebimento dos componentes digitais | 252 | + //TODO: Método deverá poderá ser transferido para a classe responsável por fazer o recebimento dos componentes digitais |
253 | private function atribuirComponentesDigitais(DocumentoDTO $parObjDocumentoDTO, $parArrObjComponentesDigitais) | 253 | private function atribuirComponentesDigitais(DocumentoDTO $parObjDocumentoDTO, $parArrObjComponentesDigitais) |
254 | { | 254 | { |
255 | if(!isset($parArrObjComponentesDigitais)) { | 255 | if(!isset($parArrObjComponentesDigitais)) { |
256 | - throw new InfraException('Componentes digitais do documento não informado.'); | 256 | + throw new InfraException('Componentes digitais do documento não informado.'); |
257 | } | 257 | } |
258 | 258 | ||
259 | - //TODO: Aplicar mesmas validações realizadas no momento do upload de um documento InfraPagina::processarUpload | ||
260 | - //TODO: Avaliar a refatoração do código abaixo para impedir a duplicação de regras de negócios | 259 | + //TODO: Aplicar mesmas validações realizadas no momento do upload de um documento InfraPagina::processarUpload |
260 | + //TODO: Avaliar a refatoração do código abaixo para impedir a duplicação de regras de negócios | ||
261 | 261 | ||
262 | $arrObjAnexoDTO = array(); | 262 | $arrObjAnexoDTO = array(); |
263 | if($parObjDocumentoDTO->getObjProtocoloDTO()->isSetArrObjAnexoDTO()) { | 263 | if($parObjDocumentoDTO->getObjProtocoloDTO()->isSetArrObjAnexoDTO()) { |
@@ -365,11 +365,11 @@ class MdPetDocumentoRN extends InfraRN { | @@ -365,11 +365,11 @@ class MdPetDocumentoRN extends InfraRN { | ||
365 | $arrObjProtocoloDTO = $objProtocoloRN->pesquisarRN0967($objPesquisaProtocoloDTO); | 365 | $arrObjProtocoloDTO = $objProtocoloRN->pesquisarRN0967($objPesquisaProtocoloDTO); |
366 | 366 | ||
367 | if (count($arrObjProtocoloDTO)==0){ | 367 | if (count($arrObjProtocoloDTO)==0){ |
368 | - $objInfraException->lancarValidacao('Documento Base não encontrado.'); | 368 | + $objInfraException->lancarValidacao('Documento Base não encontrado.'); |
369 | } | 369 | } |
370 | 370 | ||
371 | if ($arrObjProtocoloDTO[0]->getStrStaEditorDocumento()!=EditorRN::$TE_INTERNO){ | 371 | if ($arrObjProtocoloDTO[0]->getStrStaEditorDocumento()!=EditorRN::$TE_INTERNO){ |
372 | - $objInfraException->lancarValidacao('Documento Base não foi gerado pelo editor interno.'); | 372 | + $objInfraException->lancarValidacao('Documento Base não foi gerado pelo editor interno.'); |
373 | } | 373 | } |
374 | 374 | ||
375 | $objDocumentoDTO->setDblIdDocumentoTextoBase($arrObjProtocoloDTO[0]->getDblIdProtocolo()); | 375 | $objDocumentoDTO->setDblIdDocumentoTextoBase($arrObjProtocoloDTO[0]->getDblIdProtocolo()); |
@@ -432,11 +432,11 @@ class MdPetDocumentoRN extends InfraRN { | @@ -432,11 +432,11 @@ class MdPetDocumentoRN extends InfraRN { | ||
432 | if($strStaNumeracao == SerieRN::$TN_SEM_NUMERACAO){ | 432 | if($strStaNumeracao == SerieRN::$TN_SEM_NUMERACAO){ |
433 | // nao deve entrar nunca | 433 | // nao deve entrar nunca |
434 | if(!InfraString::isBolVazia($objDocumentoDTO->getStrNumero())){ | 434 | if(!InfraString::isBolVazia($objDocumentoDTO->getStrNumero())){ |
435 | - $objInfraException->lancarValidacao('Documento com número preenchido mas o tipo '.$strNomeSerie.' não tem numeração.'); | 435 | + $objInfraException->lancarValidacao('Documento com número preenchido mas o tipo '.$strNomeSerie.' não tem numeração.'); |
436 | } | 436 | } |
437 | }else if($strStaNumeracao == SerieRN::$TN_INFORMADA){ | 437 | }else if($strStaNumeracao == SerieRN::$TN_INFORMADA){ |
438 | if(InfraString::isBolVazia($objDocumentoDTO->getStrNumero())){ | 438 | if(InfraString::isBolVazia($objDocumentoDTO->getStrNumero())){ |
439 | - $objInfraException->lancarValidacao('Tipo '.$strNomeSerie.' requer preenchimento do número do documento.'); | 439 | + $objInfraException->lancarValidacao('Tipo '.$strNomeSerie.' requer preenchimento do número do documento.'); |
440 | }else{ | 440 | }else{ |
441 | $this->validarTamanhoNumeroRN0993($objDocumentoDTO, $objInfraException); | 441 | $this->validarTamanhoNumeroRN0993($objDocumentoDTO, $objInfraException); |
442 | } | 442 | } |
@@ -471,7 +471,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -471,7 +471,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
471 | $objNumeracaoDTO->setNumIdOrgao($objUnidadeDTO->getNumIdOrgao()); | 471 | $objNumeracaoDTO->setNumIdOrgao($objUnidadeDTO->getNumIdOrgao()); |
472 | $objNumeracaoDTO->setNumAno(Date('Y')); | 472 | $objNumeracaoDTO->setNumAno(Date('Y')); |
473 | }else{ | 473 | }else{ |
474 | - $objInfraException->lancarValidacao('Tipo de numeração inválido.'); | 474 | + $objInfraException->lancarValidacao('Tipo de numeração inválido.'); |
475 | } | 475 | } |
476 | 476 | ||
477 | $objNumeracaoRN = new NumeracaoRN(); | 477 | $objNumeracaoRN = new NumeracaoRN(); |
@@ -605,7 +605,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -605,7 +605,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
605 | $objEditorDTO->setNumIdBaseConhecimento(null); | 605 | $objEditorDTO->setNumIdBaseConhecimento(null); |
606 | 606 | ||
607 | if ($objSerieDTO->getNumIdModelo()==null){ | 607 | if ($objSerieDTO->getNumIdModelo()==null){ |
608 | - throw new InfraException('Tipo '.$objSerieDTO->getStrNome().' não possui modelo interno associado.'); | 608 | + throw new InfraException('Tipo '.$objSerieDTO->getStrNome().' não possui modelo interno associado.'); |
609 | } | 609 | } |
610 | 610 | ||
611 | $objEditorDTO->setNumIdModelo($objSerieDTO->getNumIdModelo()); | 611 | $objEditorDTO->setNumIdModelo($objSerieDTO->getNumIdModelo()); |
@@ -663,11 +663,11 @@ class MdPetDocumentoRN extends InfraRN { | @@ -663,11 +663,11 @@ class MdPetDocumentoRN extends InfraRN { | ||
663 | 663 | ||
664 | //seiv2 | 664 | //seiv2 |
665 | //if (InfraString::isBolVazia($objDocumentoDTO->getStrStaEditor())){ | 665 | //if (InfraString::isBolVazia($objDocumentoDTO->getStrStaEditor())){ |
666 | - //$objInfraException->adicionarValidacao('Editor não informado.'); | 666 | + //$objInfraException->adicionarValidacao('Editor não informado.'); |
667 | //} | 667 | //} |
668 | 668 | ||
669 | //if ($objDocumentoDTO->getStrStaEditor()!=EditorRN::$TE_EDOC && $objDocumentoDTO->getStrStaEditor()!=EditorRN::$TE_INTERNO && $objDocumentoDTO->getStrStaEditor()!=EditorRN::$TE_NENHUM){ | 669 | //if ($objDocumentoDTO->getStrStaEditor()!=EditorRN::$TE_EDOC && $objDocumentoDTO->getStrStaEditor()!=EditorRN::$TE_INTERNO && $objDocumentoDTO->getStrStaEditor()!=EditorRN::$TE_NENHUM){ |
670 | - //$objInfraException->adicionarValidacao('Editor ['.$objDocumentoDTO->getStrStaEditor().'] inválido.'); | 670 | + //$objInfraException->adicionarValidacao('Editor ['.$objDocumentoDTO->getStrStaEditor().'] inválido.'); |
671 | //} | 671 | //} |
672 | 672 | ||
673 | } | 673 | } |
@@ -676,10 +676,10 @@ class MdPetDocumentoRN extends InfraRN { | @@ -676,10 +676,10 @@ class MdPetDocumentoRN extends InfraRN { | ||
676 | 676 | ||
677 | //seiv2 | 677 | //seiv2 |
678 | //if (InfraString::isBolVazia($objDocumentoDTO->getStrSinFormulario())){ | 678 | //if (InfraString::isBolVazia($objDocumentoDTO->getStrSinFormulario())){ |
679 | - //$objInfraException->adicionarValidacao('Sinalizador de Formulário não informado.'); | 679 | + //$objInfraException->adicionarValidacao('Sinalizador de Formulário não informado.'); |
680 | //}else{ | 680 | //}else{ |
681 | //if (!InfraUtil::isBolSinalizadorValido($objDocumentoDTO->getStrSinFormulario())){ | 681 | //if (!InfraUtil::isBolSinalizadorValido($objDocumentoDTO->getStrSinFormulario())){ |
682 | - //$objInfraException->adicionarValidacao('Sinalizador de Formulário inválido.'); | 682 | + //$objInfraException->adicionarValidacao('Sinalizador de Formulário inválido.'); |
683 | //} | 683 | //} |
684 | //} | 684 | //} |
685 | 685 | ||
@@ -687,7 +687,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -687,7 +687,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
687 | 687 | ||
688 | private function validarNumIdUnidadeResponsavelRN0915(DocumentoDTO $objDocumentoDTO, InfraException $objInfraException){ | 688 | private function validarNumIdUnidadeResponsavelRN0915(DocumentoDTO $objDocumentoDTO, InfraException $objInfraException){ |
689 | if (InfraString::isBolVazia($objDocumentoDTO->getNumIdUnidadeResponsavel ())){ | 689 | if (InfraString::isBolVazia($objDocumentoDTO->getNumIdUnidadeResponsavel ())){ |
690 | - $objInfraException->adicionarValidacao('Unidade Responsável não informada.'); | 690 | + $objInfraException->adicionarValidacao('Unidade Responsável não informada.'); |
691 | } | 691 | } |
692 | } | 692 | } |
693 | 693 | ||
@@ -697,7 +697,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -697,7 +697,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
697 | }else{ | 697 | }else{ |
698 | $objDocumentoDTO->setStrCrcAssinatura(strtoupper(trim($objDocumentoDTO->getStrCrcAssinatura()))); | 698 | $objDocumentoDTO->setStrCrcAssinatura(strtoupper(trim($objDocumentoDTO->getStrCrcAssinatura()))); |
699 | if (strlen($objDocumentoDTO->getStrCrcAssinatura())>8){ | 699 | if (strlen($objDocumentoDTO->getStrCrcAssinatura())>8){ |
700 | - $objInfraException->lancarValidacao('Tamanho do código CRC inválido.'); | 700 | + $objInfraException->lancarValidacao('Tamanho do código CRC inválido.'); |
701 | } | 701 | } |
702 | } | 702 | } |
703 | } | 703 | } |
@@ -708,7 +708,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -708,7 +708,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
708 | }else{ | 708 | }else{ |
709 | $objDocumentoDTO->setStrCodigoVerificador(strtoupper(trim($objDocumentoDTO->getStrCodigoVerificador()))); | 709 | $objDocumentoDTO->setStrCodigoVerificador(strtoupper(trim($objDocumentoDTO->getStrCodigoVerificador()))); |
710 | if (!preg_match("/^[0-9]{10}(V)[0-9]+$/i", $objDocumentoDTO->getStrCodigoVerificador()) && strlen($objDocumentoDTO->getStrCodigoVerificador())!=7){ | 710 | if (!preg_match("/^[0-9]{10}(V)[0-9]+$/i", $objDocumentoDTO->getStrCodigoVerificador()) && strlen($objDocumentoDTO->getStrCodigoVerificador())!=7){ |
711 | - $objInfraException->lancarValidacao('Código Verificador inválido.'); | 711 | + $objInfraException->lancarValidacao('Código Verificador inválido.'); |
712 | } | 712 | } |
713 | } | 713 | } |
714 | } | 714 | } |
@@ -716,7 +716,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -716,7 +716,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
716 | private function validarNumIdSerieRN0009(DocumentoDTO $objDocumentoDTO, InfraException $objInfraException){ | 716 | private function validarNumIdSerieRN0009(DocumentoDTO $objDocumentoDTO, InfraException $objInfraException){ |
717 | 717 | ||
718 | if (InfraString::isBolVazia($objDocumentoDTO->getNumIdSerie())){ | 718 | if (InfraString::isBolVazia($objDocumentoDTO->getNumIdSerie())){ |
719 | - $objInfraException->lancarValidacao('ABS Tipo do documento não informado.'); | 719 | + $objInfraException->lancarValidacao('ABS Tipo do documento não informado.'); |
720 | }else{ | 720 | }else{ |
721 | 721 | ||
722 | $objSerieDTO = new SerieDTO(); | 722 | $objSerieDTO = new SerieDTO(); |
@@ -729,7 +729,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -729,7 +729,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
729 | $objSerieDTO = $objSerieRN->consultarRN0644($objSerieDTO); | 729 | $objSerieDTO = $objSerieRN->consultarRN0644($objSerieDTO); |
730 | 730 | ||
731 | if ($objSerieDTO==null){ | 731 | if ($objSerieDTO==null){ |
732 | - throw new InfraException('Tipo do documento ['.$objDocumentoDTO->getNumIdSerie().'] não encontrado.'); | 732 | + throw new InfraException('Tipo do documento ['.$objDocumentoDTO->getNumIdSerie().'] não encontrado.'); |
733 | } | 733 | } |
734 | 734 | ||
735 | //seiv2 | 735 | //seiv2 |
@@ -738,9 +738,9 @@ class MdPetDocumentoRN extends InfraRN { | @@ -738,9 +738,9 @@ class MdPetDocumentoRN extends InfraRN { | ||
738 | //alteracoes seiv3 | 738 | //alteracoes seiv3 |
739 | if ($objSerieDTO->getStrStaAplicabilidade()!=SerieRN::$TA_INTERNO_EXTERNO){ | 739 | if ($objSerieDTO->getStrStaAplicabilidade()!=SerieRN::$TA_INTERNO_EXTERNO){ |
740 | if ($objDocumentoDTO->getStrStaProtocoloProtocolo()==ProtocoloRN::$TP_DOCUMENTO_GERADO && $objSerieDTO->getStrStaAplicabilidade()==SerieRN::$TA_EXTERNO){ | 740 | if ($objDocumentoDTO->getStrStaProtocoloProtocolo()==ProtocoloRN::$TP_DOCUMENTO_GERADO && $objSerieDTO->getStrStaAplicabilidade()==SerieRN::$TA_EXTERNO){ |
741 | - $objInfraException->adicionarValidacao('Tipo do documento não aplicável para documentos internos.'); | 741 | + $objInfraException->adicionarValidacao('Tipo do documento não aplicável para documentos internos.'); |
742 | }else if ($objDocumentoDTO->getStrStaProtocoloProtocolo()==ProtocoloRN::$TP_DOCUMENTO_RECEBIDO && $objSerieDTO->getStrStaAplicabilidade()==SerieRN::$TA_INTERNO){ | 742 | }else if ($objDocumentoDTO->getStrStaProtocoloProtocolo()==ProtocoloRN::$TP_DOCUMENTO_RECEBIDO && $objSerieDTO->getStrStaAplicabilidade()==SerieRN::$TA_INTERNO){ |
743 | - $objInfraException->adicionarValidacao('Tipo do documento não aplicável para documentos externos.'); | 743 | + $objInfraException->adicionarValidacao('Tipo do documento não aplicável para documentos externos.'); |
744 | } | 744 | } |
745 | } | 745 | } |
746 | } | 746 | } |
@@ -749,7 +749,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -749,7 +749,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
749 | private function validarTamanhoNumeroRN0993(DocumentoDTO $objDocumentoDTO, InfraException $objInfraException){ | 749 | private function validarTamanhoNumeroRN0993(DocumentoDTO $objDocumentoDTO, InfraException $objInfraException){ |
750 | $objDocumentoDTO->setStrNumero(trim($objDocumentoDTO->getStrNumero())); | 750 | $objDocumentoDTO->setStrNumero(trim($objDocumentoDTO->getStrNumero())); |
751 | if (strlen($objDocumentoDTO->getStrNumero())>50){ | 751 | if (strlen($objDocumentoDTO->getStrNumero())>50){ |
752 | - $objInfraException->adicionarValidacao('Número possui tamanho superior a 50 caracteres.'); | 752 | + $objInfraException->adicionarValidacao('Número possui tamanho superior a 50 caracteres.'); |
753 | } | 753 | } |
754 | } | 754 | } |
755 | 755 | ||
@@ -881,12 +881,12 @@ class MdPetDocumentoRN extends InfraRN { | @@ -881,12 +881,12 @@ class MdPetDocumentoRN extends InfraRN { | ||
881 | } | 881 | } |
882 | } | 882 | } |
883 | } catch(Exception $e){ | 883 | } catch(Exception $e){ |
884 | - throw new InfraException('Erro lançando acesso para o Controle Interno.',$e); | 884 | + throw new InfraException('Erro lançando acesso para o Controle Interno.',$e); |
885 | } | 885 | } |
886 | 886 | ||
887 | } | 887 | } |
888 | 888 | ||
889 | - //método copiado da antiga DocumentoRN do seiv2, porque o SEIv3 removeu o metodo receberRN0991 | 889 | + //método copiado da antiga DocumentoRN do seiv2, porque o SEIv3 removeu o metodo receberRN0991 |
890 | public function receberRN0991(DocumentoDTO $objDocumentoDTO){ | 890 | public function receberRN0991(DocumentoDTO $objDocumentoDTO){ |
891 | 891 | ||
892 | $bolAcumulacaoPrevia = FeedSEIProtocolos::getInstance()->isBolAcumularFeeds(); | 892 | $bolAcumulacaoPrevia = FeedSEIProtocolos::getInstance()->isBolAcumularFeeds(); |
@@ -913,7 +913,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -913,7 +913,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
913 | return $objDocumentoDTO; | 913 | return $objDocumentoDTO; |
914 | } | 914 | } |
915 | 915 | ||
916 | - //método copiado da antiga DocumentoRN do seiv2 (com pequenas alterações), porque o SEIv3 removeu o metodo receberRN0991InternoControlado | 916 | + //método copiado da antiga DocumentoRN do seiv2 (com pequenas alterações), porque o SEIv3 removeu o metodo receberRN0991InternoControlado |
917 | protected function receberRN0991InternoControlado(DocumentoDTO $objDocumentoDTO) { | 917 | protected function receberRN0991InternoControlado(DocumentoDTO $objDocumentoDTO) { |
918 | try{ | 918 | try{ |
919 | 919 | ||
@@ -928,7 +928,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -928,7 +928,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
928 | $objDocumentoDTO->setStrStaProtocoloProtocolo(ProtocoloRN::$TP_DOCUMENTO_RECEBIDO); | 928 | $objDocumentoDTO->setStrStaProtocoloProtocolo(ProtocoloRN::$TP_DOCUMENTO_RECEBIDO); |
929 | 929 | ||
930 | if ($objDocumentoDTO->isSetDblIdDocumentoEdoc() && $objDocumentoDTO->getDblIdDocumentoEdoc()!=null){ | 930 | if ($objDocumentoDTO->isSetDblIdDocumentoEdoc() && $objDocumentoDTO->getDblIdDocumentoEdoc()!=null){ |
931 | - $objInfraException->adicionarValidacao('Identificador do eDoc não pode ser informado na geração.'); | 931 | + $objInfraException->adicionarValidacao('Identificador do eDoc não pode ser informado na geração.'); |
932 | } | 932 | } |
933 | 933 | ||
934 | 934 | ||
@@ -1083,11 +1083,11 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1083,11 +1083,11 @@ class MdPetDocumentoRN extends InfraRN { | ||
1083 | $objDocumentoDTO->setStrStaNivelAcessoGlobalProtocolo($objProtocoloDTOGerado->getStrStaNivelAcessoGlobal()); | 1083 | $objDocumentoDTO->setStrStaNivelAcessoGlobalProtocolo($objProtocoloDTOGerado->getStrStaNivelAcessoGlobal()); |
1084 | $this->lancarAcessoControleInterno($objDocumentoDTO); | 1084 | $this->lancarAcessoControleInterno($objDocumentoDTO); |
1085 | 1085 | ||
1086 | - //Reabertura Automática | 1086 | + //Reabertura Automática |
1087 | if ($objDocumentoDTO->isSetArrObjUnidadeDTO() && count($objDocumentoDTO->getArrObjUnidadeDTO()) > 0){ | 1087 | if ($objDocumentoDTO->isSetArrObjUnidadeDTO() && count($objDocumentoDTO->getArrObjUnidadeDTO()) > 0){ |
1088 | 1088 | ||
1089 | if ($objProtocoloDTOGerado->getStrStaNivelAcessoGlobal()==ProtocoloRN::$NA_SIGILOSO){ | 1089 | if ($objProtocoloDTOGerado->getStrStaNivelAcessoGlobal()==ProtocoloRN::$NA_SIGILOSO){ |
1090 | - $objInfraException->lancarValidacao('Não é possível reabrir automaticamente um processo sigiloso.'); | 1090 | + $objInfraException->lancarValidacao('Não é possÃvel reabrir automaticamente um processo sigiloso.'); |
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | $objUnidadeDTO = new UnidadeDTO(); | 1093 | $objUnidadeDTO = new UnidadeDTO(); |
@@ -1100,7 +1100,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1100,7 +1100,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
1100 | $objUnidadeDTO = $objUnidadeRN->consultarRN0125($objUnidadeDTO); | 1100 | $objUnidadeDTO = $objUnidadeRN->consultarRN0125($objUnidadeDTO); |
1101 | 1101 | ||
1102 | if ($objUnidadeDTO->getStrSinProtocolo()=='N'){ | 1102 | if ($objUnidadeDTO->getStrSinProtocolo()=='N'){ |
1103 | - $objInfraException->lancarValidacao('Unidade '.$objUnidadeDTO->getStrSigla().' não está sinalizada como protocolo.'); | 1103 | + $objInfraException->lancarValidacao('Unidade '.$objUnidadeDTO->getStrSigla().' não está sinalizada como protocolo.'); |
1104 | } | 1104 | } |
1105 | 1105 | ||
1106 | $arrIdUnidadesReabertura = InfraArray::converterArrInfraDTO($objDocumentoDTO->getArrObjUnidadeDTO(),'IdUnidade'); | 1106 | $arrIdUnidadesReabertura = InfraArray::converterArrInfraDTO($objDocumentoDTO->getArrObjUnidadeDTO(),'IdUnidade'); |
@@ -1126,9 +1126,9 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1126,9 +1126,9 @@ class MdPetDocumentoRN extends InfraRN { | ||
1126 | $objUnidadeDTO = $objUnidadeRN->consultarRN0125($objUnidadeDTO); | 1126 | $objUnidadeDTO = $objUnidadeRN->consultarRN0125($objUnidadeDTO); |
1127 | 1127 | ||
1128 | if ($objUnidadeDTO==null){ | 1128 | if ($objUnidadeDTO==null){ |
1129 | - $objInfraException->adicionarValidacao('Unidade ['.$numIdUnidadeReabertura.'] não encontrada para reabertura do processo.'); | 1129 | + $objInfraException->adicionarValidacao('Unidade ['.$numIdUnidadeReabertura.'] não encontrada para reabertura do processo.'); |
1130 | }else{ | 1130 | }else{ |
1131 | - $objInfraException->adicionarValidacao('Não é possível reabrir o processo na unidade '.$objUnidadeDTO->getStrSigla().' pois não ocorreu tramitação nesta unidade.'); | 1131 | + $objInfraException->adicionarValidacao('Não é possÃvel reabrir o processo na unidade '.$objUnidadeDTO->getStrSigla().' pois não ocorreu tramitação nesta unidade.'); |
1132 | } | 1132 | } |
1133 | } | 1133 | } |
1134 | } | 1134 | } |
@@ -1233,21 +1233,21 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1233,21 +1233,21 @@ class MdPetDocumentoRN extends InfraRN { | ||
1233 | $objUsuarioDTO = $objUsuarioRN->consultarRN0489($objUsuarioDTOPesquisa); | 1233 | $objUsuarioDTO = $objUsuarioRN->consultarRN0489($objUsuarioDTOPesquisa); |
1234 | 1234 | ||
1235 | if ($objUsuarioDTO==null){ | 1235 | if ($objUsuarioDTO==null){ |
1236 | - throw new InfraException('Assinante não cadastrado como usuário do sistema.'); | 1236 | + throw new InfraException('Assinante não cadastrado como usuário do sistema.'); |
1237 | } | 1237 | } |
1238 | 1238 | ||
1239 | if ($objUsuarioDTO->getStrStaTipo()==UsuarioRN::$TU_EXTERNO_PENDENTE){ | 1239 | if ($objUsuarioDTO->getStrStaTipo()==UsuarioRN::$TU_EXTERNO_PENDENTE){ |
1240 | - $objInfraException->lancarValidacao('Usuário externo '.$objUsuarioDTO->getStrSigla().' não foi liberado.'); | 1240 | + $objInfraException->lancarValidacao('Usuário externo '.$objUsuarioDTO->getStrSigla().' não foi liberado.'); |
1241 | } | 1241 | } |
1242 | 1242 | ||
1243 | if ($objUsuarioDTO->getStrStaTipo()!=UsuarioRN::$TU_SIP && $objUsuarioDTO->getStrStaTipo()!=UsuarioRN::$TU_EXTERNO){ | 1243 | if ($objUsuarioDTO->getStrStaTipo()!=UsuarioRN::$TU_SIP && $objUsuarioDTO->getStrStaTipo()!=UsuarioRN::$TU_EXTERNO){ |
1244 | - throw new InfraException('Tipo do usuário ['.$objUsuarioDTO->getStrStaTipo().'] inválido para assinatura.'); | 1244 | + throw new InfraException('Tipo do usuário ['.$objUsuarioDTO->getStrStaTipo().'] inválido para assinatura.'); |
1245 | } | 1245 | } |
1246 | 1246 | ||
1247 | if ($objAssinaturaDTO->getStrStaFormaAutenticacao()==AssinaturaRN::$TA_CERTIFICADO_DIGITAL && | 1247 | if ($objAssinaturaDTO->getStrStaFormaAutenticacao()==AssinaturaRN::$TA_CERTIFICADO_DIGITAL && |
1248 | InfraString::isBolVazia($objUsuarioDTO->getDblCpfContato()) && | 1248 | InfraString::isBolVazia($objUsuarioDTO->getDblCpfContato()) && |
1249 | $objInfraParametro->getValor('SEI_HABILITAR_VALIDACAO_CPF_CERTIFICADO_DIGITAL')=='1'){ | 1249 | $objInfraParametro->getValor('SEI_HABILITAR_VALIDACAO_CPF_CERTIFICADO_DIGITAL')=='1'){ |
1250 | - $objInfraException->lancarValidacao('Assinante não possui CPF cadastrado.'); | 1250 | + $objInfraException->lancarValidacao('Assinante não possui CPF cadastrado.'); |
1251 | } | 1251 | } |
1252 | 1252 | ||
1253 | if (SessaoSEI::getInstance()->getNumIdUsuario()==$objAssinaturaDTO->getNumIdUsuario()){ | 1253 | if (SessaoSEI::getInstance()->getNumIdUsuario()==$objAssinaturaDTO->getNumIdUsuario()){ |
@@ -1261,9 +1261,9 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1261,9 +1261,9 @@ class MdPetDocumentoRN extends InfraRN { | ||
1261 | 1261 | ||
1262 | if( $docDTOVerificacao != null | 1262 | if( $docDTOVerificacao != null |
1263 | && $docDTOVerificacao->isSetStrDescricaoTipoConferencia() | 1263 | && $docDTOVerificacao->isSetStrDescricaoTipoConferencia() |
1264 | - && $docDTOVerificacao->getStrDescricaoTipoConferencia() == "do próprio documento nato-digital" ){ | 1264 | + && $docDTOVerificacao->getStrDescricaoTipoConferencia() == "do próprio documento nato-digital" ){ |
1265 | 1265 | ||
1266 | - //instanciando RN especifica, para viabilizar customizaçao da tarja de assinatura para documentos do tipo nato-digital | 1266 | + //instanciando RN especifica, para viabilizar customizaçao da tarja de assinatura para documentos do tipo nato-digital |
1267 | $objAssinaturaRN = new MdPetAssinaturaRN(); | 1267 | $objAssinaturaRN = new MdPetAssinaturaRN(); |
1268 | 1268 | ||
1269 | } else { | 1269 | } else { |
@@ -1275,7 +1275,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1275,7 +1275,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
1275 | 1275 | ||
1276 | $arrIdDocumentoAssinatura = array_unique(InfraArray::converterArrInfraDTO($objAssinaturaDTO->getArrObjDocumentoDTO(),'IdDocumento')); | 1276 | $arrIdDocumentoAssinatura = array_unique(InfraArray::converterArrInfraDTO($objAssinaturaDTO->getArrObjDocumentoDTO(),'IdDocumento')); |
1277 | 1277 | ||
1278 | - //verifica permissão de acesso ao documento | 1278 | + //verifica permissão de acesso ao documento |
1279 | $objPesquisaProtocoloDTO = new PesquisaProtocoloDTO(); | 1279 | $objPesquisaProtocoloDTO = new PesquisaProtocoloDTO(); |
1280 | $objPesquisaProtocoloDTO->setStrStaTipo(ProtocoloRN::$TPP_DOCUMENTOS); | 1280 | $objPesquisaProtocoloDTO->setStrStaTipo(ProtocoloRN::$TPP_DOCUMENTOS); |
1281 | $objPesquisaProtocoloDTO->setStrStaAcesso(ProtocoloRN::$TAP_TODOS); | 1281 | $objPesquisaProtocoloDTO->setStrStaAcesso(ProtocoloRN::$TAP_TODOS); |
@@ -1290,12 +1290,12 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1290,12 +1290,12 @@ class MdPetDocumentoRN extends InfraRN { | ||
1290 | 1290 | ||
1291 | if ($n == 1){ | 1291 | if ($n == 1){ |
1292 | if ($numDocOrigem == 1){ | 1292 | if ($numDocOrigem == 1){ |
1293 | - $objInfraException->lancarValidacao('Documento não encontrado para assinatura.'); | 1293 | + $objInfraException->lancarValidacao('Documento não encontrado para assinatura.'); |
1294 | }else{ | 1294 | }else{ |
1295 | - $objInfraException->lancarValidacao('Um documento não está mais disponível para assinatura.'); | 1295 | + $objInfraException->lancarValidacao('Um documento não está mais disponÃvel para assinatura.'); |
1296 | } | 1296 | } |
1297 | }else if ($n > 1){ | 1297 | }else if ($n > 1){ |
1298 | - $objInfraException->lancarValidacao($n.' documentos não estão mais disponíveis para assinatura.'); | 1298 | + $objInfraException->lancarValidacao($n.' documentos não estão mais disponÃveis para assinatura.'); |
1299 | } | 1299 | } |
1300 | 1300 | ||
1301 | $objProtocoloDTOProcedimento = new ProtocoloDTO(); | 1301 | $objProtocoloDTOProcedimento = new ProtocoloDTO(); |
@@ -1322,9 +1322,9 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1322,9 +1322,9 @@ class MdPetDocumentoRN extends InfraRN { | ||
1322 | 1322 | ||
1323 | }else if ($objUsuarioDTOLogado->getStrStaTipo()==UsuarioRN::$TU_SIP && $objProtocoloDTO->getNumCodigoAcesso() < 0){ | 1323 | }else if ($objUsuarioDTOLogado->getStrStaTipo()==UsuarioRN::$TU_SIP && $objProtocoloDTO->getNumCodigoAcesso() < 0){ |
1324 | 1324 | ||
1325 | - $objInfraException->adicionarValidacao('Usuário '.$objUsuarioDTOLogado->getStrSigla().' não possui acesso ao documento '.$objProtocoloDTO->getStrProtocoloFormatado().'.'); | 1325 | + $objInfraException->adicionarValidacao('Usuário '.$objUsuarioDTOLogado->getStrSigla().' não possui acesso ao documento '.$objProtocoloDTO->getStrProtocoloFormatado().'.'); |
1326 | 1326 | ||
1327 | - //só valida se o usuário externo estiver logado pois ele pode estar na instituição para assinar através do login de outro usuário | 1327 | + //só valida se o usuário externo estiver logado pois ele pode estar na instituição para assinar através do login de outro usuário |
1328 | }elseif ($objUsuarioDTO->getStrStaTipo()==UsuarioRN::$TU_EXTERNO && $objUsuarioDTO->getNumIdUsuario()==$objUsuarioDTOLogado->getNumIdUsuario()){ | 1328 | }elseif ($objUsuarioDTO->getStrStaTipo()==UsuarioRN::$TU_EXTERNO && $objUsuarioDTO->getNumIdUsuario()==$objUsuarioDTOLogado->getNumIdUsuario()){ |
1329 | 1329 | ||
1330 | $objAcessoExternoDTO = new AcessoExternoDTO(); | 1330 | $objAcessoExternoDTO = new AcessoExternoDTO(); |
@@ -1335,21 +1335,21 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1335,21 +1335,21 @@ class MdPetDocumentoRN extends InfraRN { | ||
1335 | $objAcessoExternoDTO->setNumMaxRegistrosRetorno(1); | 1335 | $objAcessoExternoDTO->setNumMaxRegistrosRetorno(1); |
1336 | 1336 | ||
1337 | if ($objAcessoExternoRN->consultar($objAcessoExternoDTO) == null){ | 1337 | if ($objAcessoExternoRN->consultar($objAcessoExternoDTO) == null){ |
1338 | - $objInfraException->adicionarValidacao('Usuário externo '.$objUsuarioDTO->getStrSigla().' não recebeu liberação para assinar o documento '.$objProtocoloDTO->getStrProtocoloFormatado().'.'); | 1338 | + $objInfraException->adicionarValidacao('Usuário externo '.$objUsuarioDTO->getStrSigla().' não recebeu liberação para assinar o documento '.$objProtocoloDTO->getStrProtocoloFormatado().'.'); |
1339 | } | 1339 | } |
1340 | } | 1340 | } |
1341 | 1341 | ||
1342 | if ($objProtocoloDTO->getStrStaProtocolo()==ProtocoloRN::$TP_DOCUMENTO_GERADO){ | 1342 | if ($objProtocoloDTO->getStrStaProtocolo()==ProtocoloRN::$TP_DOCUMENTO_GERADO){ |
1343 | if ($objProtocoloDTO->getStrSinPublicado()=='S'){ | 1343 | if ($objProtocoloDTO->getStrSinPublicado()=='S'){ |
1344 | - $objInfraException->adicionarValidacao('Documento '.$objProtocoloDTO->getStrProtocoloFormatado().' já foi publicado.'); | 1344 | + $objInfraException->adicionarValidacao('Documento '.$objProtocoloDTO->getStrProtocoloFormatado().' já foi publicado.'); |
1345 | } | 1345 | } |
1346 | 1346 | ||
1347 | if ($objProtocoloDTO->getStrStaDocumentoDocumento()==DocumentoRN::$TD_FORMULARIO_AUTOMATICO){ | 1347 | if ($objProtocoloDTO->getStrStaDocumentoDocumento()==DocumentoRN::$TD_FORMULARIO_AUTOMATICO){ |
1348 | - $objInfraException->adicionarValidacao('Formulário '.$objProtocoloDTO->getStrProtocoloFormatado().' não pode receber assinatura.'); | 1348 | + $objInfraException->adicionarValidacao('Formulário '.$objProtocoloDTO->getStrProtocoloFormatado().' não pode receber assinatura.'); |
1349 | } | 1349 | } |
1350 | 1350 | ||
1351 | if ($objProtocoloDTO->getStrStaDocumentoDocumento()==DocumentoRN::$TD_EDITOR_EDOC){ | 1351 | if ($objProtocoloDTO->getStrStaDocumentoDocumento()==DocumentoRN::$TD_EDITOR_EDOC){ |
1352 | - $objInfraException->adicionarValidacao('Não é possível assinar documentos gerados pelo e-Doc ('.$objProtocoloDTO->getStrProtocoloFormatado().').'); | 1352 | + $objInfraException->adicionarValidacao('Não é possÃvel assinar documentos gerados pelo e-Doc ('.$objProtocoloDTO->getStrProtocoloFormatado().').'); |
1353 | } | 1353 | } |
1354 | } | 1354 | } |
1355 | 1355 | ||
@@ -1360,7 +1360,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1360,7 +1360,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
1360 | $dto = $objAssinaturaRN->consultarRN1322($dto); | 1360 | $dto = $objAssinaturaRN->consultarRN1322($dto); |
1361 | 1361 | ||
1362 | if ($dto != null){ | 1362 | if ($dto != null){ |
1363 | - $objInfraException->adicionarValidacao('Documento '.$objProtocoloDTO->getStrProtocoloFormatado().' já foi assinado por "'.$dto->getStrNomeUsuario().'".'); | 1363 | + $objInfraException->adicionarValidacao('Documento '.$objProtocoloDTO->getStrProtocoloFormatado().' já foi assinado por "'.$dto->getStrNomeUsuario().'".'); |
1364 | } | 1364 | } |
1365 | 1365 | ||
1366 | if ($objProtocoloDTO->getStrStaDocumentoDocumento()==DocumentoRN::$TD_EDITOR_INTERNO) { | 1366 | if ($objProtocoloDTO->getStrStaDocumentoDocumento()==DocumentoRN::$TD_EDITOR_INTERNO) { |
@@ -1371,12 +1371,12 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1371,12 +1371,12 @@ class MdPetDocumentoRN extends InfraRN { | ||
1371 | $objSecaoDocumentoDTO->setNumMaxRegistrosRetorno(1); | 1371 | $objSecaoDocumentoDTO->setNumMaxRegistrosRetorno(1); |
1372 | 1372 | ||
1373 | if ($objSecaoDocumentoRN->consultar($objSecaoDocumentoDTO) == null) { | 1373 | if ($objSecaoDocumentoRN->consultar($objSecaoDocumentoDTO) == null) { |
1374 | - $objInfraException->adicionarValidacao('Documento ' . $objProtocoloDTO->getStrProtocoloFormatado() . ' não contém seção de assinatura.'); | 1374 | + $objInfraException->adicionarValidacao('Documento ' . $objProtocoloDTO->getStrProtocoloFormatado() . ' não contém seção de assinatura.'); |
1375 | } | 1375 | } |
1376 | } | 1376 | } |
1377 | 1377 | ||
1378 | if ($objProtocoloDTO->getStrStaProtocolo()==ProtocoloRN::$TP_DOCUMENTO_RECEBIDO && $objProtocoloDTO->getNumIdTipoConferenciaDocumento()==null){ | 1378 | if ($objProtocoloDTO->getStrStaProtocolo()==ProtocoloRN::$TP_DOCUMENTO_RECEBIDO && $objProtocoloDTO->getNumIdTipoConferenciaDocumento()==null){ |
1379 | - $objInfraException->adicionarValidacao('Documento ' . $objProtocoloDTO->getStrProtocoloFormatado() . ' não possui Tipo de Conferência informada.'); | 1379 | + $objInfraException->adicionarValidacao('Documento ' . $objProtocoloDTO->getStrProtocoloFormatado() . ' não possui Tipo de Conferência informada.'); |
1380 | } | 1380 | } |
1381 | } | 1381 | } |
1382 | 1382 | ||
@@ -1398,7 +1398,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1398,7 +1398,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
1398 | 1398 | ||
1399 | $bcrypt = new InfraBcrypt(); | 1399 | $bcrypt = new InfraBcrypt(); |
1400 | if (!$bcrypt->verificar(md5($objAssinaturaDTO->getStrSenhaUsuario()), $objUsuarioDTO->getStrSenha())) { | 1400 | if (!$bcrypt->verificar(md5($objAssinaturaDTO->getStrSenhaUsuario()), $objUsuarioDTO->getStrSenha())) { |
1401 | - $objInfraException->lancarValidacao('Senha inválida.'); | 1401 | + $objInfraException->lancarValidacao('Senha inválida.'); |
1402 | } | 1402 | } |
1403 | 1403 | ||
1404 | } | 1404 | } |
@@ -1456,7 +1456,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1456,7 +1456,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
1456 | $objAnexoDTO = $objAnexoRN->consultarRN0736($objAnexoDTO); | 1456 | $objAnexoDTO = $objAnexoRN->consultarRN0736($objAnexoDTO); |
1457 | 1457 | ||
1458 | if ($objAnexoDTO==null){ | 1458 | if ($objAnexoDTO==null){ |
1459 | - $objInfraException->lancarValidacao('Documento '.$objProtocoloDTO->getStrProtocoloFormatado().' não possui anexo associado.'); | 1459 | + $objInfraException->lancarValidacao('Documento '.$objProtocoloDTO->getStrProtocoloFormatado().' não possui anexo associado.'); |
1460 | } | 1460 | } |
1461 | 1461 | ||
1462 | $objDocumentoConteudoBD = new DocumentoConteudoBD($this->getObjInfraIBanco()); | 1462 | $objDocumentoConteudoBD = new DocumentoConteudoBD($this->getObjInfraIBanco()); |
@@ -1501,7 +1501,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1501,7 +1501,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
1501 | $documentoDTOParaAssinar = $arrDocs[0]; | 1501 | $documentoDTOParaAssinar = $arrDocs[0]; |
1502 | 1502 | ||
1503 | if( $documentoDTOParaAssinar->isSetStrDescricaoTipoConferencia() | 1503 | if( $documentoDTOParaAssinar->isSetStrDescricaoTipoConferencia() |
1504 | - && $documentoDTOParaAssinar->getStrDescricaoTipoConferencia() == "do próprio documento nato-digital" ){ | 1504 | + && $documentoDTOParaAssinar->getStrDescricaoTipoConferencia() == "do próprio documento nato-digital" ){ |
1505 | 1505 | ||
1506 | //vai usar tarja customizada | 1506 | //vai usar tarja customizada |
1507 | $objTarjaAssinaturaDTO->setStrStaTarjaAssinatura( MdPetAssinaturaRN::$TT_ASSINATURA_SENHA_PETICIONAMENTO ); | 1507 | $objTarjaAssinaturaDTO->setStrStaTarjaAssinatura( MdPetAssinaturaRN::$TT_ASSINATURA_SENHA_PETICIONAMENTO ); |
@@ -1531,7 +1531,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1531,7 +1531,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
1531 | $numIdAtividade = null; | 1531 | $numIdAtividade = null; |
1532 | if ($objAssinaturaDTO->getStrStaFormaAutenticacao()==AssinaturaRN::$TA_SENHA){ | 1532 | if ($objAssinaturaDTO->getStrStaFormaAutenticacao()==AssinaturaRN::$TA_SENHA){ |
1533 | 1533 | ||
1534 | - //lança tarefa de assinatura | 1534 | + //lança tarefa de assinatura |
1535 | $arrObjAtributoAndamentoDTO = array(); | 1535 | $arrObjAtributoAndamentoDTO = array(); |
1536 | $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); | 1536 | $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); |
1537 | $objAtributoAndamentoDTO->setStrNome('DOCUMENTO'); | 1537 | $objAtributoAndamentoDTO->setStrNome('DOCUMENTO'); |
@@ -1541,11 +1541,11 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1541,11 +1541,11 @@ class MdPetDocumentoRN extends InfraRN { | ||
1541 | 1541 | ||
1542 | $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); | 1542 | $objAtributoAndamentoDTO = new AtributoAndamentoDTO(); |
1543 | $objAtributoAndamentoDTO->setStrNome('USUARIO'); | 1543 | $objAtributoAndamentoDTO->setStrNome('USUARIO'); |
1544 | - $objAtributoAndamentoDTO->setStrValor($objUsuarioDTO->getStrSigla().'¥'.$objUsuarioDTO->getStrNome()); | 1544 | + $objAtributoAndamentoDTO->setStrValor($objUsuarioDTO->getStrSigla().'Â¥'.$objUsuarioDTO->getStrNome()); |
1545 | $objAtributoAndamentoDTO->setStrIdOrigem($objUsuarioDTO->getNumIdUsuario()); | 1545 | $objAtributoAndamentoDTO->setStrIdOrigem($objUsuarioDTO->getNumIdUsuario()); |
1546 | $arrObjAtributoAndamentoDTO[] = $objAtributoAndamentoDTO; | 1546 | $arrObjAtributoAndamentoDTO[] = $objAtributoAndamentoDTO; |
1547 | 1547 | ||
1548 | - //Define se o propósito da operação é assinar ou autenticar o documento | 1548 | + //Define se o propósito da operação é assinar ou autenticar o documento |
1549 | $numIdTarefaAssinatura = TarefaRN::$TI_ASSINATURA_DOCUMENTO; | 1549 | $numIdTarefaAssinatura = TarefaRN::$TI_ASSINATURA_DOCUMENTO; |
1550 | if($objProtocoloDTO->getStrStaProtocolo() == ProtocoloRN::$TP_DOCUMENTO_RECEBIDO) { | 1550 | if($objProtocoloDTO->getStrStaProtocolo() == ProtocoloRN::$TP_DOCUMENTO_RECEBIDO) { |
1551 | $numIdTarefaAssinatura = TarefaRN::$TI_AUTENTICACAO_DOCUMENTO; | 1551 | $numIdTarefaAssinatura = TarefaRN::$TI_AUTENTICACAO_DOCUMENTO; |
@@ -1561,7 +1561,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1561,7 +1561,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
1561 | $numIdAtividade = $objAtividadeDTO->getNumIdAtividade(); | 1561 | $numIdAtividade = $objAtividadeDTO->getNumIdAtividade(); |
1562 | } | 1562 | } |
1563 | 1563 | ||
1564 | - //remove ocorrência pendente, se existir | 1564 | + //remove ocorrência pendente, se existir |
1565 | $dto = new AssinaturaDTO(); | 1565 | $dto = new AssinaturaDTO(); |
1566 | $dto->retNumIdAssinatura(); | 1566 | $dto->retNumIdAssinatura(); |
1567 | $dto->setDblIdDocumento($objProtocoloDTO->getDblIdProtocolo()); | 1567 | $dto->setDblIdDocumento($objProtocoloDTO->getDblIdProtocolo()); |
@@ -1647,7 +1647,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1647,7 +1647,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
1647 | 1647 | ||
1648 | 1648 | ||
1649 | if (!file_exists($strArquivoQRCaminhoCompleto)){ | 1649 | if (!file_exists($strArquivoQRCaminhoCompleto)){ |
1650 | - $objInfraException->lancarValidacao('Arquivo do QRCode não encontrado.'); | 1650 | + $objInfraException->lancarValidacao('Arquivo do QRCode não encontrado.'); |
1651 | } | 1651 | } |
1652 | 1652 | ||
1653 | if (filesize($strArquivoQRCaminhoCompleto)==0){ | 1653 | if (filesize($strArquivoQRCaminhoCompleto)==0){ |
@@ -1655,7 +1655,7 @@ class MdPetDocumentoRN extends InfraRN { | @@ -1655,7 +1655,7 @@ class MdPetDocumentoRN extends InfraRN { | ||
1655 | } | 1655 | } |
1656 | 1656 | ||
1657 | if (($binQrCode = file_get_contents($strArquivoQRCaminhoCompleto))===false){ | 1657 | if (($binQrCode = file_get_contents($strArquivoQRCaminhoCompleto))===false){ |
1658 | - $objInfraException->lancarValidacao('Não foi possível ler o arquivo do QRCode.'); | 1658 | + $objInfraException->lancarValidacao('Não foi possÃvel ler o arquivo do QRCode.'); |
1659 | } | 1659 | } |
1660 | 1660 | ||
1661 | $objDocumentoConteudoDTO->setStrQrCodeAssinatura(base64_encode($binQrCode)); | 1661 | $objDocumentoConteudoDTO->setStrQrCodeAssinatura(base64_encode($binQrCode)); |