23 lines
533 B
SQL
23 lines
533 B
SQL
DELIMITER $$
|
|
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `vn`.`timeControl_calculateByUser`(vUserFk INT, vDatedFrom DATETIME, vDatedTo DATETIME)
|
|
BEGIN
|
|
|
|
/**
|
|
* @param vUserFk
|
|
* @param vDatedFrom workerTimeControl
|
|
* @param vDatedTo workerTimeControl
|
|
*/
|
|
|
|
DROP TEMPORARY TABLE IF EXISTS tmp.`user`;
|
|
|
|
CREATE TEMPORARY TABLE tmp.`user`
|
|
SELECT id userFk
|
|
FROM account.user
|
|
WHERE id = vUserFk;
|
|
CALL vn.timeControl_calculate(vDatedFrom, vDatedTo);
|
|
|
|
DROP TEMPORARY TABLE tmp.`user`;
|
|
|
|
END$$
|
|
DELIMITER ;
|