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 | class ReciboTramiteHashDTO extends InfraDTO { | 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
| @@ -14,6 +14,7 @@ abstract class PenAtualizadorRN extends InfraRN { | @@ -14,6 +14,7 @@ abstract class PenAtualizadorRN extends InfraRN { | ||
| 14 | const VER_005 = '0.0.5'; | 14 | const VER_005 = '0.0.5'; |
| 15 | const VER_006 = '0.0.6'; | 15 | const VER_006 = '0.0.6'; |
| 16 | const VER_007 = '0.0.7'; | 16 | const VER_007 = '0.0.7'; |
| 17 | + // const VER_008 = '0.0.8'; | ||
| 17 | 18 | ||
| 18 | protected $sei_versao; | 19 | protected $sei_versao; |
| 19 | 20 |
rn/PenAtualizarSeiRN.php
| @@ -907,12 +907,13 @@ class PenAtualizarSeiRN extends PenAtualizadorRN { | @@ -907,12 +907,13 @@ class PenAtualizarSeiRN extends PenAtualizadorRN { | ||
| 907 | $objMetaBD->criarTabela(array( | 907 | $objMetaBD->criarTabela(array( |
| 908 | 'tabela' => 'md_pen_recibo_tramite_hash', | 908 | 'tabela' => 'md_pen_recibo_tramite_hash', |
| 909 | 'cols' => array( | 909 | 'cols' => array( |
| 910 | + 'id_tramite_hash'=> array($objMetaBD->tipoNumeroGrande(), PenMetaBD::NNULLO), | ||
| 910 | 'numero_registro'=> array($objMetaBD->tipoTextoFixo(16), PenMetaBD::NNULLO), | 911 | 'numero_registro'=> array($objMetaBD->tipoTextoFixo(16), PenMetaBD::NNULLO), |
| 911 | 'id_tramite' => array($objMetaBD->tipoNumeroGrande(), PenMetaBD::NNULLO), | 912 | 'id_tramite' => array($objMetaBD->tipoNumeroGrande(), PenMetaBD::NNULLO), |
| 912 | 'tipo_recibo' => array($objMetaBD->tipoTextoFixo(1), PenMetaBD::NNULLO), | 913 | 'tipo_recibo' => array($objMetaBD->tipoTextoFixo(1), PenMetaBD::NNULLO), |
| 913 | 'hash_componente_digital ' => array($objMetaBD->tipoTextoVariavel(255), PenMetaBD::NNULLO) | 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 | 'fks' => array( | 917 | 'fks' => array( |
| 917 | 'md_pen_tramite' => array(array('numero_registro', 'id_tramite'), array('numero_registro', 'id_tramite')) | 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,6 +923,20 @@ class PenAtualizarSeiRN extends PenAtualizadorRN { | ||
| 922 | 923 | ||
| 923 | $objMetaBD->adicionarColuna('md_pen_recibo_tramite_recebido', 'cadeia_certificado', $this->inicializarObjMetaBanco()->tipoTextoGrande(), PenMetaBD::SNULLO); | 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 | \ No newline at end of file | 943 | \ No newline at end of file |