Commit 849b75b8ee7921148f3065b8620a3e50d46e7479
1 parent
939a383e
Exists in
master
and in
1 other branch
Correção - aplicação de encode UTF-8 na tela de parametrização de Tipos de Proce…
…sso para Peticionamento de Processo Novo nos campos Sigla e Descrição de Unidade para a opção de Múltiplas Unidades.
Showing
1 changed file
with
8 additions
and
5 deletions
Show diff stats
sei/web/modulos/peticionamento/md_pet_tipo_processo_cadastro.php
... | ... | @@ -87,10 +87,10 @@ try { |
87 | 87 | $objUnidadeRN = new UnidadeRN(); |
88 | 88 | |
89 | 89 | $arrObjUnidadeDTO = $objUnidadeRN->listarTodasComFiltro($objUnidadeDTO); |
90 | - | |
90 | + | |
91 | 91 | foreach($arrObjUnidadeDTO as $key => $objUnidadeDTO){ |
92 | 92 | |
93 | - $arrObjUnidadeDTOFormatado[$objUnidadeDTO->getNumIdUnidade()]['sigla'] = $objUnidadeDTO->getStrSigla(); | |
93 | + $arrObjUnidadeDTOFormatado[$objUnidadeDTO->getNumIdUnidade()]['sigla'] = utf8_encode($objUnidadeDTO->getStrSigla()); | |
94 | 94 | $arrObjUnidadeDTOFormatado[$objUnidadeDTO->getNumIdUnidade()]['descricao'] = utf8_encode($objUnidadeDTO->getStrDescricao()); |
95 | 95 | |
96 | 96 | //alteracoes SEIv3 |
... | ... | @@ -103,10 +103,13 @@ try { |
103 | 103 | $contatoAssociadoDTO->setNumIdContato( $objUnidadeDTO->getNumIdContato() ); |
104 | 104 | |
105 | 105 | $contatoAssociadoDTO = $contatoAssociadoRN->consultarRN0324( $contatoAssociadoDTO ); |
106 | - $arrObjUnidadeDTOFormatado[$objUnidadeDTO->getNumIdUnidade()]['uf'] = $contatoAssociadoDTO->getStrSiglaUf(); | |
106 | + | |
107 | + //so recuperar caso se trata de unidade que possua UF configurada | |
108 | + if( $contatoAssociadoDTO != null && $contatoAssociadoDTO->isSetStrSiglaUf() && $contatoAssociadoDTO->getStrSiglaUf() != null ) { | |
109 | + $arrObjUnidadeDTOFormatado[$objUnidadeDTO->getNumIdUnidade()]['uf'] = utf8_encode($contatoAssociadoDTO->getStrSiglaUf()); | |
110 | + } | |
107 | 111 | } |
108 | 112 | |
109 | - | |
110 | 113 | $objInfraParametroDTO = new InfraParametroDTO(); |
111 | 114 | $objMdPetParametroRN = new MdPetParametroRN(); |
112 | 115 | $objInfraParametroDTO->retTodos(); |
... | ... | @@ -1104,7 +1107,7 @@ echo $contatoAssociadoDTO->getStrSiglaUf(); |
1104 | 1107 | </div> |
1105 | 1108 | </fieldset> |
1106 | 1109 | <!-- Fim do Documento Complementar --> |
1107 | - | |
1110 | + | |
1108 | 1111 | <input type="hidden" id="hdnCorpoTabela" name="hdnCorpoTabela" value=""/> |
1109 | 1112 | <input type="hidden" id="hdnUnidadesSelecionadas" name="hdnUnidadesSelecionadas" value=""/> |
1110 | 1113 | <input type="hidden" id="hdnTodasUnidades" name="hdnTodasUnidades" value='<?= json_encode($arrObjUnidadeDTOFormatado);?>' /> | ... | ... |