Files
2026-10-20 21:53:26 +08:00

42 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 6.6 岗位管理
:::tip 概述
岗位模块(goframe_position,租户级表)管理用户岗位属性:标准 CRUD + 状态切换 + 引用统计。与职级模块同构(同为用户属性维护模块)。
:::
## 接口清单
```text
七件套 + PUT /api/position/status(sys:position:status)
sys:position:{page|list|detail|add|update|delete|batchDelete|status}
```
## 模块特征
| 特征 | 实现 |
|------|------|
| 状态切换 | status(1-正常 2-禁用,字典驱动 {field}Text) |
| 引用统计 | fillUserCount:按 position_id 统计引用用户数 |
| 唯一性 | 租户内名称唯一(uk_tenant_name);未声明预检,1062 兜底 |
| 租户级 | 各租户独立维护 |
## 与其他模块的关系
```text
user.position_id → position.id 用户归属岗位(用户表单岗位选择)
fillUserCount 列表展示 user_count(该岗位下用户数)
```
## 与职级模块的差异
| 维度 | 岗位 position | 职级 level |
|------|--------------|-----------|
| 导入导出 | 无 | 有(import/export) |
| 其余 | 同构(CRUD + status + 引用统计) | 同构 |
## 管理建议
+ 岗位与职级的分工:岗位偏"职责"(如前端工程师),职级偏"层级"(如 P7)
+ 删除前查 user_count 引用;有引用先调整用户岗位
+ 岗位编码/名称变更即时生效(无缓存层,用户展示经 userExpandNames 批查回填)