This commit is contained in:
parent
f75362a6d7
commit
d47429b4a7
|
@ -43,11 +43,13 @@ module.exports = Self => {
|
|||
const stmt = new ParameterizedSQL(`
|
||||
SELECT *
|
||||
FROM(
|
||||
SELECT DISTINCT w.id, w.code, u.name, u.nickname, u.active, b.departmentFk
|
||||
SELECT w.id, w.code, u.name, u.nickname, u.active, b.departmentFk
|
||||
FROM worker w
|
||||
JOIN account.user u ON u.id = w.id
|
||||
LEFT JOIN business b ON b.workerFk = w.id
|
||||
) w`);
|
||||
ORDER BY b.id DESC
|
||||
) w
|
||||
GROUP BY w.id`);
|
||||
|
||||
stmt.merge(conn.makeSuffix(filter));
|
||||
return conn.executeStmt(stmt);
|
||||
|
|
Loading…
Reference in New Issue