Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

review: utilização de mb_convert_encoding #665

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DebugPen.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ public function gravar($str, $numIdentacao = 0, $bolLogTempoProcessamento = true
}
}

$this->objInfraDebug->gravar(utf8_encode($strLog));
$this->objInfraDebug->gravar(mb_convert_encoding($strLog, 'UTF-8', 'ISO-8859-1'));
}
}
29 changes: 5 additions & 24 deletions src/PENIntegracao.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,24 +449,6 @@ public function montarIconeProcesso(ProcedimentoAPI $objProcedimentoAP)

private function getObjArvoreAcao($dblIdProcedimento, $arrObjArvoreAcaoItemAPI)
{
// $objAtividadeDTO = new AtividadeDTO();
// $objAtividadeDTO->setDblIdProtocolo($dblIdProcedimento);
// $objAtividadeDTO->setNumIdTarefa(ProcessoEletronicoRN::obterIdTarefaModulo($idTarefaAtividade));
// $objAtividadeDTO->setNumMaxRegistrosRetorno(1);
// $objAtividadeDTO->setOrdDthAbertura(InfraDTO::$TIPO_ORDENACAO_DESC);
// $objAtividadeDTO->retNumIdAtividade();

// $objAtividadeRN = new AtividadeRN();
// $objAtividadeDTO = $objAtividadeRN->consultarRN0033($objAtividadeDTO);


// if (!empty($objAtividadeDTO)) {
// if ($idTarefaAtividade == ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO) {
// $arrObjArvoreAcaoItemAPI[] = $this->getObjArvoreAcaoEnviado($dblIdProcedimento);
// } elseif ($idTarefaAtividade == ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_RECEBIDO) {
// $arrObjArvoreAcaoItemAPI[] = $this->getObjArvoreAcaoRecebido($dblIdProcedimento);
// }
// }

$arrTiProcessoEletronico = array(
ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO),
Expand Down Expand Up @@ -752,7 +734,6 @@ private static function formatarXMLAjax($str)
$str = str_replace('>', '>', $str);
$str = str_replace('\"', '"', $str);
$str = str_replace('"', '"', $str);
//$str = str_replace("\n",'_',$str);
}
return $str;
}
Expand Down Expand Up @@ -1134,8 +1115,8 @@ public function processarControladorAjax($strAcao) {
$registrosPorPagina = 50;
$idRepositorioEstruturaOrganizacional = $_POST['idRepositorioEstruturaOrganizacional'];
$numeroDeIdentificacaoDaEstrutura = $_POST['numeroDeIdentificacaoDaEstrutura'];
$siglaUnidade = ($_POST['siglaUnidade'] == '') ? null : utf8_encode($_POST['siglaUnidade']);
$nomeUnidade = ($_POST['nomeUnidade'] == '') ? null : utf8_encode($_POST['nomeUnidade']);
$siglaUnidade = ($_POST['siglaUnidade'] == '') ? null : mb_convert_encoding($_POST['siglaUnidade'], 'UTF-8', 'ISO-8859-1');
$nomeUnidade = ($_POST['nomeUnidade'] == '') ? null : mb_convert_encoding($_POST['nomeUnidade'], 'UTF-8', 'ISO-8859-1');
$offset = $_POST['offset'] * $registrosPorPagina;

$objProcessoEletronicoRN = new ProcessoEletronicoRN();
Expand All @@ -1149,9 +1130,9 @@ public function processarControladorAjax($strAcao) {
if(!is_null($arrHierarquiaEstruturaDTO[0])){
foreach ($arrHierarquiaEstruturaDTO as $key => $estrutura) {
//Monta um array com as estruturas para retornar o JSON
$arrEstruturas['estrutura'][$key]['nome'] = utf8_encode($estrutura->get('Nome'));
$arrEstruturas['estrutura'][$key]['nome'] = mb_convert_encoding($estrutura->get('Nome'), 'UTF-8', 'ISO-8859-1');
$arrEstruturas['estrutura'][$key]['numeroDeIdentificacaoDaEstrutura'] = $estrutura->get('NumeroDeIdentificacaoDaEstrutura');
$arrEstruturas['estrutura'][$key]['sigla'] = utf8_encode($estrutura->get('Sigla'));
$arrEstruturas['estrutura'][$key]['sigla'] = mb_convert_encoding($estrutura->get('Sigla'), 'UTF-8', 'ISO-8859-1');
$arrEstruturas['estrutura'][$key]['ativo'] = $estrutura->get('Ativo');
$arrEstruturas['estrutura'][$key]['aptoParaReceberTramites'] = $estrutura->get('AptoParaReceberTramites');
$arrEstruturas['estrutura'][$key]['codigoNoOrgaoEntidade'] = $estrutura->get('CodigoNoOrgaoEntidade');
Expand Down Expand Up @@ -1200,7 +1181,7 @@ private function obterHierarquiaEstruturaDeUnidadeExterna($idRepositorioEstrutur
if (!is_null($arrObjEstruturaDTO[0])) {
$interface = new ProcessoEletronicoINT();
$arrHierarquiaEstruturaDTO = $interface->gerarHierarquiaEstruturas($arrObjEstruturaDTO);
$arrEstruturas[$key]->nome = utf8_encode($arrHierarquiaEstruturaDTO[0]->get('Nome'));
$arrEstruturas[$key]->nome = mb_convert_encoding($arrHierarquiaEstruturaDTO[0]->get('Nome'), 'UTF-8', 'ISO-8859-1');
}
}
}
Expand Down
10 changes: 0 additions & 10 deletions src/bd/PenExpedirLoteBD.php

This file was deleted.

10 changes: 0 additions & 10 deletions src/bd/PenLoteProcedimentoBD.php

This file was deleted.

14 changes: 0 additions & 14 deletions src/bd/TramitaEmBlocoProtocoloBD.php

This file was deleted.

4 changes: 2 additions & 2 deletions src/dto/ExpedirProcedimentoDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public function montar() {
$this->adicionarAtributo(InfraDTO::$PREFIXO_BOL, 'SinUrgente');
$this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdMotivoUrgencia');
$this->adicionarAtributo(InfraDTO::$PREFIXO_ARR, 'IdProcessoApensado');
$this->adicionarAtributo(InfraDTO::$PREFIXO_BOL, 'SinProcessamentoEmLote');
$this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdLote');
$this->adicionarAtributo(InfraDTO::$PREFIXO_BOL, 'SinProcessamentoEmBloco');
$this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdBloco');
$this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdAtividade');
$this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'IdUnidade');
}
Expand Down
2 changes: 1 addition & 1 deletion src/dto/PenBlocoProcessoDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function montar()
$this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'TramiteDTO');
$this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'AtividadeDTO');
$this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'ProtocoloDTO');
$this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'PenLoteProcedimentoDTO');
$this->adicionarAtributo(InfraDTO::$PREFIXO_OBJ, 'PenBlocoProcedimentoDTO');
$this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'PalavrasPesquisa');
$this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'SinAberto');
$this->adicionarAtributo(InfraDTO::$PREFIXO_NUM, 'StaIdTarefa');
Expand Down
2 changes: 0 additions & 2 deletions src/dto/PenHipoteseLegalDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,5 @@ public function montar() {
$this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'Ativo', 'sin_ativo');

$this->configurarPK('IdHipoteseLegal', InfraDTO::$TIPO_PK_NATIVA);

//$this->configurarExclusaoLogica('Ativo', 'N');
}
}
49 changes: 0 additions & 49 deletions src/dto/PenLoteProcedimentoDTO.php

This file was deleted.

1 change: 0 additions & 1 deletion src/dto/PenRelHipoteseLegalDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,5 @@ public function montar() {
$this->configurarPK('IdMap', InfraDTO::$TIPO_PK_NATIVA);
$this->configurarFK('IdBarramento', 'md_pen_hipotese_legal', 'id_hipotese_legal');

//$this->configurarExclusaoLogica('Ativo', 'N');
}
}
1 change: 0 additions & 1 deletion src/dto/ReciboTramiteDTO.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ public function montar() {
$this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'NumeroRegistro', 'numero_registro');
$this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdTramite', 'id_tramite');
$this->adicionarAtributoTabela(InfraDTO::$PREFIXO_DTH, 'Recebimento', 'dth_recebimento');
//$this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'HashComponenteDigital', 'hash_componente_digital');
$this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'CadeiaCertificado', 'cadeia_certificado');
$this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'HashAssinatura', 'hash_assinatura');
}
Expand Down
60 changes: 0 additions & 60 deletions src/dto/TramitaEmBlocoProtocoloDTO.php

This file was deleted.

7 changes: 1 addition & 6 deletions src/int/ProcessoEletronicoINT.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ProcessoEletronicoINT extends InfraINT {
const TEE_EXPEDICAO_ETAPA_PROCEDIMENTO = 'Enviando dados do processo %s';
const TEE_EXPEDICAO_ETAPA_DOCUMENTO = 'Enviando documento %s';
const TEE_EXPEDICAO_ETAPA_CONCLUSAO = 'Trâmite externo do processo finalizado com sucesso!';
const TEE_EXPEDICAO_LOTE_ETAPA_CONCLUSAO = 'Processo(s) aguardando envio. Favor acompanhar a tramitação por meio do bloco, na funcionalidade \'Blocos de Trâmite Externo\'';
const TEE_EXPEDICAO_BLOCO_ETAPA_CONCLUSAO = 'Processo(s) aguardando envio. Favor acompanhar a tramitação por meio do bloco, na funcionalidade \'Blocos de Trâmite Externo\'';

/**
* Concate as siglas das hierarquias no nome da unidade
Expand Down Expand Up @@ -192,16 +192,12 @@ public static function getCaminhoIcone($imagem, $relPath = null) {
return '/infra_css/svg/excluir.svg';
break;
case '/pen_expedir_procedimento.gif':
// return '/infra_css/svg/upload.svg';
// return 'svg/arquivo_mapeamento_assunto.svg';
return 'modulos/' . $strModulo . '/imagens/pen_expedir_procedimento.png';
break;
case '/pen_consultar_recibos.png':
// return '/infra_css/svg/pesquisar.svg';
return 'modulos/' . $strModulo . '/imagens/consultar_recibo.png';
break;
case '/pen_cancelar_tramite.gif':
// return '/infra_css/svg/remover.svg';
return 'modulos/' . $strModulo . '/imagens/pen_cancelar_envio.svg';
break;
case '/infra_js/arvore/plus.gif':
Expand Down Expand Up @@ -291,7 +287,6 @@ public static function montarRestricaoTramitaGovBr($idUnidade, &$strCss, &$strHt
//IdUnidadeRestricao NomeUnidadeRestricao
$arrayKeys[] = $item->getNumIdUnidadeRestricao();
$items[] = array($item->getNumIdUnidadeRestricao(), $item->getStrNomeUnidadeRestricao());
//$strHtmlRepoEstruturasUnidades .= '<input type="hidden" id="hdnRepoEstruturas' . $item->getNumIdUnidadeRestricao() . '" name="hdnRepoEstruturas' . $item->getNumIdUnidadeRestricao() . '" value="" />' . "\n";
$hdnRepoEstruturas[$item->getNumIdUnidadeRestricao()] = array();
}
if ($item->getNumIdUnidadeRHRestricao() != null) {
Expand Down
18 changes: 9 additions & 9 deletions src/pen_expedir_bloco.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
}

$objPenBlocoProcessoRN = new PenBlocoProcessoRN();
$arrTramiteEmBlocoProtocolo = $objPenBlocoProcessoRN->listar($objPenBlocoProcessoDTO);
$idTramiteEmBloco = $arrTramiteEmBlocoProtocolo[0]->getNumIdBloco();
$arrPenBlocoProcesso = $objPenBlocoProcessoRN->listar($objPenBlocoProcessoDTO);
$idTramiteEmBloco = $arrPenBlocoProcesso[0]->getNumIdBloco();
$strParametros .= '&id_bloco=' . $idTramiteEmBloco;
foreach ($arrTramiteEmBlocoProtocolo as $i => $tramiteEmBlocoProtocolo) {
$arrProtocolosOrigem[] = $tramiteEmBlocoProtocolo->getDblIdProtocolo();
foreach ($arrPenBlocoProcesso as $i => $PenBlocoProcesso) {
$arrProtocolosOrigem[] = $PenBlocoProcesso->getDblIdProtocolo();
}
} else {
$idTramiteEmBloco = null;
Expand Down Expand Up @@ -150,9 +150,9 @@
$objPenBlocoProcessoDTO->setNumIdBloco($_GET['id_bloco']);

$objPenBlocoProcessoRN = new PenBlocoProcessoRN();
$arrTramiteEmBlocoProtocolo = $objPenBlocoProcessoRN->listar($objPenBlocoProcessoDTO);
$arrPenBlocoProcesso = $objPenBlocoProcessoRN->listar($objPenBlocoProcessoDTO);
$arrProcedimentos = array();
foreach ($arrTramiteEmBlocoProtocolo as $objDTO) {
foreach ($arrPenBlocoProcesso as $objDTO) {
$objDTO->setNumIdRepositorioOrigem($numIdRepositorioOrigem);
$objDTO->setNumIdUnidadeOrigem($numIdUnidadeOrigem);
$objDTO->setNumIdRepositorioDestino($numIdRepositorio);
Expand All @@ -172,9 +172,9 @@
$arrProcedimentos[] = $objDTO->getDblIdProtocolo();
}

$arrTramiteEmBlocoProtocolo[0]->setArrListaProcedimento($arrProcedimentos);
$objPenExpedirLoteRN = new PenExpedirLoteRN();
$ret = $objPenExpedirLoteRN->cadastrarBloco($arrTramiteEmBlocoProtocolo[0]);
$arrPenBlocoProcesso[0]->setArrListaProcedimento($arrProcedimentos);
$objPenExpedirBlocoRN = new PenExpedirBlocoRN();
$ret = $objPenExpedirBlocoRN->cadastrarBloco($arrPenBlocoProcesso[0]);

$bolBotaoFecharCss = InfraUtil::compararVersoes(SEI_VERSAO, ">", "4.0.1");

Expand Down
2 changes: 1 addition & 1 deletion src/pen_map_hipotese_legal_envio_cadastrar.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function onSubmit() {
$objPagina->fecharHead();
$objPagina->abrirBody($strTitulo, 'onload="inicializar();"');
?>
<form id="<?php print PEN_RECURSO_BASE; ?>_form" onsubmit="return onSubmit();" method="post" action="<?php //print $objSessaoSEI->assinarLink($strProprioLink); ?>">
<form id="<?php print PEN_RECURSO_BASE; ?>_form" onsubmit="return onSubmit();" method="post" action="">
<?php $objPagina->montarBarraComandosSuperior($arrComandos); ?>
<?php $objPagina->montarAreaValidacao(); ?>
<?php $objPagina->abrirAreaDados('12em'); ?>
Expand Down
Loading
Loading