fix: refs #5919 rollback

This commit is contained in:
Jorge Penadés 2024-04-29 12:04:31 +02:00
parent f6e89c9049
commit be69b5e2c4
1 changed files with 2 additions and 3 deletions

View File

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