Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adicionar estrutura base para funcionamento do composer no módulo #583

Open
wants to merge 18 commits into
base: release/3.7.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ install: check-isalive
$(CMD_COMPOSE_FUNC) exec org1-http chown -R root:root /etc/cron.d/
$(CMD_COMPOSE_FUNC) exec org1-http chmod 0644 /etc/cron.d/sei
$(CMD_COMPOSE_FUNC) exec org1-http chmod 0644 /etc/cron.d/sip
$(CMD_COMPOSE_FUNC) exec -w /opt/sei/web/modulos/pen org1-http bash -c './composer.phar install --no-dev'
$(CMD_COMPOSE_FUNC) exec -w /opt/sei/web/modulos/pen org2-http bash -c './composer.phar install --no-dev'
$(CMD_COMPOSE_FUNC) exec -w /opt/sei/scripts/$(MODULO_PASTAS_CONFIG) org1-http bash -c "$(CMD_INSTALACAO_SEI_MODULO)"
$(CMD_COMPOSE_FUNC) exec -w /opt/sip/scripts/$(MODULO_PASTAS_CONFIG) org1-http bash -c "$(CMD_INSTALACAO_SIP_MODULO)"

Expand All @@ -154,9 +156,6 @@ install: check-isalive
$(CMD_COMPOSE_FUNC) exec -w /opt/sei/scripts/$(MODULO_PASTAS_CONFIG) org2-http bash -c "$(CMD_INSTALACAO_SEI_MODULO)"
$(CMD_COMPOSE_FUNC) exec -w /opt/sip/scripts/$(MODULO_PASTAS_CONFIG) org2-http bash -c "$(CMD_INSTALACAO_SIP_MODULO)"

@if [ -e tests_$(sistema)/funcional/assets/config/ConfiguracaoModPEN.php ]; then rm tests_$(sistema)/funcional/assets/config/ConfiguracaoModPEN.php; fi;
@cp tests_$(sistema)/funcional/assets/config/ConfiguracaoModPEN.exemplo.php tests_$(sistema)/funcional/assets/config/ConfiguracaoModPEN.php
@echo "\nArquivo 'ConfiguracaoModPEN.php' restaurado conforme 'ConfiguracaoModPEN.exemplo.php'.\n";

wget -nc -i $(PEN_TEST_FUNC)/assets/arquivos/test_files_index.txt -P $(PEN_TEST_FUNC)/.tmp
cp $(PEN_TEST_FUNC)/.tmp/* /tmp
Expand Down
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
"Tests\\": "sei/"
}
},

"require": {
"guzzlehttp/guzzle": "^7.0"
},

"require-dev": {
"php": "7.3.12",
"phpunit/phpunit": "*",
Expand Down
Empty file added src/composer.json
Empty file.
Empty file added src/composer.phar
Empty file.
4 changes: 2 additions & 2 deletions src/int/ProcessoEletronicoINT.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ public static function formatarHierarquia($ObjEstrutura)

if(isset($ObjEstrutura->hierarquia)) {

$arrObjNivel = $ObjEstrutura->hierarquia->nivel;
$arrObjNivel = $ObjEstrutura->hierarquia;

$siglasUnidades = array();
$siglasUnidades[] = $ObjEstrutura->sigla;

foreach($arrObjNivel as $key => $objNivel){
$siglasUnidades[] = $objNivel->sigla ;
$siglasUnidades[] = $objNivel->sigla;
}

for($i = 1; $i <= 3; $i++){
Expand Down
4 changes: 2 additions & 2 deletions src/rn/EnviarReciboTramiteRN.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ private function obterDataRecebimentoComponentesDigitais($parObjTramite){
}

foreach ($parObjTramite->historico->operacao as $operacao) {
if($operacao->situacao == ProcessoEletronicoRN::$STA_SITUACAO_TRAMITE_COMPONENTES_RECEBIDOS_DESTINATARIO) {
mrglaydson marked this conversation as resolved.
Show resolved Hide resolved
return ProcessoEletronicoRN::converterDataSEI($operacao->dataHora);
if($operacao['situacao'] == ProcessoEletronicoRN::$STA_SITUACAO_TRAMITE_COMPONENTES_RECEBIDOS_DESTINATARIO) {
return ProcessoEletronicoRN::converterDataSEI($operacao['dataHora']);
}
}

Expand Down
670 changes: 458 additions & 212 deletions src/rn/ExpedirProcedimentoRN.php

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions src/rn/PENAgendamentoRN.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ protected function atualizarHipotesesLegaisControlado()
$hipotesesPenDesativadas = $processoEletronicoRN->consultarHipotesesLegais(false);

$hipoteses = array();
if (!empty($hipotesesPen) && !empty($hipotesesPen->hipotesesLegais) && !empty($hipotesesPen->hipotesesLegais->hipotese)) {
$hipoteses = $hipotesesPen->hipotesesLegais->hipotese;
if (!empty($hipotesesPen) && !empty($hipotesesPen['hipotesesLegais'])) {
$hipoteses = $hipotesesPen['hipotesesLegais'];
}

if (!empty($hipotesesPenDesativadas) && !empty($hipotesesPenDesativadas->hipotesesLegais) && !empty($hipotesesPenDesativadas->hipotesesLegais->hipotese)) {
$hipoteses = array_merge($hipoteses, $hipotesesPenDesativadas->hipotesesLegais->hipotese);
if (!empty($hipotesesPenDesativadas) && !empty($hipotesesPenDesativadas['hipotesesLegais'])) {
$hipoteses = array_merge($hipoteses, $hipotesesPenDesativadas['hipotesesLegais']);
}

if(empty($hipoteses)){
Expand All @@ -38,20 +38,20 @@ protected function atualizarHipotesesLegaisControlado()
foreach ($hipoteses as $hipotese) {

$objDTO = new PenHipoteseLegalDTO();
$objDTO->setNumIdentificacao($hipotese->identificacao);
$objDTO->setNumIdentificacao($hipotese['identificacao']);
$objDTO->setNumMaxRegistrosRetorno(1);
$objDTO->retStrNome();
$objDTO->retNumIdHipoteseLegal();
$objConsulta = $objBD->consultar($objDTO);

//Caso não haja um nome para a hipótese legal, ele pula para a próxima.
if (empty($hipotese->nome)) {
if (empty($hipotese['nome'])) {
continue;
}

$objDTO->setStrNome(utf8_decode($hipotese->nome));
$objDTO->setStrNome(utf8_decode($hipotese['nome']));

if ($hipotese->status) {
if ($hipotese['status']) {
$objDTO->setStrAtivo('S');
} else {
$objDTO->setStrAtivo('N');
Expand Down
Loading
Loading