2024-08-20 08:06:10 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn`@`localhost`
|
2024-01-15 11:31:03 +00:00
|
|
|
SQL SECURITY DEFINER
|
|
|
|
VIEW `vn`.`workerTimeJourneyNG`
|
|
|
|
AS SELECT `wtc`.`userFk` AS `userFk`,
|
|
|
|
cast(`wtc`.`timed` AS date) AS `dated`,
|
|
|
|
IF(`wtc`.`order` MOD 2, -1, 1) * (HOUR(`wtc`.`timed`) + MINUTE(`wtc`.`timed`) / 60) AS `Journey`,
|
|
|
|
dayname(`wtc`.`timed`) AS `dayName`,
|
|
|
|
`w`.`lastName` AS `name`,
|
|
|
|
`w`.`firstName` AS `firstname`
|
|
|
|
FROM (
|
|
|
|
`vn`.`workerTimeControl` `wtc`
|
|
|
|
JOIN `vn`.`worker` `w` ON(`w`.`id` = `wtc`.`userFk`)
|
|
|
|
)
|