Skip to content

Commit

Permalink
Merge pull request #699 from portabilis/portabilis-patch-2019-02-22
Browse files Browse the repository at this point in the history
Portabilis patch 22/02/2019
  • Loading branch information
edersoares authored Mar 2, 2020
2 parents b8beefb + 2b8133f commit 7097b4b
Show file tree
Hide file tree
Showing 16 changed files with 366 additions and 177 deletions.
10 changes: 5 additions & 5 deletions app/Repositories/EducacensoRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public function getDataForRecord00($school, $year)
FROM pmieducar.ano_letivo_modulo
WHERE ano_letivo_modulo.ref_ano = :year AND ano_letivo_modulo.ref_ref_cod_escola = e.cod_escola) AS "fimAnoLetivo",
j.fantasia AS nome,
COALESCE(ep.cep, ee.cep) AS cep,
ep.cep AS cep,
municipio.cod_ibge AS "codigoIbgeMunicipio",
distrito.cod_ibge AS "codigoIbgeDistrito",
COALESCE(l.idtlog || l.nome, ee.idtlog || ee.logradouro) AS logradouro,
COALESCE(ep.numero, ee.numero) AS numero,
COALESCE(ep.complemento, ee.complemento) AS complemento,
COALESCE(bairro.nome, ee.bairro) AS bairro,
l.idtlog || l.nome AS logradouro,
ep.numero AS numero,
ep.complemento AS complemento,
bairro.nome AS bairro,
(SELECT COALESCE(
(SELECT min(fone_pessoa.ddd)
FROM cadastro.fone_pessoa
Expand Down
2 changes: 1 addition & 1 deletion app/Services/Educacenso/ImportService.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ private function importLine($line, $user)
$lineId = $this->getLineId($line);

$class = $this->getRegistroById($lineId);
$line = str_replace("\r\n", '', utf8_decode($line));
$line = preg_replace( "/\r|\n/", '', utf8_decode($line));
$arrayColumns = explode(self::DELIMITER, $line);

if (!$class) {
Expand Down
10 changes: 5 additions & 5 deletions app/Services/Educacenso/Version2019/Registro10Import.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,18 @@ public function import(RegistroEducacenso $model, $year, $user)
$school->qtd_secretario_escolar = $model->qtdSecretarioEscolar ?: null;
$school->qtd_segurancas = $model->qtdSegurancas ?: null;
$school->qtd_tecnicos = $model->qtdTecnicos ?: null;
$school->alimentacao_escolar_alunos = $model->alimentacaoEscolarAlunos;
$school->alimentacao_escolar_alunos = $model->alimentacaoEscolarAlunos ?: null;
$school->organizacao_ensino = $this->getArrayOrganizacaoEnsino();
$school->instrumentos_pedagogicos = $this->getArrayInstrumentosPedagogicos();
$school->educacao_indigena = $model->educacaoIndigena;
$school->educacao_indigena = $model->educacaoIndigena ?: null;
$school->lingua_ministrada = $model->linguaIndigena ? LinguaMinistrada::INDIGENA : LinguaMinistrada::PORTUGUESA;
$school->codigo_lingua_indigena = $this->getArrayLinguaIndigena();
$school->exame_selecao_ingresso = $model->exameSelecaoIngresso;
$school->exame_selecao_ingresso = $model->exameSelecaoIngresso ?: null;
$school->reserva_vagas_cotas = $this->getArrayReservaVagas();
$school->predio_compartilhado_outra_escola = $model->predioCompartilhadoOutraEscola ?: null;
$school->usa_espacos_equipamentos_atividades_regulares = $model->usaEspacosEquipamentosAtividadesRegulares;
$school->usa_espacos_equipamentos_atividades_regulares = $model->usaEspacosEquipamentosAtividadesRegulares ?: null;
$school->orgaos_colegiados = $this->getArrayOrgaosColegiados();
$school->projeto_politico_pedagogico = $model->projetoPoliticoPedagogico;
$school->projeto_politico_pedagogico = $model->projetoPoliticoPedagogico ?: null;

$school->save();
}
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Software livre de gestão escolar",
"type": "project",
"license": "GPL-2.0-or-later",
"version": "2.2.19",
"version": "2.2.20",
"keywords": [
"Portabilis",
"i-Educar"
Expand Down Expand Up @@ -62,7 +62,8 @@
],
"psr-4": {
"App\\": "app/",
"iEducar\\": "src"
"iEducar\\": "src",
"iEducar\\Packages\\Reports\\": "ieducar/modules/Reports/src"
}
},
"autoload-dev": {
Expand Down
Loading

0 comments on commit 7097b4b

Please sign in to comment.