refs #5919 fix locker
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Carlos Satorres 2023-12-28 16:40:13 +01:00
parent f35b2a4905
commit 6ceee45b13
2 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,9 @@
ALTER TABLE vn.worker MODIFY COLUMN locker varchar(10) DEFAULT NULL NULL;
-- Eliminar locker
ALTER TABLE `vn`.`worker` DROP COLUMN `locker`;
CREATE TABLE `vn`.`locker` (
`id` int(100),
`code` varchar(10) DEFAULT NULL,
`gender` varchar(255) DEFAULT NULL,
`workerFk` int(10) unsigned DEFAULT NULL,

View File

@ -117,14 +117,15 @@ module.exports = Self => {
stmt = new ParameterizedSQL(
`SELECT w.id, u.email, p.extension, u.name as userName,
d.name AS department, w.lastName, u.nickname, mu.email
d.name AS department, w.lastName, u.nickname, mu.email, lc.code
FROM worker w
LEFT JOIN workerDepartment wd ON wd.workerFk = w.id
LEFT JOIN department d ON d.id = wd.departmentFk
LEFT JOIN client c ON c.id = w.id
LEFT JOIN account.user u ON u.id = w.id
LEFT JOIN pbx.sip p ON p.user_id = u.id
LEFT JOIN account.emailUser mu ON mu.userFk = u.id`
LEFT JOIN account.emailUser mu ON mu.userFk = u.id
LEFT JOIN locker lc ON lc.workerFk = w.id`
);
stmt.merge(conn.makeSuffix(filter));