feat(mcp): add agent.user.list.query for agent-role user listing
查询 m0.user 中 enterprise_type=1 的代理角色用户,返回所属权限组、 dept_user 部门岗位明细与当前站点;行级权限复用 visibleAgentIds (总部全量/代理商自己+直属下级+代管),mobile 原样不脱敏, idcard/password/openid 不进白名单,不返回位置字段。 设计:doc/agent-user-list-mcp-tool-design.md(2026-10-13 王恒拍板)
This commit is contained in:
@@ -846,7 +846,7 @@
|
||||
|
||||
---
|
||||
|
||||
## 33. district.paper.percapita.query
|
||||
## 34. district.paper.percapita.query
|
||||
|
||||
查询站点人均用纸统计,覆盖老 `StatisticsReportController` 的五个接口。
|
||||
|
||||
@@ -869,7 +869,7 @@
|
||||
|
||||
---
|
||||
|
||||
## 34. district.paper.device_average.query
|
||||
## 35. district.paper.device_average.query
|
||||
|
||||
查询站点设备日均用纸统计,覆盖老 `StatisticsReportController` 的五个硬件统计接口。
|
||||
|
||||
@@ -911,7 +911,7 @@
|
||||
|
||||
---
|
||||
|
||||
## 35. hardware.device.lifecycle.query
|
||||
## 36. hardware.device.lifecycle.query
|
||||
|
||||
按 SN 查询设备生命周期当前状态,复刻老系统 `/lifeCycle/lifeCycleListByPage`。
|
||||
完整设计见 [device-lifecycle-mcp-tool-design.md](device-lifecycle-mcp-tool-design.md)。
|
||||
@@ -928,7 +928,7 @@
|
||||
- roadState/inventoryState 含 `-1=初始化`;未知枚举值返回 `未知(code)`,不抛错。
|
||||
- 与老系统差异:不做任何行/字段权限过滤;不复制老系统 `exchange_state∈(0,1)` 的排除,全状态可见。
|
||||
|
||||
## 36. hardware.device.lifecycle.detail.query
|
||||
## 37. hardware.device.lifecycle.detail.query
|
||||
|
||||
按 SN 查询设备生命周期事件时间线,复刻老系统 `/assetDepreciationSet/lookDetail`。
|
||||
|
||||
@@ -953,7 +953,7 @@
|
||||
|
||||
---
|
||||
|
||||
## 37. district.traffic.statistics.query
|
||||
## 38. district.traffic.statistics.query
|
||||
|
||||
查询站点人流量统计(人次,SUM(use_count)),复刻老 `StatisticsReportController.trafficStatistics`(饼图)
|
||||
与 `trafficStatisticsDetail`(折线图)。
|
||||
@@ -977,7 +977,7 @@
|
||||
|
||||
---
|
||||
|
||||
## 38. district.paper.trace.list.query
|
||||
## 39. district.paper.trace.list.query
|
||||
|
||||
客户换纸记录分页查询(ES paperuselog 热索引 / paperuselog_all 冷索引),复刻老
|
||||
`/MonthlyStatistics/getRfidTraceList` 的数据查询语义但**出分页明细**(不复刻轨迹展开)。
|
||||
@@ -997,6 +997,25 @@
|
||||
|
||||
---
|
||||
|
||||
## 40. agent.user.list.query
|
||||
|
||||
代理角色用户分页查询(m0 `user`,强制 `enterprise_type=1` + `soft_delete=0`),对应老 `/user/listByPage` 的代理用户子集。
|
||||
|
||||
- 分类:agent | 类型:读
|
||||
- 入参(全部可选):`agentId`(精确,必须在当前身份可见范围内)、`name`/`mobile`/`no`(模糊)、
|
||||
`authorityId`(精确)、`deptId`(精确,查 `dept_user` 关联)、`workStatus`(精确);`page`/`rows` 默认 1/20 上限 100。
|
||||
- 返回 `total/page/rows/[notice]/records`,固定 `id DESC`。record 含 id/name/no/loginAccount/mobile(**原样不脱敏**)/
|
||||
agentId+agentName/authorityId+authorityName/enterpriseType/approle/roleType/workStatus 及各自 `*Text`/
|
||||
deptId+deptName+postName(主岗)/`deptList`(dept_user 全量岗位明细:deptId/deptName/postId/postName/isManager/isKey)/
|
||||
districtId+districtName/lastLoginTime/createTime。
|
||||
- 枚举文案:enterpriseType 1=代理 2=物业;approle 1=运维 2=保洁 3=富士康 4=老化 5=物业 6=代理;
|
||||
roleType 0=管理 1=普通;workStatus 0=上班 1=下班 2=请假 3=休息。
|
||||
- 行级权限:总部(isagent=0)看全部;代理商(isagent=1)`agent_id IN visibleAgentIds`(自己+直属下级+代管),
|
||||
传范围外 agentId 抛 `IllegalStateException("无权访问该代理商")`;服务主体不放行(仅绑 prod scope 1)。
|
||||
- 白名单不含 idcard/password/weixin_openid/weixin_name/ding_user_id,不返回位置字段(省市区/地址)。
|
||||
|
||||
详细设计见 [agent-user-list-mcp-tool-design](agent-user-list-mcp-tool-design.md)。
|
||||
|
||||
---
|
||||
|
||||
## 附录:在线查看工具清单
|
||||
|
||||
Reference in New Issue
Block a user