feat(mcp): 新增站点列表与详情工具 (REQ-20260908-0006)
This commit is contained in:
@@ -119,7 +119,66 @@
|
||||
|
||||
---
|
||||
|
||||
## 4. sys.ping
|
||||
## 4. district.list.query
|
||||
|
||||
分页查询站点列表,对应老系统 `/district/districtlistByPage`,但使用固定轻量字段契约。
|
||||
|
||||
- 分类:customer | 类型:读
|
||||
- 数据来源:m0 库 `district_district_strategy` 视图,固定 `soft_delete = 0`、`id DESC`
|
||||
- 行级权限:总部看全部;代理商按自己、直属下级、代管代理及授权物业过滤;销售部门非负责人沿用老接口的互斥物业范围。筛选条件只能缩小权限结果。
|
||||
|
||||
**入参**:
|
||||
|
||||
| 参数 | 类型 | 必填 | 说明 |
|
||||
|---|---|---|---|
|
||||
| id | number | 否 | 站点 id,正整数,精确匹配 |
|
||||
| districtName | string | 否 | 站点名称,模糊匹配 |
|
||||
| districtState | number | 否 | 0=测试 1=履约 2=演示 3=撤机 |
|
||||
| province | string | 否 | 省份,模糊匹配 |
|
||||
| city | string | 否 | 城市,模糊匹配 |
|
||||
| agentId | number | 否 | 代理商 id,正整数,精确匹配 |
|
||||
| propertyId | number | 否 | 物业 id,正整数,精确匹配 |
|
||||
| page | number | 否 | 页码,从 1 开始,默认 1 |
|
||||
| rows | number | 否 | 每页条数,默认 20,上限 100 |
|
||||
|
||||
**出参 records 字段**:
|
||||
|
||||
`id`、`districtName`、`districtNumber`、`propertyId`、`propertyName`、`agentId`、`agentName`、`province`、`city`、`countyseat`、`address`、`districtState`、`onlineState`、`hardwareCount`、`isSmart`。
|
||||
|
||||
`propertyName`、`agentName` 均为批量富化,查不到时返回 `未查询到`。
|
||||
|
||||
---
|
||||
|
||||
## 5. district.detail.get
|
||||
|
||||
按站点 id 获取扩展详情。站点 id 与当前用户行权限在同一个数据库查询条件中组合。
|
||||
|
||||
- 分类:customer | 类型:读
|
||||
- 入参:`id`(number,必填,正整数)
|
||||
- 找到:`{ "found": true, "data": { ... } }`
|
||||
- 不存在或无权限:`{ "found": false, "message": "站点不存在或无权访问" }`
|
||||
|
||||
**data 字段**:
|
||||
|
||||
| 分组 | 字段 |
|
||||
|---|---|
|
||||
| 归属 | id、districtName、districtNumber、propertyId、propertyName、agentId、agentName、salesId、salesName、serviceCompanyId、serviceCompany |
|
||||
| 地址联系人 | province、city、countyseat、address、contact、phone、mail |
|
||||
| 站点属性 | businessFormat、attributeId、attributeName、installType、isSmart、lnfluenceLevel、buildCount、hardwareCount、airdetectorFlag |
|
||||
| 状态周期 | districtState、onlineState、testDate、honourDate、weaningDate、testDays |
|
||||
| 设备耗材 | deviceSalesType、paperSalesType、consumablesType、posDevicePaperNorm、toiletDevicePaperNorm |
|
||||
| 功能开关 | pointState、assignmentWorkState、airState、messageFlag、reportFlag、lockMachineFlag、eventRepairFlag、rfidUseFlag、calibratedFlag、illegalPaperDisable |
|
||||
| 语音配置 | lowerPaperState、noPaperState、powerWarning、waitTimes |
|
||||
| 报警配置 | warning、warning2、warning3、warningTime、paperPercentWarn、maintainOrderWarning、foamCountWarning、foamPowerWarning |
|
||||
| 业务配置 | pointDeduction、effectiveUseTime、consumablesPrice、billDate、billType、billTypeStr、fineMoney |
|
||||
| 运行配置 | districtRefresh(Redis 未配置默认 5)、forbidFunction(Redis 未配置默认 0) |
|
||||
| 审计信息 | createId、createName、createTime、modifyTime、memo |
|
||||
|
||||
固定不返回 `softDelete`、`enterpriseId`、`modifyId`、内部服务 URL、重复 `districtId`、语义未确认的 `supervisorId` 和 SKU 列表。
|
||||
|
||||
---
|
||||
|
||||
## 6. sys.ping
|
||||
|
||||
服务自检(demo 工具,证明链路连通)。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user