-- 更设置父级部门到公司
update sys.department set parent_id =501 where parent_id = 0
-- 设置部门的id序号
SELECT setval('sys.department_id_seq', 1000);
-- 关联职员表更新职员id
update user_department
set employee_id = employee.id
from employee
where employee.user_id = user_department.user_id;