|
@ -20,7 +20,7 @@ async function reportList(ctx) { |
|
|
WITH RECURSIVE sub_departments AS ( |
|
|
WITH RECURSIVE sub_departments AS ( |
|
|
SELECT id, dependence |
|
|
SELECT id, dependence |
|
|
FROM department |
|
|
FROM department |
|
|
WHERE id = 1 |
|
|
WHERE id = ${userInfo.departmentId} |
|
|
UNION ALL |
|
|
UNION ALL |
|
|
SELECT d.id, d.dependence |
|
|
SELECT d.id, d.dependence |
|
|
FROM sub_departments sd |
|
|
FROM sub_departments sd |
|
|