D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso
/
adm
/
app
/
gre
/
Models
/
Filename :
GreLerIntercorrencia.php
back
Copy
<?php namespace App\gre\Models; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of Intercorrencia * * @copyright (c) year, Carlos Marques - CM */ class GreLerIntercorrencia { private $Resultado; private $Dados; public function lerLanc($DadosId = null) { $this->Dados = (int) $DadosId; $lerLanc = new \App\adms\Models\helper\AdmsRead(); $lerLanc->fullRead("select intercor.*, date_format(intercor.data_email_recebido, '%d/%m/%Y %H:%i:%s') data_retorno, case when intercor.autorizado = 'S' then 'AUTORIZADO' else case when intercor.autorizado = 'N' then 'NÃO AUTORIZADO' else ' ' end end autorizado_m, tipo.nome tipo_nome, resid.nome resid_nome, resid.id resid_id, resid.gre_empr_princ_id, sit.nome nome_sit, cr.cor cor_cr FROM gre_intercorrencia intercor left join gre_tipo_intercorrencia tipo on tipo.id = intercor.gre_tipo_intercorrencia_id join gre_residente resid on resid.id = intercor.gre_residente_id INNER JOIN gre_status_intercor sit ON sit.id=intercor.adms_sit_id INNER JOIN adms_cors cr ON cr.id= sit.adms_cor_id WHERE resid.id = :id order by intercor.created,tipo.id ", "id=". $this->Dados); $this->Resultado= $lerLanc->getResultado(); return $this->Resultado; } }