Loading...
Loading...
Ziniao Department Management: Query, create, modify, delete, and sort departments. Used when users need to view the organizational structure, create/modify/delete departments, or adjust department sorting.
npx skill4agent add ziniao-open/skills ziniao-department../ziniao-shared/SKILL.md--treeziniao-cli department list --tree├── 技术部 (id: 15868464646076)
│ ├── 前端组 (id: 15954943062431)
│ └── 后端组 (id: 15954943062432)
└── 市场部 (id: 15868464646077)hierarchy# Create a sub-department under an existing department (parentId must be an existing department ID, passing 0 is not supported)
ziniao-cli department create --name "华东区" --parent-id 15868464646076⚠cannot be set to 0; it must be an existing parent department ID. To query available parent department IDs, execute--parent-idfirst.department list --tree
high-risk-writeziniao-cli department list --tree # Check sub-departments
ziniao-cli staff list --department-id xxx # Check for employees
ziniao-cli department delete --id xxx # Execute deletion (confirmation required)| Command | Description | Detailed Documentation |
|---|---|---|
| Query department list | |
| Add new department | |
| Modify department | Only send modified fields: |
| Delete department (sub-departments and employee affiliations will be cleared) | |
| Adjust sorting | |
ziniao-cli api /superbrowser/rest/v1/erp/department/list
ziniao-cli api /superbrowser/rest/v1/erp/department/add --data '{"name":"xxx","parentId":"<父部门ID>","hierarchy":"0"}'
ziniao-cli api /superbrowser/rest/v1/erp/department/update --data '{"id":"xxx","name":"新名"}'
ziniao-cli api /superbrowser/rest/v1/erp/department/delete --data '{"id":"xxx"}'
ziniao-cli api /superbrowser/rest/v1/erp/department/order --data '{"parentId":"xxx","order":["id1","id2"]}'