codex/Bisverwendung_model:

- added getVerwendungen method
person/Benutzer_model
- added comment
person/Benutzerfunktion_model
- added getBenutzerFunktionByUid method
ressource/Mitarbeiter_model
- added getVorgesetzte method
- extended getPersonal method
This commit is contained in:
alex
2020-06-22 11:20:27 +02:00
parent 32490dfc2d
commit 5b264bb6a9
4 changed files with 101 additions and 8 deletions
@@ -41,4 +41,35 @@ class Bisverwendung_model extends DB_Model
return $this->loadWhere($condition);
}
/**
* Gets Verwendungen of the user, optionally in a time span.
* @param string $uid
* @param string $beginn
* @param string $ende
* @return array
*/
public function getVerwendungen($uid, $beginn = null, $ende = null)
{
$params = array($uid);
$qry = 'SELECT * FROM bis.tbl_bisverwendung
WHERE mitarbeiter_uid = ?';
if (isset($beginn))
{
$qry .= ' AND ( ende >= ? OR ende IS NULL )';
$params[] = $beginn;
}
if (isset($ende))
{
$qry .= ' AND ( beginn <= ? OR beginn IS NULL )';
$params[] = $ende;
}
$qry .= 'ORDER BY beginn';
return $this->execQuery($qry, $params);
}
}