diff --git a/sei/web/modulos/utilidades/dto/MdUtlControleDsmpDTO.php b/sei/web/modulos/utilidades/dto/MdUtlControleDsmpDTO.php
index 51b7495..9f30d57 100644
--- a/sei/web/modulos/utilidades/dto/MdUtlControleDsmpDTO.php
+++ b/sei/web/modulos/utilidades/dto/MdUtlControleDsmpDTO.php
@@ -133,6 +133,9 @@ public function montar() {
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'StaEncaminhamentoAnalise','anl.sta_encaminhamento_analise','md_utl_analise anl');
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM, 'IdMdUtlAdmFilaEncAnalise','anl.id_md_utl_adm_fila','md_utl_analise anl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTA, 'PeriodoInicioAnalise','anl.dta_periodo_inicio','md_utl_analise anl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTA, 'PeriodoFimAnalise','anl.dta_periodo_fim','md_utl_analise anl');
+
//Revisão
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'SinAtivoRevisao','rev.sin_ativo','md_utl_revisao rev');
diff --git a/sei/web/modulos/utilidades/dto/MdUtlHistControleDsmpDTO.php b/sei/web/modulos/utilidades/dto/MdUtlHistControleDsmpDTO.php
index b7585ee..e84b6f8 100644
--- a/sei/web/modulos/utilidades/dto/MdUtlHistControleDsmpDTO.php
+++ b/sei/web/modulos/utilidades/dto/MdUtlHistControleDsmpDTO.php
@@ -82,6 +82,8 @@ public function montar() {
$this->configurarFK('IdProcedimento', 'protocolo', 'id_protocolo');
$this->configurarFK('IdMdUtlContestRevisao', 'imd_utl_contest_revisao', 'id_md_utl_contest_revisao');
+ $this->configurarFK('IdMdUtlAnalise', 'md_utl_analise anl', 'anl.id_md_utl_analise', InfraDTO::$TIPO_FK_OPCIONAL);
+
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'NomeFila','fila.nome','md_utl_adm_fila fila');
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'NomeUsuarioDist','ud.nome','usuario ud');
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'SiglaUsuarioDist','ud.sigla','usuario ud');
@@ -92,6 +94,10 @@ public function montar() {
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'NomeTpControle','nome','md_utl_adm_tp_ctrl_desemp');
+ //Análise
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTA, 'PeriodoInicioAnalise','anl.dta_periodo_inicio','md_utl_analise anl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTA, 'PeriodoFimAnalise','anl.dta_periodo_fim','md_utl_analise anl');
+
$this->adicionarAtributo(InfraDTO::$PREFIXO_STR,'SinVerificarPermissao');
}
diff --git a/sei/web/modulos/utilidades/dto/MdUtlProcedimentoDTO.php b/sei/web/modulos/utilidades/dto/MdUtlProcedimentoDTO.php
index d7fd444..a53d8fe 100644
--- a/sei/web/modulos/utilidades/dto/MdUtlProcedimentoDTO.php
+++ b/sei/web/modulos/utilidades/dto/MdUtlProcedimentoDTO.php
@@ -9,99 +9,145 @@
class MdUtlProcedimentoDTO extends ProcedimentoDTO
{
- private $ControleDsmpFk = null;
- private $ControleDsmpWhere = null;
+ private $ControleDsmpFk = null;
+ private $ControleDsmpWhere = null;
+ private $TriagAnaliseRevTIPOFK = null;
public function __construct(){
$this->ControleDsmpFk = InfraDTO::$TIPO_FK_OPCIONAL;
$this->ControleDsmpWhere = InfraDTO::$FILTRO_FK_ON;
+ $this->TriagAnaliseRevTIPOFK = InfraDTO::$TIPO_FK_OPCIONAL;
parent::__construct();
}
public function montar() {
parent::montar();
- $this->configurarFK('IdProcedimento', 'md_utl_controle_dsmp cpf', 'cpf.id_procedimento', $this->getControleDsmpTIPOFK(), $this->getControleDsmpTIPOWhere());
- $this->configurarFK('IdMdUtlTriagem', 'md_utl_triagem tri', 'tri.id_md_utl_triagem', InfraDTO::$TIPO_FK_OPCIONAL);
- $this->configurarFK('IdUnidade', 'unidade u', 'u.id_unidade', InfraDTO::$TIPO_FK_OPCIONAL);
- $this->configurarFK('IdFila', 'md_utl_adm_fila af', 'af.id_md_utl_adm_fila', InfraDTO::$TIPO_FK_OPCIONAL);
+ $this->configurarFK('IdProcedimento', 'md_utl_controle_dsmp ctrl', 'ctrl.id_procedimento', $this->getControleDsmpTIPOFK() /*, $this->getControleDsmpTIPOWhere()*/);
+ $this->configurarFK('IdProcedimento', 'md_utl_hist_controle_dsmp hctrl', 'hctrl.id_procedimento',$this->getControleDsmpTIPOFK());
+
$this->configurarFK('IdProcedimento', 'documento doc', 'doc.id_procedimento');
$this->configurarFK('IdProtocoloDoc', 'protocolo pd', 'pd.id_protocolo');
$this->configurarFK('IdProcedimento', 'atividade atv', 'atv.id_protocolo');
- $this->configurarFK('IdUsuarioDistribuicao', 'usuario ud', 'ud.id_usuario', InfraDTO::$TIPO_FK_OPCIONAL);
- $this->configurarFK('IdMdUtlAjustePrazo', 'md_utl_ajuste_prazo mdap', 'mdap.id_md_utl_ajuste_prazo', InfraDTO::$TIPO_FK_OPCIONAL);
- $this->configurarFK('IdMdUtlContestRevisao', 'md_utl_contest_revisao mdcr', 'mdcr.id_md_utl_contest_revisao', InfraDTO::$TIPO_FK_OPCIONAL);
- // novo relacionamento para retornar info da tabela tipo de controle de desempenho
- $this->configurarFK('IdTipoCtrlDsmp','md_utl_adm_tp_ctrl_desemp tp_ctrl','tp_ctrl.id_md_utl_adm_tp_ctrl_desemp');
+ /* =============================================================================================================
+ CONFIGURACAO COM CONTROLE
+ ============================================================================================================= */
- //$this->configurarFK('IdDocumento', 'documento d', 'd.id_documento');
+ $this->configurarFK('IdUnidade', 'unidade u', 'u.id_unidade');
+ $this->configurarFK('IdFila', 'md_utl_adm_fila af', 'af.id_md_utl_adm_fila', InfraDTO::$TIPO_FK_OPCIONAL);
+ $this->configurarFK('IdMdUtlAdmTpCtrlDesemp','md_utl_adm_tp_ctrl_desemp tp_ctrl','tp_ctrl.id_md_utl_adm_tp_ctrl_desemp');
- //Get Dados do Status de Utilidades
+ $this->configurarFK('IdUsuarioDistribuicao', 'usuario ud', 'ud.id_usuario', InfraDTO::$TIPO_FK_OPCIONAL , InfraDTO::$FILTRO_FK_WHERE);
+ $this->configurarFK('IdUsuario', 'usuario us', 'us.id_usuario', InfraDTO::$TIPO_FK_OPCIONAL , InfraDTO::$FILTRO_FK_WHERE);
- //Relacionamento de Procedimento
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
- 'IdMdUtlAdmRelControleDsmp',
- 'id_procedimento',
- 'procedimento');
+ $this->configurarFK('IdMdUtlTriagem', 'md_utl_triagem tri', 'tri.id_md_utl_triagem', $this->getTriagAnaliseRevTIPOFK() /*,InfraDTO::$FILTRO_FK_WHERE*/);
+ $this->configurarFK('IdMdUtlAnalise','md_utl_analise an','an.id_md_utl_analise',$this->getTriagAnaliseRevTIPOFK() /*,InfraDTO::$FILTRO_FK_WHERE*/);
+ $this->configurarFK('IdMdUtlRevisao','md_utl_revisao re','re.id_md_utl_revisao',$this->getTriagAnaliseRevTIPOFK() /*,InfraDTO::$FILTRO_FK_WHERE*/);
- //Get Dados da Proc Fila
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
- 'IdMdUtlControleDsmp',
- 'cpf.id_md_utl_controle_dsmp',
- 'md_utl_controle_dsmp cpf');
+ $this->configurarFK('IdMdUtlAjustePrazo', 'md_utl_ajuste_prazo mdap', 'mdap.id_md_utl_ajuste_prazo', InfraDTO::$TIPO_FK_OPCIONAL);
+ $this->configurarFK('IdMdUtlContestRevisao', 'md_utl_contest_revisao mdcr', 'mdcr.id_md_utl_contest_revisao', InfraDTO::$TIPO_FK_OPCIONAL);
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTH,
- 'Atual',
- 'cpf.dth_atual',
- 'md_utl_controle_dsmp cpf');
+ /* =============================================================================================================
+ CONFIGURACAO COM HISTORICO DO CONTROLE
+ ============================================================================================================= */
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
- 'IdUnidade',
- 'cpf.id_unidade',
- 'md_utl_controle_dsmp cpf');
+ $this->configurarFK('IdUnidadeHist', 'unidade hu', 'hu.id_unidade');
+ $this->configurarFK('IdFilaHist', 'md_utl_adm_fila haf', 'haf.id_md_utl_adm_fila', InfraDTO::$TIPO_FK_OPCIONAL);
+ $this->configurarFK('IdMdUtlAdmTpCtrlDesempHist','md_utl_adm_tp_ctrl_desemp htp_ctrl','htp_ctrl.id_md_utl_adm_tp_ctrl_desemp');
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
- 'IdMdUtlAdmTpCtrlDesemp',
- 'cpf.id_md_utl_adm_tp_ctrl_desemp',
- 'md_utl_controle_dsmp cpf');
-
- // retorna info do tipo de controle desempenho - relaciona
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
- 'IdTipoCtrlDsmp',
- 'cpf.id_md_utl_adm_tp_ctrl_desemp',
- 'md_utl_controle_dsmp cpf');
+ $this->configurarFK('IdUsuarioDistribuicaoHist', 'usuario hud', 'hud.id_usuario',InfraDTO::$TIPO_FK_OPCIONAL,InfraDTO::$FILTRO_FK_WHERE);
+ $this->configurarFK('IdUsuarioHist', 'usuario hus', 'hus.id_usuario',InfraDTO::$TIPO_FK_OPCIONAL,InfraDTO::$FILTRO_FK_WHERE);
- // retorna info do tipo de controle desempenho - get nome do tipo de controle
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
- 'NomeTpCtrlDsmp',
- 'tp_ctrl.nome',
- 'md_utl_adm_tp_ctrl_desemp tp_ctrl');
+ $this->configurarFK('IdMdUtlTriagemHist', 'md_utl_triagem htri', 'htri.id_md_utl_triagem', $this->getTriagAnaliseRevTIPOFK() /*, InfraDTO::$FILTRO_FK_WHERE*/);
+ $this->configurarFK('IdMdUtlAnaliseHist','md_utl_analise han','han.id_md_utl_analise',$this->getTriagAnaliseRevTIPOFK() /*, InfraDTO::$FILTRO_FK_WHERE*/);
+ $this->configurarFK('IdMdUtlRevisaoHist','md_utl_revisao hre','hre.id_md_utl_revisao',$this->getTriagAnaliseRevTIPOFK() /*,InfraDTO::$FILTRO_FK_WHERE*/);
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
- 'IdFila',
- 'cpf.id_md_utl_adm_fila',
- 'md_utl_controle_dsmp cpf');
+ /* =============================================================================================================
+ ATRIBUICAO IMPORTANTE PARA OS JOIN DO CONTROLE
+ ============================================================================================================= */
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdMdUtlControleDsmp','ctrl.id_md_utl_controle_dsmp','md_utl_controle_dsmp ctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdUnidade','ctrl.id_unidade','md_utl_controle_dsmp ctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdMdUtlAdmTpCtrlDesemp','ctrl.id_md_utl_adm_tp_ctrl_desemp','md_utl_controle_dsmp ctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdFila','ctrl.id_md_utl_adm_fila','md_utl_controle_dsmp ctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdUsuario','ctrl.id_usuario','md_utl_controle_dsmp ctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdUsuarioDistribuicao','ctrl.id_usuario_distribuicao','md_utl_controle_dsmp ctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdMdUtlAjustePrazo','ctrl.id_md_utl_ajuste_prazo','md_utl_controle_dsmp ctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdMdUtlContestRevisao','ctrl.id_md_utl_contest_revisao','md_utl_controle_dsmp ctrl');
+
+ /* =============================================================================================================
+ ATRIBUICAO IMPORTANTE PARA OS JOIN DO HISTORICO CONTROLE
+ ============================================================================================================= */
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdMdUtlHistControleDsmp','hctrl.id_md_utl_hist_controle_dsmp','md_utl_hist_controle_dsmp hctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdUnidadeHist','hctrl.id_unidade','md_utl_hist_controle_dsmp hctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdMdUtlAdmTpCtrlDesempHist','hctrl.id_md_utl_adm_tp_ctrl_desemp','md_utl_hist_controle_dsmp hctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdFilaHist','hctrl.id_md_utl_adm_fila','md_utl_hist_controle_dsmp hctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdUsuarioHist','hctrl.id_usuario','md_utl_hist_controle_dsmp hctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdUsuarioDistribuicaoHist','hctrl.id_usuario_distribuicao','md_utl_hist_controle_dsmp hctrl');
+
+ /* =============================================================================================================
+ RELACIONAMENTOS DE ATRIBUTO DA TRIAGEM, ANALISE E REVISAO NAS TABELAS CTRL E HIST
+ ============================================================================================================= */
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdMdUtlTriagem', 'ctrl.id_md_utl_triagem', 'md_utl_controle_dsmp ctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdMdUtlAnalise', 'ctrl.id_md_utl_analise', 'md_utl_controle_dsmp ctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdMdUtlRevisao', 'ctrl.id_md_utl_revisao', 'md_utl_controle_dsmp ctrl');
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdMdUtlTriagemHist', 'hctrl.id_md_utl_triagem', 'md_utl_hist_controle_dsmp hctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdMdUtlAnaliseHist', 'hctrl.id_md_utl_analise', 'md_utl_hist_controle_dsmp hctrl');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'IdMdUtlRevisaoHist', 'hctrl.id_md_utl_revisao','md_utl_hist_controle_dsmp hctrl');
+
+ /* =============================================================================================================
+ COLUNAS DA TABELA CONTROLE
+ ============================================================================================================= */
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
- 'IdUsuarioDistribuicao',
- 'cpf.id_usuario_distribuicao',
- 'md_utl_controle_dsmp cpf');
+ 'IdMdUtlAdmRelControleDsmp',
+ 'id_procedimento',
+ 'procedimento');
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
+ 'TipoAcao',
+ 'ctrl.tipo_acao',
+ 'md_utl_controle_dsmp ctrl');
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTH,
+ 'Atual',
+ 'ctrl.dth_atual',
+ 'md_utl_controle_dsmp ctrl');
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
'TempoExecucao',
- 'cpf.tempo_execucao',
- 'md_utl_controle_dsmp cpf');
+ 'ctrl.tempo_execucao',
+ 'md_utl_controle_dsmp ctrl');
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
'TempoExecucaoAtribuido',
- 'cpf.tempo_de_execucao_atribuido',
- 'md_utl_controle_dsmp cpf');
-
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
- 'IdMdUtlRevisao',
- 'cpf.id_md_utl_revisao',
- 'md_utl_controle_dsmp cpf');
+ 'ctrl.tempo_de_execucao_atribuido',
+ 'md_utl_controle_dsmp ctrl');
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
+ 'StaAtendimentoDsmp',
+ 'ctrl.sta_atendimento_dsmp',
+ 'md_utl_controle_dsmp ctrl');
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
+ 'IdAtendimento',
+ 'ctrl.id_atendimento',
+ 'md_utl_controle_dsmp ctrl');
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTH,
+ 'PrazoTarefa',
+ 'ctrl.dth_prazo_tarefa',
+ 'md_utl_controle_dsmp ctrl');
+
+ // retorna info do tipo de controle desempenho - get nome do tipo de controle
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
+ 'NomeTpCtrlDsmp',
+ 'tp_ctrl.nome',
+ 'md_utl_adm_tp_ctrl_desemp tp_ctrl');
//Get dados da tabela Fila
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
@@ -109,26 +155,12 @@ public function montar() {
'af.nome',
'md_utl_adm_fila af');
+ // Get dados da tabela Unidade
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
'SiglaUnidade',
'u.sigla',
'unidade u');
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
- 'StaAtendimentoDsmp',
- 'cpf.sta_atendimento_dsmp',
- 'md_utl_controle_dsmp cpf');
-
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTH,
- 'PrazoTarefa',
- 'cpf.dth_prazo_tarefa',
- 'md_utl_controle_dsmp cpf');
-
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
- 'IdMdUtlAnalise',
- 'cpf.id_md_utl_analise',
- 'md_utl_controle_dsmp cpf');
-
//Get dados do Procedimento
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DBL,
'IdDocumento',
@@ -158,7 +190,6 @@ public function montar() {
'atv.id_atividade',
'atividade atv');
-
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTH,
'ConclusaoAtvUtilidades',
'atv.dth_conclusao',
@@ -174,26 +205,6 @@ public function montar() {
'atv.id_unidade',
'atividade atv');
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
- 'IdMdUtlTriagem',
- 'cpf.id_md_utl_triagem',
- 'md_utl_controle_dsmp cpf');
-
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTH,
- 'PrazoResposta',
- 'tri.dth_prazo_resposta',
- 'md_utl_triagem tri');
-
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
- 'IdMdUtlAjustePrazo',
- 'cpf.id_md_utl_ajuste_prazo',
- 'md_utl_controle_dsmp cpf');
-
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
- 'IdMdUtlContestRevisao',
- 'cpf.id_md_utl_contest_revisao',
- 'md_utl_controle_dsmp cpf');
-
//Get Dados Ajuste Prazo
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
'StaSolicitacaoAjustePrazo',
@@ -206,13 +217,114 @@ public function montar() {
'mdcr.sta_solicitacao',
'md_utl_contest_revisao mdcr');
-
- //Get Dados do Usuário da Distribuição
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'NomeUsuarioDistribuicao','ud.nome','usuario ud');
- $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'SiglaUsuarioDistribuicao','ud.sigla','usuario ud');
+ // tabela Usuario
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'NomeUsuarioDistribuicao','ud.nome','usuario ud');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'SiglaUsuarioDistribuicao','ud.sigla','usuario ud');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'NomeUsuario','us.nome','usuario us');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'SiglaUsuario','us.sigla','usuario us');
+
+ // tabela Triagem
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTH, 'PrazoResposta', 'tri.dth_prazo_resposta', 'md_utl_triagem tri');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTA,'TriagemAtual', 'tri.dth_atual', 'md_utl_triagem tri');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'TempoExecucaoAtribuidoTriag', 'tri.tempo_de_execucao_atribuido', 'md_utl_triagem tri');
+
+ // tabela Analise
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTA,'PeriodoInicio','an.dta_periodo_inicio','md_utl_analise an');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTA,'PeriodoFim','an.dta_periodo_fim','md_utl_analise an');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'TempoExecucaoAtribuidoAnalise', 'an.tempo_de_execucao_atribuido', 'md_utl_analise an');
+
+ // tabela Revisao
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTA,'RevisaoAtual', 're.dth_atual', 'md_utl_revisao re');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'TempoExecucaoAtribuidoRev', 're.tempo_de_execucao_atribuido', 'md_utl_revisao re');
+
+ /* =============================================================================================================
+ COLUNAS QUE SE RELACIONAM COM A TABELA CONTROLE HISTORICO
+ ============================================================================================================= */
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
+ 'TipoAcaoHist',
+ 'hctrl.tipo_acao',
+ 'md_utl_hist_controle_dsmp hctrl');
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTH,
+ 'AtualHist',
+ 'hctrl.dth_atual',
+ 'md_utl_hist_controle_dsmp hctrl');
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
+ 'TempoExecucaoHist',
+ 'hctrl.tempo_execucao',
+ 'md_utl_hist_controle_dsmp hctrl');
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
+ 'TempoExecucaoAtribuidoHist',
+ 'hctrl.tempo_de_execucao_atribuido',
+ 'md_utl_hist_controle_dsmp hctrl');
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
+ 'StaAtendimentoDsmpHist',
+ 'hctrl.sta_atendimento_dsmp',
+ 'md_utl_hist_controle_dsmp hctrl');
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,
+ 'IdAtendimentoHist',
+ 'hctrl.id_atendimento',
+ 'md_utl_controle_dsmp hctrl');
+
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTH,
+ 'PrazoTarefaHist',
+ 'hctrl.dth_prazo_tarefa',
+ 'md_utl_hist_controle_dsmp hctrl');
+
+ // retorna info do tipo de controle desempenho - get nome do tipo de controle
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
+ 'NomeTpCtrlDsmpHist',
+ 'htp_ctrl.nome',
+ 'md_utl_adm_tp_ctrl_desemp htp_ctrl');
+
+ //Get dados da tabela Fila
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
+ 'NomeFilaHist',
+ 'haf.nome',
+ 'md_utl_adm_fila haf');
+
+ // Get dados da tabela Unidade
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR,
+ 'SiglaUnidadeHist',
+ 'hu.sigla',
+ 'unidade hu');
+
+ // tabela Usuario
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'NomeUsuarioDistribuicaoHist','hud.nome','usuario hud');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'SiglaUsuarioDistribuicaoHist','hud.sigla','usuario hud');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'NomeUsuarioHist','hus.nome','usuario hus');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'SiglaUsuarioHist','hus.sigla','usuario hus');
+
+ // tabela Triagem
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTH, 'PrazoRespostaHist', 'htri.dth_prazo_resposta', 'md_utl_triagem htri');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTA,'TriagemAtualHist', 'htri.dth_atual', 'md_utl_triagem htri');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'TempoExecucaoAtribuidoTriagHist', 'htri.tempo_de_execucao_atribuido', 'md_utl_triagem htri');
+
+ // tabela Analise
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTA,'PeriodoInicioHist','han.dta_periodo_inicio','md_utl_analise han');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTA,'PeriodoFimHist','han.dta_periodo_fim','md_utl_analise han');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'TempoExecucaoAtribuidoAnaliseHist', 'han.tempo_de_execucao_atribuido', 'md_utl_analise han');
+
+ // tabela Revisao
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTA,'RevisaoAtualHist', 'hre.dth_atual', 'md_utl_revisao hre');
+ $this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM,'TempoExecucaoAtribuidoRevHist', 'hre.tempo_de_execucao_atribuido', 'md_utl_revisao hre');
+
+ /* =============================================================================================================
+ COLUNAS CRIADAS DINAMICAMENTE, SEM VINCULO A NENHUMA TABELA
+ ============================================================================================================= */
$this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'ValorAtividadeSelectUtl');
$this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'NomeAtividadeTriagem');
+
+ $this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'AtivarDebug');
+ #$this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'TipoAcaoGrid');
+ #$this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'OrigemAcaoGrid');
+ //$this->adicionarAtributo(InfraDTO::$PREFIXO_STR, 'AtivarDebug');
}
public function getControleDsmpTIPOFK() {
@@ -231,4 +343,12 @@ public function setControleDsmpTIPOWhere($ControleDsmpWhere) {
$this->ControleDsmpWhere = $ControleDsmpWhere;
}
+ public function getTriagAnaliseRevTIPOFK() {
+ return $this->TriagAnaliseRevTIPOFK;
+ }
+
+ public function setTriagAnaliseRevTIPOFK($tipoFK) {
+ $this->TriagAnaliseRevTIPOFK = $tipoFK;
+ }
+
}
diff --git a/sei/web/modulos/utilidades/int/MdUtlAdmIntegracaoINT.php b/sei/web/modulos/utilidades/int/MdUtlAdmIntegracaoINT.php
index d9baee2..21ee6c6 100644
--- a/sei/web/modulos/utilidades/int/MdUtlAdmIntegracaoINT.php
+++ b/sei/web/modulos/utilidades/int/MdUtlAdmIntegracaoINT.php
@@ -46,7 +46,7 @@ public static function montarOperacaoSOAP($data){
}
public static function getDadosServicoREST( $post ){
- $objInfraException = new InfraException();
+ $objInfraException = new InfraException();
$urlServico = trim($post['urlServico']);
@@ -61,12 +61,12 @@ public static function getDadosServicoREST( $post ){
curl_setopt_array( $curl, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
- CURLOPT_CONNECTTIMEOUT => 5,
- CURLOPT_TIMEOUT => 20,
+ CURLOPT_CONNECTTIMEOUT => 8,
+ CURLOPT_TIMEOUT => 20,
CURLOPT_CUSTOMREQUEST => $post['tipoRequisicao'],
]);
- // monta dados de parametros necessarios
+ // monta dados de parametros necessarios
if ( array_key_exists( 'parametros' , $post ) ) {
$payload = json_encode( $post['parametros'] );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $payload );
@@ -87,10 +87,10 @@ public static function getDadosServicoREST( $post ){
// executa a consulta no webservice
$ret = curl_exec( $curl );
- $info = curl_getinfo( $curl );
- $ret = self::trataRetornoCurl( $info , $ret );
+ $info = curl_getinfo( $curl );
+ $ret = self::trataRetornoCurl( $info , $ret );
- if ( $info['http_code'] == 0 ) $ret['msg'] = curl_error($curl);
+ if ( $info['http_code'] == 0 ) $ret['msg'] = curl_error($curl);
if ( $ret['suc'] === false ) {
$strError = "Falha no serviço SARH \n\n";
diff --git a/sei/web/modulos/utilidades/int/MdUtlAdmPrmGrINT.php b/sei/web/modulos/utilidades/int/MdUtlAdmPrmGrINT.php
index 4e084f9..6ca9868 100644
--- a/sei/web/modulos/utilidades/int/MdUtlAdmPrmGrINT.php
+++ b/sei/web/modulos/utilidades/int/MdUtlAdmPrmGrINT.php
@@ -305,6 +305,8 @@ public static function autoCompletarUsuarios($numIdOrgao, $strPalavrasPesquisa,
public static function convertToHoursMins($time)
{
+ if ( is_string($time) ) return $time;
+
$hours = intVal($time / 60);
$minutes = ($time % 60);
if ($time == 0) {
@@ -403,18 +405,18 @@ public static function recuperarTextoFrequenciaTooltipDinamico($idControleDesemp
public static function recuperarTextoFrequenciaTooltipDinamicoMeusProcessos($idControleDesempenho = null, $strTela = null)
{
- $msgPadrao = $strTela ? MdUtlMensagemINT::setMensagemPadraoPersonalizada(MdUtlMensagemINT::$MSG_UTL_137,[$strTela]) : MdUtlMensagemINT::$MSG_UTL_136;
+ $msgPadrao = $strTela ? MdUtlMensagemINT::setMensagemPadraoPersonalizada(MdUtlMensagemINT::$MSG_UTL_137,[$strTela]) : MdUtlMensagemINT::$MSG_UTL_136;
if (!$idControleDesempenho){
return $msgPadrao;
}
$dados = MdUtlAdmPrmGrINT::recuperarTextoFrequenciaTooltipDinamico($idControleDesempenho);
- return $msgPadrao ."\n \n". $dados['textoFrequencia'];
+ return $msgPadrao ."\n \n". $dados['textoFrequencia'];
}
public static function recuperarTextoFrequenciaTooltipDinamicoDistribuirProcessos($idControleDesempenho)
{
$msgPadrao = MdUtlMensagemINT::$MSG_UTL_136;
- $msgDist = 'A Carga Exigível no Período Atual somente será exibida depois que for aplicado o filtro "Membro Participante". \n \n '. $msgPadrao;
+ $msgDist = 'A Carga Exigível no Período Selecionado somente será exibida depois que for aplicado o filtro "Membro Participante". \n \n '. $msgPadrao;
if (!$idControleDesempenho) {
return $msgDist;
}
@@ -445,21 +447,21 @@ public static function recuperarTextoFrequenciaTooltipDinamicoDistribuirPessoaTe
public static function recuperarTextoFrequenciaTooltipDinamicoCargaHorariaDistribuidaPeriodo($idControleDesempenho)
{
if (!$idControleDesempenho) {
- return 'A Carga total abrange todo e qualquer tempo que foi distribudo para o usurio logado no Tipo de Controle indicado, dentro do Perodo em andamento, conforme definido nos parmetros gerais do Tipo de Controle de Desempenho.\n \n Para o Tipo de Controle selecionado, o Perodo de distribuio e acompanhamento "Semanal", tendo sempre incio toda segunda-feira s 0h, o que marca o fim do Perodo anterior;';
+ return 'A Carga total abrange todo e qualquer tempo que foi distribuído para o usuário logado no Tipo de Controle indicado, dentro do Período selecionado, conforme definido nos parâmetros gerais do Tipo de Controle de Desempenho.\n \n Para o Tipo de Controle selecionado, o Período de distribuição e acompanhamento "Semanal", tendo sempre início toda segunda-feira às 0h, o que marca o fim do Período anterior;';
}
$dados = MdUtlAdmPrmGrINT::recuperarTextoFrequenciaTooltipDinamico($idControleDesempenho);
- return 'A Carga total abrange todo e qualquer tempo que foi distribudo para o usurio logado no Tipo de Controle indicado, dentro do Perodo em andamento, conforme definido nos parmetros gerais do Tipo de Controle de Desempenho.\n \n '. $dados['textoFrequencia'];
+ return 'A Carga total abrange todo e qualquer tempo que foi distribuído para o usuário logado no Tipo de Controle indicado, dentro do Período selecionado, conforme definido nos parâmetros gerais do Tipo de Controle de Desempenho.\n \n '. $dados['textoFrequencia'];
}
public static function recuperarTextoFrequenciaTooltipDistribuicaoDinamicoCargaHorariaDistribuidaPeriodo($idControleDesempenho)
{
if (!$idControleDesempenho) {
- return 'A Carga Horria Distribuda no Perodo somente ser exibida depois que for aplicado o filtro "Responsvel".\n \n A Carga total abrange todo e qualquer tempo que foi distribudo para o responsvel no Tipo de Controle indicado, dentro do Perodo em andamento, conforme definido nos parmetros gerais do Tipo de Controle de Desempenho.\n \n Para o Tipo de Controle selecionado, o Perodo de distribuio e acompanhamento "Semanal", tendo sempre incio toda segunda-feira s 0h, o que marca o fim do Perodo anterior;';
+ return 'A Carga Horária Distribuída no Período somente será exibida depois que for aplicado o filtro "Responsável".\n \n A Carga total abrange todo e qualquer tempo que foi distribuído para o responsável no Tipo de Controle indicado, dentro do Período selecionado, conforme definido nos parâmetros gerais do Tipo de Controle de Desempenho.\n \n Para o Tipo de Controle selecionado, o Período de distribuido e acompanhamento "Semanal", tendo sempre início toda segunda-feira às 0h, o que marca o fim do Período anterior;';
}
$dados = MdUtlAdmPrmGrINT::recuperarTextoFrequenciaTooltipDinamico($idControleDesempenho);
- return 'A Carga Horria Distribuda no Perodo somente ser exibida depois que for aplicado o filtro "Responsvel".\n \n A Carga total abrange todo e qualquer tempo que foi distribudo para o responsvel no Tipo de Controle indicado, dentro do Perodo em andamento, conforme definido nos parmetros gerais do Tipo de Controle de Desempenho.\n \n'. $dados['textoFrequencia'];
+ return 'A Carga Horária Distribuída no Período somente será exibida depois que for aplicado o filtro "Responsável".\n \n A Carga total abrange todo e qualquer tempo que foi distribuído para o responsável no Tipo de Controle indicado, dentro do Período selecionado, conforme definido nos parâmetros gerais do Tipo de Controle de Desempenho.\n \n'. $dados['textoFrequencia'];
}
public static function retornaTipoPeriodo($idTipoControle)
diff --git a/sei/web/modulos/utilidades/int/MdUtlAdmPrmGrUsuINT.php b/sei/web/modulos/utilidades/int/MdUtlAdmPrmGrUsuINT.php
index 4af23d2..900a0b1 100644
--- a/sei/web/modulos/utilidades/int/MdUtlAdmPrmGrUsuINT.php
+++ b/sei/web/modulos/utilidades/int/MdUtlAdmPrmGrUsuINT.php
@@ -322,7 +322,7 @@ public static function getValoresParamUnidEsf( $idTipoControle ){
$arrFrequencia = MdUtlAdmPrmGrINT::retornaArrPadraoFrequenciaDiaria();
$objMdUtlAdmPrmGrUsuRN = new MdUtlAdmPrmGrUsuRN();
- $arrPeriodo = $objMdUtlAdmPrmGrUsuRN->getDiasUteisNoPeriodo([$objDTO->getStrStaFrequencia()]);
+ $arrPeriodo = $objMdUtlAdmPrmGrUsuRN->getDiasUteisNoPeriodo([$objDTO->getStrStaFrequencia()]);
$diasUteis = $arrPeriodo['numFrequencia'];
$arrParamRet['idPrmGr'] = $objDTO->getNumIdMdUtlAdmPrmGr();
@@ -337,11 +337,11 @@ public static function getValoresParamUnidEsf( $idTipoControle ){
}
public static function buscarDadosCargaUsuarioCompleto( $post ){
- $arrIdsPrmGr = [];
+ $arrIdsPrmGr = [];
foreach( $post['idTipoControle'] as $idTpCtrl ){
$arrParams = self::getValoresParamUnidEsf( $idTpCtrl );
- $dados[] = MdUtlAdmPrmGrUsuINT::arrDadosCargaUsuario($post['idUsuarioParticipante'], $arrParams['idPrmGr'], $arrParams['numCargaPadrao'], $arrParams['numPercentualTele'], $arrParams['staFrequencia'], $idTpCtrl, $arrParams['inicioPeriodo']);
- $arrIdsPrmGr[] = $arrParams['idPrmGr'];
+ $dados[] = MdUtlAdmPrmGrUsuINT::arrDadosCargaUsuario($post['idUsuarioParticipante'], $arrParams['idPrmGr'], $arrParams['numCargaPadrao'], $arrParams['numPercentualTele'], $arrParams['staFrequencia'], $idTpCtrl, $post['tmpPeriodo'], true /*$arrParams['inicioPeriodo']*/);
+ $arrIdsPrmGr[] = $arrParams['idPrmGr'];
}
$retorno = array();
@@ -416,14 +416,23 @@ public static function buscarDadosCargaUsuario($idUsuarioParticipante, $idParam,
return $xml;
}
- public static function arrDadosCargaUsuario($idUsuarioParticipante, $idParam, $numCargaPadrao, $numPercentualTele, $staFrequencia, $idTipoControle, $inicioPeriodo)
+ public static function arrDadosCargaUsuario($idUsuarioParticipante, $idParam, $numCargaPadrao, $numPercentualTele, $staFrequencia, $idTipoControle, $strPeriodo, $isPeriodoVariavel = false /*$inicioPeriodo*/)
{
$objMdUtlAdmPrmGrUsuRN = new MdUtlAdmPrmGrUsuRN();
$objMdUtlControleDsmpRN = new MdUtlControleDsmpRN();
$objMdUtlHistControleDsmpRN = new MdUtlHistControleDsmpRN();
$objMdUtlPrazoRN = new MdUtlPrazoRN();
- $arrDatasFiltro = $objMdUtlPrazoRN->getDatasPeriodoAtual($idParam);
+ if ( $isPeriodoVariavel ){
+ if (!empty($strPeriodo)) {
+ $arrDt = explode('|', $strPeriodo);
+ $arrDatasFiltro = ['DT_INICIAL' => $arrDt[0] . ' 00:00:00', 'DT_FINAL' => $arrDt[1] . ' 23:59:59'];
+ } else {
+ $arrDatasFiltro = $objMdUtlPrazoRN->getDatasPeriodoAtual($idParam);
+ }
+ } else {
+ $arrDatasFiltro = $objMdUtlPrazoRN->getDatasPorFrequencia($strPeriodo);
+ }
#if (empty($arrDatasFiltro)) $arrDatasFiltro = $objMdUtlPrazoRN->getDatasPorFrequencia($inicioPeriodo);
@@ -435,7 +444,8 @@ public static function arrDadosCargaUsuario($idUsuarioParticipante, $idParam, $n
$tempoExecucaoExecutadoHist = $objMdUtlHistControleDsmpRN->buscarTempoExecucaoExecutadoHist(array($idUsuarioParticipante, $idTipoControle, $arrDatasFiltro));
$totalTempoExecucaoExecutadoHist = $tempoExecucaoExecutado + $tempoExecucaoExecutadoHist;
- $arrPeriodo = $objMdUtlAdmPrmGrUsuRN->getDiasUteisNoPeriodo([$staFrequencia]);
+ $iniPeriodo = substr($arrDatasFiltro['DT_INICIAL'],0,10);
+ $arrPeriodo = $objMdUtlAdmPrmGrUsuRN->getDiasUteisNoPeriodo([$staFrequencia, true, $iniPeriodo]);
$totalCarga = $objMdUtlAdmPrmGrUsuRN->verificaCargaPadrao(array($idUsuarioParticipante, $idParam, $numCargaPadrao, $numPercentualTele, $arrPeriodo));
diff --git a/sei/web/modulos/utilidades/int/MdUtlControleDsmpINT.php b/sei/web/modulos/utilidades/int/MdUtlControleDsmpINT.php
index 3801168..cf3d063 100644
--- a/sei/web/modulos/utilidades/int/MdUtlControleDsmpINT.php
+++ b/sei/web/modulos/utilidades/int/MdUtlControleDsmpINT.php
@@ -411,87 +411,103 @@ public static function montarSelectMembroResponsavelAvaliacao($vlSelecionado = n
return $select;
}
- public static function montarSelectPeriodoAnalise($idTipoControleDesempenho, $idUsuarioAtribuicao, $periodoInicialSelecionado = NULL, $periodoFinalSelecionado = NULL, $frequenciaAnalise = NULL)
- {
- $objMdUtlAdmTpCtrlDesempRN = new MdUtlAdmTpCtrlDesempRN();
- $objMdUtlAdmTpCtrlDesempDTO = new MdUtlAdmTpCtrlDesempDTO();
- $objMdUtlAdmTpCtrlDesempDTO->setNumIdMdUtlAdmTpCtrlDesemp($idTipoControleDesempenho);
- $objMdUtlAdmTpCtrlDesempDTO->retNumIdMdUtlAdmPrmGr();
- $objMdUtlAdmTpCtrlDesemp = $objMdUtlAdmTpCtrlDesempRN->consultar($objMdUtlAdmTpCtrlDesempDTO);
-
- $objMdUtlAdmPrmGrRN = new MdUtlAdmPrmGrRN();
- $objMdUtlAdmPrmGrDTO = new MdUtlAdmPrmGrDTO();
- $objMdUtlAdmPrmGrDTO->setNumIdMdUtlAdmPrmGr( $objMdUtlAdmTpCtrlDesemp->getNumIdMdUtlAdmPrmGr() );
- $objMdUtlAdmPrmGrDTO->retStrStaFrequencia();
- $objMdUtlAdmPrmGrDTO->retNumInicioPeriodo();
- $objMdUtlAdmPrmGrDTO->retDtaDataCorte();
- $objMdUtlAdmPrmGr = $objMdUtlAdmPrmGrRN->consultar($objMdUtlAdmPrmGrDTO);
-
- $objMdUtlAdmPrmGrUsuDTO = new MdUtlAdmPrmGrUsuDTO();
- $objMdUtlAdmPrmGrUsuRN = new MdUtlAdmPrmGrUsuRN();
-
- $objMdUtlAdmPrmGrUsuDTO->setNumIdMdUtlAdmPrmGr($objMdUtlAdmTpCtrlDesemp->getNumIdMdUtlAdmPrmGr());
- $objMdUtlAdmPrmGrUsuDTO->setNumIdUsuario($idUsuarioAtribuicao);
- $objMdUtlAdmPrmGrUsuDTO->setNumMaxRegistrosRetorno(1);
- $objMdUtlAdmPrmGrUsuDTO->retDthInicioParticipacao();
- $objMdUtlAdmPrmGrUsuDTO = $objMdUtlAdmPrmGrUsuRN->consultar($objMdUtlAdmPrmGrUsuDTO);
-
- if(!is_null($objMdUtlAdmPrmGrUsuDTO->getDthInicioParticipacao())) {
- $dataInicioPeriodo = $objMdUtlAdmPrmGrUsuDTO->getDthInicioParticipacao();
- $dataInicioPeriodo = explode(" ", $dataInicioPeriodo);
- $dataInicioPeriodo = $dataInicioPeriodo[0];
- } elseif($objMdUtlAdmPrmGr->getDtaDataCorte()) {
- $dataInicioPeriodo = $objMdUtlAdmPrmGr->getDtaDataCorte();
- } else {
- $dataInicioPeriodo = date("Y-m-d");
- }
- $dataInicioPeriodo = implode('-', array_reverse(explode('/', $dataInicioPeriodo)));
- $periodo = array();
- if($frequenciaAnalise != NULL) {
- $frequencia = $frequenciaAnalise;
- } else {
- $frequencia = $objMdUtlAdmPrmGr->getStrStaFrequencia();
- }
-
- if($frequencia == "S") {
- $inicioSemana = date('Y-m-d', strtotime("Monday this week"));
- $strDiaSemanaAtual = InfraData::obterDescricaoDiaSemana(date('d/m/Y'));
- $diaFinalSemanaAtual = $strDiaSemanaAtual == 'domingo' ? InfraData::getStrDataAtual() : date("d/m/Y", strtotime("next Sunday"));
- $periodo[] = "Semanal (". date("d/m/Y", strtotime($inicioSemana))." a ". $diaFinalSemanaAtual .") - Atual";
- $i = -1;
- while(strtotime($inicioSemana) > strtotime($dataInicioPeriodo)) {
- $inicioSemana = date("Y-m-d", strtotime($i." week", strtotime($inicioSemana)));
- $periodo[] = "Semanal (". date("d/m/Y", strtotime($inicioSemana))." a ". date("d/m/Y", strtotime("next Sunday", strtotime($inicioSemana))).")";
- }
- } elseif($frequencia == "M") {
- $inicioMes = date('Y-m-01');
- $periodo[] = "Mensal (". date("d/m/Y", strtotime($inicioMes))." a ". date("t/m/Y").") - Atual";
- $i = -1;
- while(strtotime($inicioMes) > strtotime($dataInicioPeriodo)) {
- $inicioMes = date("Y-m-01", strtotime($i." month"));
- $periodo[] = "Mensal (". date("d/m/Y", strtotime($inicioMes))." a ". date("t/m/Y", strtotime($inicioMes)).")";
- $i--;
- }
- } else {
- return array("D", $dataInicioPeriodo);
- }
- $select = '';
- $vlSelecionado = $periodoInicialSelecionado."|".$periodoFinalSelecionado;
- $numLimitador = 15;
- foreach ($periodo as $key => $parametros) {
- $periodoExplodido = explode("(", $parametros);
- $periodoInicialExplodido = explode(" ", $periodoExplodido[1]);
- $periodoInicial = $periodoInicialExplodido[0];
- $periodoFinalExplodido = explode(")", $periodoInicialExplodido[2]);
- $periodoFinal = $periodoFinalExplodido[0];
- $chave = $periodoInicial . '|' . $periodoFinal;
- $strSelected = $vlSelecionado != null && $chave == $vlSelecionado ? 'selected=selected' : '';
- $select .= '';
- $numLimitador--;
- if( $numLimitador == 0 ) break;
- }
- return array($frequencia, $select);
- }
+ public static function montarSelectPeriodoAnalise($idTipoControleDesempenho, $idUsuarioAtribuicao = NULL, $periodoInicialSelecionado = NULL, $periodoFinalSelecionado = NULL, $frequenciaAnalise = NULL, $bolOrigemLista = false)
+ {
+ $objMdUtlAdmTpCtrlDesempRN = new MdUtlAdmTpCtrlDesempRN();
+ $objMdUtlAdmTpCtrlDesempDTO = new MdUtlAdmTpCtrlDesempDTO();
+ $objMdUtlAdmTpCtrlDesempDTO->setNumIdMdUtlAdmTpCtrlDesemp($idTipoControleDesempenho);
+ $objMdUtlAdmTpCtrlDesempDTO->retNumIdMdUtlAdmPrmGr();
+ $objMdUtlAdmTpCtrlDesemp = $objMdUtlAdmTpCtrlDesempRN->consultar($objMdUtlAdmTpCtrlDesempDTO);
+
+ $objMdUtlAdmPrmGrRN = new MdUtlAdmPrmGrRN();
+ $objMdUtlAdmPrmGrDTO = new MdUtlAdmPrmGrDTO();
+ $objMdUtlAdmPrmGrDTO->setNumIdMdUtlAdmPrmGr( $objMdUtlAdmTpCtrlDesemp->getNumIdMdUtlAdmPrmGr() );
+ $objMdUtlAdmPrmGrDTO->retStrStaFrequencia();
+ $objMdUtlAdmPrmGrDTO->retNumInicioPeriodo();
+ $objMdUtlAdmPrmGrDTO->retDtaDataCorte();
+ $objMdUtlAdmPrmGr = $objMdUtlAdmPrmGrRN->consultar($objMdUtlAdmPrmGrDTO);
+
+ $objMdUtlAdmPrmGrUsuDTO = new MdUtlAdmPrmGrUsuDTO();
+ $objMdUtlAdmPrmGrUsuRN = new MdUtlAdmPrmGrUsuRN();
+
+ if ( $idUsuarioAtribuicao ) {
+ $objMdUtlAdmPrmGrUsuDTO->setNumIdMdUtlAdmPrmGr($objMdUtlAdmTpCtrlDesemp->getNumIdMdUtlAdmPrmGr());
+ $objMdUtlAdmPrmGrUsuDTO->setNumIdUsuario($idUsuarioAtribuicao);
+ $objMdUtlAdmPrmGrUsuDTO->setNumMaxRegistrosRetorno(1);
+ $objMdUtlAdmPrmGrUsuDTO->retDthInicioParticipacao();
+ $objMdUtlAdmPrmGrUsuDTO = $objMdUtlAdmPrmGrUsuRN->consultar($objMdUtlAdmPrmGrUsuDTO);
+ }
+
+ if( $idUsuarioAtribuicao && !is_null($objMdUtlAdmPrmGrUsuDTO) && !is_null($objMdUtlAdmPrmGrUsuDTO->getDthInicioParticipacao())) {
+ $dataInicioPeriodo = $objMdUtlAdmPrmGrUsuDTO->getDthInicioParticipacao();
+ $dataInicioPeriodo = explode(" ", $dataInicioPeriodo);
+ $dataInicioPeriodo = $dataInicioPeriodo[0];
+ } elseif($objMdUtlAdmPrmGr->getDtaDataCorte()) {
+ $dataInicioPeriodo = $objMdUtlAdmPrmGr->getDtaDataCorte();
+ } else {
+ $dataInicioPeriodo = date("Y-m-d");
+ }
+ $dataInicioPeriodo = implode('-', array_reverse(explode('/', $dataInicioPeriodo)));
+ $periodo = array();
+ if($frequenciaAnalise != NULL) {
+ $frequencia = $frequenciaAnalise;
+ } else {
+ $frequencia = $objMdUtlAdmPrmGr->getStrStaFrequencia();
+ }
+
+ if($frequencia == "S") {
+ $inicioSemana = date('Y-m-d', strtotime("Monday this week"));
+ $strDiaSemanaAtual = InfraData::obterDescricaoDiaSemana(date('d/m/Y'));
+ $diaFinalSemanaAtual = $strDiaSemanaAtual == 'domingo' ? InfraData::getStrDataAtual() : date("d/m/Y", strtotime("next Sunday"));
+ $periodo[] = "Semanal (". date("d/m/Y", strtotime($inicioSemana))." a ". $diaFinalSemanaAtual .") - Atual";
+
+ $arrPeriodoAtual = [ $inicioSemana , date("Y-m-d", strtotime("next Sunday")) ];
+
+ $i = -1;
+ while(strtotime($inicioSemana) > strtotime($dataInicioPeriodo)) {
+ $inicioSemana = date("Y-m-d", strtotime($i." week", strtotime($inicioSemana)));
+ $periodo[] = "Semanal (". date("d/m/Y", strtotime($inicioSemana))." a ". date("d/m/Y", strtotime("next Sunday", strtotime($inicioSemana))).")";
+ }
+ } elseif($frequencia == "M") {
+ $inicioMes = date('Y-m-01');
+ $periodo[] = "Mensal (". date("d/m/Y", strtotime($inicioMes))." a ". date("t/m/Y").") - Atual";
+
+ $arrPeriodoAtual = [ $inicioMes , date("Y-m-t") ];
+
+ $i = -1;
+ while(strtotime($inicioMes) > strtotime($dataInicioPeriodo)) {
+ $inicioMes = date("Y-m-01", strtotime($i." month"));
+ $periodo[] = "Mensal (". date("d/m/Y", strtotime($inicioMes))." a ". date("t/m/Y", strtotime($inicioMes)).")";
+ $i--;
+ }
+ } else {
+ return array("D", $dataInicioPeriodo);
+ }
+ $select = '';
+ $vlSelecionado = $periodoInicialSelecionado."|".$periodoFinalSelecionado;
+ $numLimitador = 15;
+ $arrPeriodosSelecionado = [];
+ foreach ($periodo as $key => $parametros) {
+ $periodoExplodido = explode("(", $parametros);
+ $periodoInicialExplodido = explode(" ", $periodoExplodido[1]);
+ $periodoInicial = $periodoInicialExplodido[0];
+ $periodoFinalExplodido = explode(")", $periodoInicialExplodido[2]);
+ $periodoFinal = $periodoFinalExplodido[0];
+ $chave = $periodoInicial . '|' . $periodoFinal;
+ $strSelected = $vlSelecionado != null && $chave == $vlSelecionado ? 'selected=selected' : '';
+
+ if ( $bolOrigemLista && strpos($parametros,'Atual') ) $strSelected = 'selected=selected';
+
+ $select .= '';
+
+ if (!empty( $strSelected) ) $arrPeriodosSelecionado = ['inicial' => $periodoInicial , 'final' => $periodoFinal];
+
+ $numLimitador--;
+ if( $numLimitador == 0 ) break;
+ }
+
+ return array($frequencia, $select, $arrPeriodosSelecionado , 'periodoAtual' => $arrPeriodoAtual);
+ }
public static function retornaSelectEncaminhamentoAnaliseTriagem()
{
diff --git a/sei/web/modulos/utilidades/int/MdUtlMensagemINT.php b/sei/web/modulos/utilidades/int/MdUtlMensagemINT.php
index f6dda25..e2cd542 100644
--- a/sei/web/modulos/utilidades/int/MdUtlMensagemINT.php
+++ b/sei/web/modulos/utilidades/int/MdUtlMensagemINT.php
@@ -139,17 +139,18 @@ class MdUtlMensagemINT extends InfraINT {
public static $MSG_UTL_124 = 'Usuário não vinculado à Fila ou está Desativado, com isso, o campo que sinaliza a Distribuição automática para o Novo Fluxo do processo foi desmarcado.';
public static $MSG_UTL_125 = 'Antes de Salvar, acione o botão Editar sobre um determinado Ex-Participante e altere as informações.';
public static $MSG_UTL_126 = 'Ao menos um campo precisa estar preenchido para realizar à atualização.';
- public static $MSG_UTL_127 = 'O Tipo de Integração "SOAP" ainda não está disponível nesta versão.';
- public static $MSG_UTL_128 = 'Indique como Dado Restrito a chave de autenticação definida no Header.';
- public static $MSG_UTL_129 = 'O Conteúdo de Autenticação é de preenchimento obrigatório.';
- public static $MSG_UTL_130 = 'Para remover este membro, antes é necessário preencher a Data Fim de Participação';
- public static $MSG_UTL_131 = 'Não é permitido solicitar ajuste de prazo, pois em nenhuma das atividades selecionadas deste processo possuem prazo definido.';
- public static $MSG_UTL_132 = 'Não foi possível distribuir processos para o usuário logado, pois nenhum processo foi encontrado considerando as parametrizações da Distribuição.';
- public static $MSG_UTL_133 = "Erro Interno no Servidor de Resposta\nHá um problema com o recurso que você está procurando e ele não pode ser exibido";
- public static $MSG_UTL_134 = "Falha na execução da consulta no webservice";
- public static $MSG_UTL_135 = "Nenhum recurso correspondente encontrado para determinada solicitação";
- public static $MSG_UTL_136 = 'A Carga Exigível no Período Atual corresponde ao Tempo de Execução exigido pelo usuário logado no Tipo de Controle indicado durante o período atual, abatendo o tempo de ausências formais (afastamentos, licenças e férias) ou o tempo de quando estiver no exercício de Chefia Imediata (inclusive Substituição), caso na Administração do Módulo no SEI esteja ativada a integração com o Sistema de Recursos Humanos.';
- public static $MSG_UTL_137 = 'A Carga Exigível no Período Atual corresponde ao Tempo de Execução exigido pelo Membro Responsável pela @VALOR1@ no Tipo de Controle indicado durante o período atual, abatendo o tempo de ausências formais (afastamentos, licenças e férias) ou o tempo de quando estiver no exercício de Chefia Imediata (inclusive Substituição), caso na Administração do Módulo no SEI esteja ativada a integração com o Sistema de Recursos Humanos.';
+ public static $MSG_UTL_127 = 'O Tipo de Integração "SOAP" ainda não está disponível nesta versão.';
+ public static $MSG_UTL_128 = 'Indique como Dado Restrito a chave de autenticação definida no Header.';
+ public static $MSG_UTL_129 = 'O Conteúdo de Autenticação é de preenchimento obrigatório.';
+ public static $MSG_UTL_130 = 'Para remover este membro, antes é necessário preencher a Data Fim de Participação';
+ public static $MSG_UTL_131 = 'Não é permitido solicitar ajuste de prazo, pois em nenhuma das atividades selecionadas deste processo possuem prazo definido.';
+ public static $MSG_UTL_132 = 'Não foi possível distribuir processos para o usuário logado, pois nenhum processo foi encontrado considerando as parametrizações da Distribuição.';
+ public static $MSG_UTL_133 = "Erro Interno no Servidor de Resposta\nHá um problema com o recurso que você está procurando e ele não pode ser exibido";
+ public static $MSG_UTL_134 = "Falha na execução da consulta no webservice";
+ public static $MSG_UTL_135 = "Nenhum recurso correspondente encontrado para determinada solicitação";
+ public static $MSG_UTL_136 = 'A Carga Exigível no Período Selecionado corresponde ao Tempo de Execução exigido pelo usuário logado no Tipo de Controle indicado durante o período selecionado, abatendo o tempo de ausências formais (afastamentos, licenças e férias) ou o tempo de quando estiver no exercício de Chefia Imediata (inclusive Substituição), caso na Administração do Módulo no SEI esteja ativada a integração com o Sistema de Recursos Humanos.';
+ public static $MSG_UTL_137 = 'A Carga Exigível no Período Selecionado corresponde ao Tempo de Execução exigido pelo Membro Responsável pela @VALOR1@ no Tipo de Controle indicado durante o período selecionado, abatendo o tempo de ausências formais (afastamentos, licenças e férias) ou o tempo de quando estiver no exercício de Chefia Imediata (inclusive Substituição), caso na Administração do Módulo no SEI esteja ativada a integração com o Sistema de Recursos Humanos.';
+ public static $MSG_UTL_138 = "Nenhum Tipo de Controle de Desempenho foi configurado para a Unidade @VALOR1@.\n Antes, o Gestor do Controle de Desempenho necessita realizar as parametrizações na Administração do módulo.";
public static function getMensagem($msg, $arrParams = null){
$isPersonalizada = count(explode('@VALOR', self::$MSG_UTL_10)) > 1;
diff --git a/sei/web/modulos/utilidades/md_utl_analise_cadastro_js.php b/sei/web/modulos/utilidades/md_utl_analise_cadastro_js.php
index c30930a..33a07c7 100644
--- a/sei/web/modulos/utilidades/md_utl_analise_cadastro_js.php
+++ b/sei/web/modulos/utilidades/md_utl_analise_cadastro_js.php
@@ -294,7 +294,7 @@ function RetriagemAnlCorrecao() {
}
function abrirModalRevisao() {
- infraAbrirJanela('=$strLinkIniciarRevisao?>','janelaAjudaVariaveisModelo',1200,600,'location=0,status=1,resizable=1,scrollbars=1',false);
+ infraAbrirJanelaModal('= $strLinkIniciarRevisao ?>',1000,600);
}
function validarSeriesObrigatorias(){
diff --git a/sei/web/modulos/utilidades/md_utl_controle_dsmp_associacao.php b/sei/web/modulos/utilidades/md_utl_controle_dsmp_associacao.php
index 496577f..71de61e 100644
--- a/sei/web/modulos/utilidades/md_utl_controle_dsmp_associacao.php
+++ b/sei/web/modulos/utilidades/md_utl_controle_dsmp_associacao.php
@@ -191,7 +191,7 @@
$arrComandos[] = '';
- $arrComandos[] = '