-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suporte a Multiorgaos na instalação * Instalacao Muliorgaos habilitada no envlocal.env, basta preencher os parametros que sobe ja com muiltiorgao * Corrigindo bug 74, quando multiorgaos instalador gerava erro ao rodar novamente * Ajuste na versão e mensagem na rotina de testes de infra
- Loading branch information
1 parent
c47b751
commit 7cc603d
Showing
9 changed files
with
134 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
containers/app/app-ci/assets/scripts-e-automatizadores/misc/cadastrarMultiorgao.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
|
||
/* | ||
cadastra multiorgaos | ||
*/ | ||
|
||
require_once '/opt/sip/web/Sip.php'; | ||
|
||
SessaoSip::getInstance(false); | ||
InfraDebug::getInstance()->setBolLigado(true); | ||
InfraDebug::getInstance()->setBolDebugInfra(false); | ||
InfraDebug::getInstance()->setBolEcho(true); | ||
|
||
$conexao = BancoSip::getInstance(); | ||
|
||
$siglas = getenv('APP_ORGAOS_ADICIONAIS_SIGLA'); | ||
$nomes = getenv('APP_ORGAOS_ADICIONAIS_NOME'); | ||
|
||
|
||
if( $siglas == "" || $nomes == "" ){ | ||
|
||
echo "Siglas ou Nomes dos Orgaos nao informados completamente, pulando etapa de configuracao multiorgaos"; | ||
echo ""; | ||
exit(0); | ||
|
||
} | ||
|
||
$arrSiglas = explode("/", $siglas); | ||
$arrNomes = explode("/", $nomes); | ||
|
||
if( count($arrSiglas) != count($arrNomes) ){ | ||
|
||
echo "Siglas ou Nomes dos Orgaos nao informados corretamente. Erro na correlacao de sigla/nome."; | ||
echo ""; | ||
echo "Pulando etapa de configuracao de multiorgaos"; | ||
echo ""; | ||
exit(0); | ||
|
||
} | ||
|
||
for ($i=0; $i < count($arrSiglas) ; $i++) { | ||
|
||
$sigla = $arrSiglas[$i]; | ||
$nome = $arrNomes[$i]; | ||
$ordem = $i + 1; | ||
|
||
echo $sigla; | ||
echo $nome; | ||
|
||
$objOrgaoDTO = new OrgaoDTO(); | ||
$objOrgaoDTO->setNumIdOrgao(null); | ||
$objOrgaoDTO->setStrSigla($sigla); | ||
$objOrgaoDTO->setStrDescricao($nome); | ||
$objOrgaoDTO->setNumOrdem($ordem); | ||
|
||
$objOrgaoDTO->setStrSinAutenticar('N'); | ||
$objOrgaoDTO->setStrSinAtivo('S'); | ||
|
||
$arrObjRelOrgaoAutenticacaoDTO = array(); | ||
$objOrgaoDTO->setArrObjRelOrgaoAutenticacaoDTO($arrObjRelOrgaoAutenticacaoDTO); | ||
|
||
$objOrgaoRN = new OrgaoRN(); | ||
$objOrgaoDTO = $objOrgaoRN->cadastrar($objOrgaoDTO); | ||
|
||
echo "Criacao do orgao $sigla feita com sucesso\n"; | ||
|
||
} | ||
|
||
|
||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters