Commit b5e0c98bca47b842d20a5c90d798c978adfef654
1 parent
59147ea6
Exists in
master
and in
21 other branches
Sprint 3: 90% das US
Showing
16 changed files
with
1172 additions
and
1028 deletions
Show diff stats
PENControlador.php
@@ -25,26 +25,26 @@ class PENControlador implements ISeiControlador { | @@ -25,26 +25,26 @@ class PENControlador implements ISeiControlador { | ||
25 | require_once dirname(__FILE__) . '/pen_procedimento_expedido_listar.php'; | 25 | require_once dirname(__FILE__) . '/pen_procedimento_expedido_listar.php'; |
26 | return true; | 26 | return true; |
27 | 27 | ||
28 | - case 'pen_map_tipo_doc_enviado_listar': | 28 | + case 'pen_map_tipo_documento_envio_listar': |
29 | case 'pen_map_tipo_doc_enviado_excluir': | 29 | case 'pen_map_tipo_doc_enviado_excluir': |
30 | case 'pen_map_tipo_doc_enviado_desativar': | 30 | case 'pen_map_tipo_doc_enviado_desativar': |
31 | case 'pen_map_tipo_doc_enviado_ativar': | 31 | case 'pen_map_tipo_doc_enviado_ativar': |
32 | - require_once dirname(__FILE__) . '/pen_map_tipo_doc_enviado_listar.php'; | 32 | + require_once dirname(__FILE__) . '/pen_map_tipo_documento_envio_listar.php'; |
33 | return true; | 33 | return true; |
34 | 34 | ||
35 | - case 'pen_map_tipo_doc_enviado_cadastrar': | ||
36 | - case 'pen_map_tipo_doc_enviado_visualizar': | ||
37 | - require_once dirname(__FILE__) . '/pen_map_tipo_doc_enviado_cadastrar.php'; | 35 | + case 'pen_map_tipo_documento_envio_cadastrar': |
36 | + case 'pen_map_tipo_documento_enviador_alterar': | ||
37 | + require_once dirname(__FILE__) . '/pen_map_tipo_documento_envio_cadastrar.php'; | ||
38 | return true; | 38 | return true; |
39 | 39 | ||
40 | - case 'pen_map_tipo_doc_recebido_listar': | ||
41 | - case 'pen_map_tipo_doc_recebido_excluir': | ||
42 | - require_once dirname(__FILE__) . '/pen_map_tipo_doc_recebido_listar.php'; | 40 | + case 'pen_map_tipo_documento_recebimento_listar': |
41 | + case 'pen_map_tipo_documento_recebimento_excluir': | ||
42 | + require_once dirname(__FILE__) . '/pen_map_tipo_documento_recebimento_listar.php'; | ||
43 | return true; | 43 | return true; |
44 | 44 | ||
45 | - case 'pen_map_tipo_doc_recebido_cadastrar': | ||
46 | - case 'pen_map_tipo_doc_recebido_visualizar': | ||
47 | - require_once dirname(__FILE__) . '/pen_map_tipo_doc_recebido_cadastrar.php'; | 45 | + case 'pen_map_tipo_documento_recebimento_cadastrar': |
46 | + case 'pen_map_tipo_documento_recebimento_alterar': | ||
47 | + require_once dirname(__FILE__) . '/pen_map_tipo_documento_recebimento_cadastrar.php'; | ||
48 | return true; | 48 | return true; |
49 | 49 | ||
50 | case 'apensados_selecionar_expedir_procedimento': | 50 | case 'apensados_selecionar_expedir_procedimento': |
PENIntegracao.php
@@ -118,6 +118,49 @@ class PENIntegracao extends SeiIntegracao { | @@ -118,6 +118,49 @@ class PENIntegracao extends SeiIntegracao { | ||
118 | 118 | ||
119 | return $arrStrIcone; | 119 | return $arrStrIcone; |
120 | } | 120 | } |
121 | + | ||
122 | + public function montarIconeProcesso(ProcedimentoAPI $objProcedimentoAP) { | ||
123 | + $dblIdProcedimento = $objProcedimentoAP->getIdProcedimento(); | ||
124 | + | ||
125 | + $objArvoreAcaoItemAPI = new ArvoreAcaoItemAPI(); | ||
126 | + $objArvoreAcaoItemAPI->setTipo('MD_TRAMITE_PROCESSO'); | ||
127 | + $objArvoreAcaoItemAPI->setId('MD_TRAMITE_PROC_' . $dblIdProcedimento); | ||
128 | + $objArvoreAcaoItemAPI->setIdPai($dblIdProcedimento); | ||
129 | + $objArvoreAcaoItemAPI->setTitle('Um trâmite para esse processo foi recusado'); | ||
130 | + $objArvoreAcaoItemAPI->setIcone($this->getDiretorioImagens() . '/pen_tramite_recusado.png'); | ||
131 | + | ||
132 | + $objArvoreAcaoItemAPI->setTarget(null); | ||
133 | + $objArvoreAcaoItemAPI->setHref('javascript:alert(\'Um trâmite para esse processo foi recusado\');'); | ||
134 | + | ||
135 | + $objArvoreAcaoItemAPI->setSinHabilitado('S'); | ||
136 | + | ||
137 | + $objProcedimentoDTO = new ProcedimentoDTO(); | ||
138 | + $objProcedimentoDTO->setDblIdProcedimento($dblIdProcedimento); | ||
139 | + $objProcedimentoDTO->retDblIdProcedimento(); | ||
140 | + $objProcedimentoDTO->retStrStaEstadoProtocolo(); | ||
141 | + | ||
142 | + $objProcedimentoBD = new ProcedimentoBD(BancoSEI::getInstance()); | ||
143 | + $arrObjProcedimentoDTO = $objProcedimentoBD->consultar($objProcedimentoDTO); | ||
144 | + | ||
145 | + if (!empty($arrObjProcedimentoDTO)) { | ||
146 | + $dblIdProcedimento = $objProcedimentoDTO->getDblIdProcedimento(); | ||
147 | + $objPenProtocoloDTO = new PenProtocoloDTO(); | ||
148 | + $objPenProtocoloDTO->setDblIdProtocolo($dblIdProcedimento); | ||
149 | + $objPenProtocoloDTO->retStrSinObteveRecusa(); | ||
150 | + $objPenProtocoloDTO->setNumMaxRegistrosRetorno(1); | ||
151 | + | ||
152 | + $objProtocoloBD = new ProtocoloBD(BancoSEI::getInstance()); | ||
153 | + $objPenProtocoloDTO = $objProtocoloBD->consultar($objPenProtocoloDTO); | ||
154 | + | ||
155 | + if (!empty($objPenProtocoloDTO) && $objPenProtocoloDTO->getStrSinObteveRecusa() == 'S') { | ||
156 | + $arrObjArvoreAcaoItemAPI[] = $objArvoreAcaoItemAPI; | ||
157 | + } | ||
158 | + } else { | ||
159 | + return array(); | ||
160 | + } | ||
161 | + | ||
162 | + return $arrObjArvoreAcaoItemAPI; | ||
163 | + } | ||
121 | 164 | ||
122 | public function montarIconeAcompanhamentoEspecial($arrObjProcedimentoDTO) { | 165 | public function montarIconeAcompanhamentoEspecial($arrObjProcedimentoDTO) { |
123 | 166 | ||
@@ -177,26 +220,26 @@ class PENIntegracao extends SeiIntegracao { | @@ -177,26 +220,26 @@ class PENIntegracao extends SeiIntegracao { | ||
177 | require_once dirname(__FILE__) . '/pen_procedimento_expedido_listar.php'; | 220 | require_once dirname(__FILE__) . '/pen_procedimento_expedido_listar.php'; |
178 | return true; | 221 | return true; |
179 | 222 | ||
180 | - case 'pen_map_tipo_doc_enviado_listar': | 223 | + case 'pen_map_tipo_documento_envio_listar': |
181 | case 'pen_map_tipo_doc_enviado_excluir': | 224 | case 'pen_map_tipo_doc_enviado_excluir': |
182 | case 'pen_map_tipo_doc_enviado_desativar': | 225 | case 'pen_map_tipo_doc_enviado_desativar': |
183 | case 'pen_map_tipo_doc_enviado_ativar': | 226 | case 'pen_map_tipo_doc_enviado_ativar': |
184 | - require_once dirname(__FILE__) . '/pen_map_tipo_doc_enviado_listar.php'; | 227 | + require_once dirname(__FILE__) . '/pen_map_tipo_documento_envio_listar.php'; |
185 | return true; | 228 | return true; |
186 | 229 | ||
187 | - case 'pen_map_tipo_doc_enviado_cadastrar': | 230 | + case 'pen_map_tipo_documento_envio_cadastrar': |
188 | case 'pen_map_tipo_doc_enviado_visualizar': | 231 | case 'pen_map_tipo_doc_enviado_visualizar': |
189 | - require_once dirname(__FILE__) . '/pen_map_tipo_doc_enviado_cadastrar.php'; | 232 | + require_once dirname(__FILE__) . '/pen_map_tipo_documento_envio_cadastrar.php'; |
190 | return true; | 233 | return true; |
191 | 234 | ||
192 | - case 'pen_map_tipo_doc_recebido_listar': | 235 | + case 'pen_map_tipo_documento_recebimento_listar': |
193 | case 'pen_map_tipo_doc_recebido_excluir': | 236 | case 'pen_map_tipo_doc_recebido_excluir': |
194 | - require_once dirname(__FILE__) . '/pen_map_tipo_doc_recebido_listar.php'; | 237 | + require_once dirname(__FILE__) . '/pen_map_tipo_documento_recebimento_listar.php'; |
195 | return true; | 238 | return true; |
196 | 239 | ||
197 | - case 'pen_map_tipo_doc_recebido_cadastrar': | 240 | + case 'pen_map_tipo_documento_recebimento_cadastrar': |
198 | case 'pen_map_tipo_doc_recebido_visualizar': | 241 | case 'pen_map_tipo_doc_recebido_visualizar': |
199 | - require_once dirname(__FILE__) . '/pen_map_tipo_doc_recebido_cadastrar.php'; | 242 | + require_once dirname(__FILE__) . '/pen_map_tipo_documento_recebimento_cadastrar.php'; |
200 | return true; | 243 | return true; |
201 | 244 | ||
202 | case 'apensados_selecionar_expedir_procedimento': | 245 | case 'apensados_selecionar_expedir_procedimento': |
pen_map_tipo_doc_enviado_cadastrar.php
@@ -1,192 +0,0 @@ | @@ -1,192 +0,0 @@ | ||
1 | -<?php | ||
2 | -/** | ||
3 | - * | ||
4 | - * @author Join Tecnologia | ||
5 | - */ | ||
6 | -require_once dirname(__FILE__) . '/../../SEI.php'; | ||
7 | - | ||
8 | - | ||
9 | -try { | ||
10 | - | ||
11 | - session_start(); | ||
12 | - | ||
13 | - $objPaginaSEI = PaginaSEI::getInstance(); | ||
14 | - | ||
15 | - SessaoSEI::getInstance()->validarLink(); | ||
16 | - SessaoSEI::getInstance()->validarPermissao($_GET['acao']); | ||
17 | - | ||
18 | - $objBancoSEI = BancoSEI::getInstance(); | ||
19 | - $objBancoSEI->abrirConexao(); | ||
20 | - | ||
21 | - $arrComandos = array(); | ||
22 | - | ||
23 | - $bolSomenteLeitura = false; | ||
24 | - | ||
25 | - switch ($_GET['acao']) { | ||
26 | - case 'pen_map_tipo_doc_enviado_cadastrar': | ||
27 | - $arrComandos[] = '<button type="submit" name="sbmCadastrarSerie" value="Salvar" class="infraButton"><span class="infraTeclaAtalho">S</span>alvar</button>'; | ||
28 | - $arrComandos[] = '<button type="button" value="Cancelar" onclick="location.href=\'' . $objPaginaSEI->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_listar&acao_origem=' . $_GET['acao'])) . '\';" class="infraButton"><span class="infraTeclaAtalho">C</span>ancelar</button>'; | ||
29 | - | ||
30 | - if(array_key_exists('codigo_especie', $_GET) && !empty($_GET['codigo_especie'])){ | ||
31 | - $strTitulo = 'Editar Mapeamento de Envio'; | ||
32 | - } | ||
33 | - else { | ||
34 | - $strTitulo = 'Novo Mapeamento de Envio'; | ||
35 | - } | ||
36 | - break; | ||
37 | - | ||
38 | - case 'pen_map_tipo_doc_enviado_visualizar': | ||
39 | - $arrComandos[] = '<button type="button" name="btnFechar" value="Fechar class="infraButton" onclick="location.href=\'' . $objPaginaSEI->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_listar&acao_origem=' . $_GET['acao'])) . '\';"><span class="infraTeclaAtalho">F</span>echar</button>'; | ||
40 | - $bolSomenteLeitura = true; | ||
41 | - $strTitulo = 'Consultar Mapeamento de Envio'; | ||
42 | - break; | ||
43 | - | ||
44 | - | ||
45 | - default: | ||
46 | - throw new InfraException("Ação '" . $_GET['acao'] . "' não reconhecida."); | ||
47 | - } | ||
48 | - | ||
49 | - //-------------------------------------------------------------------------- | ||
50 | - // Ação por POST esta salvando o formulário | ||
51 | - if(strtoupper($_SERVER['REQUEST_METHOD']) === 'POST') { | ||
52 | - | ||
53 | - if(!array_key_exists('codigo_especie', $_POST) || empty($_POST['codigo_especie'])) { | ||
54 | - throw new InfraException('Nenhuma "Espécie Documental" foi selecionada'); | ||
55 | - } | ||
56 | - | ||
57 | - if(!array_key_exists('id_serie', $_POST) || empty($_POST['id_serie'])) { | ||
58 | - throw new InfraException('Nenhum "Tipo de Documento" foi selecionado'); | ||
59 | - } | ||
60 | - | ||
61 | - $objPenRelTipoDocMapEnviadoDTO = new PenRelTipoDocMapEnviadoDTO(); | ||
62 | - $objPenRelTipoDocMapEnviadoDTO->setNumCodigoEspecie($_POST['codigo_especie']); | ||
63 | - $objPenRelTipoDocMapEnviadoDTO->setNumIdSerie($_POST['id_serie']); | ||
64 | - | ||
65 | - if(array_key_exists('id_mapeamento', $_GET) && !empty($_GET['id_mapeamento'])) { | ||
66 | - $objPenRelTipoDocMapEnviadoDTO->setDblIdMap($_GET['id_mapeamento']); | ||
67 | - } | ||
68 | - | ||
69 | - $objPenRelTipoDocMapEnviadoRN = new PenRelTipoDocMapEnviadoRN(); | ||
70 | - $objPenRelTipoDocMapEnviadoRN->cadastrar($objPenRelTipoDocMapEnviadoDTO); | ||
71 | - | ||
72 | - $objPaginaSEI->adicionarMensagem('Salvo com sucesso', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
73 | - | ||
74 | - header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_listar&acao_origem='.$_GET['acao'])); | ||
75 | - exit(0); | ||
76 | - } | ||
77 | - // Ação por GET + ID esta carregando o formulário | ||
78 | - else if(array_key_exists('id_mapeamento', $_GET) && !empty($_GET['id_mapeamento'])){ | ||
79 | - | ||
80 | - $objPenRelTipoDocMapEnviadoDTO = new PenRelTipoDocMapEnviadoDTO(); | ||
81 | - $objPenRelTipoDocMapEnviadoDTO->setDblIdMap($_GET['id_mapeamento']); | ||
82 | - $objPenRelTipoDocMapEnviadoDTO->retTodos(); | ||
83 | - | ||
84 | - $objEspecieDocumentalBD = new GenericoBD(BancoSEI::getInstance()); | ||
85 | - $objPenRelTipoDocMapEnviadoDTO = $objEspecieDocumentalBD->consultar($objPenRelTipoDocMapEnviadoDTO); | ||
86 | - } | ||
87 | - | ||
88 | - if(empty($objPenRelTipoDocMapEnviadoDTO)){ | ||
89 | - $objPenRelTipoDocMapEnviadoDTO = new PenRelTipoDocMapEnviadoDTO(); | ||
90 | - $objPenRelTipoDocMapEnviadoDTO->setNumCodigoEspecie(0); | ||
91 | - $objPenRelTipoDocMapEnviadoDTO->setNumIdSerie(0); | ||
92 | - } | ||
93 | - | ||
94 | - $objTipoDocMapRN = new TipoDocMapRN(); | ||
95 | - $objPenRelTipoDocMapEnviadoRN = new PenRelTipoDocMapEnviadoRN(); | ||
96 | - | ||
97 | - $arrSerie = $objTipoDocMapRN->listarParesSerie( | ||
98 | - $objPenRelTipoDocMapEnviadoRN->listarEmUso($objPenRelTipoDocMapEnviadoDTO->getNumIdSerie()), | ||
99 | - true | ||
100 | - ); | ||
101 | -} | ||
102 | -catch (InfraException $e) { | ||
103 | - | ||
104 | - if(preg_match('/Duplicate/', $e->getStrDescricao())){ | ||
105 | - | ||
106 | - $objPaginaSEI->adicionarMensagem('Nenhuma das duas chaves pode estar sendo utilizada em outra relação', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
107 | - } | ||
108 | - else { | ||
109 | - | ||
110 | - $objPaginaSEI->processarExcecao($e); | ||
111 | - } | ||
112 | -} | ||
113 | -?> | ||
114 | - | ||
115 | -<?php | ||
116 | -// View | ||
117 | -ob_clean(); | ||
118 | - | ||
119 | -$objPaginaSEI->montarDocType(); | ||
120 | -$objPaginaSEI->abrirHtml(); | ||
121 | -$objPaginaSEI->abrirHead(); | ||
122 | -$objPaginaSEI->montarMeta(); | ||
123 | -$objPaginaSEI->montarTitle(':: ' . $objPaginaSEI->getStrNomeSistema() . ' - ' . $strTitulo . ' ::'); | ||
124 | -$objPaginaSEI->montarStyle(); | ||
125 | -?> | ||
126 | -<style type="text/css"> | ||
127 | - | ||
128 | -.input-label-first{position:absolute;left:0%;top:0%;width:25%; color: #666!important} | ||
129 | -.input-field-first{position:absolute;left:0%;top:15%;width:25%} | ||
130 | - | ||
131 | -.input-label-third {position:absolute;left:0%;top:40%;width:25%; color:#666!important} | ||
132 | -.input-field-third {position:absolute;left:0%;top:55%;width:25%;} | ||
133 | - | ||
134 | -</style> | ||
135 | -<?php $objPaginaSEI->montarJavaScript(); ?> | ||
136 | -<script type="text/javascript"> | ||
137 | - | ||
138 | -function inicializar(){ | ||
139 | - | ||
140 | - var strMensagens = '<?php print str_replace("\n", '\n', $objPaginaSEI->getStrMensagens()); ?>'; | ||
141 | - | ||
142 | - if(strMensagens) { | ||
143 | - | ||
144 | - alert(strMensagens); | ||
145 | - } | ||
146 | -} | ||
147 | - | ||
148 | -function onSubmit() { | ||
149 | - | ||
150 | - var form = jQuery('#pen-map-tipo-doc-enviado'); | ||
151 | - var field = jQuery('select[name=codigo_especie]', form); | ||
152 | - | ||
153 | - if(field.val() === 'null'){ | ||
154 | - alert('Nenhuma "Espécie Documental" foi selecionada'); | ||
155 | - field.focus(); | ||
156 | - return false; | ||
157 | - } | ||
158 | - | ||
159 | - field = jQuery('select[name=id_serie]', form); | ||
160 | - | ||
161 | - if(field.val() === 'null'){ | ||
162 | - alert('Nenhum "Tipo de Documento" foi selecionado'); | ||
163 | - field.focus(); | ||
164 | - return false; | ||
165 | - } | ||
166 | -} | ||
167 | - | ||
168 | -</script> | ||
169 | -<?php | ||
170 | -$objPaginaSEI->fecharHead(); | ||
171 | -$objPaginaSEI->abrirBody($strTitulo,'onload="inicializar();"'); | ||
172 | -?> | ||
173 | -<form id="pen-map-tipo-doc-enviado" onsubmit="return onSubmit();" method="post" action="<?php //print $objSessaoSEI->assinarLink($strProprioLink); ?>"> | ||
174 | - <?php $objPaginaSEI->montarBarraComandosSuperior($arrComandos); ?> | ||
175 | - <?php //$objPaginaSEI->montarAreaValidacao(); ?> | ||
176 | - <?php $objPaginaSEI->abrirAreaDados('12em'); ?> | ||
177 | - | ||
178 | - <label for="codigo_especie" class="infraLabelObrigatorio input-label-first">Espécie Documental:</label> | ||
179 | - | ||
180 | - <select name="codigo_especie" class="infraSelect input-field-first"<?php if($bolSomenteLeitura): ?> disabled="disabled" readonly="readonly"<?php endif; ?>> | ||
181 | - <?php print InfraINT::montarSelectArray('', 'Selecione', $objPenRelTipoDocMapEnviadoDTO->getNumCodigoEspecie(), $objTipoDocMapRN->listarParesEspecie()); ?> | ||
182 | - </select> | ||
183 | - | ||
184 | - <label for="id_serie" class="infraLabelObrigatorio input-label-third">Tipo de Documento:</label> | ||
185 | - <select name="id_serie" class="infraSelect input-field-third"<?php if($bolSomenteLeitura): ?> disabled="disabled" readonly="readonly"<?php endif; ?>> | ||
186 | - <?php print InfraINT::montarSelectArray('', 'Selecione', $objPenRelTipoDocMapEnviadoDTO->getNumIdSerie(), $arrSerie); ?> | ||
187 | - </select> | ||
188 | - | ||
189 | - <?php print $objPaginaSEI->fecharAreaDados(); ?> | ||
190 | -</form> | ||
191 | -<?php $objPaginaSEI->fecharBody(); ?> | ||
192 | -<?php $objPaginaSEI->fecharHtml(); ?> | ||
193 | \ No newline at end of file | 0 | \ No newline at end of file |
pen_map_tipo_doc_enviado_listar.php
@@ -1,334 +0,0 @@ | @@ -1,334 +0,0 @@ | ||
1 | -<?php | ||
2 | - | ||
3 | -require_once dirname(__FILE__) . '/../../SEI.php'; | ||
4 | - | ||
5 | -/** | ||
6 | - * Consulta os logs do estado do procedimento ao ser expedido | ||
7 | - * | ||
8 | - * @author Join Tecnologia | ||
9 | - */ | ||
10 | - | ||
11 | -session_start(); | ||
12 | - | ||
13 | -InfraDebug::getInstance()->setBolLigado(false); | ||
14 | -InfraDebug::getInstance()->setBolDebugInfra(true); | ||
15 | -InfraDebug::getInstance()->limpar(); | ||
16 | - | ||
17 | -$objPaginaSEI = PaginaSEI::getInstance(); | ||
18 | -$objSessaoSEI = SessaoSEI::getInstance(); | ||
19 | - | ||
20 | -$strProprioLink = 'controlador.php?acao='.$_GET['acao'].'&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao_retorno']; | ||
21 | - | ||
22 | -try { | ||
23 | - | ||
24 | - $objSessaoSEI->validarLink(); | ||
25 | - $objSessaoSEI->validarPermissao('pen_map_tipo_doc_enviado_listar'); | ||
26 | - | ||
27 | - $objBancoSEI = BancoSEI::getInstance(); | ||
28 | - $objBancoSEI->abrirConexao(); | ||
29 | - | ||
30 | - //-------------------------------------------------------------------------- | ||
31 | - // Ações | ||
32 | - if(array_key_exists('acao', $_GET)) { | ||
33 | - | ||
34 | - $arrParam = array_merge($_GET, $_POST); | ||
35 | - | ||
36 | - switch($_GET['acao']) { | ||
37 | - | ||
38 | - case 'pen_map_tipo_doc_enviado_excluir': | ||
39 | - | ||
40 | - if(array_key_exists('hdnInfraItensSelecionados', $arrParam) && !empty($arrParam['hdnInfraItensSelecionados'])) { | ||
41 | - | ||
42 | - PenRelTipoDocMapEnviadoRN::excluir(explode(',', $arrParam['hdnInfraItensSelecionados'])); | ||
43 | - | ||
44 | - $objPaginaSEI->adicionarMensagem('Excluido com sucesso.', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
45 | - | ||
46 | - header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao_retorno'].'&acao_origem='.$_GET['acao_origem'])); | ||
47 | - exit(0); | ||
48 | - } | ||
49 | - else { | ||
50 | - | ||
51 | - throw new InfraException('Nenhum Registro foi selecionado para executar esta ação'); | ||
52 | - } | ||
53 | - break; | ||
54 | - | ||
55 | - case 'pen_map_tipo_doc_enviado_desativar': | ||
56 | - | ||
57 | - if(array_key_exists('hdnInfraItensSelecionados', $arrParam) && !empty($arrParam['hdnInfraItensSelecionados'])) { | ||
58 | - | ||
59 | - PenRelTipoDocMapEnviadoRN::mudarEstado(explode(',', $arrParam['hdnInfraItensSelecionados']), 'N'); | ||
60 | - | ||
61 | - $objPaginaSEI->adicionarMensagem('Desativado com sucesso.', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
62 | - | ||
63 | - header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao_retorno'].'&acao_origem='.$_GET['acao_origem'])); | ||
64 | - exit(0); | ||
65 | - } | ||
66 | - else { | ||
67 | - | ||
68 | - throw new InfraException('Nenhum Registro foi selecionado para executar esta ação'); | ||
69 | - } | ||
70 | - break; | ||
71 | - | ||
72 | - case 'pen_map_tipo_doc_enviado_ativar': | ||
73 | - if(array_key_exists('hdnInfraItensSelecionados', $arrParam) && !empty($arrParam['hdnInfraItensSelecionados'])) { | ||
74 | - | ||
75 | - PenRelTipoDocMapEnviadoRN::mudarEstado(explode(',', $arrParam['hdnInfraItensSelecionados']), 'S'); | ||
76 | - | ||
77 | - $objPaginaSEI->adicionarMensagem('Ativado com sucesso.', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
78 | - | ||
79 | - header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao_retorno'].'&acao_origem='.$_GET['acao_origem'])); | ||
80 | - exit(0); | ||
81 | - } | ||
82 | - break; | ||
83 | - | ||
84 | - case 'pen_map_tipo_doc_enviado_listar': | ||
85 | - // Ação padrão desta tela | ||
86 | - break; | ||
87 | - | ||
88 | - default: | ||
89 | - throw new InfraException('Ação não permitida nesta tela'); | ||
90 | - | ||
91 | - } | ||
92 | - } | ||
93 | - //-------------------------------------------------------------------------- | ||
94 | - | ||
95 | - $strTitulo = 'Lista dos Mapeamentos de Envio'; | ||
96 | - | ||
97 | - $arrComandos = array(); | ||
98 | - $arrComandos[] = '<button type="button" accesskey="P" onclick="onClickBtnPesquisar();" id="btnPesquisar" value="Pesquisar" class="infraButton"><span class="infraTeclaAtalho">P</span>esquisar</button>'; | ||
99 | - $arrComandos[] = '<button type="button" value="Novo" onclick="onClickBtnNovo()" class="infraButton"><span class="infraTeclaAtalho">N</span>ovo</button>'; | ||
100 | - //$arrComandos[] = '<button type="button" value="Ativar" onclick="onClickBtnAtivar()" class="infraButton">Ativar</button>'; | ||
101 | - //$arrComandos[] = '<button type="button" value="Desativar" onclick="onClickBtnDesativar()" class="infraButton">Desativar</button>'; | ||
102 | - $arrComandos[] = '<button type="button" value="Excluir" onclick="onClickBtnExcluir()" class="infraButton"><span class="infraTeclaAtalho">E</span>xcluir</button>'; | ||
103 | - $arrComandos[] = '<button type="button" accesskey="I" id="btnImprimir" value="Imprimir" onclick="infraImprimirTabela();" class="infraButton"><span class="infraTeclaAtalho">I</span>mprimir</button>'; | ||
104 | - | ||
105 | - //-------------------------------------------------------------------------- | ||
106 | - // DTO de paginação | ||
107 | - | ||
108 | - $objPenRelTipoDocMapEnviadoDTO = new PenRelTipoDocMapEnviadoDTO(); | ||
109 | - $objPenRelTipoDocMapEnviadoDTO->retTodos(true); | ||
110 | - //-------------------------------------------------------------------------- | ||
111 | - // Filtragem | ||
112 | - | ||
113 | - if(array_key_exists('nome_serie', $_POST) && !empty($_POST['nome_serie'])) { | ||
114 | - | ||
115 | - $objPenRelTipoDocMapEnviadoDTO->setStrNomeSerie('%'.$_POST['nome_serie'].'%', InfraDTO::$OPER_LIKE); | ||
116 | - } | ||
117 | - | ||
118 | - if(array_key_exists('nome_especie', $_POST) && !empty($_POST['nome_especie'])) { | ||
119 | - | ||
120 | - $objPenRelTipoDocMapEnviadoDTO->setStrNomeEspecie('%'.$_POST['nome_especie'].'%', InfraDTO::$OPER_LIKE); | ||
121 | - } | ||
122 | - //-------------------------------------------------------------------------- | ||
123 | - | ||
124 | - $objPaginaSEI->prepararOrdenacao($objPenRelTipoDocMapEnviadoDTO, 'CodigoEspecie', InfraDTO::$TIPO_ORDENACAO_ASC); | ||
125 | - $objPaginaSEI->prepararPaginacao($objPenRelTipoDocMapEnviadoDTO); | ||
126 | - | ||
127 | - $objGenericoBD = new GenericoBD($objBancoSEI); | ||
128 | - $arrObjPenRelTipoDocMapEnviadoDTO = $objGenericoBD->listar($objPenRelTipoDocMapEnviadoDTO); | ||
129 | - | ||
130 | - $objPaginaSEI->processarPaginacao($objPenRelTipoDocMapEnviadoDTO); | ||
131 | - | ||
132 | - $numRegistros = count($arrObjPenRelTipoDocMapEnviadoDTO); | ||
133 | - | ||
134 | - if(!empty($arrObjPenRelTipoDocMapEnviadoDTO)){ | ||
135 | - | ||
136 | - $strResultado = ''; | ||
137 | - | ||
138 | - $strResultado .= '<table width="99%" class="infraTable">'."\n"; | ||
139 | - $strResultado .= '<caption class="infraCaption">'.$objPaginaSEI->gerarCaptionTabela('estados do processo', $numRegistros).'</caption>'; | ||
140 | - | ||
141 | - $strResultado .= '<tr>'; | ||
142 | - $strResultado .= '<th class="infraTh" width="1%">'.$objPaginaSEI->getThCheck().'</th>'."\n"; | ||
143 | - $strResultado .= '<th class="infraTh" width="35%">Especie Documental</th>'."\n"; | ||
144 | - $strResultado .= '<th class="infraTh" width="35%">Tipo de Documento</th>'."\n"; | ||
145 | - $strResultado .= '<th class="infraTh" width="14%">Ações</th>'."\n"; | ||
146 | - $strResultado .= '</tr>'."\n"; | ||
147 | - $strCssTr = ''; | ||
148 | - | ||
149 | - $index = 0; | ||
150 | - foreach($arrObjPenRelTipoDocMapEnviadoDTO as $objPenRelTipoDocMapEnviadoDTO) { | ||
151 | - | ||
152 | - $strCssTr = ($strCssTr == 'infraTrClara') ? 'infraTrEscura' : 'infraTrClara'; | ||
153 | - | ||
154 | - $strResultado .= '<tr class="'.$strCssTr.'">'; | ||
155 | - $strResultado .= '<td>'.$objPaginaSEI->getTrCheck($index, $objPenRelTipoDocMapEnviadoDTO->getDblIdMap(), '').'</td>'; | ||
156 | - $strResultado .= '<td>'.$objPenRelTipoDocMapEnviadoDTO->getStrNomeEspecie().'</td>'; | ||
157 | - $strResultado .= '<td>'.$objPenRelTipoDocMapEnviadoDTO->getStrNomeSerie().'</td>'; | ||
158 | - $strResultado .= '<td align="center">'; | ||
159 | - | ||
160 | - $strResultado .= '<a href="'.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_visualizar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&id_mapeamento='.$objPenRelTipoDocMapEnviadoDTO->getDblIdMap()).'"><img src="imagens/consultar.gif" title="Consultar Mapeamento" alt="Consultar Mapeamento" class="infraImg"></a>'; | ||
161 | - $strResultado .= '<a href="'.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_cadastrar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&id_mapeamento='.$objPenRelTipoDocMapEnviadoDTO->getDblIdMap()).'"><img src="imagens/alterar.gif" title="Alterar Mapeamento" alt="Alterar Mapeamento" class="infraImg"></a>'; | ||
162 | - | ||
163 | -// if($objPenRelTipoDocMapEnviadoDTO->getStrPadrao() == 'S'){ | ||
164 | -// $strResultado .= '<a href="'.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_desativar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&hdnInfraItensSelecionados='.$objPenRelTipoDocMapEnviadoDTO->getNumCodigoEspecie()).'"><img src="imagens/plugin.png" title="Desativar '.$strTitulo.'" alt="Desativar '.$strTitulo.'" class="infraImg"></a>'; | ||
165 | -// } | ||
166 | -// else { | ||
167 | -// $strResultado .= '<a href="'.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_ativar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&hdnInfraItensSelecionados='.$objPenRelTipoDocMapEnviadoDTO->getNumCodigoEspecie()).'"><img src="imagens/plugin_disabled.png" title="Ativar '.$strTitulo.'" alt="Ativar '.$strTitulo.'" class="infraImg"></a>'; | ||
168 | -// } | ||
169 | - $strResultado .= '<a href="#" onclick="onCLickLinkDelete(\''.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_excluir&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&hdnInfraItensSelecionados='.$objPenRelTipoDocMapEnviadoDTO->getDblIdMap()).'\', this)"><img src="imagens/excluir.gif" title="Excluir Mapeamento" alt="Excluir Mapeamento" class="infraImg"></a>'; | ||
170 | - | ||
171 | - $strResultado .= '</td>'; | ||
172 | - $strResultado .= '</tr>'."\n"; | ||
173 | - | ||
174 | - $index++; | ||
175 | - } | ||
176 | - $strResultado .= '</table>'; | ||
177 | - } | ||
178 | -} | ||
179 | -catch(InfraException $e){ | ||
180 | - $objPaginaSEI->processarExcecao($e); | ||
181 | -} | ||
182 | - | ||
183 | -$objPaginaSEI->montarDocType(); | ||
184 | -$objPaginaSEI->abrirHtml(); | ||
185 | -$objPaginaSEI->abrirHead(); | ||
186 | -$objPaginaSEI->montarMeta(); | ||
187 | -$objPaginaSEI->montarTitle(':: '.$objPaginaSEI->getStrNomeSistema().' - '.$strTitulo.' ::'); | ||
188 | -$objPaginaSEI->montarStyle(); | ||
189 | -?> | ||
190 | -<style type="text/css"> | ||
191 | - | ||
192 | -.input-label-first{position:absolute;left:0%;top:0%;width:25%; color: #666!important} | ||
193 | -.input-field-first{position:absolute;left:0%;top:50%;width:25%} | ||
194 | - | ||
195 | -.input-label-second{position:absolute;left:30%;top:0%;width:25%; color: #666!important} | ||
196 | -.input-field-second{position:absolute;left:30%;top:50%;width:25%;} | ||
197 | - | ||
198 | -.input-label-third {position:absolute;left:0%;top:40%;width:25%; color:#666!important} | ||
199 | -.input-field-third {position:absolute;left:0%;top:55%;width:25%;} | ||
200 | - | ||
201 | -</style> | ||
202 | -<?php $objPaginaSEI->montarJavaScript(); ?> | ||
203 | -<script type="text/javascript"> | ||
204 | - | ||
205 | -var objAutoCompletarInteressadoRI1225 = null; | ||
206 | - | ||
207 | -function inicializar(){ | ||
208 | - | ||
209 | - infraEfeitoTabelas(); | ||
210 | - | ||
211 | - var strMensagens = '<?php print str_replace("\n", '\n', $objPaginaSEI->getStrMensagens()); ?>'; | ||
212 | - | ||
213 | - if(strMensagens) { | ||
214 | - | ||
215 | - alert(strMensagens); | ||
216 | - } | ||
217 | -} | ||
218 | - | ||
219 | -function onClickBtnPesquisar(){ | ||
220 | - document.getElementById('frmAcompanharEstadoProcesso').action='<?php print $objSessaoSEI->assinarLink($strProprioLink); ?>'; | ||
221 | - document.getElementById('frmAcompanharEstadoProcesso').submit(); | ||
222 | -} | ||
223 | - | ||
224 | -function tratarEnter(ev){ | ||
225 | - var key = infraGetCodigoTecla(ev); | ||
226 | - if (key == 13){ | ||
227 | - onClickBtnPesquisar(); | ||
228 | - } | ||
229 | - return true; | ||
230 | -} | ||
231 | - | ||
232 | -function onCLickLinkDelete(url, link) { | ||
233 | - | ||
234 | - var row = jQuery(link).parents('tr:first'); | ||
235 | - | ||
236 | - var strEspecieDocumental = row.find('td:eq(1)').text(); | ||
237 | - var strTipoDocumento = row.find('td:eq(2)').text(); | ||
238 | - | ||
239 | - if(confirm('Confirma a exclusão do mapeamento "' + strEspecieDocumental + ' x ' + strTipoDocumento +'"?')){ | ||
240 | - | ||
241 | - window.location = url; | ||
242 | - } | ||
243 | - | ||
244 | -} | ||
245 | - | ||
246 | -function onClickBtnNovo(){ | ||
247 | - | ||
248 | - window.location = '<?php print $objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_cadastrar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao_origem']); ?>'; | ||
249 | -} | ||
250 | -<?php /* ?> | ||
251 | -function onClickBtnAtivar(){ | ||
252 | - | ||
253 | - try { | ||
254 | - | ||
255 | - var form = jQuery('#frmAcompanharEstadoProcesso'); | ||
256 | - form.attr('action', '<?php print $objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_ativar&acao_origem='.$_GET['acao_origem'].'&acao_retorno=pen_map_tipo_doc_enviado_listar'); ?>'); | ||
257 | - form.submit(); | ||
258 | - } | ||
259 | - catch(e){ | ||
260 | - | ||
261 | - alert('Erro : ' + e.message); | ||
262 | - } | ||
263 | - | ||
264 | -} | ||
265 | - | ||
266 | -function onClickBtnDesativar(){ | ||
267 | - | ||
268 | - try { | ||
269 | - | ||
270 | - var form = jQuery('#frmAcompanharEstadoProcesso'); | ||
271 | - form.attr('action', '<?php print $objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_desativar&acao_origem='.$_GET['acao_origem'].'&acao_retorno=pen_map_tipo_doc_enviado_listar'); ?>'); | ||
272 | - form.submit(); | ||
273 | - } | ||
274 | - catch(e){ | ||
275 | - | ||
276 | - alert('Erro : ' + e.message); | ||
277 | - } | ||
278 | -} | ||
279 | -<?php */ ?> | ||
280 | -function onClickBtnExcluir(){ | ||
281 | - | ||
282 | - try { | ||
283 | - | ||
284 | - var len = jQuery('input[name*=chkInfraItem]:checked').length; | ||
285 | - | ||
286 | - if(len > 0){ | ||
287 | - | ||
288 | - if(confirm('Confirma a exclusão de ' + len + ' mapeamento(s) ?')) { | ||
289 | - | ||
290 | - var form = jQuery('#frmAcompanharEstadoProcesso'); | ||
291 | - form.attr('action', '<?php print $objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_excluir&acao_origem='.$_GET['acao_origem'].'&acao_retorno=pen_map_tipo_doc_enviado_listar'); ?>'); | ||
292 | - form.submit(); | ||
293 | - } | ||
294 | - } | ||
295 | - else { | ||
296 | - | ||
297 | - alert('Selecione pelo menos um mapeamento para Excluir'); | ||
298 | - } | ||
299 | - } | ||
300 | - catch(e){ | ||
301 | - | ||
302 | - alert('Erro : ' + e.message); | ||
303 | - } | ||
304 | -} | ||
305 | - | ||
306 | -</script> | ||
307 | -<?php | ||
308 | -$objPaginaSEI->fecharHead(); | ||
309 | -$objPaginaSEI->abrirBody($strTitulo,'onload="inicializar();"'); | ||
310 | -?> | ||
311 | -<form id="frmAcompanharEstadoProcesso" method="post" action="<?php// print $objSessaoSEI->assinarLink($strProprioLink); ?>"> | ||
312 | - | ||
313 | - <?php $objPaginaSEI->montarBarraComandosSuperior($arrComandos); ?> | ||
314 | - <?php //$objPaginaSEI->montarAreaValidacao(); ?> | ||
315 | - <?php $objPaginaSEI->abrirAreaDados('40px'); ?> | ||
316 | - | ||
317 | - <label for="nome_especie" class="infraLabelObrigatorio input-label-first">Espécie Documental:</label> | ||
318 | - <input type="text" name="nome_especie" class="infraText input-field-first" onkeyup="return tratarEnter(event)" value="<?php print $_POST['nome_especie']; ?>"/> | ||
319 | - | ||
320 | - <label for="nome_serie" class="infraLabelObrigatorio input-label-second">Tipo de Documento:</label> | ||
321 | - <input type="text" name="nome_serie" class="infraText input-field-second" onkeyup="return tratarEnter(event)" value="<?php print $_POST['nome_serie']; ?>"/> | ||
322 | - | ||
323 | - <?php $objPaginaSEI->fecharAreaDados(); ?> | ||
324 | - | ||
325 | - <?php if($numRegistros > 0): ?> | ||
326 | - <?php $objPaginaSEI->montarAreaTabela($strResultado, $numRegistros); ?> | ||
327 | - <?php //$objPaginaSEI->montarAreaDebug(); ?> | ||
328 | - <?php else: ?> | ||
329 | - <div style="clear:both"></div> | ||
330 | - <p>Nenhum estado foi encontrado para este procedimento</p> | ||
331 | - <?php endif; ?> | ||
332 | -</form> | ||
333 | -<?php $objPaginaSEI->fecharBody(); ?> | ||
334 | -<?php $objPaginaSEI->fecharHtml(); ?> | ||
335 | \ No newline at end of file | 0 | \ No newline at end of file |
pen_map_tipo_doc_recebido_cadastrar.php
@@ -1,191 +0,0 @@ | @@ -1,191 +0,0 @@ | ||
1 | -<?php | ||
2 | -/** | ||
3 | - * | ||
4 | - * @author Join Tecnologia | ||
5 | - */ | ||
6 | -require_once dirname(__FILE__) . '/../../SEI.php'; | ||
7 | - | ||
8 | - | ||
9 | -try { | ||
10 | - | ||
11 | - session_start(); | ||
12 | - | ||
13 | - $objPaginaSEI = PaginaSEI::getInstance(); | ||
14 | - | ||
15 | - SessaoSEI::getInstance()->validarLink(); | ||
16 | - //SessaoSEI::getInstance()->validarPermissao('pen_map_tipo_doc_recebido_cadastrar'); | ||
17 | - | ||
18 | - $objBancoSEI = BancoSEI::getInstance(); | ||
19 | - $objBancoSEI->abrirConexao(); | ||
20 | - | ||
21 | - $arrComandos = array(); | ||
22 | - | ||
23 | - $bolSomenteLeitura = false; | ||
24 | - | ||
25 | - switch ($_GET['acao']) { | ||
26 | - case 'pen_map_tipo_doc_recebido_cadastrar': | ||
27 | - $arrComandos[] = '<button type="submit" name="sbmCadastrarSerie" value="Salvar" class="infraButton"><span class="infraTeclaAtalho">S</span>alvar</button>'; | ||
28 | - $arrComandos[] = '<button type="button" value="Cancelar" onclick="location.href=\'' . $objPaginaSEI->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=pen_map_tipo_doc_recebido_listar&acao_origem=' . $_GET['acao'])) . '\';" class="infraButton"><span class="infraTeclaAtalho">C</span>ancelar</button>'; | ||
29 | - $bolDesativarCampos = false; | ||
30 | - | ||
31 | - if(array_key_exists('codigo_especie', $_GET) && !empty($_GET['codigo_especie'])){ | ||
32 | - $strTitulo = 'Editar Mapeamento de Recebimento'; | ||
33 | - } | ||
34 | - else { | ||
35 | - $strTitulo = 'Novo Mapeamento de Recebimento'; | ||
36 | - } | ||
37 | - break; | ||
38 | - | ||
39 | - case 'pen_map_tipo_doc_recebido_visualizar': | ||
40 | - $arrComandos[] = '<button type="button" name="btnFechar" value="Fechar class="infraButton" onclick="location.href=\'' . $objPaginaSEI->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=pen_map_tipo_doc_recebido_listar&acao_origem=' . $_GET['acao'])) . '\';">Fechar</button>'; | ||
41 | - $bolSomenteLeitura = true; | ||
42 | - $strTitulo = 'Consultar Mapeamento de Recebimento'; | ||
43 | - break; | ||
44 | - | ||
45 | - | ||
46 | - default: | ||
47 | - throw new InfraException("Ação '" . $_GET['acao'] . "' não reconhecida."); | ||
48 | - } | ||
49 | - | ||
50 | - //-------------------------------------------------------------------------- | ||
51 | - // Ação por POST esta salvando o formulário | ||
52 | - if(strtoupper($_SERVER['REQUEST_METHOD']) === 'POST') { | ||
53 | - | ||
54 | - if(!array_key_exists('codigo_especie', $_POST) || empty($_POST['codigo_especie'])) { | ||
55 | - throw new InfraException('Nenhuma "Espécie Documental" foi selecionada'); | ||
56 | - } | ||
57 | - | ||
58 | - if(!array_key_exists('id_serie', $_POST) || empty($_POST['id_serie'])) { | ||
59 | - throw new InfraException('Nenhum "Tipo de Documento" foi selecionado'); | ||
60 | - } | ||
61 | - | ||
62 | - $objPenRelTipoDocMapRecebidoDTO = new PenRelTipoDocMapRecebidoDTO(); | ||
63 | - $objPenRelTipoDocMapRecebidoDTO->setNumCodigoEspecie($_POST['codigo_especie']); | ||
64 | - $objPenRelTipoDocMapRecebidoDTO->setNumIdSerie($_POST['id_serie']); | ||
65 | - | ||
66 | - if(array_key_exists('id_mapeamento', $_GET) && !empty($_GET['id_mapeamento'])) { | ||
67 | - $objPenRelTipoDocMapRecebidoDTO->setDblIdMap($_GET['id_mapeamento']); | ||
68 | - } | ||
69 | - | ||
70 | - $objPenRelTipoDocMapRecebidoRN = new PenRelTipoDocMapRecebidoRN(); | ||
71 | - $objPenRelTipoDocMapRecebidoRN->cadastrar($objPenRelTipoDocMapRecebidoDTO); | ||
72 | - | ||
73 | - $objPaginaSEI->adicionarMensagem('Salvo com sucesso', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
74 | - | ||
75 | - header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao=pen_map_tipo_doc_recebido_listar&acao_origem='.$_GET['acao'])); | ||
76 | - exit(0); | ||
77 | - } | ||
78 | - // Ação por GET + ID esta carregando o formulário | ||
79 | - else if(array_key_exists('id_mapeamento', $_GET) && !empty($_GET['id_mapeamento'])){ | ||
80 | - | ||
81 | - $objPenRelTipoDocMapRecebidoDTO = new PenRelTipoDocMapRecebidoDTO(); | ||
82 | - $objPenRelTipoDocMapRecebidoDTO->setDblIdMap($_GET['id_mapeamento']); | ||
83 | - $objPenRelTipoDocMapRecebidoDTO->retTodos(); | ||
84 | - | ||
85 | - $objEspecieDocumentalBD = new GenericoBD(BancoSEI::getInstance()); | ||
86 | - $objPenRelTipoDocMapRecebidoDTO = $objEspecieDocumentalBD->consultar($objPenRelTipoDocMapRecebidoDTO); | ||
87 | - } | ||
88 | - | ||
89 | - if(empty($objPenRelTipoDocMapRecebidoDTO)){ | ||
90 | - $objPenRelTipoDocMapRecebidoDTO = new PenRelTipoDocMapRecebidoDTO(); | ||
91 | - $objPenRelTipoDocMapRecebidoDTO->setNumCodigoEspecie(0); | ||
92 | - $objPenRelTipoDocMapRecebidoDTO->setNumIdSerie(0); | ||
93 | - } | ||
94 | - | ||
95 | - $objTipoDocMapRN = new TipoDocMapRN(); | ||
96 | - $objPenRelTipoDocMapRecebidoRN = new PenRelTipoDocMapRecebidoRN(); | ||
97 | - | ||
98 | - $arrEspecieDocumental = $objTipoDocMapRN->listarParesEspecie( | ||
99 | - $objPenRelTipoDocMapRecebidoRN->listarEmUso($objPenRelTipoDocMapRecebidoDTO->getNumCodigoEspecie()) | ||
100 | - ); | ||
101 | -} | ||
102 | -catch (InfraException $e) { | ||
103 | - | ||
104 | - if(preg_match('/Duplicate/', $e->getStrDescricao())){ | ||
105 | - | ||
106 | - $objPaginaSEI->adicionarMensagem('Nenhuma das duas chaves pode estar sendo utilizada em outra relação', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
107 | - } | ||
108 | - else { | ||
109 | - | ||
110 | - $objPaginaSEI->processarExcecao($e); | ||
111 | - } | ||
112 | -} | ||
113 | -?> | ||
114 | - | ||
115 | -<?php | ||
116 | -// View | ||
117 | -ob_clean(); | ||
118 | - | ||
119 | -$objPaginaSEI->montarDocType(); | ||
120 | -$objPaginaSEI->abrirHtml(); | ||
121 | -$objPaginaSEI->abrirHead(); | ||
122 | -$objPaginaSEI->montarMeta(); | ||
123 | -$objPaginaSEI->montarTitle(':: ' . $objPaginaSEI->getStrNomeSistema() . ' - ' . $strTitulo . ' ::'); | ||
124 | -$objPaginaSEI->montarStyle(); | ||
125 | -?> | ||
126 | -<style type="text/css"> | ||
127 | - | ||
128 | -.input-label-first{position:absolute;left:0%;top:0%;width:25%; color: #666!important} | ||
129 | -.input-field-first{position:absolute;left:0%;top:15%;width:25%} | ||
130 | - | ||
131 | -.input-label-third {position:absolute;left:0%;top:40%;width:25%; color:#666!important} | ||
132 | -.input-field-third {position:absolute;left:0%;top:55%;width:25%;} | ||
133 | - | ||
134 | -</style> | ||
135 | -<?php $objPaginaSEI->montarJavaScript(); ?> | ||
136 | -<script type="text/javascript"> | ||
137 | - | ||
138 | -function inicializar(){ | ||
139 | - | ||
140 | - var strMensagens = '<?php print str_replace("\n", '\n', $objPaginaSEI->getStrMensagens()); ?>'; | ||
141 | - | ||
142 | - if(strMensagens) { | ||
143 | - | ||
144 | - alert(strMensagens); | ||
145 | - } | ||
146 | -} | ||
147 | - | ||
148 | -function onSubmit() { | ||
149 | - | ||
150 | - var form = jQuery('#pen-map-tipo-doc-recebido'); | ||
151 | - var field = jQuery('select[name=codigo_especie]', form); | ||
152 | - | ||
153 | - if(field.val() === 'null'){ | ||
154 | - alert('Nenhuma "Espécie Documental" foi selecionada'); | ||
155 | - field.focus(); | ||
156 | - return false; | ||
157 | - } | ||
158 | - | ||
159 | - field = jQuery('select[name=id_serie]', form); | ||
160 | - | ||
161 | - if(field.val() === 'null'){ | ||
162 | - alert('Nenhum "Tipo de Documento" foi selecionado'); | ||
163 | - field.focus(); | ||
164 | - return false; | ||
165 | - } | ||
166 | -} | ||
167 | - | ||
168 | -</script> | ||
169 | -<?php | ||
170 | -$objPaginaSEI->fecharHead(); | ||
171 | -$objPaginaSEI->abrirBody($strTitulo,'onload="inicializar();"'); | ||
172 | -?> | ||
173 | -<form id="pen-map-tipo-doc-recebido" onsubmit="return onSubmit();" method="post" action="<?php //print $objSessaoSEI->assinarLink($strProprioLink); ?>"> | ||
174 | - <?php $objPaginaSEI->montarBarraComandosSuperior($arrComandos); ?> | ||
175 | - <?php //$objPaginaSEI->montarAreaValidacao(); ?> | ||
176 | - <?php $objPaginaSEI->abrirAreaDados('12em'); ?> | ||
177 | - | ||
178 | - <label for="codigo_especie" class="infraLabelObrigatorio input-label-first">Espécie Documental:</label> | ||
179 | - <select name="codigo_especie" class="infraSelect input-field-first"<?php if($bolSomenteLeitura): ?> disabled="disabled" readonly="readonly"<?php endif; ?>> | ||
180 | - <?php print InfraINT::montarSelectArray('', 'Selecione', $objPenRelTipoDocMapRecebidoDTO->getNumCodigoEspecie(), $arrEspecieDocumental); ?> | ||
181 | - </select> | ||
182 | - | ||
183 | - <label for="id_serie" class="infraLabelObrigatorio input-label-third">Tipo de Documento:</label> | ||
184 | - <select name="id_serie" class="infraSelect input-field-third"<?php if($bolSomenteLeitura): ?> disabled="disabled" readonly="readonly"<?php endif; ?>> | ||
185 | - <?php print InfraINT::montarSelectArray('', 'Selecione', $objPenRelTipoDocMapRecebidoDTO->getNumIdSerie(), $objTipoDocMapRN->listarParesSerie()); ?> | ||
186 | - </select> | ||
187 | - | ||
188 | - <?php print $objPaginaSEI->fecharAreaDados(); ?> | ||
189 | -</form> | ||
190 | -<?php $objPaginaSEI->fecharBody(); ?> | ||
191 | -<?php $objPaginaSEI->fecharHtml(); ?> | ||
192 | \ No newline at end of file | 0 | \ No newline at end of file |
pen_map_tipo_doc_recebido_listar.php
@@ -1,274 +0,0 @@ | @@ -1,274 +0,0 @@ | ||
1 | -<?php | ||
2 | - | ||
3 | -require_once dirname(__FILE__) . '/../../SEI.php'; | ||
4 | - | ||
5 | -/** | ||
6 | - * Consulta os logs do estado do procedimento ao ser expedido | ||
7 | - * | ||
8 | - * @author Join Tecnologia | ||
9 | - */ | ||
10 | - | ||
11 | -session_start(); | ||
12 | - | ||
13 | -InfraDebug::getInstance()->setBolLigado(false); | ||
14 | -InfraDebug::getInstance()->setBolDebugInfra(true); | ||
15 | -InfraDebug::getInstance()->limpar(); | ||
16 | - | ||
17 | -$objPaginaSEI = PaginaSEI::getInstance(); | ||
18 | -$objSessaoSEI = SessaoSEI::getInstance(); | ||
19 | - | ||
20 | -$strProprioLink = 'controlador.php?acao='.$_GET['acao'].'&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao_retorno']; | ||
21 | - | ||
22 | -try { | ||
23 | - | ||
24 | - $objSessaoSEI->validarLink(); | ||
25 | - //$objSessaoSEI->validarPermissao('pen_map_tipo_doc_recebido_listar'); | ||
26 | - | ||
27 | - $objBancoSEI = BancoSEI::getInstance(); | ||
28 | - $objBancoSEI->abrirConexao(); | ||
29 | - | ||
30 | - //-------------------------------------------------------------------------- | ||
31 | - // Ações | ||
32 | - if(array_key_exists('acao', $_GET)) { | ||
33 | - | ||
34 | - $arrParam = array_merge($_GET, $_POST); | ||
35 | - | ||
36 | - switch($_GET['acao']) { | ||
37 | - | ||
38 | - case 'pen_map_tipo_doc_recebido_excluir': | ||
39 | - | ||
40 | - if(array_key_exists('hdnInfraItensSelecionados', $arrParam) && !empty($arrParam['hdnInfraItensSelecionados'])) { | ||
41 | - | ||
42 | - $objBancoSEI = BancoSEI::getInstance(); | ||
43 | - $objGenericoBD = new GenericoBD($objBancoSEI); | ||
44 | - | ||
45 | - $arrDblIdMap = explode(',', $arrParam['hdnInfraItensSelecionados']); | ||
46 | - | ||
47 | - foreach($arrDblIdMap as $dblIdMap) { | ||
48 | - | ||
49 | - $objPenRelTipoDocMapRecebidoDTO = new PenRelTipoDocMapRecebidoDTO(); | ||
50 | - $objPenRelTipoDocMapRecebidoDTO->setDblIdMap($dblIdMap); | ||
51 | - | ||
52 | - $objGenericoBD->excluir($objPenRelTipoDocMapRecebidoDTO); | ||
53 | - } | ||
54 | - $objPaginaSEI->adicionarMensagem('Excluido com sucesso.', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
55 | - | ||
56 | - header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao_retorno'].'&acao_origem='.$_GET['acao_origem'])); | ||
57 | - exit(0); | ||
58 | - } | ||
59 | - else { | ||
60 | - | ||
61 | - throw new InfraException('Nenhum Registro foi selecionado para executar esta ação'); | ||
62 | - } | ||
63 | - break; | ||
64 | - | ||
65 | - case 'pen_map_tipo_doc_recebido_listar': | ||
66 | - // Ação padrão desta tela | ||
67 | - break; | ||
68 | - | ||
69 | - default: | ||
70 | - throw new InfraException('Ação não permitida nesta tela'); | ||
71 | - | ||
72 | - } | ||
73 | - } | ||
74 | - //-------------------------------------------------------------------------- | ||
75 | - | ||
76 | - $strTitulo = 'Lista dos Mapeamentos de Recebimento'; | ||
77 | - | ||
78 | - $arrComandos = array(); | ||
79 | - $arrComandos[] = '<button type="button" accesskey="P" onclick="onClickBtnPesquisar();" id="btnPesquisar" value="Pesquisar" class="infraButton"><span class="infraTeclaAtalho">P</span>esquisar</button>'; | ||
80 | - $arrComandos[] = '<button type="button" value="Novo" onclick="onClickBtnNovo()" class="infraButton"><span class="infraTeclaAtalho">N</span>ovo</button>'; | ||
81 | - $arrComandos[] = '<button type="button" value="Excluir" onclick="onClickBtnExcluir()" class="infraButton"><span class="infraTeclaAtalho">E</span>xcluir</button>'; | ||
82 | - $arrComandos[] = '<button type="button" accesskey="I" id="btnImprimir" value="Imprimir" onclick="infraImprimirTabela();" class="infraButton"><span class="infraTeclaAtalho">I</span>mprimir</button>'; | ||
83 | - | ||
84 | - //-------------------------------------------------------------------------- | ||
85 | - // DTO de paginação | ||
86 | - | ||
87 | - $objPenRelTipoDocMapRecebidoDTO = new PenRelTipoDocMapRecebidoDTO(); | ||
88 | - $objPenRelTipoDocMapRecebidoDTO->retTodos(true); | ||
89 | - //-------------------------------------------------------------------------- | ||
90 | - // Filtragem | ||
91 | - | ||
92 | - if(array_key_exists('nome_serie', $_POST) && !empty($_POST['nome_serie'])) { | ||
93 | - | ||
94 | - $objPenRelTipoDocMapRecebidoDTO->setStrNomeSerie('%'.$_POST['nome_serie'].'%', InfraDTO::$OPER_LIKE); | ||
95 | - } | ||
96 | - | ||
97 | - if(array_key_exists('nome_especie', $_POST) && !empty($_POST['nome_especie'])) { | ||
98 | - | ||
99 | - $objPenRelTipoDocMapRecebidoDTO->setStrNomeEspecie('%'.$_POST['nome_especie'].'%', InfraDTO::$OPER_LIKE); | ||
100 | - } | ||
101 | - //-------------------------------------------------------------------------- | ||
102 | - | ||
103 | - $objPaginaSEI->prepararOrdenacao($objPenRelTipoDocMapRecebidoDTO, 'CodigoEspecie', InfraDTO::$TIPO_ORDENACAO_ASC); | ||
104 | - $objPaginaSEI->prepararPaginacao($objPenRelTipoDocMapRecebidoDTO); | ||
105 | - | ||
106 | - $objGenericoBD = new GenericoBD($objBancoSEI); | ||
107 | - $arrObjPenRelTipoDocMapRecebidoDTO = $objGenericoBD->listar($objPenRelTipoDocMapRecebidoDTO); | ||
108 | - | ||
109 | - $objPaginaSEI->processarPaginacao($objPenRelTipoDocMapRecebidoDTO); | ||
110 | - | ||
111 | - $numRegistros = count($arrObjPenRelTipoDocMapRecebidoDTO); | ||
112 | - | ||
113 | - if(!empty($arrObjPenRelTipoDocMapRecebidoDTO)){ | ||
114 | - | ||
115 | - $strResultado = ''; | ||
116 | - | ||
117 | - $strResultado .= '<table width="99%" class="infraTable">'."\n"; | ||
118 | - $strResultado .= '<caption class="infraCaption">'.$objPaginaSEI->gerarCaptionTabela('estados do processo', $numRegistros).'</caption>'; | ||
119 | - | ||
120 | - $strResultado .= '<tr>'; | ||
121 | - $strResultado .= '<th class="infraTh" width="1%">'.$objPaginaSEI->getThCheck().'</th>'."\n"; | ||
122 | - $strResultado .= '<th class="infraTh" width="35%">Especie Documental</th>'."\n"; | ||
123 | - $strResultado .= '<th class="infraTh" width="35%">Tipo de Documento</th>'."\n"; | ||
124 | - $strResultado .= '<th class="infraTh" width="14%">Ações</th>'."\n"; | ||
125 | - $strResultado .= '</tr>'."\n"; | ||
126 | - $strCssTr = ''; | ||
127 | - | ||
128 | - $index = 0; | ||
129 | - foreach($arrObjPenRelTipoDocMapRecebidoDTO as $objPenRelTipoDocMapRecebidoDTO) { | ||
130 | - | ||
131 | - $strCssTr = ($strCssTr == 'infraTrClara') ? 'infraTrEscura' : 'infraTrClara'; | ||
132 | - | ||
133 | - $strResultado .= '<tr class="'.$strCssTr.'">'; | ||
134 | - $strResultado .= '<td>'.$objPaginaSEI->getTrCheck($index, $objPenRelTipoDocMapRecebidoDTO->getDblIdMap(), '').'</td>'; | ||
135 | - $strResultado .= '<td>'.$objPenRelTipoDocMapRecebidoDTO->getStrNomeEspecie().'</td>'; | ||
136 | - $strResultado .= '<td>'.$objPenRelTipoDocMapRecebidoDTO->getStrNomeSerie().'</td>'; | ||
137 | - $strResultado .= '<td align="center">'; | ||
138 | - | ||
139 | - $strResultado .= '<a href="'.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_recebido_visualizar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&id_mapeamento='.$objPenRelTipoDocMapRecebidoDTO->getDblIdMap()).'"><img src="imagens/consultar.gif" title="Consultar Mapeamento" alt="Consultar Mapeamento" class="infraImg"></a>'; | ||
140 | - $strResultado .= '<a href="'.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_recebido_cadastrar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&id_mapeamento='.$objPenRelTipoDocMapRecebidoDTO->getDblIdMap()).'"><img src="imagens/alterar.gif" title="Alterar Mapeamento" alt="Alterar Mapeamento" class="infraImg"></a>'; | ||
141 | - $strResultado .= '<a href="#" onclick="onCLickLinkDelete(\''.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_recebido_excluir&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&hdnInfraItensSelecionados='.$objPenRelTipoDocMapRecebidoDTO->getDblIdMap()).'\', this)"><img src="imagens/excluir.gif" title="Excluir Mapeamento" alt="Excluir Mapeamento" class="infraImg"></a>'; | ||
142 | - | ||
143 | - $strResultado .= '</td>'; | ||
144 | - $strResultado .= '</tr>'."\n"; | ||
145 | - | ||
146 | - $index++; | ||
147 | - } | ||
148 | - $strResultado .= '</table>'; | ||
149 | - } | ||
150 | -} | ||
151 | -catch(InfraException $e){ | ||
152 | - $objPaginaSEI->processarExcecao($e); | ||
153 | -} | ||
154 | - | ||
155 | -$objPaginaSEI->montarDocType(); | ||
156 | -$objPaginaSEI->abrirHtml(); | ||
157 | -$objPaginaSEI->abrirHead(); | ||
158 | -$objPaginaSEI->montarMeta(); | ||
159 | -$objPaginaSEI->montarTitle(':: '.$objPaginaSEI->getStrNomeSistema().' - '.$strTitulo.' ::'); | ||
160 | -$objPaginaSEI->montarStyle(); | ||
161 | -?> | ||
162 | -<style type="text/css"> | ||
163 | - | ||
164 | -.input-label-first{position:absolute;left:0%;top:0%;width:25%; color: #666!important} | ||
165 | -.input-field-first{position:absolute;left:0%;top:50%;width:25%} | ||
166 | - | ||
167 | -.input-label-second{position:absolute;left:30%;top:0%;width:25%; color: #666!important} | ||
168 | -.input-field-second{position:absolute;left:30%;top:50%;width:25%;} | ||
169 | - | ||
170 | -.input-label-third {position:absolute;left:0%;top:40%;width:25%; color:#666!important} | ||
171 | -.input-field-third {position:absolute;left:0%;top:55%;width:25%;} | ||
172 | - | ||
173 | -</style> | ||
174 | -<?php $objPaginaSEI->montarJavaScript(); ?> | ||
175 | -<script type="text/javascript"> | ||
176 | - | ||
177 | -function inicializar(){ | ||
178 | - | ||
179 | - infraEfeitoTabelas(); | ||
180 | - | ||
181 | - var strMensagens = '<?php print str_replace("\n", '\n', $objPaginaSEI->getStrMensagens()); ?>'; | ||
182 | - | ||
183 | - if(strMensagens) { | ||
184 | - | ||
185 | - alert(strMensagens); | ||
186 | - } | ||
187 | -} | ||
188 | - | ||
189 | -function onClickBtnPesquisar(){ | ||
190 | - document.getElementById('frmAcompanharEstadoProcesso').action='<?php print $objSessaoSEI->assinarLink($strProprioLink); ?>'; | ||
191 | - document.getElementById('frmAcompanharEstadoProcesso').submit(); | ||
192 | -} | ||
193 | - | ||
194 | -function tratarEnter(ev){ | ||
195 | - var key = infraGetCodigoTecla(ev); | ||
196 | - if (key == 13){ | ||
197 | - onClickBtnPesquisar(); | ||
198 | - } | ||
199 | - return true; | ||
200 | -} | ||
201 | - | ||
202 | -function onCLickLinkDelete(url, link) { | ||
203 | - | ||
204 | - var row = jQuery(link).parents('tr:first'); | ||
205 | - | ||
206 | - var strEspecieDocumental = row.find('td:eq(1)').text(); | ||
207 | - var strTipoDocumento = row.find('td:eq(2)').text(); | ||
208 | - | ||
209 | - if(confirm('Confirma a exclusão do mapeamento "' + strEspecieDocumental + ' x ' + strTipoDocumento +'"?')){ | ||
210 | - | ||
211 | - window.location = url; | ||
212 | - } | ||
213 | - | ||
214 | -} | ||
215 | - | ||
216 | -function onClickBtnNovo(){ | ||
217 | - | ||
218 | - window.location = '<?php print $objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_recebido_cadastrar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao_origem']); ?>'; | ||
219 | -} | ||
220 | - | ||
221 | -function onClickBtnExcluir(){ | ||
222 | - | ||
223 | - try { | ||
224 | - | ||
225 | - var len = jQuery('input[name*=chkInfraItem]:checked').length; | ||
226 | - | ||
227 | - if(len > 0){ | ||
228 | - | ||
229 | - if(confirm('Confirma a exclusão de ' + len + ' mapeamento(s) ?')) { | ||
230 | - | ||
231 | - var form = jQuery('#frmAcompanharEstadoProcesso'); | ||
232 | - form.attr('action', '<?php print $objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_recebido_excluir&acao_origem='.$_GET['acao_origem'].'&acao_retorno=pen_map_tipo_doc_recebido_listar'); ?>'); | ||
233 | - form.submit(); | ||
234 | - } | ||
235 | - } | ||
236 | - else { | ||
237 | - | ||
238 | - alert('Selecione pelo menos um mapeamento para Excluir'); | ||
239 | - } | ||
240 | - } | ||
241 | - catch(e){ | ||
242 | - | ||
243 | - alert('Erro : ' + e.message); | ||
244 | - } | ||
245 | -} | ||
246 | - | ||
247 | -</script> | ||
248 | -<?php | ||
249 | -$objPaginaSEI->fecharHead(); | ||
250 | -$objPaginaSEI->abrirBody($strTitulo,'onload="inicializar();"'); | ||
251 | -?> | ||
252 | -<form id="frmAcompanharEstadoProcesso" method="post" action="<?php// print $objSessaoSEI->assinarLink($strProprioLink); ?>"> | ||
253 | - | ||
254 | - <?php $objPaginaSEI->montarBarraComandosSuperior($arrComandos); ?> | ||
255 | - <?php //$objPaginaSEI->montarAreaValidacao(); ?> | ||
256 | - <?php $objPaginaSEI->abrirAreaDados('40px'); ?> | ||
257 | - <label for="nome_especie" class="infraLabelObrigatorio input-label-first">Espécie Documental:</label> | ||
258 | - <input type="text" name="nome_especie" class="infraText input-field-first" onkeyup="return tratarEnter(event)" value="<?php print $_POST['nome_especie']; ?>"/> | ||
259 | - | ||
260 | - <label for="nome_serie" class="infraLabelObrigatorio input-label-second">Tipo de Documento:</label> | ||
261 | - <input type="text" name="nome_serie" class="infraText input-field-second" onkeyup="return tratarEnter(event)" value="<?php print $_POST['nome_serie']; ?>"/> | ||
262 | - <?php $objPaginaSEI->fecharAreaDados(); ?> | ||
263 | - | ||
264 | - <?php if($numRegistros > 0): ?> | ||
265 | - <?php $objPaginaSEI->montarAreaTabela($strResultado, $numRegistros); ?> | ||
266 | - <?php //$objPaginaSEI->montarAreaDebug(); ?> | ||
267 | - <?php else: ?> | ||
268 | - <div style="clear:both"></div> | ||
269 | - <p>Nenhum estado foi encontrado para este procedimento</p> | ||
270 | - <?php endif; ?> | ||
271 | -</form> | ||
272 | -<?php $objPaginaSEI->fecharBody(); ?> | ||
273 | -<?php $objPaginaSEI->fecharHtml(); ?> | ||
274 | - |
@@ -0,0 +1,192 @@ | @@ -0,0 +1,192 @@ | ||
1 | +<?php | ||
2 | +/** | ||
3 | + * | ||
4 | + * @author Join Tecnologia | ||
5 | + */ | ||
6 | +require_once dirname(__FILE__) . '/../../SEI.php'; | ||
7 | + | ||
8 | + | ||
9 | +try { | ||
10 | + | ||
11 | + session_start(); | ||
12 | + | ||
13 | + $objPaginaSEI = PaginaSEI::getInstance(); | ||
14 | + | ||
15 | + SessaoSEI::getInstance()->validarLink(); | ||
16 | + SessaoSEI::getInstance()->validarPermissao($_GET['acao']); | ||
17 | + | ||
18 | + $objBancoSEI = BancoSEI::getInstance(); | ||
19 | + $objBancoSEI->abrirConexao(); | ||
20 | + | ||
21 | + $arrComandos = array(); | ||
22 | + | ||
23 | + $bolSomenteLeitura = false; | ||
24 | + | ||
25 | + switch ($_GET['acao']) { | ||
26 | + case 'pen_map_tipo_documento_envio_cadastrar': | ||
27 | + $arrComandos[] = '<button type="submit" name="sbmCadastrarSerie" value="Salvar" class="infraButton"><span class="infraTeclaAtalho">S</span>alvar</button>'; | ||
28 | + $arrComandos[] = '<button type="button" value="Cancelar" onclick="location.href=\'' . $objPaginaSEI->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=pen_map_tipo_documento_envio_listar&acao_origem=' . $_GET['acao'])) . '\';" class="infraButton"><span class="infraTeclaAtalho">C</span>ancelar</button>'; | ||
29 | + | ||
30 | + if(array_key_exists('codigo_especie', $_GET) && !empty($_GET['codigo_especie'])){ | ||
31 | + $strTitulo = 'Editar Mapeamento de Envio'; | ||
32 | + } | ||
33 | + else { | ||
34 | + $strTitulo = 'Novo Mapeamento de Envio'; | ||
35 | + } | ||
36 | + break; | ||
37 | + | ||
38 | + case 'pen_map_tipo_doc_enviado_visualizar': | ||
39 | + $arrComandos[] = '<button type="button" name="btnFechar" value="Fechar class="infraButton" onclick="location.href=\'' . $objPaginaSEI->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=pen_map_tipo_documento_envio_listar&acao_origem=' . $_GET['acao'])) . '\';"><span class="infraTeclaAtalho">F</span>echar</button>'; | ||
40 | + $bolSomenteLeitura = true; | ||
41 | + $strTitulo = 'Consultar Mapeamento de Envio'; | ||
42 | + break; | ||
43 | + | ||
44 | + | ||
45 | + default: | ||
46 | + throw new InfraException("Ação '" . $_GET['acao'] . "' não reconhecida."); | ||
47 | + } | ||
48 | + | ||
49 | + //-------------------------------------------------------------------------- | ||
50 | + // Ação por POST esta salvando o formulário | ||
51 | + if(strtoupper($_SERVER['REQUEST_METHOD']) === 'POST') { | ||
52 | + | ||
53 | + if(!array_key_exists('codigo_especie', $_POST) || empty($_POST['codigo_especie'])) { | ||
54 | + throw new InfraException('Nenhuma "Espécie Documental" foi selecionada'); | ||
55 | + } | ||
56 | + | ||
57 | + if(!array_key_exists('id_serie', $_POST) || empty($_POST['id_serie'])) { | ||
58 | + throw new InfraException('Nenhum "Tipo de Documento" foi selecionado'); | ||
59 | + } | ||
60 | + | ||
61 | + $objPenRelTipoDocMapEnviadoDTO = new PenRelTipoDocMapEnviadoDTO(); | ||
62 | + $objPenRelTipoDocMapEnviadoDTO->setNumCodigoEspecie($_POST['codigo_especie']); | ||
63 | + $objPenRelTipoDocMapEnviadoDTO->setNumIdSerie($_POST['id_serie']); | ||
64 | + | ||
65 | + if(array_key_exists('id_mapeamento', $_GET) && !empty($_GET['id_mapeamento'])) { | ||
66 | + $objPenRelTipoDocMapEnviadoDTO->setDblIdMap($_GET['id_mapeamento']); | ||
67 | + } | ||
68 | + | ||
69 | + $objPenRelTipoDocMapEnviadoRN = new PenRelTipoDocMapEnviadoRN(); | ||
70 | + $objPenRelTipoDocMapEnviadoRN->cadastrar($objPenRelTipoDocMapEnviadoDTO); | ||
71 | + | ||
72 | + $objPaginaSEI->adicionarMensagem('Salvo com sucesso', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
73 | + | ||
74 | + header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao=pen_map_tipo_documento_envio_listar&acao_origem='.$_GET['acao'])); | ||
75 | + exit(0); | ||
76 | + } | ||
77 | + // Ação por GET + ID esta carregando o formulário | ||
78 | + else if(array_key_exists('id_mapeamento', $_GET) && !empty($_GET['id_mapeamento'])){ | ||
79 | + | ||
80 | + $objPenRelTipoDocMapEnviadoDTO = new PenRelTipoDocMapEnviadoDTO(); | ||
81 | + $objPenRelTipoDocMapEnviadoDTO->setDblIdMap($_GET['id_mapeamento']); | ||
82 | + $objPenRelTipoDocMapEnviadoDTO->retTodos(); | ||
83 | + | ||
84 | + $objEspecieDocumentalBD = new GenericoBD(BancoSEI::getInstance()); | ||
85 | + $objPenRelTipoDocMapEnviadoDTO = $objEspecieDocumentalBD->consultar($objPenRelTipoDocMapEnviadoDTO); | ||
86 | + } | ||
87 | + | ||
88 | + if(empty($objPenRelTipoDocMapEnviadoDTO)){ | ||
89 | + $objPenRelTipoDocMapEnviadoDTO = new PenRelTipoDocMapEnviadoDTO(); | ||
90 | + $objPenRelTipoDocMapEnviadoDTO->setNumCodigoEspecie(0); | ||
91 | + $objPenRelTipoDocMapEnviadoDTO->setNumIdSerie(0); | ||
92 | + } | ||
93 | + | ||
94 | + $objTipoDocMapRN = new TipoDocMapRN(); | ||
95 | + $objPenRelTipoDocMapEnviadoRN = new PenRelTipoDocMapEnviadoRN(); | ||
96 | + | ||
97 | + $arrSerie = $objTipoDocMapRN->listarParesSerie( | ||
98 | + $objPenRelTipoDocMapEnviadoRN->listarEmUso($objPenRelTipoDocMapEnviadoDTO->getNumIdSerie()), | ||
99 | + true | ||
100 | + ); | ||
101 | +} | ||
102 | +catch (InfraException $e) { | ||
103 | + | ||
104 | + if(preg_match('/Duplicate/', $e->getStrDescricao())){ | ||
105 | + | ||
106 | + $objPaginaSEI->adicionarMensagem('Nenhuma das duas chaves pode estar sendo utilizada em outra relação', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
107 | + } | ||
108 | + else { | ||
109 | + | ||
110 | + $objPaginaSEI->processarExcecao($e); | ||
111 | + } | ||
112 | +} | ||
113 | +?> | ||
114 | + | ||
115 | +<?php | ||
116 | +// View | ||
117 | +ob_clean(); | ||
118 | + | ||
119 | +$objPaginaSEI->montarDocType(); | ||
120 | +$objPaginaSEI->abrirHtml(); | ||
121 | +$objPaginaSEI->abrirHead(); | ||
122 | +$objPaginaSEI->montarMeta(); | ||
123 | +$objPaginaSEI->montarTitle(':: ' . $objPaginaSEI->getStrNomeSistema() . ' - ' . $strTitulo . ' ::'); | ||
124 | +$objPaginaSEI->montarStyle(); | ||
125 | +?> | ||
126 | +<style type="text/css"> | ||
127 | + | ||
128 | +.input-label-first{position:absolute;left:0%;top:0%;width:25%; color: #666!important} | ||
129 | +.input-field-first{position:absolute;left:0%;top:15%;width:25%} | ||
130 | + | ||
131 | +.input-label-third {position:absolute;left:0%;top:40%;width:25%; color:#666!important} | ||
132 | +.input-field-third {position:absolute;left:0%;top:55%;width:25%;} | ||
133 | + | ||
134 | +</style> | ||
135 | +<?php $objPaginaSEI->montarJavaScript(); ?> | ||
136 | +<script type="text/javascript"> | ||
137 | + | ||
138 | +function inicializar(){ | ||
139 | + | ||
140 | + var strMensagens = '<?php print str_replace("\n", '\n', $objPaginaSEI->getStrMensagens()); ?>'; | ||
141 | + | ||
142 | + if(strMensagens) { | ||
143 | + | ||
144 | + alert(strMensagens); | ||
145 | + } | ||
146 | +} | ||
147 | + | ||
148 | +function onSubmit() { | ||
149 | + | ||
150 | + var form = jQuery('#pen-map-tipo-doc-enviado'); | ||
151 | + var field = jQuery('select[name=codigo_especie]', form); | ||
152 | + | ||
153 | + if(field.val() === 'null'){ | ||
154 | + alert('Nenhuma "Espécie Documental" foi selecionada'); | ||
155 | + field.focus(); | ||
156 | + return false; | ||
157 | + } | ||
158 | + | ||
159 | + field = jQuery('select[name=id_serie]', form); | ||
160 | + | ||
161 | + if(field.val() === 'null'){ | ||
162 | + alert('Nenhum "Tipo de Documento" foi selecionado'); | ||
163 | + field.focus(); | ||
164 | + return false; | ||
165 | + } | ||
166 | +} | ||
167 | + | ||
168 | +</script> | ||
169 | +<?php | ||
170 | +$objPaginaSEI->fecharHead(); | ||
171 | +$objPaginaSEI->abrirBody($strTitulo,'onload="inicializar();"'); | ||
172 | +?> | ||
173 | +<form id="pen-map-tipo-doc-enviado" onsubmit="return onSubmit();" method="post" action="<?php //print $objSessaoSEI->assinarLink($strProprioLink); ?>"> | ||
174 | + <?php $objPaginaSEI->montarBarraComandosSuperior($arrComandos); ?> | ||
175 | + <?php //$objPaginaSEI->montarAreaValidacao(); ?> | ||
176 | + <?php $objPaginaSEI->abrirAreaDados('12em'); ?> | ||
177 | + | ||
178 | + <label for="codigo_especie" class="infraLabelObrigatorio input-label-first">Espécie Documental:</label> | ||
179 | + | ||
180 | + <select name="codigo_especie" class="infraSelect input-field-first"<?php if($bolSomenteLeitura): ?> disabled="disabled" readonly="readonly"<?php endif; ?>> | ||
181 | + <?php print InfraINT::montarSelectArray('', 'Selecione', $objPenRelTipoDocMapEnviadoDTO->getNumCodigoEspecie(), $objTipoDocMapRN->listarParesEspecie()); ?> | ||
182 | + </select> | ||
183 | + | ||
184 | + <label for="id_serie" class="infraLabelObrigatorio input-label-third">Tipo de Documento:</label> | ||
185 | + <select name="id_serie" class="infraSelect input-field-third"<?php if($bolSomenteLeitura): ?> disabled="disabled" readonly="readonly"<?php endif; ?>> | ||
186 | + <?php print InfraINT::montarSelectArray('', 'Selecione', $objPenRelTipoDocMapEnviadoDTO->getNumIdSerie(), $arrSerie); ?> | ||
187 | + </select> | ||
188 | + | ||
189 | + <?php print $objPaginaSEI->fecharAreaDados(); ?> | ||
190 | +</form> | ||
191 | +<?php $objPaginaSEI->fecharBody(); ?> | ||
192 | +<?php $objPaginaSEI->fecharHtml(); ?> | ||
0 | \ No newline at end of file | 193 | \ No newline at end of file |
@@ -0,0 +1,333 @@ | @@ -0,0 +1,333 @@ | ||
1 | +<?php | ||
2 | + | ||
3 | +require_once dirname(__FILE__) . '/../../SEI.php'; | ||
4 | + | ||
5 | +/** | ||
6 | + * Consulta os logs do estado do procedimento ao ser expedido | ||
7 | + * | ||
8 | + * @author Join Tecnologia | ||
9 | + */ | ||
10 | + | ||
11 | +session_start(); | ||
12 | + | ||
13 | +InfraDebug::getInstance()->setBolLigado(false); | ||
14 | +InfraDebug::getInstance()->setBolDebugInfra(true); | ||
15 | +InfraDebug::getInstance()->limpar(); | ||
16 | + | ||
17 | +$objPaginaSEI = PaginaSEI::getInstance(); | ||
18 | +$objSessaoSEI = SessaoSEI::getInstance(); | ||
19 | + | ||
20 | +$strProprioLink = 'controlador.php?acao='.$_GET['acao'].'&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao_retorno']; | ||
21 | + | ||
22 | +try { | ||
23 | + | ||
24 | + $objSessaoSEI->validarLink(); | ||
25 | + $objSessaoSEI->validarPermissao('pen_map_tipo_documento_envio_listar'); | ||
26 | + | ||
27 | + $objBancoSEI = BancoSEI::getInstance(); | ||
28 | + $objBancoSEI->abrirConexao(); | ||
29 | + | ||
30 | + //-------------------------------------------------------------------------- | ||
31 | + // Ações | ||
32 | + if(array_key_exists('acao', $_GET)) { | ||
33 | + | ||
34 | + $arrParam = array_merge($_GET, $_POST); | ||
35 | + | ||
36 | + switch($_GET['acao']) { | ||
37 | + | ||
38 | + case 'pen_map_tipo_doc_enviado_excluir': | ||
39 | + | ||
40 | + if(array_key_exists('hdnInfraItensSelecionados', $arrParam) && !empty($arrParam['hdnInfraItensSelecionados'])) { | ||
41 | + | ||
42 | + PenRelTipoDocMapEnviadoRN::excluir(explode(',', $arrParam['hdnInfraItensSelecionados'])); | ||
43 | + | ||
44 | + $objPaginaSEI->adicionarMensagem('Excluido com sucesso.', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
45 | + | ||
46 | + header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao_retorno'].'&acao_origem='.$_GET['acao_origem'])); | ||
47 | + exit(0); | ||
48 | + } | ||
49 | + else { | ||
50 | + | ||
51 | + throw new InfraException('Nenhum Registro foi selecionado para executar esta ação'); | ||
52 | + } | ||
53 | + break; | ||
54 | + | ||
55 | + case 'pen_map_tipo_doc_enviado_desativar': | ||
56 | + | ||
57 | + if(array_key_exists('hdnInfraItensSelecionados', $arrParam) && !empty($arrParam['hdnInfraItensSelecionados'])) { | ||
58 | + | ||
59 | + PenRelTipoDocMapEnviadoRN::mudarEstado(explode(',', $arrParam['hdnInfraItensSelecionados']), 'N'); | ||
60 | + | ||
61 | + $objPaginaSEI->adicionarMensagem('Desativado com sucesso.', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
62 | + | ||
63 | + header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao_retorno'].'&acao_origem='.$_GET['acao_origem'])); | ||
64 | + exit(0); | ||
65 | + } | ||
66 | + else { | ||
67 | + | ||
68 | + throw new InfraException('Nenhum Registro foi selecionado para executar esta ação'); | ||
69 | + } | ||
70 | + break; | ||
71 | + | ||
72 | + case 'pen_map_tipo_doc_enviado_ativar': | ||
73 | + if(array_key_exists('hdnInfraItensSelecionados', $arrParam) && !empty($arrParam['hdnInfraItensSelecionados'])) { | ||
74 | + | ||
75 | + PenRelTipoDocMapEnviadoRN::mudarEstado(explode(',', $arrParam['hdnInfraItensSelecionados']), 'S'); | ||
76 | + | ||
77 | + $objPaginaSEI->adicionarMensagem('Ativado com sucesso.', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
78 | + | ||
79 | + header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao_retorno'].'&acao_origem='.$_GET['acao_origem'])); | ||
80 | + exit(0); | ||
81 | + } | ||
82 | + break; | ||
83 | + | ||
84 | + case 'pen_map_tipo_documento_envio_listar': | ||
85 | + // Ação padrão desta tela | ||
86 | + break; | ||
87 | + | ||
88 | + default: | ||
89 | + throw new InfraException('Ação não permitida nesta tela'); | ||
90 | + | ||
91 | + } | ||
92 | + } | ||
93 | + //-------------------------------------------------------------------------- | ||
94 | + | ||
95 | + $strTitulo = 'Lista dos Mapeamentos de Envio'; | ||
96 | + | ||
97 | + $arrComandos = array(); | ||
98 | + $arrComandos[] = '<button type="button" accesskey="P" onclick="onClickBtnPesquisar();" id="btnPesquisar" value="Pesquisar" class="infraButton"><span class="infraTeclaAtalho">P</span>esquisar</button>'; | ||
99 | + $arrComandos[] = '<button type="button" value="Novo" onclick="onClickBtnNovo()" class="infraButton"><span class="infraTeclaAtalho">N</span>ovo</button>'; | ||
100 | + //$arrComandos[] = '<button type="button" value="Ativar" onclick="onClickBtnAtivar()" class="infraButton">Ativar</button>'; | ||
101 | + //$arrComandos[] = '<button type="button" value="Desativar" onclick="onClickBtnDesativar()" class="infraButton">Desativar</button>'; | ||
102 | + $arrComandos[] = '<button type="button" value="Excluir" onclick="onClickBtnExcluir()" class="infraButton"><span class="infraTeclaAtalho">E</span>xcluir</button>'; | ||
103 | + $arrComandos[] = '<button type="button" accesskey="I" id="btnImprimir" value="Imprimir" onclick="infraImprimirTabela();" class="infraButton"><span class="infraTeclaAtalho">I</span>mprimir</button>'; | ||
104 | + | ||
105 | + //-------------------------------------------------------------------------- | ||
106 | + // DTO de paginação | ||
107 | + | ||
108 | + $objPenRelTipoDocMapEnviadoDTO = new PenRelTipoDocMapEnviadoDTO(); | ||
109 | + $objPenRelTipoDocMapEnviadoDTO->retTodos(true); | ||
110 | + //-------------------------------------------------------------------------- | ||
111 | + // Filtragem | ||
112 | + | ||
113 | + if(array_key_exists('nome_serie', $_POST) && !empty($_POST['nome_serie'])) { | ||
114 | + | ||
115 | + $objPenRelTipoDocMapEnviadoDTO->setStrNomeSerie('%'.$_POST['nome_serie'].'%', InfraDTO::$OPER_LIKE); | ||
116 | + } | ||
117 | + | ||
118 | + if(array_key_exists('nome_especie', $_POST) && !empty($_POST['nome_especie'])) { | ||
119 | + | ||
120 | + $objPenRelTipoDocMapEnviadoDTO->setStrNomeEspecie('%'.$_POST['nome_especie'].'%', InfraDTO::$OPER_LIKE); | ||
121 | + } | ||
122 | + //-------------------------------------------------------------------------- | ||
123 | + | ||
124 | + $objPaginaSEI->prepararOrdenacao($objPenRelTipoDocMapEnviadoDTO, 'CodigoEspecie', InfraDTO::$TIPO_ORDENACAO_ASC); | ||
125 | + $objPaginaSEI->prepararPaginacao($objPenRelTipoDocMapEnviadoDTO); | ||
126 | + | ||
127 | + $objGenericoBD = new GenericoBD($objBancoSEI); | ||
128 | + $arrObjPenRelTipoDocMapEnviadoDTO = $objGenericoBD->listar($objPenRelTipoDocMapEnviadoDTO); | ||
129 | + | ||
130 | + $objPaginaSEI->processarPaginacao($objPenRelTipoDocMapEnviadoDTO); | ||
131 | + | ||
132 | + $numRegistros = count($arrObjPenRelTipoDocMapEnviadoDTO); | ||
133 | + | ||
134 | + if(!empty($arrObjPenRelTipoDocMapEnviadoDTO)){ | ||
135 | + | ||
136 | + $strResultado = ''; | ||
137 | + | ||
138 | + $strResultado .= '<table width="99%" class="infraTable">'."\n"; | ||
139 | + $strResultado .= '<caption class="infraCaption">'.$objPaginaSEI->gerarCaptionTabela('estados do processo', $numRegistros).'</caption>'; | ||
140 | + | ||
141 | + $strResultado .= '<tr>'; | ||
142 | + $strResultado .= '<th class="infraTh" width="1%">'.$objPaginaSEI->getThCheck().'</th>'."\n"; | ||
143 | + $strResultado .= '<th class="infraTh" width="35%">Especie Documental</th>'."\n"; | ||
144 | + $strResultado .= '<th class="infraTh" width="35%">Tipo de Documento</th>'."\n"; | ||
145 | + $strResultado .= '<th class="infraTh" width="14%">Ações</th>'."\n"; | ||
146 | + $strResultado .= '</tr>'."\n"; | ||
147 | + $strCssTr = ''; | ||
148 | + | ||
149 | + $index = 0; | ||
150 | + foreach($arrObjPenRelTipoDocMapEnviadoDTO as $objPenRelTipoDocMapEnviadoDTO) { | ||
151 | + | ||
152 | + $strCssTr = ($strCssTr == 'infraTrClara') ? 'infraTrEscura' : 'infraTrClara'; | ||
153 | + | ||
154 | + $strResultado .= '<tr class="'.$strCssTr.'">'; | ||
155 | + $strResultado .= '<td>'.$objPaginaSEI->getTrCheck($index, $objPenRelTipoDocMapEnviadoDTO->getDblIdMap(), '').'</td>'; | ||
156 | + $strResultado .= '<td>'.$objPenRelTipoDocMapEnviadoDTO->getStrNomeEspecie().'</td>'; | ||
157 | + $strResultado .= '<td>'.$objPenRelTipoDocMapEnviadoDTO->getStrNomeSerie().'</td>'; | ||
158 | + $strResultado .= '<td align="center">'; | ||
159 | + | ||
160 | + if($objSessaoSEI->verificarPermissao('pen_map_tipo_documento_envio_visualizar')) { | ||
161 | + $strResultado .= '<a href="'.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_visualizar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&id_mapeamento='.$objPenRelTipoDocMapEnviadoDTO->getDblIdMap()).'"><img src="imagens/consultar.gif" title="Consultar Mapeamento" alt="Consultar Mapeamento" class="infraImg"></a>'; | ||
162 | + } | ||
163 | + if($objSessaoSEI->verificarPermissao('pen_map_tipo_documento_envio_alterar')) { | ||
164 | + $strResultado .= '<a href="'.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_documento_envio_cadastrar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&id_mapeamento='.$objPenRelTipoDocMapEnviadoDTO->getDblIdMap()).'"><img src="imagens/alterar.gif" title="Alterar Mapeamento" alt="Alterar Mapeamento" class="infraImg"></a>'; | ||
165 | + } | ||
166 | + if($objSessaoSEI->verificarPermissao('pen_map_tipo_documento_envio_excluir')) { | ||
167 | + $strResultado .= '<a href="#" onclick="onCLickLinkDelete(\''.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_excluir&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&hdnInfraItensSelecionados='.$objPenRelTipoDocMapEnviadoDTO->getDblIdMap()).'\', this)"><img src="imagens/excluir.gif" title="Excluir Mapeamento" alt="Excluir Mapeamento" class="infraImg"></a>'; | ||
168 | + } | ||
169 | + | ||
170 | + $strResultado .= '</td>'; | ||
171 | + $strResultado .= '</tr>'."\n"; | ||
172 | + | ||
173 | + $index++; | ||
174 | + } | ||
175 | + $strResultado .= '</table>'; | ||
176 | + } | ||
177 | +} | ||
178 | +catch(InfraException $e){ | ||
179 | + $objPaginaSEI->processarExcecao($e); | ||
180 | +} | ||
181 | + | ||
182 | +$objPaginaSEI->montarDocType(); | ||
183 | +$objPaginaSEI->abrirHtml(); | ||
184 | +$objPaginaSEI->abrirHead(); | ||
185 | +$objPaginaSEI->montarMeta(); | ||
186 | +$objPaginaSEI->montarTitle(':: '.$objPaginaSEI->getStrNomeSistema().' - '.$strTitulo.' ::'); | ||
187 | +$objPaginaSEI->montarStyle(); | ||
188 | +?> | ||
189 | +<style type="text/css"> | ||
190 | + | ||
191 | +.input-label-first{position:absolute;left:0%;top:0%;width:25%; color: #666!important} | ||
192 | +.input-field-first{position:absolute;left:0%;top:50%;width:25%} | ||
193 | + | ||
194 | +.input-label-second{position:absolute;left:30%;top:0%;width:25%; color: #666!important} | ||
195 | +.input-field-second{position:absolute;left:30%;top:50%;width:25%;} | ||
196 | + | ||
197 | +.input-label-third {position:absolute;left:0%;top:40%;width:25%; color:#666!important} | ||
198 | +.input-field-third {position:absolute;left:0%;top:55%;width:25%;} | ||
199 | + | ||
200 | +</style> | ||
201 | +<?php $objPaginaSEI->montarJavaScript(); ?> | ||
202 | +<script type="text/javascript"> | ||
203 | + | ||
204 | +var objAutoCompletarInteressadoRI1225 = null; | ||
205 | + | ||
206 | +function inicializar(){ | ||
207 | + | ||
208 | + infraEfeitoTabelas(); | ||
209 | + | ||
210 | + var strMensagens = '<?php print str_replace("\n", '\n', $objPaginaSEI->getStrMensagens()); ?>'; | ||
211 | + | ||
212 | + if(strMensagens) { | ||
213 | + | ||
214 | + alert(strMensagens); | ||
215 | + } | ||
216 | +} | ||
217 | + | ||
218 | +function onClickBtnPesquisar(){ | ||
219 | + document.getElementById('frmAcompanharEstadoProcesso').action='<?php print $objSessaoSEI->assinarLink($strProprioLink); ?>'; | ||
220 | + document.getElementById('frmAcompanharEstadoProcesso').submit(); | ||
221 | +} | ||
222 | + | ||
223 | +function tratarEnter(ev){ | ||
224 | + var key = infraGetCodigoTecla(ev); | ||
225 | + if (key == 13){ | ||
226 | + onClickBtnPesquisar(); | ||
227 | + } | ||
228 | + return true; | ||
229 | +} | ||
230 | + | ||
231 | +function onCLickLinkDelete(url, link) { | ||
232 | + | ||
233 | + var row = jQuery(link).parents('tr:first'); | ||
234 | + | ||
235 | + var strEspecieDocumental = row.find('td:eq(1)').text(); | ||
236 | + var strTipoDocumento = row.find('td:eq(2)').text(); | ||
237 | + | ||
238 | + if(confirm('Confirma a exclusão do mapeamento "' + strEspecieDocumental + ' x ' + strTipoDocumento +'"?')){ | ||
239 | + | ||
240 | + window.location = url; | ||
241 | + } | ||
242 | + | ||
243 | +} | ||
244 | + | ||
245 | +function onClickBtnNovo(){ | ||
246 | + | ||
247 | + window.location = '<?php print $objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_documento_envio_cadastrar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao_origem']); ?>'; | ||
248 | +} | ||
249 | +<?php /* ?> | ||
250 | +function onClickBtnAtivar(){ | ||
251 | + | ||
252 | + try { | ||
253 | + | ||
254 | + var form = jQuery('#frmAcompanharEstadoProcesso'); | ||
255 | + form.attr('action', '<?php print $objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_ativar&acao_origem='.$_GET['acao_origem'].'&acao_retorno=pen_map_tipo_documento_envio_listar'); ?>'); | ||
256 | + form.submit(); | ||
257 | + } | ||
258 | + catch(e){ | ||
259 | + | ||
260 | + alert('Erro : ' + e.message); | ||
261 | + } | ||
262 | + | ||
263 | +} | ||
264 | + | ||
265 | +function onClickBtnDesativar(){ | ||
266 | + | ||
267 | + try { | ||
268 | + | ||
269 | + var form = jQuery('#frmAcompanharEstadoProcesso'); | ||
270 | + form.attr('action', '<?php print $objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_desativar&acao_origem='.$_GET['acao_origem'].'&acao_retorno=pen_map_tipo_documento_envio_listar'); ?>'); | ||
271 | + form.submit(); | ||
272 | + } | ||
273 | + catch(e){ | ||
274 | + | ||
275 | + alert('Erro : ' + e.message); | ||
276 | + } | ||
277 | +} | ||
278 | +<?php */ ?> | ||
279 | +function onClickBtnExcluir(){ | ||
280 | + | ||
281 | + try { | ||
282 | + | ||
283 | + var len = jQuery('input[name*=chkInfraItem]:checked').length; | ||
284 | + | ||
285 | + if(len > 0){ | ||
286 | + | ||
287 | + if(confirm('Confirma a exclusão de ' + len + ' mapeamento(s) ?')) { | ||
288 | + | ||
289 | + var form = jQuery('#frmAcompanharEstadoProcesso'); | ||
290 | + form.attr('action', '<?php print $objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_enviado_excluir&acao_origem='.$_GET['acao_origem'].'&acao_retorno=pen_map_tipo_documento_envio_listar'); ?>'); | ||
291 | + form.submit(); | ||
292 | + } | ||
293 | + } | ||
294 | + else { | ||
295 | + | ||
296 | + alert('Selecione pelo menos um mapeamento para Excluir'); | ||
297 | + } | ||
298 | + } | ||
299 | + catch(e){ | ||
300 | + | ||
301 | + alert('Erro : ' + e.message); | ||
302 | + } | ||
303 | +} | ||
304 | + | ||
305 | +</script> | ||
306 | +<?php | ||
307 | +$objPaginaSEI->fecharHead(); | ||
308 | +$objPaginaSEI->abrirBody($strTitulo,'onload="inicializar();"'); | ||
309 | +?> | ||
310 | +<form id="frmAcompanharEstadoProcesso" method="post" action="<?php// print $objSessaoSEI->assinarLink($strProprioLink); ?>"> | ||
311 | + | ||
312 | + <?php $objPaginaSEI->montarBarraComandosSuperior($arrComandos); ?> | ||
313 | + <?php //$objPaginaSEI->montarAreaValidacao(); ?> | ||
314 | + <?php $objPaginaSEI->abrirAreaDados('40px'); ?> | ||
315 | + | ||
316 | + <label for="nome_especie" class="infraLabelObrigatorio input-label-first">Espécie Documental:</label> | ||
317 | + <input type="text" name="nome_especie" class="infraText input-field-first" onkeyup="return tratarEnter(event)" value="<?php print $_POST['nome_especie']; ?>"/> | ||
318 | + | ||
319 | + <label for="nome_serie" class="infraLabelObrigatorio input-label-second">Tipo de Documento:</label> | ||
320 | + <input type="text" name="nome_serie" class="infraText input-field-second" onkeyup="return tratarEnter(event)" value="<?php print $_POST['nome_serie']; ?>"/> | ||
321 | + | ||
322 | + <?php $objPaginaSEI->fecharAreaDados(); ?> | ||
323 | + | ||
324 | + <?php if($numRegistros > 0): ?> | ||
325 | + <?php $objPaginaSEI->montarAreaTabela($strResultado, $numRegistros); ?> | ||
326 | + <?php //$objPaginaSEI->montarAreaDebug(); ?> | ||
327 | + <?php else: ?> | ||
328 | + <div style="clear:both"></div> | ||
329 | + <p>Nenhum estado foi encontrado para este procedimento</p> | ||
330 | + <?php endif; ?> | ||
331 | +</form> | ||
332 | +<?php $objPaginaSEI->fecharBody(); ?> | ||
333 | +<?php $objPaginaSEI->fecharHtml(); ?> | ||
0 | \ No newline at end of file | 334 | \ No newline at end of file |
@@ -0,0 +1,191 @@ | @@ -0,0 +1,191 @@ | ||
1 | +<?php | ||
2 | +/** | ||
3 | + * | ||
4 | + * @author Join Tecnologia | ||
5 | + */ | ||
6 | +require_once dirname(__FILE__) . '/../../SEI.php'; | ||
7 | + | ||
8 | + | ||
9 | +try { | ||
10 | + | ||
11 | + session_start(); | ||
12 | + | ||
13 | + $objPaginaSEI = PaginaSEI::getInstance(); | ||
14 | + | ||
15 | + SessaoSEI::getInstance()->validarLink(); | ||
16 | + //SessaoSEI::getInstance()->validarPermissao('pen_map_tipo_documento_recebimento_cadastrar'); | ||
17 | + | ||
18 | + $objBancoSEI = BancoSEI::getInstance(); | ||
19 | + $objBancoSEI->abrirConexao(); | ||
20 | + | ||
21 | + $arrComandos = array(); | ||
22 | + | ||
23 | + $bolSomenteLeitura = false; | ||
24 | + | ||
25 | + switch ($_GET['acao']) { | ||
26 | + case 'pen_map_tipo_documento_recebimento_cadastrar': | ||
27 | + $arrComandos[] = '<button type="submit" name="sbmCadastrarSerie" value="Salvar" class="infraButton"><span class="infraTeclaAtalho">S</span>alvar</button>'; | ||
28 | + $arrComandos[] = '<button type="button" value="Cancelar" onclick="location.href=\'' . $objPaginaSEI->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=pen_map_tipo_documento_recebimento_listar&acao_origem=' . $_GET['acao'])) . '\';" class="infraButton"><span class="infraTeclaAtalho">C</span>ancelar</button>'; | ||
29 | + $bolDesativarCampos = false; | ||
30 | + | ||
31 | + if(array_key_exists('codigo_especie', $_GET) && !empty($_GET['codigo_especie'])){ | ||
32 | + $strTitulo = 'Editar Mapeamento de Recebimento'; | ||
33 | + } | ||
34 | + else { | ||
35 | + $strTitulo = 'Novo Mapeamento de Recebimento'; | ||
36 | + } | ||
37 | + break; | ||
38 | + | ||
39 | + case 'pen_map_tipo_doc_recebido_visualizar': | ||
40 | + $arrComandos[] = '<button type="button" name="btnFechar" value="Fechar class="infraButton" onclick="location.href=\'' . $objPaginaSEI->formatarXHTML(SessaoSEI::getInstance()->assinarLink('controlador.php?acao=pen_map_tipo_documento_recebimento_listar&acao_origem=' . $_GET['acao'])) . '\';">Fechar</button>'; | ||
41 | + $bolSomenteLeitura = true; | ||
42 | + $strTitulo = 'Consultar Mapeamento de Recebimento'; | ||
43 | + break; | ||
44 | + | ||
45 | + | ||
46 | + default: | ||
47 | + throw new InfraException("Ação '" . $_GET['acao'] . "' não reconhecida."); | ||
48 | + } | ||
49 | + | ||
50 | + //-------------------------------------------------------------------------- | ||
51 | + // Ação por POST esta salvando o formulário | ||
52 | + if(strtoupper($_SERVER['REQUEST_METHOD']) === 'POST') { | ||
53 | + | ||
54 | + if(!array_key_exists('codigo_especie', $_POST) || empty($_POST['codigo_especie'])) { | ||
55 | + throw new InfraException('Nenhuma "Espécie Documental" foi selecionada'); | ||
56 | + } | ||
57 | + | ||
58 | + if(!array_key_exists('id_serie', $_POST) || empty($_POST['id_serie'])) { | ||
59 | + throw new InfraException('Nenhum "Tipo de Documento" foi selecionado'); | ||
60 | + } | ||
61 | + | ||
62 | + $objPenRelTipoDocMapRecebidoDTO = new PenRelTipoDocMapRecebidoDTO(); | ||
63 | + $objPenRelTipoDocMapRecebidoDTO->setNumCodigoEspecie($_POST['codigo_especie']); | ||
64 | + $objPenRelTipoDocMapRecebidoDTO->setNumIdSerie($_POST['id_serie']); | ||
65 | + | ||
66 | + if(array_key_exists('id_mapeamento', $_GET) && !empty($_GET['id_mapeamento'])) { | ||
67 | + $objPenRelTipoDocMapRecebidoDTO->setDblIdMap($_GET['id_mapeamento']); | ||
68 | + } | ||
69 | + | ||
70 | + $objPenRelTipoDocMapRecebidoRN = new PenRelTipoDocMapRecebidoRN(); | ||
71 | + $objPenRelTipoDocMapRecebidoRN->cadastrar($objPenRelTipoDocMapRecebidoDTO); | ||
72 | + | ||
73 | + $objPaginaSEI->adicionarMensagem('Salvo com sucesso', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
74 | + | ||
75 | + header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao=pen_map_tipo_documento_recebimento_listar&acao_origem='.$_GET['acao'])); | ||
76 | + exit(0); | ||
77 | + } | ||
78 | + // Ação por GET + ID esta carregando o formulário | ||
79 | + else if(array_key_exists('id_mapeamento', $_GET) && !empty($_GET['id_mapeamento'])){ | ||
80 | + | ||
81 | + $objPenRelTipoDocMapRecebidoDTO = new PenRelTipoDocMapRecebidoDTO(); | ||
82 | + $objPenRelTipoDocMapRecebidoDTO->setDblIdMap($_GET['id_mapeamento']); | ||
83 | + $objPenRelTipoDocMapRecebidoDTO->retTodos(); | ||
84 | + | ||
85 | + $objEspecieDocumentalBD = new GenericoBD(BancoSEI::getInstance()); | ||
86 | + $objPenRelTipoDocMapRecebidoDTO = $objEspecieDocumentalBD->consultar($objPenRelTipoDocMapRecebidoDTO); | ||
87 | + } | ||
88 | + | ||
89 | + if(empty($objPenRelTipoDocMapRecebidoDTO)){ | ||
90 | + $objPenRelTipoDocMapRecebidoDTO = new PenRelTipoDocMapRecebidoDTO(); | ||
91 | + $objPenRelTipoDocMapRecebidoDTO->setNumCodigoEspecie(0); | ||
92 | + $objPenRelTipoDocMapRecebidoDTO->setNumIdSerie(0); | ||
93 | + } | ||
94 | + | ||
95 | + $objTipoDocMapRN = new TipoDocMapRN(); | ||
96 | + $objPenRelTipoDocMapRecebidoRN = new PenRelTipoDocMapRecebidoRN(); | ||
97 | + | ||
98 | + $arrEspecieDocumental = $objTipoDocMapRN->listarParesEspecie( | ||
99 | + $objPenRelTipoDocMapRecebidoRN->listarEmUso($objPenRelTipoDocMapRecebidoDTO->getNumCodigoEspecie()) | ||
100 | + ); | ||
101 | +} | ||
102 | +catch (InfraException $e) { | ||
103 | + | ||
104 | + if(preg_match('/Duplicate/', $e->getStrDescricao())){ | ||
105 | + | ||
106 | + $objPaginaSEI->adicionarMensagem('Nenhuma das duas chaves pode estar sendo utilizada em outra relação', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
107 | + } | ||
108 | + else { | ||
109 | + | ||
110 | + $objPaginaSEI->processarExcecao($e); | ||
111 | + } | ||
112 | +} | ||
113 | +?> | ||
114 | + | ||
115 | +<?php | ||
116 | +// View | ||
117 | +ob_clean(); | ||
118 | + | ||
119 | +$objPaginaSEI->montarDocType(); | ||
120 | +$objPaginaSEI->abrirHtml(); | ||
121 | +$objPaginaSEI->abrirHead(); | ||
122 | +$objPaginaSEI->montarMeta(); | ||
123 | +$objPaginaSEI->montarTitle(':: ' . $objPaginaSEI->getStrNomeSistema() . ' - ' . $strTitulo . ' ::'); | ||
124 | +$objPaginaSEI->montarStyle(); | ||
125 | +?> | ||
126 | +<style type="text/css"> | ||
127 | + | ||
128 | +.input-label-first{position:absolute;left:0%;top:0%;width:25%; color: #666!important} | ||
129 | +.input-field-first{position:absolute;left:0%;top:15%;width:25%} | ||
130 | + | ||
131 | +.input-label-third {position:absolute;left:0%;top:40%;width:25%; color:#666!important} | ||
132 | +.input-field-third {position:absolute;left:0%;top:55%;width:25%;} | ||
133 | + | ||
134 | +</style> | ||
135 | +<?php $objPaginaSEI->montarJavaScript(); ?> | ||
136 | +<script type="text/javascript"> | ||
137 | + | ||
138 | +function inicializar(){ | ||
139 | + | ||
140 | + var strMensagens = '<?php print str_replace("\n", '\n', $objPaginaSEI->getStrMensagens()); ?>'; | ||
141 | + | ||
142 | + if(strMensagens) { | ||
143 | + | ||
144 | + alert(strMensagens); | ||
145 | + } | ||
146 | +} | ||
147 | + | ||
148 | +function onSubmit() { | ||
149 | + | ||
150 | + var form = jQuery('#pen-map-tipo-doc-recebido'); | ||
151 | + var field = jQuery('select[name=codigo_especie]', form); | ||
152 | + | ||
153 | + if(field.val() === 'null'){ | ||
154 | + alert('Nenhuma "Espécie Documental" foi selecionada'); | ||
155 | + field.focus(); | ||
156 | + return false; | ||
157 | + } | ||
158 | + | ||
159 | + field = jQuery('select[name=id_serie]', form); | ||
160 | + | ||
161 | + if(field.val() === 'null'){ | ||
162 | + alert('Nenhum "Tipo de Documento" foi selecionado'); | ||
163 | + field.focus(); | ||
164 | + return false; | ||
165 | + } | ||
166 | +} | ||
167 | + | ||
168 | +</script> | ||
169 | +<?php | ||
170 | +$objPaginaSEI->fecharHead(); | ||
171 | +$objPaginaSEI->abrirBody($strTitulo,'onload="inicializar();"'); | ||
172 | +?> | ||
173 | +<form id="pen-map-tipo-doc-recebido" onsubmit="return onSubmit();" method="post" action="<?php //print $objSessaoSEI->assinarLink($strProprioLink); ?>"> | ||
174 | + <?php $objPaginaSEI->montarBarraComandosSuperior($arrComandos); ?> | ||
175 | + <?php //$objPaginaSEI->montarAreaValidacao(); ?> | ||
176 | + <?php $objPaginaSEI->abrirAreaDados('12em'); ?> | ||
177 | + | ||
178 | + <label for="codigo_especie" class="infraLabelObrigatorio input-label-first">Espécie Documental:</label> | ||
179 | + <select name="codigo_especie" class="infraSelect input-field-first"<?php if($bolSomenteLeitura): ?> disabled="disabled" readonly="readonly"<?php endif; ?>> | ||
180 | + <?php print InfraINT::montarSelectArray('', 'Selecione', $objPenRelTipoDocMapRecebidoDTO->getNumCodigoEspecie(), $arrEspecieDocumental); ?> | ||
181 | + </select> | ||
182 | + | ||
183 | + <label for="id_serie" class="infraLabelObrigatorio input-label-third">Tipo de Documento:</label> | ||
184 | + <select name="id_serie" class="infraSelect input-field-third"<?php if($bolSomenteLeitura): ?> disabled="disabled" readonly="readonly"<?php endif; ?>> | ||
185 | + <?php print InfraINT::montarSelectArray('', 'Selecione', $objPenRelTipoDocMapRecebidoDTO->getNumIdSerie(), $objTipoDocMapRN->listarParesSerie()); ?> | ||
186 | + </select> | ||
187 | + | ||
188 | + <?php print $objPaginaSEI->fecharAreaDados(); ?> | ||
189 | +</form> | ||
190 | +<?php $objPaginaSEI->fecharBody(); ?> | ||
191 | +<?php $objPaginaSEI->fecharHtml(); ?> | ||
0 | \ No newline at end of file | 192 | \ No newline at end of file |
@@ -0,0 +1,280 @@ | @@ -0,0 +1,280 @@ | ||
1 | +<?php | ||
2 | + | ||
3 | +require_once dirname(__FILE__) . '/../../SEI.php'; | ||
4 | + | ||
5 | +/** | ||
6 | + * Consulta os logs do estado do procedimento ao ser expedido | ||
7 | + * | ||
8 | + * @author Join Tecnologia | ||
9 | + */ | ||
10 | + | ||
11 | +session_start(); | ||
12 | + | ||
13 | +InfraDebug::getInstance()->setBolLigado(false); | ||
14 | +InfraDebug::getInstance()->setBolDebugInfra(true); | ||
15 | +InfraDebug::getInstance()->limpar(); | ||
16 | + | ||
17 | +$objPaginaSEI = PaginaSEI::getInstance(); | ||
18 | +$objSessaoSEI = SessaoSEI::getInstance(); | ||
19 | + | ||
20 | +$strProprioLink = 'controlador.php?acao='.$_GET['acao'].'&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao_retorno']; | ||
21 | + | ||
22 | +try { | ||
23 | + | ||
24 | + $objSessaoSEI->validarLink(); | ||
25 | + //$objSessaoSEI->validarPermissao('pen_map_tipo_documento_recebimento_listar'); | ||
26 | + | ||
27 | + $objBancoSEI = BancoSEI::getInstance(); | ||
28 | + $objBancoSEI->abrirConexao(); | ||
29 | + | ||
30 | + //-------------------------------------------------------------------------- | ||
31 | + // Ações | ||
32 | + if(array_key_exists('acao', $_GET)) { | ||
33 | + | ||
34 | + $arrParam = array_merge($_GET, $_POST); | ||
35 | + | ||
36 | + switch($_GET['acao']) { | ||
37 | + | ||
38 | + case 'pen_map_tipo_doc_recebido_excluir': | ||
39 | + | ||
40 | + if(array_key_exists('hdnInfraItensSelecionados', $arrParam) && !empty($arrParam['hdnInfraItensSelecionados'])) { | ||
41 | + | ||
42 | + $objBancoSEI = BancoSEI::getInstance(); | ||
43 | + $objGenericoBD = new GenericoBD($objBancoSEI); | ||
44 | + | ||
45 | + $arrDblIdMap = explode(',', $arrParam['hdnInfraItensSelecionados']); | ||
46 | + | ||
47 | + foreach($arrDblIdMap as $dblIdMap) { | ||
48 | + | ||
49 | + $objPenRelTipoDocMapRecebidoDTO = new PenRelTipoDocMapRecebidoDTO(); | ||
50 | + $objPenRelTipoDocMapRecebidoDTO->setDblIdMap($dblIdMap); | ||
51 | + | ||
52 | + $objGenericoBD->excluir($objPenRelTipoDocMapRecebidoDTO); | ||
53 | + } | ||
54 | + $objPaginaSEI->adicionarMensagem('Excluido com sucesso.', InfraPagina::$TIPO_MSG_INFORMACAO); | ||
55 | + | ||
56 | + header('Location: '.SessaoSEI::getInstance()->assinarLink('controlador.php?acao='.$_GET['acao_retorno'].'&acao_origem='.$_GET['acao_origem'])); | ||
57 | + exit(0); | ||
58 | + } | ||
59 | + else { | ||
60 | + | ||
61 | + throw new InfraException('Nenhum Registro foi selecionado para executar esta ação'); | ||
62 | + } | ||
63 | + break; | ||
64 | + | ||
65 | + case 'pen_map_tipo_documento_recebimento_listar': | ||
66 | + // Ação padrão desta tela | ||
67 | + break; | ||
68 | + | ||
69 | + default: | ||
70 | + throw new InfraException('Ação não permitida nesta tela'); | ||
71 | + | ||
72 | + } | ||
73 | + } | ||
74 | + //-------------------------------------------------------------------------- | ||
75 | + | ||
76 | + $strTitulo = 'Lista dos Mapeamentos de Recebimento'; | ||
77 | + | ||
78 | + $arrComandos = array(); | ||
79 | + $arrComandos[] = '<button type="button" accesskey="P" onclick="onClickBtnPesquisar();" id="btnPesquisar" value="Pesquisar" class="infraButton"><span class="infraTeclaAtalho">P</span>esquisar</button>'; | ||
80 | + $arrComandos[] = '<button type="button" value="Novo" onclick="onClickBtnNovo()" class="infraButton"><span class="infraTeclaAtalho">N</span>ovo</button>'; | ||
81 | + $arrComandos[] = '<button type="button" value="Excluir" onclick="onClickBtnExcluir()" class="infraButton"><span class="infraTeclaAtalho">E</span>xcluir</button>'; | ||
82 | + $arrComandos[] = '<button type="button" accesskey="I" id="btnImprimir" value="Imprimir" onclick="infraImprimirTabela();" class="infraButton"><span class="infraTeclaAtalho">I</span>mprimir</button>'; | ||
83 | + | ||
84 | + //-------------------------------------------------------------------------- | ||
85 | + // DTO de paginação | ||
86 | + | ||
87 | + $objPenRelTipoDocMapRecebidoDTO = new PenRelTipoDocMapRecebidoDTO(); | ||
88 | + $objPenRelTipoDocMapRecebidoDTO->retTodos(true); | ||
89 | + //-------------------------------------------------------------------------- | ||
90 | + // Filtragem | ||
91 | + | ||
92 | + if(array_key_exists('nome_serie', $_POST) && !empty($_POST['nome_serie'])) { | ||
93 | + | ||
94 | + $objPenRelTipoDocMapRecebidoDTO->setStrNomeSerie('%'.$_POST['nome_serie'].'%', InfraDTO::$OPER_LIKE); | ||
95 | + } | ||
96 | + | ||
97 | + if(array_key_exists('nome_especie', $_POST) && !empty($_POST['nome_especie'])) { | ||
98 | + | ||
99 | + $objPenRelTipoDocMapRecebidoDTO->setStrNomeEspecie('%'.$_POST['nome_especie'].'%', InfraDTO::$OPER_LIKE); | ||
100 | + } | ||
101 | + //-------------------------------------------------------------------------- | ||
102 | + | ||
103 | + $objPaginaSEI->prepararOrdenacao($objPenRelTipoDocMapRecebidoDTO, 'CodigoEspecie', InfraDTO::$TIPO_ORDENACAO_ASC); | ||
104 | + $objPaginaSEI->prepararPaginacao($objPenRelTipoDocMapRecebidoDTO); | ||
105 | + | ||
106 | + $objGenericoBD = new GenericoBD($objBancoSEI); | ||
107 | + $arrObjPenRelTipoDocMapRecebidoDTO = $objGenericoBD->listar($objPenRelTipoDocMapRecebidoDTO); | ||
108 | + | ||
109 | + $objPaginaSEI->processarPaginacao($objPenRelTipoDocMapRecebidoDTO); | ||
110 | + | ||
111 | + $numRegistros = count($arrObjPenRelTipoDocMapRecebidoDTO); | ||
112 | + | ||
113 | + if(!empty($arrObjPenRelTipoDocMapRecebidoDTO)){ | ||
114 | + | ||
115 | + $strResultado = ''; | ||
116 | + | ||
117 | + $strResultado .= '<table width="99%" class="infraTable">'."\n"; | ||
118 | + $strResultado .= '<caption class="infraCaption">'.$objPaginaSEI->gerarCaptionTabela('estados do processo', $numRegistros).'</caption>'; | ||
119 | + | ||
120 | + $strResultado .= '<tr>'; | ||
121 | + $strResultado .= '<th class="infraTh" width="1%">'.$objPaginaSEI->getThCheck().'</th>'."\n"; | ||
122 | + $strResultado .= '<th class="infraTh" width="35%">Especie Documental</th>'."\n"; | ||
123 | + $strResultado .= '<th class="infraTh" width="35%">Tipo de Documento</th>'."\n"; | ||
124 | + $strResultado .= '<th class="infraTh" width="14%">Ações</th>'."\n"; | ||
125 | + $strResultado .= '</tr>'."\n"; | ||
126 | + $strCssTr = ''; | ||
127 | + | ||
128 | + $index = 0; | ||
129 | + foreach($arrObjPenRelTipoDocMapRecebidoDTO as $objPenRelTipoDocMapRecebidoDTO) { | ||
130 | + | ||
131 | + $strCssTr = ($strCssTr == 'infraTrClara') ? 'infraTrEscura' : 'infraTrClara'; | ||
132 | + | ||
133 | + $strResultado .= '<tr class="'.$strCssTr.'">'; | ||
134 | + $strResultado .= '<td>'.$objPaginaSEI->getTrCheck($index, $objPenRelTipoDocMapRecebidoDTO->getDblIdMap(), '').'</td>'; | ||
135 | + $strResultado .= '<td>'.$objPenRelTipoDocMapRecebidoDTO->getStrNomeEspecie().'</td>'; | ||
136 | + $strResultado .= '<td>'.$objPenRelTipoDocMapRecebidoDTO->getStrNomeSerie().'</td>'; | ||
137 | + $strResultado .= '<td align="center">'; | ||
138 | + | ||
139 | + if($objSessaoSEI->verificarPermissao('pen_map_tipo_documento_recebimento_visualizar')) { | ||
140 | + $strResultado .= '<a href="'.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_recebido_visualizar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&id_mapeamento='.$objPenRelTipoDocMapRecebidoDTO->getDblIdMap()).'"><img src="imagens/consultar.gif" title="Consultar Mapeamento" alt="Consultar Mapeamento" class="infraImg"></a>'; | ||
141 | + } | ||
142 | + if($objSessaoSEI->verificarPermissao('pen_map_tipo_documento_recebimento_alterar')) { | ||
143 | + $strResultado .= '<a href="'.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_documento_recebimento_cadastrar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&id_mapeamento='.$objPenRelTipoDocMapRecebidoDTO->getDblIdMap()).'"><img src="imagens/alterar.gif" title="Alterar Mapeamento" alt="Alterar Mapeamento" class="infraImg"></a>'; | ||
144 | + } | ||
145 | + if($objSessaoSEI->verificarPermissao('pen_map_tipo_documento_recebimento_excluir')) { | ||
146 | + $strResultado .= '<a href="#" onclick="onCLickLinkDelete(\''.$objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_recebido_excluir&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao'].'&hdnInfraItensSelecionados='.$objPenRelTipoDocMapRecebidoDTO->getDblIdMap()).'\', this)"><img src="imagens/excluir.gif" title="Excluir Mapeamento" alt="Excluir Mapeamento" class="infraImg"></a>'; | ||
147 | + } | ||
148 | + | ||
149 | + $strResultado .= '</td>'; | ||
150 | + $strResultado .= '</tr>'."\n"; | ||
151 | + | ||
152 | + $index++; | ||
153 | + } | ||
154 | + $strResultado .= '</table>'; | ||
155 | + } | ||
156 | +} | ||
157 | +catch(InfraException $e){ | ||
158 | + $objPaginaSEI->processarExcecao($e); | ||
159 | +} | ||
160 | + | ||
161 | +$objPaginaSEI->montarDocType(); | ||
162 | +$objPaginaSEI->abrirHtml(); | ||
163 | +$objPaginaSEI->abrirHead(); | ||
164 | +$objPaginaSEI->montarMeta(); | ||
165 | +$objPaginaSEI->montarTitle(':: '.$objPaginaSEI->getStrNomeSistema().' - '.$strTitulo.' ::'); | ||
166 | +$objPaginaSEI->montarStyle(); | ||
167 | +?> | ||
168 | +<style type="text/css"> | ||
169 | + | ||
170 | +.input-label-first{position:absolute;left:0%;top:0%;width:25%; color: #666!important} | ||
171 | +.input-field-first{position:absolute;left:0%;top:50%;width:25%} | ||
172 | + | ||
173 | +.input-label-second{position:absolute;left:30%;top:0%;width:25%; color: #666!important} | ||
174 | +.input-field-second{position:absolute;left:30%;top:50%;width:25%;} | ||
175 | + | ||
176 | +.input-label-third {position:absolute;left:0%;top:40%;width:25%; color:#666!important} | ||
177 | +.input-field-third {position:absolute;left:0%;top:55%;width:25%;} | ||
178 | + | ||
179 | +</style> | ||
180 | +<?php $objPaginaSEI->montarJavaScript(); ?> | ||
181 | +<script type="text/javascript"> | ||
182 | + | ||
183 | +function inicializar(){ | ||
184 | + | ||
185 | + infraEfeitoTabelas(); | ||
186 | + | ||
187 | + var strMensagens = '<?php print str_replace("\n", '\n', $objPaginaSEI->getStrMensagens()); ?>'; | ||
188 | + | ||
189 | + if(strMensagens) { | ||
190 | + | ||
191 | + alert(strMensagens); | ||
192 | + } | ||
193 | +} | ||
194 | + | ||
195 | +function onClickBtnPesquisar(){ | ||
196 | + document.getElementById('frmAcompanharEstadoProcesso').action='<?php print $objSessaoSEI->assinarLink($strProprioLink); ?>'; | ||
197 | + document.getElementById('frmAcompanharEstadoProcesso').submit(); | ||
198 | +} | ||
199 | + | ||
200 | +function tratarEnter(ev){ | ||
201 | + var key = infraGetCodigoTecla(ev); | ||
202 | + if (key == 13){ | ||
203 | + onClickBtnPesquisar(); | ||
204 | + } | ||
205 | + return true; | ||
206 | +} | ||
207 | + | ||
208 | +function onCLickLinkDelete(url, link) { | ||
209 | + | ||
210 | + var row = jQuery(link).parents('tr:first'); | ||
211 | + | ||
212 | + var strEspecieDocumental = row.find('td:eq(1)').text(); | ||
213 | + var strTipoDocumento = row.find('td:eq(2)').text(); | ||
214 | + | ||
215 | + if(confirm('Confirma a exclusão do mapeamento "' + strEspecieDocumental + ' x ' + strTipoDocumento +'"?')){ | ||
216 | + | ||
217 | + window.location = url; | ||
218 | + } | ||
219 | + | ||
220 | +} | ||
221 | + | ||
222 | +function onClickBtnNovo(){ | ||
223 | + | ||
224 | + window.location = '<?php print $objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_documento_recebimento_cadastrar&acao_origem='.$_GET['acao_origem'].'&acao_retorno='.$_GET['acao_origem']); ?>'; | ||
225 | +} | ||
226 | + | ||
227 | +function onClickBtnExcluir(){ | ||
228 | + | ||
229 | + try { | ||
230 | + | ||
231 | + var len = jQuery('input[name*=chkInfraItem]:checked').length; | ||
232 | + | ||
233 | + if(len > 0){ | ||
234 | + | ||
235 | + if(confirm('Confirma a exclusão de ' + len + ' mapeamento(s) ?')) { | ||
236 | + | ||
237 | + var form = jQuery('#frmAcompanharEstadoProcesso'); | ||
238 | + form.attr('action', '<?php print $objSessaoSEI->assinarLink('controlador.php?acao=pen_map_tipo_doc_recebido_excluir&acao_origem='.$_GET['acao_origem'].'&acao_retorno=pen_map_tipo_documento_recebimento_listar'); ?>'); | ||
239 | + form.submit(); | ||
240 | + } | ||
241 | + } | ||
242 | + else { | ||
243 | + | ||
244 | + alert('Selecione pelo menos um mapeamento para Excluir'); | ||
245 | + } | ||
246 | + } | ||
247 | + catch(e){ | ||
248 | + | ||
249 | + alert('Erro : ' + e.message); | ||
250 | + } | ||
251 | +} | ||
252 | + | ||
253 | +</script> | ||
254 | +<?php | ||
255 | +$objPaginaSEI->fecharHead(); | ||
256 | +$objPaginaSEI->abrirBody($strTitulo,'onload="inicializar();"'); | ||
257 | +?> | ||
258 | +<form id="frmAcompanharEstadoProcesso" method="post" action="<?php// print $objSessaoSEI->assinarLink($strProprioLink); ?>"> | ||
259 | + | ||
260 | + <?php $objPaginaSEI->montarBarraComandosSuperior($arrComandos); ?> | ||
261 | + <?php //$objPaginaSEI->montarAreaValidacao(); ?> | ||
262 | + <?php $objPaginaSEI->abrirAreaDados('40px'); ?> | ||
263 | + <label for="nome_especie" class="infraLabelObrigatorio input-label-first">Espécie Documental:</label> | ||
264 | + <input type="text" name="nome_especie" class="infraText input-field-first" onkeyup="return tratarEnter(event)" value="<?php print $_POST['nome_especie']; ?>"/> | ||
265 | + | ||
266 | + <label for="nome_serie" class="infraLabelObrigatorio input-label-second">Tipo de Documento:</label> | ||
267 | + <input type="text" name="nome_serie" class="infraText input-field-second" onkeyup="return tratarEnter(event)" value="<?php print $_POST['nome_serie']; ?>"/> | ||
268 | + <?php $objPaginaSEI->fecharAreaDados(); ?> | ||
269 | + | ||
270 | + <?php if($numRegistros > 0): ?> | ||
271 | + <?php $objPaginaSEI->montarAreaTabela($strResultado, $numRegistros); ?> | ||
272 | + <?php //$objPaginaSEI->montarAreaDebug(); ?> | ||
273 | + <?php else: ?> | ||
274 | + <div style="clear:both"></div> | ||
275 | + <p>Nenhum estado foi encontrado para este procedimento</p> | ||
276 | + <?php endif; ?> | ||
277 | +</form> | ||
278 | +<?php $objPaginaSEI->fecharBody(); ?> | ||
279 | +<?php $objPaginaSEI->fecharHtml(); ?> | ||
280 | + |
pen_procedimento_estado.php
@@ -228,6 +228,7 @@ try { | @@ -228,6 +228,7 @@ try { | ||
228 | $strResultado .= '</tr>'."\n"; | 228 | $strResultado .= '</tr>'."\n"; |
229 | $strCssTr = ''; | 229 | $strCssTr = ''; |
230 | 230 | ||
231 | + $idCount = 1; | ||
231 | foreach($arrAgruparProcedimentoAndamentoDTO as $key => $arrObjProcedimentoAndamentoDTO) { | 232 | foreach($arrAgruparProcedimentoAndamentoDTO as $key => $arrObjProcedimentoAndamentoDTO) { |
232 | 233 | ||
233 | 234 | ||
@@ -237,7 +238,9 @@ try { | @@ -237,7 +238,9 @@ try { | ||
237 | 238 | ||
238 | 239 | ||
239 | $strResultado .= '<tr>'; | 240 | $strResultado .= '<tr>'; |
240 | - $strResultado .= '<td valign="middle" colspan="2">'.$objReturn->strMensagem.'</td>'; | 241 | + $strResultado .= '<td valign="middle" colspan="2">' |
242 | + . '<img class="imagPlus" align="absbottom" src="/infra_js/arvore/plus.gif" onclick="toggleTr('.$idCount.', this)" title="Maximizar" />' | ||
243 | + . ''.$objReturn->strMensagem.'</td>'; | ||
241 | $strResultado .= '<td valign="middle" align="center">'; | 244 | $strResultado .= '<td valign="middle" align="center">'; |
242 | 245 | ||
243 | // @join_tec US008.03 (#23092) | @join_tec US008.13 (#23092) | 246 | // @join_tec US008.03 (#23092) | @join_tec US008.13 (#23092) |
@@ -247,7 +250,7 @@ try { | @@ -247,7 +250,7 @@ try { | ||
247 | } | 250 | } |
248 | // @join_tec US008.01 (#23092) | 251 | // @join_tec US008.01 (#23092) |
249 | if($objReturn->bolReciboExiste) { | 252 | if($objReturn->bolReciboExiste) { |
250 | - $strResultado .= '<a href="'.$objSessaoSEI->assinarLink($strProprioLink.'&metodo=baixarReciboRecebimento&id_tarefa='.$numTarefa.'&id_tramite='.$dblIdTramite).'"><img class="infraImg" src="'.PENIntegracao::getDiretorio().'/imagens/page_green.png" alt="Recibo de Conclusão de Trâmite" title="Recibo de Conclusão de Trâmite" /></a>'; | 253 | + $strResultado .= '<a href="'.$objSessaoSEI->assinarLink($strProprioLink.'&metodo=baixarReciboRecebimento&id_tarefa='.$numTarefa.'&id_tramite='.$dblIdTramite).'"><img class="infraImg" src="'.PENIntegracao::getDiretorio().'/imagens/page_green.png" alt="Recibo de Conclusão de Trâmite" title="Recibo de Conclusão de Trâmite" /></a>'; |
251 | } | 254 | } |
252 | $strResultado .= '</td>'; | 255 | $strResultado .= '</td>'; |
253 | $strResultado .= '<tr>'; | 256 | $strResultado .= '<tr>'; |
@@ -256,7 +259,7 @@ try { | @@ -256,7 +259,7 @@ try { | ||
256 | 259 | ||
257 | $strCssTr = ($strCssTr == 'infraTrClara') ? 'infraTrEscura' : 'infraTrClara'; | 260 | $strCssTr = ($strCssTr == 'infraTrClara') ? 'infraTrEscura' : 'infraTrClara'; |
258 | 261 | ||
259 | - $strResultado .= '<tr class="'.$strCssTr.'">'; | 262 | + $strResultado .= '<tr class="'.$strCssTr.' extra_hidden_'.$idCount.'" style="display:none;">'; |
260 | //$strResultado .= '<td>'.$objPaginaSEI->getTrCheck($i, $objProcedimentoAndamentoDTO->getDblIdAndamento(), '').'</td>'; | 263 | //$strResultado .= '<td>'.$objPaginaSEI->getTrCheck($i, $objProcedimentoAndamentoDTO->getDblIdAndamento(), '').'</td>'; |
261 | $strResultado .= '<td align="center">'.$objProcedimentoAndamentoDTO->getDthData().'</td>'; | 264 | $strResultado .= '<td align="center">'.$objProcedimentoAndamentoDTO->getDthData().'</td>'; |
262 | $strResultado .= '<td>'.$objProcedimentoAndamentoDTO->getStrMensagem().'</td>'; | 265 | $strResultado .= '<td>'.$objProcedimentoAndamentoDTO->getStrMensagem().'</td>'; |
@@ -274,6 +277,7 @@ try { | @@ -274,6 +277,7 @@ try { | ||
274 | 277 | ||
275 | $i++; | 278 | $i++; |
276 | } | 279 | } |
280 | + $idCount++; | ||
277 | } | 281 | } |
278 | $strResultado .= '</table>'; | 282 | $strResultado .= '</table>'; |
279 | } | 283 | } |
@@ -308,6 +312,16 @@ function inicializar(){ | @@ -308,6 +312,16 @@ function inicializar(){ | ||
308 | 312 | ||
309 | } | 313 | } |
310 | 314 | ||
315 | +function toggleTr(number, obj) { | ||
316 | + jQuery('.extra_hidden_'+number).toggle(); | ||
317 | + if (jQuery('.extra_hidden_'+number).is(':hidden')) { | ||
318 | + jQuery(obj).attr('src', '/infra_js/arvore/plus.gif'); | ||
319 | + } else { | ||
320 | + jQuery(obj).attr('src', '/infra_js/arvore/minus.gif'); | ||
321 | + } | ||
322 | +} | ||
323 | + | ||
324 | + | ||
311 | function pesquisar(){ | 325 | function pesquisar(){ |
312 | document.getElementById('frmAcompanharEstadoProcesso').action='<?php print $objSessaoSEI->assinarLink($strProprioLink); ?>'; | 326 | document.getElementById('frmAcompanharEstadoProcesso').action='<?php print $objSessaoSEI->assinarLink($strProprioLink); ?>'; |
313 | document.getElementById('frmAcompanharEstadoProcesso').submit(); | 327 | document.getElementById('frmAcompanharEstadoProcesso').submit(); |
pen_procedimento_expedir.php
@@ -161,9 +161,9 @@ try { | @@ -161,9 +161,9 @@ try { | ||
161 | 161 | ||
162 | try { | 162 | try { |
163 | $respostaExpedir = $objExpedirProcedimentosRN->expedirProcedimento($objExpedirProcedimentoDTO); | 163 | $respostaExpedir = $objExpedirProcedimentosRN->expedirProcedimento($objExpedirProcedimentoDTO); |
164 | - //$objPaginaSEI->adicionarMensagem("Processo $strProtocoloProcedimentoFormatado expedido com sucesso."); | ||
165 | - //header('Location: '.$objSessaoSEI->assinarLink('controlador.php?acao='.$objPaginaSEI->getAcaoRetorno().'&acao_origem='.$_GET['acao'].$objPaginaSEI->montarAncora($numIdProcedimento))); | ||
166 | - //die; | 164 | + |
165 | + echo '<input type="button" onclick="javascript:window.close()" class="botao_fechar" value="Fechar" ' | ||
166 | + . 'style="margin-left: 84%; margin-top: 4%;"/>'; //Botão para fechar a janela | ||
167 | } catch(\Exception $e) { | 167 | } catch(\Exception $e) { |
168 | $objPaginaSEI->processarExcecao($e); | 168 | $objPaginaSEI->processarExcecao($e); |
169 | } | 169 | } |
@@ -504,8 +504,6 @@ function enviarForm(el){ | @@ -504,8 +504,6 @@ function enviarForm(el){ | ||
504 | 504 | ||
505 | strRespMensagem += "\n"; | 505 | strRespMensagem += "\n"; |
506 | }); | 506 | }); |
507 | - | ||
508 | - | ||
509 | alert(strRespMensagem); | 507 | alert(strRespMensagem); |
510 | return false; | 508 | return false; |
511 | } | 509 | } |
rn/PENAgendamentoRN.php
@@ -254,7 +254,8 @@ class PENAgendamentoRN extends InfraRN { | @@ -254,7 +254,8 @@ class PENAgendamentoRN extends InfraRN { | ||
254 | 254 | ||
255 | if ($cont > 0) { | 255 | if ($cont > 0) { |
256 | $msg = "Falha na execução. \n Os seguintes serviços não estão rodando: \n $servicos"; | 256 | $msg = "Falha na execução. \n Os seguintes serviços não estão rodando: \n $servicos"; |
257 | - LogSEI::getInstance()->gravar($msg); | 257 | +// LogSEI::getInstance()->gravar(); |
258 | + throw new InfraException($msg, $e); | ||
258 | } else { | 259 | } else { |
259 | LogSEI::getInstance()->gravar("Todos os serviços estão rodando."); | 260 | LogSEI::getInstance()->gravar("Todos os serviços estão rodando."); |
260 | } | 261 | } |
rn/PenAtualizarSipRN.php
@@ -259,22 +259,22 @@ class PenAtualizarSipRN extends PenAtualizadorRN { | @@ -259,22 +259,22 @@ class PenAtualizarSipRN extends PenAtualizadorRN { | ||
259 | $numIdItemMenuPai = $this->criarMenu('Envio', 10, $_numIdItemMenuPai, $numIdMenu, null, $numIdSistema); | 259 | $numIdItemMenuPai = $this->criarMenu('Envio', 10, $_numIdItemMenuPai, $numIdMenu, null, $numIdSistema); |
260 | 260 | ||
261 | // Gera o submenu Mapeamento > Envio > Cadastrar | 261 | // Gera o submenu Mapeamento > Envio > Cadastrar |
262 | - $numIdRecurso = $this->criarRecurso('pen_map_tipo_doc_enviado_cadastrar', 'Cadastro de mapeamento de documentos enviados', $numIdSistema); | 262 | + $numIdRecurso = $this->criarRecurso('pen_map_tipo_documento_envio_cadastrar', 'Cadastro de mapeamento de documentos enviados', $numIdSistema); |
263 | $this->criarMenu('Cadastrar', 10, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); | 263 | $this->criarMenu('Cadastrar', 10, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); |
264 | 264 | ||
265 | // Gera o submenu Mapeamento > Envio > Listar | 265 | // Gera o submenu Mapeamento > Envio > Listar |
266 | - $numIdRecurso = $this->criarRecurso('pen_map_tipo_doc_enviado_listar', 'Listagem de mapeamento de documentos enviados', $numIdSistema); | 266 | + $numIdRecurso = $this->criarRecurso('pen_map_tipo_documento_envio_listar', 'Listagem de mapeamento de documentos enviados', $numIdSistema); |
267 | $this->criarMenu('Listar', 20, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); | 267 | $this->criarMenu('Listar', 20, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); |
268 | 268 | ||
269 | // Gera o submenu Mapeamento > Recebimento | 269 | // Gera o submenu Mapeamento > Recebimento |
270 | $numIdItemMenuPai = $this->criarMenu('Recebimento', 20, $_numIdItemMenuPai, $numIdMenu, null, $numIdSistema); | 270 | $numIdItemMenuPai = $this->criarMenu('Recebimento', 20, $_numIdItemMenuPai, $numIdMenu, null, $numIdSistema); |
271 | 271 | ||
272 | // Gera o submenu Mapeamento > Recebimento > Cadastrar | 272 | // Gera o submenu Mapeamento > Recebimento > Cadastrar |
273 | - $numIdRecurso = $this->criarRecurso('pen_map_tipo_doc_recebido_cadastrar', 'Cadastro de mapeamento de documentos recebidos', $numIdSistema); | 273 | + $numIdRecurso = $this->criarRecurso('pen_map_tipo_documento_recebimento_cadastrar', 'Cadastro de mapeamento de documentos recebidos', $numIdSistema); |
274 | $this->criarMenu('Cadastrar', 10, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); | 274 | $this->criarMenu('Cadastrar', 10, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); |
275 | 275 | ||
276 | // Gera o submenu Mapeamento > Recebimento > Listar | 276 | // Gera o submenu Mapeamento > Recebimento > Listar |
277 | - $numIdRecurso = $this->criarRecurso('pen_map_tipo_doc_recebido_listar', 'Listagem de mapeamento de documentos recebidos', $numIdSistema); | 277 | + $numIdRecurso = $this->criarRecurso('pen_map_tipo_documento_recebimento_listar', 'Listagem de mapeamento de documentos recebidos', $numIdSistema); |
278 | $this->criarMenu('Listar', 20, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); | 278 | $this->criarMenu('Listar', 20, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); |
279 | 279 | ||
280 | //Atribui as permissões aos recursos e menus | 280 | //Atribui as permissões aos recursos e menus |
rn/ReceberProcedimentoRN.php
@@ -1627,7 +1627,7 @@ class ReceberProcedimentoRN extends InfraRN | @@ -1627,7 +1627,7 @@ class ReceberProcedimentoRN extends InfraRN | ||
1627 | $objReceberTramiteRecusadoDTO->setNumIdProtocolo($objProcessoEletronicoDTO->getDblIdProcedimento()); | 1627 | $objReceberTramiteRecusadoDTO->setNumIdProtocolo($objProcessoEletronicoDTO->getDblIdProcedimento()); |
1628 | $objReceberTramiteRecusadoDTO->setNumIdUnidadeOrigem(null); | 1628 | $objReceberTramiteRecusadoDTO->setNumIdUnidadeOrigem(null); |
1629 | $objReceberTramiteRecusadoDTO->setNumIdTarefa(ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_TRAMITE_RECUSADO)); | 1629 | $objReceberTramiteRecusadoDTO->setNumIdTarefa(ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_TRAMITE_RECUSADO)); |
1630 | - $objReceberTramiteRecusadoDTO->setStrMotivoRecusa(ProcessoEletronicoRN::$MOTIVOS_RECUSA[$tramite->motivoDaRecusa]); | 1630 | + $objReceberTramiteRecusadoDTO->setStrMotivoRecusa($tramite->justificativaDaRecusa); |
1631 | $objReceberTramiteRecusadoDTO->setStrNomeUnidadeDestino($objAtributoAndamentoDTO->getStrValor()); | 1631 | $objReceberTramiteRecusadoDTO->setStrNomeUnidadeDestino($objAtributoAndamentoDTO->getStrValor()); |
1632 | 1632 | ||
1633 | //Faz o tratamento do processo e do trâmite recusado | 1633 | //Faz o tratamento do processo e do trâmite recusado |
sip_atualizar_versao_modulo_pen.php
@@ -582,21 +582,25 @@ class PenAtualizarSipRN extends PenAtualizadorRN { | @@ -582,21 +582,25 @@ class PenAtualizarSipRN extends PenAtualizadorRN { | ||
582 | $this->instalarV101(); | 582 | $this->instalarV101(); |
583 | $this->instalarV102(); | 583 | $this->instalarV102(); |
584 | $this->instalarV103(); | 584 | $this->instalarV103(); |
585 | + $this->instalarV104(); | ||
585 | } else { | 586 | } else { |
586 | switch ($strVersaoModuloPen) { | 587 | switch ($strVersaoModuloPen) { |
587 | case '1.0.0': | 588 | case '1.0.0': |
588 | $this->instalarV101(); | 589 | $this->instalarV101(); |
589 | $this->instalarV102(); | 590 | $this->instalarV102(); |
590 | $this->instalarV103(); | 591 | $this->instalarV103(); |
592 | + $this->instalarV104(); | ||
591 | break; | 593 | break; |
592 | 594 | ||
593 | case '1.0.1': | 595 | case '1.0.1': |
594 | $this->instalarV102(); | 596 | $this->instalarV102(); |
595 | $this->instalarV103(); | 597 | $this->instalarV103(); |
598 | + $this->instalarV104(); | ||
596 | break; | 599 | break; |
597 | 600 | ||
598 | case '1.0.2': //Remover depois de usar | 601 | case '1.0.2': //Remover depois de usar |
599 | $this->instalarV103(); | 602 | $this->instalarV103(); |
603 | + $this->instalarV104(); | ||
600 | break; | 604 | break; |
601 | } | 605 | } |
602 | } | 606 | } |
@@ -879,22 +883,22 @@ class PenAtualizarSipRN extends PenAtualizadorRN { | @@ -879,22 +883,22 @@ class PenAtualizarSipRN extends PenAtualizadorRN { | ||
879 | $numIdItemMenuPai = $this->criarMenu('Envio', 10, $_numIdItemMenuPai, $numIdMenu, null, $numIdSistema); | 883 | $numIdItemMenuPai = $this->criarMenu('Envio', 10, $_numIdItemMenuPai, $numIdMenu, null, $numIdSistema); |
880 | 884 | ||
881 | // Gera o submenu Mapeamento > Envio > Cadastrar | 885 | // Gera o submenu Mapeamento > Envio > Cadastrar |
882 | - $numIdRecurso = $this->criarRecurso('pen_map_tipo_doc_enviado_cadastrar', 'Cadastro de mapeamento de documentos enviados', $numIdSistema); | 886 | + $numIdRecurso = $this->criarRecurso('pen_map_tipo_documento_envio_cadastrar', 'Cadastro de mapeamento de documentos enviados', $numIdSistema); |
883 | $this->criarMenu('Cadastrar', 10, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); | 887 | $this->criarMenu('Cadastrar', 10, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); |
884 | 888 | ||
885 | // Gera o submenu Mapeamento > Envio > Listar | 889 | // Gera o submenu Mapeamento > Envio > Listar |
886 | - $numIdRecurso = $this->criarRecurso('pen_map_tipo_doc_enviado_listar', 'Listagem de mapeamento de documentos enviados', $numIdSistema); | 890 | + $numIdRecurso = $this->criarRecurso('pen_map_tipo_documento_envio_listar', 'Listagem de mapeamento de documentos enviados', $numIdSistema); |
887 | $this->criarMenu('Listar', 20, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); | 891 | $this->criarMenu('Listar', 20, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); |
888 | 892 | ||
889 | // Gera o submenu Mapeamento > Recebimento | 893 | // Gera o submenu Mapeamento > Recebimento |
890 | $numIdItemMenuPai = $this->criarMenu('Recebimento', 20, $_numIdItemMenuPai, $numIdMenu, null, $numIdSistema); | 894 | $numIdItemMenuPai = $this->criarMenu('Recebimento', 20, $_numIdItemMenuPai, $numIdMenu, null, $numIdSistema); |
891 | 895 | ||
892 | // Gera o submenu Mapeamento > Recebimento > Cadastrar | 896 | // Gera o submenu Mapeamento > Recebimento > Cadastrar |
893 | - $numIdRecurso = $this->criarRecurso('pen_map_tipo_doc_recebido_cadastrar', 'Cadastro de mapeamento de documentos recebidos', $numIdSistema); | 897 | + $numIdRecurso = $this->criarRecurso('pen_map_tipo_documento_recebimento_cadastrar', 'Cadastro de mapeamento de documentos recebidos', $numIdSistema); |
894 | $this->criarMenu('Cadastrar', 10, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); | 898 | $this->criarMenu('Cadastrar', 10, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); |
895 | 899 | ||
896 | // Gera o submenu Mapeamento > Recebimento > Listar | 900 | // Gera o submenu Mapeamento > Recebimento > Listar |
897 | - $numIdRecurso = $this->criarRecurso('pen_map_tipo_doc_recebido_listar', 'Listagem de mapeamento de documentos recebidos', $numIdSistema); | 901 | + $numIdRecurso = $this->criarRecurso('pen_map_tipo_documento_recebimento_listar', 'Listagem de mapeamento de documentos recebidos', $numIdSistema); |
898 | $this->criarMenu('Listar', 20, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); | 902 | $this->criarMenu('Listar', 20, $numIdItemMenuPai, $numIdMenu, $numIdRecurso, $numIdSistema); |
899 | 903 | ||
900 | //Atribui as permissões aos recursos e menus | 904 | //Atribui as permissões aos recursos e menus |
@@ -1271,6 +1275,85 @@ class PenAtualizarSipRN extends PenAtualizadorRN { | @@ -1271,6 +1275,85 @@ class PenAtualizarSipRN extends PenAtualizadorRN { | ||
1271 | $objInfraParametroDTO->setStrValor('1.0.3'); | 1275 | $objInfraParametroDTO->setStrValor('1.0.3'); |
1272 | $objInfraParametroBD->alterar($objInfraParametroDTO); | 1276 | $objInfraParametroBD->alterar($objInfraParametroDTO); |
1273 | } | 1277 | } |
1278 | + | ||
1279 | + /** | ||
1280 | + * Instala/Atualiza os módulo PEN para versão 1.0.4 | ||
1281 | + */ | ||
1282 | + protected function instalarV104() { | ||
1283 | + $numIdSistema = $this->getNumIdSistema('SEI'); | ||
1284 | + | ||
1285 | + //Cadastrar recurso Mapeamento dos Tipo de documentos enviados | ||
1286 | + $this->criarRecurso('pen_map_tipo_documento_envio_alterar', 'Alteração de mapeamento de documentos enviados', $numIdSistema); | ||
1287 | + $this->criarRecurso('pen_map_tipo_documento_envio_excluir', 'Exclusão de mapeamento de documentos enviados', $numIdSistema); | ||
1288 | + | ||
1289 | + //Cadastrar recurso Mapeamento dos Tipo de documentos recebido | ||
1290 | + $this->criarRecurso('pen_map_tipo_documento_recebimento_alterar', 'Alteração de mapeamento de documentos recebimento', $numIdSistema); | ||
1291 | + $this->criarRecurso('pen_map_tipo_documento_recebimento_excluir', 'Exclusão de mapeamento de documentos recebimento', $numIdSistema); | ||
1292 | + $this->criarRecurso('pen_map_tipo_documento_recebimento_visualizar', 'Visualização de mapeamento de documentos recebimento', $numIdSistema); | ||
1293 | + | ||
1294 | + //Alterar nomeclatura do recurso (recebido) | ||
1295 | + $objDTO = new RecursoDTO(); | ||
1296 | + $objDTO->setStrNome('pen_map_tipo_doc_recebido_cadastrar'); | ||
1297 | + $objDTO->retNumIdRecurso(); | ||
1298 | + $objBD = new RecursoBD($this->getObjInfraIBanco()); | ||
1299 | + $objDTO = $objBD->consultar($objDTO); | ||
1300 | + if ($objDTO) { | ||
1301 | + $objDTO->setStrNome('pen_map_tipo_documento_recebimento_cadastrar'); | ||
1302 | + $objDTO->setStrCaminho('controlador.php?acao=pen_map_tipo_documento_recebimento_cadastrar'); | ||
1303 | + $objBD->alterar($objDTO); | ||
1304 | + } | ||
1305 | + $objDTO = new RecursoDTO(); | ||
1306 | + $objDTO->setStrNome('pen_map_tipo_doc_enviado_visualizar'); | ||
1307 | + $objDTO->retNumIdRecurso(); | ||
1308 | + $objBD = new RecursoBD($this->getObjInfraIBanco()); | ||
1309 | + $objDTO = $objBD->consultar($objDTO); | ||
1310 | + if ($objDTO) { | ||
1311 | + $objDTO->setStrNome('pen_map_tipo_documento_envio_visualizar'); | ||
1312 | + $objDTO->setStrCaminho('controlador.php?acao=pen_map_tipo_documento_envio_visualizar'); | ||
1313 | + $objBD->alterar($objDTO); | ||
1314 | + } | ||
1315 | + $objDTO = new RecursoDTO(); | ||
1316 | + $objDTO->setStrNome('pen_map_tipo_doc_recebido_listar'); | ||
1317 | + $objDTO->retNumIdRecurso(); | ||
1318 | + $objBD = new RecursoBD($this->getObjInfraIBanco()); | ||
1319 | + $objDTO = $objBD->consultar($objDTO); | ||
1320 | + if ($objDTO) { | ||
1321 | + $objDTO->setStrNome('pen_map_tipo_documento_recebimento_listar'); | ||
1322 | + $objDTO->setStrCaminho('controlador.php?acao=pen_map_tipo_documento_recebimento_listar'); | ||
1323 | + $objBD->alterar($objDTO); | ||
1324 | + } | ||
1325 | + | ||
1326 | + //Alterar nomeclatura do recurso (envio) | ||
1327 | + $objDTO = new RecursoDTO(); | ||
1328 | + $objDTO->setStrNome('pen_map_tipo_doc_enviado_cadastrar'); | ||
1329 | + $objDTO->retNumIdRecurso(); | ||
1330 | + $objBD = new RecursoBD($this->getObjInfraIBanco()); | ||
1331 | + $objDTO = $objBD->consultar($objDTO); | ||
1332 | + if ($objDTO) { | ||
1333 | + $objDTO->setStrNome('pen_map_tipo_documento_envio_cadastrar'); | ||
1334 | + $objDTO->setStrCaminho('controlador.php?acao=pen_map_tipo_documento_envio_cadastrar'); | ||
1335 | + $objBD->alterar($objDTO); | ||
1336 | + } | ||
1337 | + $objDTO = new RecursoDTO(); | ||
1338 | + $objDTO->setStrNome('pen_map_tipo_doc_enviado_listar'); | ||
1339 | + $objDTO->retNumIdRecurso(); | ||
1340 | + $objBD = new RecursoBD($this->getObjInfraIBanco()); | ||
1341 | + $objDTO = $objBD->consultar($objDTO); | ||
1342 | + if ($objDTO) { | ||
1343 | + $objDTO->setStrNome('pen_map_tipo_documento_envio_listar'); | ||
1344 | + $objDTO->setStrCaminho('controlador.php?acao=pen_map_tipo_documento_envio_listar'); | ||
1345 | + $objBD->alterar($objDTO); | ||
1346 | + } | ||
1347 | + | ||
1348 | + /* altera o parâmetro da versão de banco */ | ||
1349 | + $objInfraParametroDTO = new InfraParametroDTO(); | ||
1350 | + $objInfraParametroDTO->setStrNome($this->sip_versao); | ||
1351 | + $objInfraParametroDTO->retTodos(); | ||
1352 | + $objInfraParametroBD = new InfraParametroBD($this->inicializarObjInfraIBanco()); | ||
1353 | + $objInfraParametroDTO = $objInfraParametroBD->consultar($objInfraParametroDTO); | ||
1354 | + $objInfraParametroDTO->setStrValor('1.0.4'); | ||
1355 | + $objInfraParametroBD->alterar($objInfraParametroDTO); | ||
1356 | + } | ||
1274 | } | 1357 | } |
1275 | 1358 | ||
1276 | try { | 1359 | try { |