ProcessoExpedidoDTO.php
2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
require_once dirname(__FILE__).'/../../../SEI.php';
/**
* @author Join Tecnologia
*/
class ProcessoExpedidoDTO extends InfraDTO {
public function __construct($bolComposto = false) {
// Força o JOIN com todas as tabelas
parent::__construct(true);
}
public function getStrNomeTabela() {
return 'protocolo';
}
public function montar() {
// Protocolo
$this->adicionarAtributoTabela(InfraDTO::$PREFIXO_DBL, 'IdProtocolo', 'id_protocolo');
$this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'StaEstado', 'sta_estado');
$this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'ProtocoloFormatado', 'protocolo_formatado');
// Atividade
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM, 'IdAtividade', 'id_atividade', 'atividade');
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM, 'Tarefa', 'id_tarefa', 'atividade');
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_DTH, 'Expedido', 'dth_conclusao', 'atividade');
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_NUM, 'IdUsuario', 'id_usuario_origem', 'atividade');
// Usuário
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'NomeUsuario', 'nome', 'usuario');
// Atributo Andamento
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'Destino', 'valor', 'atributo_andamento');
$this->adicionarAtributoTabelaRelacionada(InfraDTO::$PREFIXO_STR, 'AtribNome', 'nome', 'atributo_andamento');
$this->setStrAtribNome('UNIDADE_DESTINO');
$this->configurarFK('IdProtocolo', 'atividade', 'id_protocolo');
$this->configurarFK('IdUsuario', 'usuario', 'id_usuario');
$this->configurarFK('IdAtividade', 'atributo_andamento', 'id_atividade');
//$this->setStrStaEstado(ProtocoloRN::$TE_PROCEDIMENTO_BLOQUEADO);
//$this->setNumTarefa(ProcessoEletronicoRN::obterIdTarefaModulo(ProcessoEletronicoRN::$TI_PROCESSO_ELETRONICO_PROCESSO_EXPEDIDO));
$this->setOrd('Expedido', InfraDTO::$TIPO_ORDENACAO_DESC);
}
}