mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
added time recording query
This commit is contained in:
@@ -21,4 +21,26 @@ class Zeitaufzeichnung_model extends DB_Model
|
||||
|
||||
return $this->execQuery($qry);
|
||||
}
|
||||
|
||||
public function getFullInterval($uid, $fromDate, $toDate)
|
||||
{
|
||||
$qry = <<<EOL
|
||||
SELECT d.dates, z.*
|
||||
FROM
|
||||
(SELECT
|
||||
*, to_char ((ende-start),'HH24:MI') as diff,
|
||||
(SELECT (to_char(sum(ende-start),'DD')::integer)*24+to_char(sum(ende-start),'HH24')::integer || ':' || to_char(sum(ende-start),'MI')
|
||||
FROM campus.tbl_zeitaufzeichnung
|
||||
WHERE uid=? and start between ? AND ?) as summe
|
||||
FROM campus.tbl_zeitaufzeichnung
|
||||
WHERE uid=? AND (aktivitaet_kurzbz != 'DienstreiseMT' or aktivitaet_kurzbz is null) AND start between ? AND ?) as z
|
||||
|
||||
RIGHT JOIN (select generate_series ( ?::timestamp , ?::timestamp , '1 day'::interval) :: date as dates) d on date(z.ende) = d.dates
|
||||
|
||||
ORDER BY d.dates desc, z.start desc
|
||||
EOL;
|
||||
|
||||
|
||||
return $this->execQuery($qry, array($uid, $fromDate, $toDate, $uid, $fromDate, $toDate, $fromDate, $toDate));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24035,6 +24035,26 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'personalverwaltung',
|
||||
'category' => 'zeitaufzeichnung',
|
||||
'phrase' => 'id',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'ID',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'ID',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
// Personalverwaltung end
|
||||
array(
|
||||
'app' => 'core',
|
||||
|
||||
Reference in New Issue
Block a user