Skip to content

Commit

Permalink
Merge pull request #568 from alecostaweb/issue_567
Browse files Browse the repository at this point in the history
Listar histórico funcional
  • Loading branch information
masakik authored Aug 29, 2024
2 parents bf06dc5 + 0bfd922 commit aac7e50
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
5 changes: 5 additions & 0 deletions resources/queries/Pessoa.listarHistoricoFuncional.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SELECT R.* FROM RESUSERVHISTFUNCIONAL R
WHERE R.codpes = CONVERT(int, :codpes)
AND R.dtafimsitfun IS NOT NULL
ORDER BY R.dtainisitfun

17 changes: 17 additions & 0 deletions src/Pessoa.php
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,23 @@ public static function listarTitulacoes(int $codpes)
return DB::fetchAll($query, $param);
}

/**
* Método para retornar a lista do histórico funcional de uma pessoa
*
* Somente os já encerrados dentro da unidade
*
* @param Integer $codpes
* @return Array
*
* @author Alessandro Costa de Oliveira, em 04/06/2024
*/
public static function listarHistoricoFuncional(int $codpes)
{
$query = DB::getQuery('Pessoa.listarHistoricoFuncional.sql');
$param = ['codpes' => $codpes];
return DB::fetchAll($query, $param);
}

/********** INÍCIO - Métodos deprecados que devem ser eliminados numa futura major release ***********/

/**
Expand Down

0 comments on commit aac7e50

Please sign in to comment.