diff --git a/modules/worker/back/methods/worker/mySubordinates.js b/modules/worker/back/methods/worker/mySubordinates.js index b6711e382..540bb8551 100644 --- a/modules/worker/back/methods/worker/mySubordinates.js +++ b/modules/worker/back/methods/worker/mySubordinates.js @@ -30,13 +30,12 @@ module.exports = Self => { if (typeof options == 'object') Object.assign(myOptions, options); - stmts.push(new ParameterizedSQL('CALL vn.subordinateGetList(?)', [userId])); - const queryIndex = stmts.push('SELECT * FROM tmp.subordinate') - 1; - stmts.push('DROP TEMPORARY TABLE tmp.subordinate'); + stmts.push(new ParameterizedSQL('CALL vn.worker_getHierarchy(?)', [userId])); + const queryIndex = stmts.push('SELECT * FROM tmp.workerHierarchyList') - 1; + stmts.push('DROP TEMPORARY TABLE tmp.workerHierarchyList'); const sql = ParameterizedSQL.join(stmts, ';'); const result = await conn.executeStmt(sql, myOptions); - return result[queryIndex]; }; };