Commit ad4451c4669a3f6c89bb404b2042247f1c96562b
Exists in
master
and in
1 other branch
Merge branch 'Correcao_111_Pet' into 'master'
Correcao 111 pet Correções: Abertura do Editor pelo Usuário Externo no SEI 3.0.6 e ordem ascendente na combo de UF na tela de Peticionamento Processo Novo. See merge request !9
Showing
2 changed files
with
46 additions
and
27 deletions
Show diff stats
sei/web/modulos/peticionamento/md_pet_usu_ext_cadastro.php
@@ -110,30 +110,53 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | @@ -110,30 +110,53 @@ PaginaSEIExterna::getInstance()->abrirAreaDados('auto'); | ||
110 | <br/> | 110 | <br/> |
111 | 111 | ||
112 | <select id="selUFAberturaProcesso" name="selUFAberturaProcesso"> | 112 | <select id="selUFAberturaProcesso" name="selUFAberturaProcesso"> |
113 | - | ||
114 | - <option value=""></option> | ||
115 | - | ||
116 | - <? foreach( $arrUnidadeUFDTO as $itemUnidadeDTO ){ ?> | ||
117 | - <option value="<?= $itemUnidadeDTO->getNumIdUnidade() ?>"> | ||
118 | - <? // seiv2 $itemUnidadeDTO->getStrSiglaUf() ?> | ||
119 | - <?php | ||
120 | - //alteracoes seiv3 | ||
121 | - $contatoAssociadoDTO = new ContatoDTO(); | ||
122 | - $contatoAssociadoRN = new ContatoRN(); | ||
123 | - $contatoAssociadoDTO->retStrSiglaUf(); | ||
124 | - $contatoAssociadoDTO->retNumIdContato(); | ||
125 | - $contatoAssociadoDTO->setNumIdContato( $itemUnidadeDTO->getNumIdContato() ); | ||
126 | - | ||
127 | - $contatoAssociadoDTO = $contatoAssociadoRN->consultarRN0324( $contatoAssociadoDTO ); | ||
128 | - echo $contatoAssociadoDTO->getStrSiglaUf(); | ||
129 | - ?> | ||
130 | - </option> | ||
131 | - <? } ?> | ||
132 | - | 113 | + <option value=""></option> |
114 | + <? | ||
115 | + function array_msort($array, $cols) { | ||
116 | + $colarr = array(); | ||
117 | + foreach ($cols as $col => $order) { | ||
118 | + $colarr[$col] = array(); | ||
119 | + foreach ($array as $k => $row) { $colarr[$col]['_'.$k] = strtolower($row[$col]); } | ||
120 | + } | ||
121 | + $eval = 'array_multisort('; | ||
122 | + foreach ($cols as $col => $order) { | ||
123 | + $eval .= '$colarr[\''.$col.'\'],'.$order.','; | ||
124 | + } | ||
125 | + $eval = substr($eval,0,-1).');'; | ||
126 | + eval($eval); | ||
127 | + $ret = array(); | ||
128 | + foreach ($colarr as $col => $arr) { | ||
129 | + foreach ($arr as $k => $v) { | ||
130 | + $k = substr($k,1); | ||
131 | + if (!isset($ret[$k])) $ret[$k] = $array[$k]; | ||
132 | + $ret[$k][$col] = $array[$k][$col]; | ||
133 | + } | ||
134 | + } | ||
135 | + return $ret; | ||
136 | + } | ||
137 | + $arrUnidadeUF = array(); | ||
138 | + foreach( $arrUnidadeUFDTO as $itemUnidadeDTO ){ | ||
139 | + $contatoAssociadoDTO = new ContatoDTO(); | ||
140 | + $contatoAssociadoRN = new ContatoRN(); | ||
141 | + $contatoAssociadoDTO->retStrSiglaUf(); | ||
142 | + $contatoAssociadoDTO->retNumIdContato(); | ||
143 | + $contatoAssociadoDTO->setNumIdContato( $itemUnidadeDTO->getNumIdContato() ); | ||
144 | + | ||
145 | + $contatoAssociadoDTO = $contatoAssociadoRN->consultarRN0324( $contatoAssociadoDTO ); | ||
146 | + | ||
147 | + $arrUnidadeUF[] = array ('IdUnidade' => $itemUnidadeDTO->getNumIdUnidade() | ||
148 | + , 'IdContato' => $itemUnidadeDTO->getNumIdContato() | ||
149 | + , 'SiglaUf' => $contatoAssociadoDTO->getStrSiglaUf() | ||
150 | + ); | ||
151 | + } | ||
152 | + $arrUnidadeUF = array_msort($arrUnidadeUF, array('name'=>SORT_DESC, 'SiglaUf'=>SORT_ASC)); | ||
153 | + foreach( $arrUnidadeUF as $itemUnidade ){ | ||
154 | + echo '<option value="' . $itemUnidade['IdUnidade'] . '">' . $itemUnidade['SiglaUf'] . '</option>'; | ||
155 | + } | ||
156 | + ?> | ||
133 | </select> <br/><br/> | 157 | </select> <br/><br/> |
134 | - | ||
135 | - <? } ?> | ||
136 | - | 158 | + <? } ?> |
159 | + | ||
137 | <? if( $objTipoProcDTO->getStrSinIIProprioUsuarioExterno() == 'S') { ?> | 160 | <? if( $objTipoProcDTO->getStrSinIIProprioUsuarioExterno() == 'S') { ?> |
138 | 161 | ||
139 | <!-- CASO 1 --> | 162 | <!-- CASO 1 --> |
sei/web/modulos/peticionamento/rn/MdPetEditorUsuarioExternoRN.php
@@ -86,8 +86,6 @@ class MdPetEditorUsuarioExternoRN extends InfraRN | @@ -86,8 +86,6 @@ class MdPetEditorUsuarioExternoRN extends InfraRN | ||
86 | $scayt=""; | 86 | $scayt=""; |
87 | LogSEI::getInstance()->gravar("'Erro acessando servidor SCAYT para validar versão do plugin:\n".InfraException::inspecionar($e)); | 87 | LogSEI::getInstance()->gravar("'Erro acessando servidor SCAYT para validar versão do plugin:\n".InfraException::inspecionar($e)); |
88 | } | 88 | } |
89 | - } elseif ($objOrgaoDTO != null && $objOrgaoDTO->getStrStaCorretorOrtografico()==OrgaoRN::$TCO_GRATUITO){ | ||
90 | - $scayt = 'scayt3'; | ||
91 | } | 89 | } |
92 | if ($scayt!="") { | 90 | if ($scayt!="") { |
93 | $includePlugins[] = $scayt; | 91 | $includePlugins[] = $scayt; |
@@ -385,8 +383,6 @@ class MdPetEditorUsuarioExternoRN extends InfraRN | @@ -385,8 +383,6 @@ class MdPetEditorUsuarioExternoRN extends InfraRN | ||
385 | $scayt=""; | 383 | $scayt=""; |
386 | LogSEI::getInstance()->gravar("'Erro acessando servidor SCAYT para validar versão do plugin:\n".InfraException::inspecionar($e)); | 384 | LogSEI::getInstance()->gravar("'Erro acessando servidor SCAYT para validar versão do plugin:\n".InfraException::inspecionar($e)); |
387 | } | 385 | } |
388 | - } elseif ($objOrgaoDTO->getStrStaCorretorOrtografico()==OrgaoRN::$TCO_GRATUITO){ | ||
389 | - $scayt = 'scayt3'; | ||
390 | } | 386 | } |
391 | if ($scayt!="") { | 387 | if ($scayt!="") { |
392 | $includePlugins[] = $scayt; | 388 | $includePlugins[] = $scayt; |