Commit c95033c40229eab72d08ad3f509fb226a6f98b59
1 parent
60a0e3f3
Exists in
master
and in
7 other branches
Correção da Primary Key da tabela de hash
Showing
3 changed files
with
31 additions
and
13 deletions
Show diff stats
dto/ReciboTramiteHashDTO.php
| 1 | 1 | <? |
| 2 | 2 | |
| 3 | -require_once dirname(__FILE__).'/../../../SEI.php'; | |
| 3 | +require_once dirname(__FILE__) . '/../../../SEI.php'; | |
| 4 | 4 | |
| 5 | 5 | class ReciboTramiteHashDTO extends InfraDTO { |
| 6 | 6 | |
| 7 | - public function getStrNomeTabela() { | |
| 8 | - return "md_pen_recibo_tramite_hash"; | |
| 9 | - } | |
| 7 | + public function getStrNomeTabela() { | |
| 8 | + return "md_pen_recibo_tramite_hash"; | |
| 9 | + } | |
| 10 | 10 | |
| 11 | - public function montar() { | |
| 12 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'NumeroRegistro', 'numero_registro'); | |
| 13 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdTramite', 'id_tramite'); | |
| 14 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'HashComponenteDigital', 'hash_componente_digital'); | |
| 15 | - $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'TipoRecibo', 'tipo_recibo'); | |
| 16 | - | |
| 17 | - } | |
| 18 | -} | |
| 11 | + public function montar() { | |
| 12 | + $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_DBL, 'IdTramiteHash', 'id_tramite_hash'); | |
| 13 | + $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'NumeroRegistro', 'numero_registro'); | |
| 14 | + $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_NUM, 'IdTramite', 'id_tramite'); | |
| 15 | + $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'HashComponenteDigital', 'hash_componente_digital'); | |
| 16 | + $this->adicionarAtributoTabela(InfraDTO::$PREFIXO_STR, 'TipoRecibo', 'tipo_recibo'); | |
| 17 | + | |
| 18 | + $this->configurarPK('IdTramiteHash', InfraDTO::$TIPO_PK_SEQUENCIAL); | |
| 19 | + } | |
| 19 | 20 | |
| 21 | +} | ... | ... |
rn/PenAtualizadorRN.php
rn/PenAtualizarSeiRN.php
| ... | ... | @@ -907,12 +907,13 @@ class PenAtualizarSeiRN extends PenAtualizadorRN { |
| 907 | 907 | $objMetaBD->criarTabela(array( |
| 908 | 908 | 'tabela' => 'md_pen_recibo_tramite_hash', |
| 909 | 909 | 'cols' => array( |
| 910 | + 'id_tramite_hash'=> array($objMetaBD->tipoNumeroGrande(), PenMetaBD::NNULLO), | |
| 910 | 911 | 'numero_registro'=> array($objMetaBD->tipoTextoFixo(16), PenMetaBD::NNULLO), |
| 911 | 912 | 'id_tramite' => array($objMetaBD->tipoNumeroGrande(), PenMetaBD::NNULLO), |
| 912 | 913 | 'tipo_recibo' => array($objMetaBD->tipoTextoFixo(1), PenMetaBD::NNULLO), |
| 913 | 914 | 'hash_componente_digital ' => array($objMetaBD->tipoTextoVariavel(255), PenMetaBD::NNULLO) |
| 914 | 915 | ), |
| 915 | - // 'pk' => array('numero_registro', 'id_tramite', 'hash_componente_digital', 'tipo_recibo'), | |
| 916 | + 'pk' => array('id_tramite_hash'), | |
| 916 | 917 | 'fks' => array( |
| 917 | 918 | 'md_pen_tramite' => array(array('numero_registro', 'id_tramite'), array('numero_registro', 'id_tramite')) |
| 918 | 919 | ) |
| ... | ... | @@ -922,6 +923,20 @@ class PenAtualizarSeiRN extends PenAtualizadorRN { |
| 922 | 923 | |
| 923 | 924 | $objMetaBD->adicionarColuna('md_pen_recibo_tramite_recebido', 'cadeia_certificado', $this->inicializarObjMetaBanco()->tipoTextoGrande(), PenMetaBD::SNULLO); |
| 924 | 925 | |
| 926 | + $objInfraSequencia = new InfraSequencia($this->getObjInfraIBanco()); | |
| 927 | + | |
| 928 | + if(!$objInfraSequencia->verificarSequencia('md_pen_recibo_tramite_hash')){ | |
| 929 | + | |
| 930 | + $objInfraSequencia->criarSequencia('md_pen_recibo_tramite_hash', '1', '1', '9999999999'); | |
| 931 | + } | |
| 925 | 932 | } |
| 933 | + | |
| 934 | + /* protected function instalarV008R004S006WI001(){ | |
| 935 | + $objMetaBD = $this->inicializarObjMetaBanco(); | |
| 936 | + | |
| 937 | + $objMetaBD->alterarColuna('md_pen_recibo_tramite', 'dth_recebimento', 'VARCHAR(60)', PenMetaBD::NNULLO); | |
| 938 | + $objMetaBD->alterarColuna('md_pen_recibo_tramite_enviado', 'dth_recebimento', 'VARCHAR(60)', PenMetaBD::NNULLO); | |
| 939 | + $objMetaBD->alterarColuna('md_pen_recibo_tramite_recebido', 'dth_recebimento', 'VARCHAR(60)', PenMetaBD::NNULLO); | |
| 940 | + } */ | |
| 926 | 941 | |
| 927 | 942 | } |
| 928 | 943 | \ No newline at end of file | ... | ... |