feat(mcp): 新增电池检查/故障汇总/现场维修记录三工具
- battery.inspection.list.query(m2 battery_inspection,老 /batteryInspection/pageList) - repair.recording.list.query(m0 equipment_repair_recording,老 /equipmentRepair/recordingByPage) - repair.handle.list.query(m0 equipment_repair_handle,老 repairRecordHandleList) - 行权限复用 resolveRowScope 含直属下级口径(方案 B 拍板),battery 落 apply_agent_id, repair 三字段 OR(apply_agent_id/property_id 代管/agent_id) - 修复点:富化与字典按页批量(修 N+1 与 accessory NPE)、chipCode 落 chip_code(修拼不存在列)、 固定 id DESC 砍掉 sidx/sord 动态排序注入面、传 agentId 仍叠加行级 ACL - REQ-20261106-0020,515 项测试全绿
This commit is contained in:
@@ -100,6 +100,9 @@ xiaoqu-agent-service/
|
||||
| `hardware.electricity.message.list.query` | hardware | read | 设备电量/信号/温度等消息记录分页查询(ES electricitymessage_yyyyMM 月索引,只走本地集群,无权限过滤,对齐老 /batteryAnalyse/batteryAnalyseList)。入参 snCode(必填)/startTime/endTime(必填且须同一天,跨天拒绝)/messageType(0-5,不传=全部类型)/page/rows(默认 1/500,上限 1000);出参 snCode/index/total/page/rows/records(createTime/messageType/messageTypeText/value),createTime ASC。详细设计见 doc/electricity-message-mcp-tool-design.md |
|
||||
| `agent.user.list.query` | agent | read | 代理角色用户分页查询(m0 user 表,强制 enterprise_type=1 + soft_delete=0,对齐老 /user/listByPage 代理用户子集)。入参 agentId/name/mobile/no/authorityId/deptId/workStatus/page/rows;出参含 agentName/authorityName/deptList(dept_user 岗位明细)/districtName,mobile 原样不脱敏,不含 idcard/password/openid 与位置字段。行权限:总部看全部,代理商按 visibleAgentIds(自己+直属下级+代管)收缩,agentId 越权拒绝;只绑 prod scope 1。详细设计见 doc/agent-user-list-mcp-tool-design.md |
|
||||
| `hardware.cleanlog.list.query` | hardware | read | 清机记录分页查询(m0 hardware_clean_log + hardware_clean_pic,对齐老 /hardwareCleanLog/listByPage)。入参 districtId/propertyId/agentId/userId/snCode(模糊)/type/userRoleType/startTime/endTime(按 modify_time)/minCleanRfidCount/maxCleanRfidCount/page/rows;硬过滤 soft_delete=0 且 status=1,固定 id DESC;传 agentId 仍叠加行级 ACL(修老接口绕过 bug);名称 Redis multiGet + user 按页批量富化(修 N+1);type=0 用行内图片,type≠0 按页批量查图片表拼 OSS URL。详细设计见 doc/hardware-cleanlog-mcp-design.md |
|
||||
| `battery.inspection.list.query` | battery | read | 电池检查记录分页查询(m2 battery_inspection,对齐老 /batteryInspection/pageList)。入参 snCode(模糊)/agentId/propertyId/districtId/checkUserId/checkUserName(模糊)/checkType(0小保养 1大保养)/checkRecord14/productionDateStart/End/checkTimeStart/End;硬过滤 soft_delete=0,固定 id DESC;行权限 resolveRowScope 含直属下级落 apply_agent_id。详细设计见 doc/battery-inspection-repair-mcp-design.md |
|
||||
| `repair.recording.list.query` | repair | read | 故障汇总分页查询(m0 equipment_repair_recording,对齐老 /equipmentRepair/recordingByPage)。入参 id/snCode/problem(模糊)/agentId(收窄语义,仍叠加行权限)/propertyId/districtId/state/userId/sourceType/deviceType/createTimeStart/End;硬过滤 soft_delete=0+effective_state=1,固定 id DESC;富化按页批量(修 N+1)。详细设计见 doc/battery-inspection-repair-mcp-design.md |
|
||||
| `repair.handle.list.query` | repair | read | 现场维修记录分页查询(m0 equipment_repair_handle,对齐老 /equipmentRepair/repairRecordHandleList)。入参 id/equipmentRepairId/snCode/agentId/propertyId/districtId/state/userId/assembly/assemblyFault/chipCode(模糊)/accessoryId;硬过滤 soft_delete=0+effective_state=1,固定 id DESC;组件/零部件名按页查 fault_info 字典,chipCode 落 chip_code(修老接口拼不存在列的 bug)。详细设计见 doc/battery-inspection-repair-mcp-design.md |
|
||||
|
||||
分页统一规范:page 从 1 开始,rows 默认 20、上限 100,超出截断为 100 并在返回 `notice` 字段提示。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user