am-freescan/docs/cmvr-port-matrix.md
2026-10-22 16:18:37 +08:00

48 KiB
Raw Permalink Blame History

CMVR 原能力迁移范围与验收矩阵

审计日期:2026-10-21。来源只读:E:/workspace/frontend/cmvr-iot-frontend/CMVR-AIMA、E:/workspace/frontend/cmvr-iot-frontend/cmvr-iot-common、E:/workspace/backend/CMVR-IOT。仅修改目标 am-freescan 内的本文件和 am-backend/yudao-module-cmvr/src/main/resources/sql/cmvr-schema.sql。

本文中的 scanner 指既有 ai-scanner 任务管理项目。新链路是任务选择原 AIMA 用例及其 detectItemId,冻结发布版本后调用移植的 CMVR 原生流程引擎。本文不要求新增物理激光扫描节点,也不要求连接旧 supplier 占位协议。

下表是可执行验收清单,不是已经通过的测试记录。源码静态审计已完成;数据库初始化、编译、浏览器验证与硬件实测结果由实施者分别记录。没有设备或 AI 服务时,相关原功能应返回实际不可用原因,不能生成模拟成功记录。

1. 路由与完整功能边界

来源简称:A=CMVR-AIMA/src,C=cmvr-iot-common/src,B=CMVR-IOT。来源菜单经 /getRouters 动态提供,因此业务路由不能只从 A/router/index.js 推断;组件引用是持久验收依据。目标入口可挂到现有布局,业务组件、交互、图定义及响应合同应保持原行为。

功能 来源源码 / 接口 验证方式与通过条件
测试用例列表、查询、分页、元数据 A/views/intelligenceTest/testCase/index.vue;A/api/intelligenceTest/testCase.js;/aima/testcase/list 新增包含分类、优先级、描述、前置条件、步骤、预期结果、预计时长的用例;查询、分页、刷新后字段一致
用例编辑、复制、启停、批量删除 同上;POST/PUT/DELETE /aima/testcase;POST /aima/testcase/copy/{id} 复制后业务与检测项标识独立;修改不污染原记录;启停与删除状态规则与来源一致
用例进入原生流程设计器 A/testCase handleDeploy;/flow?itemId=...&name=...&state=... 配置按钮新窗口打开正确检测项;刷新 URL 后仍加载同一图,不落入简化编辑器
任务定义 CRUD、复制 A/views/intelligenceTest/taskManage/index.vue;/aima/task、/list、/copy/{id} 新增、编辑、复制、删除可用;复制保留有序用例绑定但拥有独立任务配置
任务绑定用例与拖动排序 A/taskManage vuedraggable;/aima/task/testCases/{id}、/bindTestCases/{id} 按 A、B、A 绑定同一用例两次并拖动重排;保存刷新后三个位置保留,不按用例 ID 去重
任务实例添加、查询、修改、删除 A/views/intelligenceTest/runningTask/index.vue;/aima/taskinstance、/list 待执行实例可改删;任务、手机、车辆信息关联正确;执行后修改/删除限制与来源一致
任务实例开始与运行参数 runningTask、C/flow/components/RuntimeParamsEditor.vue;PUT /aima/taskinstance/start/{id} 必填、数字、布尔、嵌套对象/数组校验通过;参数实际进入节点输入;重复用例参数各自隔离
运行时机器人角色/设备分配 RuntimeAssignmentsEditor.vue;C/utils/flowResources.js;/resource/robots、/{robotId}/devices 只将永久 robotId 和对应 deviceId 作为硬件身份;按角色、设备种类校验;同名角色在不同用例位置可选不同机器人
暂停、恢复、终止 runningTask;PUT `/aima/taskinstance/pause resume
历史再次执行 POST /aima/taskinstance/rerun/{id};B/aima/.../AimaTaskInstanceServiceImpl.rerunInstance 从历史快照取得运行参数及分配;创建新实例、执行次数加一;历史日志保持原样
当前任务步骤、进度、实时日志 A/runningTask/task-steps.vue、task-log.vue;/aima/testlog/list;WS AimaTaskInstance 进度、执行位置与任务实例对应;A、B、A 的两个 A 不合并;断线恢复后补拉日志,无重复订阅
历史日志、媒体与业务判定 A/task-log.vue;C/flow/components/TaskExecutionLog.vue 历史页面无需实时上下文也能展示终态;图片/视频/音频可打开;节点运行成功与检测判定 passed=false 明确区分
手机、车辆资源 A/views/intelligenceTest/mobilePhone/index.vue、car/index.vue;/aima/phone、/aima/vehicle CRUD、查询、停用状态与实例选择均可用;规格参数、系统版本、VIN 等原字段不丢失
机器人登记、编辑、归档 C/views/resource/robot/index.vue;/resource/robots 永久 robotId 创建后不可改;名称/类型/编号/地图保存;归档状态与重复身份限制保留
机器人状态、端点与设备抽屉 同上;/resource/robots/id/{id}、/id/{id}/devices 展示在线、QUIC节点/端点、最后心跳、AGV位姿、电量、地图及设备总量/故障数;5秒轮询启停正确
设备中心筛选与配置 C/views/resource/device/index.vue;GET/PUT /resource/devices、/{id} 机器人/用途/在线过滤可用;编辑设备名称、用途、启用及备注后刷新一致;在线/健康与真实上报一致
设备示教隐藏路由 C/router/deviceRoutes.js 从设备页进入 `/device/mechanical_arm
地图与机器人绑定 C/views/resource/map/index.vue;/resource/maps、/robot/{robotId};机器人地图接口 新建/编辑/删除地图,绑定当前机器人地图,下载远端地图与查看位置;空库和离线状态能正确展示
机器人地图与导航扩展操作 B/admin/.../resource/ResourceRobotController remote-maps、download-map、upload-active-map、sync-runtime、location、navigate-to-position、start-mapping、stop-mapping 接口完整;有硬件环境再验证写操作
终端资源依赖 C/views/resource/terminal/index.vue;/resource/terminals、/{id}/robots 机器人与边缘终端绑定仍能查询;终端上下线/端点能力由 QUIC 接入提供
视觉标定依赖 C/views/resource/visionCalibration/index.vue;/vision/calibration 手眼标定/工具标定、会话心跳/停止、pivot/direction、校正、激活/作废、验证及记录查询均保留;无设备时返回真实不可用原因

2. Vue Flow 原生设计器验收

完整设计器来自 C/views/flow,包含 31 个组件文件、vue-flow 适配器、专用节点配置和图工具。A 本地 testCase 页面只负责打开入口,不能替代共享模块。节点清单由本文件后文从原 config.js 自动列出。

功能 来源源码 / 接口 验证方式与通过条件
画布、节点/边渲染与拖入组件 C/flow/index.vue、vue-flow/adapter.js、FlowNode.vue、FlowEdge.vue、components/Aside.vue 每个原分组/动作可检索并拖入;连线、分支出口、节点双击配置可用;坐标与视口保存恢复
基础节点 nodes/common/startNode.vue、endNode.vue、serviceNode.vue 开始/结束节点输入输出结构不改;原图导入后类型与属性兼容
图编辑体验 C/flow/index.vue、composables/useFlowEvents.js 选择、移动、删除、复制/粘贴、撤销/重做、键盘快捷键、分组/展开及边校验按原交互可用
开始参数与输出 schema components/ParamsDrawer.vue、components/params/*、utils/flow.js 嵌套 schema 与必填标志保存重开一致;上下游变量引用可选且执行时正确解析
节点配置器 nodes/function/、components/ HTTP方法/headers/query/body、代码编辑、循环、分支、媒体分析等专用配置原样可用,不落到统一占位表单
机器人角色与设备槽位 utils/flowResources.js、机器人相关节点 图保存逻辑角色/设备槽位;具体分配只用于本次运行;旧 robotId/deviceId 图兼容解析
草稿保存、自动保存与冲突控制 PUT /flow/draft;TeDetectionItem.draftRevision/draftHash 修改后保存与新窗口读取一致;过期 revision 被拒绝,不能静默覆盖他人草稿
发布版本与历史详情 POST /flow/publish;GET /flow/versions/{itemId}、/flow/version/{versionId} 发布生成不可变版本及 hash;修改草稿不改变已发布版本内容
版本恢复草稿与回退 POST /flow/version/{versionId}/restore-draft、/rollback 恢复草稿遵守 revision;回退建立发布历史,既有执行仍引用原 manifest
子流程选择、参数与执行 GET /flow/subflows;nodes/function/subFlow.vue、subStart.vue、subEnd.vue 只提供可用发布子流程;子流程输入输出映射正常;嵌套日志与版本引用可追溯
试运行 components/TestRun.vue;POST /flow/executeTrial 可用当前草稿试跑;校验运行参数/机器人设备;试跑不覆盖正式发布版本
单节点运行 C/flow/index.vue;POST /flow/action 选定节点和真实资源执行一次;输入、输出、错误显示正确;不伪造整个流程成功
动作队列编辑与单独执行 components/ActionQueueSingleRun.vue;nodes/function/actionQueue.vue 添加、移除、重排、提取步骤与超时配置可保存;队列输出与失败步骤真实可见
运行中可视化、暂停/恢复/停止 POST /flow/view、`/flow/pause resume
媒体与智能分析日志 TaskExecutionLog.vue 及媒体节点配置器 原图像、音频、视频路径与播放器保留;confidence/passed/evidence/decisionReason 等结构化结论可读
音频人工纠错与训练回传 POST /flow/audio-correction/{nodeInstId} 只纠正声音分类节点;使用持久日志的媒体与profile;训练服务失败需真实反馈,不改造成仅前端标记
恢复设备可运行状态 /api/system/safetyState、restoreOperationalState、recoverSafetyState 原确认交互与恢复结果保留;实际硬件连接后验证,不能靠静态成功响应通过
Monaco与多媒体/3D静态资产 flow/monaco.js;public 模型;three/urdf-loader/xacro-parser/xgplayer 代码编辑与语言worker、3D模型及媒体资源路径实际可加载;生产build资源不引用来源目录

3. WS、硬件、文件及外部服务合同

依赖 已核实原合同 验证方式 / 迁移边界
AjaxResult与分页 原成功码200,部分目标服务0;列表返回rows/total,详情返回data 专用 /admin-api/cmvr 适配器保留原包裹结构;原组件无需逐页重新设计
认证与权限 原CMVR-Token及RuoYi权限;目标使用AM FreeScan会话 请求适配目标Bearer/tenant;原页面 hasPermi 权限指令与后端权限桥一致;不能依赖来源登录
WS握手 ws URL 带 userId/token;heartbeat;channel_subscription subscribe/unsubscribe 使用目标会话;退出关闭;重连恢复所有通道;跨用户身份切换不复用旧连接
任务实时通道 AimaFlowExecutionListener 向 AimaTaskInstance 推送任务/节点日志 正确 taskInstanceId 与位置字段;重连补拉完整分页日志
WS二进制控制消息 websocket.js 对gzip二进制使用 DecompressionStream('gzip'),文本消息为JSON 保留 gzip 与明文JSON兼容,不能一律按字符串解码
WS媒体帧 CMVF魔数,26字节头,version=1、mediaType、64位timestamp、sequence、channelLength、payloadLength;video/mp4 视频帧按通道转发到原播放器;长度校验、Blob/ArrayBuffer兼容;不能只实现JSON广播
相机实时与流URL Camera/index.vue 的 edgeCameraServiceImpl 通道;/api/edge/camera/rgb-stream-url 预览、录像/拍照输出、断线重订阅按原接口;需真实camera设备
灵巧手传感器 edgeDexHandServiceImpl/getSensorDataStream/{robotId}/{deviceId} 流数据映射与3D/曲线刷新、页面卸载取消订阅;需真实dexHand设备
QUIC机器人接入 B/cmvr-iot-quic 与 quic-contract;resource订阅上线/设备发现/状态事件;来源UDP4433与证书配置 隔离目标配置;保留robotId/deviceId与协议契约;硬件实测连接、心跳、断线、会话更替和设备发现
机械臂与AGV控制 `/api/arm/getPose getJointState
音频与仿生头 /api/Microphone/*、/api/Speaker/*、dexHand/head等原API 播放/录制/暂停恢复/音量/表情等保持实际设备行为;失败不转成模拟成功
文件管理与上传 /system/file/*、/common/upload及组件上传下载;cmvr_file_info 目标存储中能上传、列表、引用、播放和下载;数据库保存的URL可由浏览器及AI服务读取
MinIO与媒体模型服务 源配置使用局域网MinIO与media-analysis;音视频/图像分析调用profiles与结果服务 外部服务地址和凭证独立配置;既有业务文件不从来源数据库复制;无配置时明确报错
商道智能体、TTS与AI评价 原LLM、Flowise、AI Agent、TTS及evaluation operators;部分源代码存在固定局域网/localhost地址与内嵌配置 迁移时按目标配置接入;不在文档/日志输出凭证;真实服务未就绪不算AI/语音链路已通过
Node-RED兼容导入 api/flow/nodeRed.js、utils/convertNodeRedToVueFlow.js;VITE_NODE_RED_URL 仅启用此入口时配置原服务;原已有图不强制转成新的简化schema

4. ai-scanner 任务到原生用例的最小兼容适配

保留原前端UI、AimaTestCase、TeDetectionItem、图JSON及原引擎。桥只承担方法目录、ID/版本、参数、状态、控制与结果同步。

数据 / 操作 原CMVR语义 ai-scanner任务适配与验收
选择执行方法 AimaTestCase.id → detectItemId → 已发布TeDetectionItem版本 方法下拉读原用例,保留case/detectItem身份;未发布/停用不可伪装可执行
三层ID AimaTaskInstance.id为业务实例;taskInsId指向TeTaskInst.id;节点TeNodeInst.id另有身份 LabExecution.id与原生实例ID必须显式映射;结果/控制使用映射,不以字符串相等假设关联
版本冻结 TeTaskInstFlowVersion保存instId、itemId、itemOrder、itemOccurrence、versionId、versionNo 执行创建时冻结版本及有序清单;运行过程中再发布用例不改变该执行
有序重复项 AimaTaskTestCase主键(task_id,sort_order);同一item多次出现 A、B、A三项执行与日志独立;不可distinct/set去重
运行参数 runParams按 itemId:occurrence,兼容旧itemId键;AIMA注入phoneId/vehicleId/taskInstanceId 保留业务参数,额外注入lab taskId/executionId等上下文;禁止覆盖原必需业务值或将所有位置合并
资源分配 runtimeAssignments角色含roleKey/sourceRoleKey/itemId/itemOccurrence,members含robotId/devices 从原运行分配组件传递;不同位置同名角色可绑定不同真实设备;快照可重现
任务状态 5未开始,1运行,3暂停,0完成,2失败,4终止 映射到Lab QUEUED/RUNNING/PAUSED/SUCCEEDED/FAILED/CANCELLED;不能直接按数值复用
日志状态 节点与业务日志status是另一套含义,来源字段注释存在历史不一致 使用原事件/枚举/实际调用逻辑映射;不要仅依据数据库旧注释判断终态
开始 正式执行使用已发布manifest,返回原生instId 在事务提交后启动,派发幂等;保存lab execution与native实例映射;启动失败为真实FAILED/派发失败
暂停 / 恢复 / 取消 FlowControlService控制真实任务上下文与后续执行 ai-scanner按钮路由原引擎;当前6节点DetectionExecutionService的“不支持暂停”不应参与新链路
重跑 / 重试 原rerun读取历史执行请求,创建新实例并增加executionNumber ai-scanner创建新的执行/重试记录;保留旧日志和映射;明确按冻结版本和历史参数执行
进度与节点事件 原事件带item位置、节点、输入输出、错误、iteration;AIMA listener更新业务统计 桥同步LabExecution、步骤、运行阶段、结果交付;处理重复/乱序/晚到事件,取消终态受保护
业务判定 引擎成功表示流程完成,分析passed=false表示检测不通过 流程状态与业务结果独立;不能将SUCCESS直接等同所有检测合格
结果与文件 输出含结构化判定、分析证据、媒体URL、耗时、节点日志 桥保存lab结果和文件引用;不能丢失原完整输出,也不能制造空的合格结果

既有 lab/detection/DetectionFlowEngine 明确只支持 start/end/code/http/sleep/branch,且其暂停/恢复明确抛错。这是上一版的能力边界,不是原CMVR能力边界。新CMVR链路必须路由移植的原生引擎;既有独立本地检测功能可保持兼容,但不得把不支持的原节点静默改写成6节点图。

5. 静态种子与数据库范围

cmvr-schema.sql 为48张表的结构DDL,仅 CREATE TABLE IF NOT EXISTS,不选择数据库、不删除、不更新、不插入历史业务行。已在指定目标新库执行。来源基础表缺DDL时依据当前持久实体、类型、TableField/TableId和mapper查询推导;推导表在SQL注释中逐一注明。完整车机路径规划依赖闭包另补入 cmvr_veh_oper_config,与最初47张表共同构成最终48张原生表。

30张表直接采用来源SQL的CREATE定义;17张缺失基础表推导为:cmvr_file_info、cmvr_group、ae_evaluation、evaluate_indicator、te_ai_evaluation、te_detection_item、te_node_inst、te_task_config_info、te_task_inst、te_task_orchestration、ti_project、ti_vehicle_config、ti_vehicle_function、ti_vehicle_ui、vi_corpus、vi_project、vi_scheme。当前持久实体字段已对照覆盖;补齐来源aima_alarm遗漏的BaseEntity.remark;重复绑定使用位置主键。推导的可变长度与常规查询索引是兼容选择,需要在目标新库运行验证,不宣称与未提供的历史DDL字节一致。

静态项 是否需要数据库种子 来源 / 说明
robot_type 必需 资源机器人登记表单required,空字典将无法完成原登记流程;从原静态SQL取已确认类型或在目标配置合法类型
ti_function_config、ti_ui_config 使用触控路径/车机配置时需要 TiVehicleFunction服务与TiEvaluationRecorder依赖;属于字典定义,不能拿生产车机业务实例作种子
tts_language、tts_voice、tts_emotion 使用TTS/语料管理及其字典JOIN时需要 TTS与Corpus mapper按这些dict_type查标签;其余TTS字典以源静态定义及实际页面引用补齐
声音分类POWER_ON等 不需要 C/flow/audioTypes.js 中固定选项;同原代码保留
节点动作、机器人设备种类、状态标签 不需要复制业务表 C/flow/config.js、robotDevice.js、agvRuntimeStatus.js与相关enum定义;随源码移植
菜单与按钮权限 需要目标静态seed 使用现有AM FreeScan系统菜单/权限表;业务入口与原hasPermi/后端权限桥保持一致
文件、机器人、设备、地图、用例、任务、结果 不复制历史业务数据 新库空表,由新目标用户创建或由目标设备接入上报

SysFileInfo/SysGroup映射为 cmvr_file_info、cmvr_group,避免目标系统表碰撞。原 mapper 的 sys_user.user_name/nick_name 与 sys_dict_data.dict_type/dict_value/dict_label JOIN 必须适配目标身份/字典表或兼容查询,不能靠创建旧sys_*表绕过。

5.1 已实施的静态bootstrap与幂等验证

scripts/bootstrap_cmvr.py 与 config/cmvr-reference.json 已在指定 192.168.28.10 / am-freescan 新库应用两轮,凭据只从目标 .local/runtime.json 读取。脚本继续检查主机、库名、独立库owner标记与迁移锁;不会连接来源数据库。

  • 配置共17种字典、33个静态值;其中10种通用字典的29值直接读取来源 sql/ry_20260417.sql 中静态INSERT定义,另外为原SysGroup契约的检测项/任务/设备3值与目标独立的GENERIC机器人1值。
  • 逐个扫描复制的原UI,12种实际 useDict 引用全部覆盖。源SQL没有提供触控功能/界面和TTS音色等服务特定值,因此只建对应字典类型,保留空值清单;真实代码应由目标车机和语音服务配置,不能凭空假设可用能力。
  • 创建 cmvr_group 7=测试用例(type1)、8=执行任务(type2)、9=设备资源(type3)。7是AimaTestCaseServiceImpl与InspectionWaypointServiceImpl创建检测项时硬编码的必需配置;8/9是按原分组类型新建的默认配置,不是历史业务记录。
  • 菜单component_name与实际wrapper逐一匹配:CmvrTestCase、CmvrTaskManage、CmvrRunningTask、CmvrCar、CmvrMobilePhone、CmvrRobot、CmvrDevice、CmvrMap、CmvrTerminal、CmvrVisionCalibration。追加终端、视觉标定两个已移植的真实入口。
  • 原迁移Controller的171种 hasPermi 注解全部纳入配置(最初166种,车机操作闭包追加5种)。9种权限已由页面菜单提供,其余162种为按钮权限,按用例/任务/运行/资源等语义父菜单分配;ID由permission的稳定hash产生,追加注解不会重排既有角色授权。
  • 首轮新增11种字典/32值、3个分组、157个按钮、2个菜单,修正8个旧wrapper名。第二轮schema及字典/分组/菜单/按钮变化均为0,引用校验全部通过。
  • 独立只读核验:字典逻辑键重复0、原生按钮权限重复0、角色菜单重复0、管理员未授权CMVR菜单0。未导入任何机器人、设备、用例、任务、结果或原凭据。

5.2 为真实执行修复的来源缺陷与宿主适配

来源 EdgeTouchOperateService 含固定条件旁路:等待15秒后直接返回成功。目标移植已移除此旁路,使其进入原有HLC/gRPC/脚本执行路径;没有硬件连接时不能返回假成功。来源三个项目保持只读。

目标正式执行请求增加 frozenVersionIds,按宿主执行创建时冻结的发布版本清单替换原生检测项的flow/config;宿主桥在事务提交后调度,保留原UI及图JSON。外部服务与配置项清单见目标 yudao-module-cmvr/src/main/resources/cmvr-external-settings.json,不复制源凭据。

6. 最终验收执行顺序

  1. 检查三来源工作树无本次变更;目标代码不引用来源绝对目录或file依赖。
  2. 在指定新数据库执行DDL并核对48表、关键列、主键和版本索引;静态种子仅写目标系统。
  3. 编译目标前后端;校验所有迁移路由、动态import、Monaco worker、SVG和public资源。
  4. 登录目标系统,逐项完成无硬件CRUD、图保存发布/恢复/回退、重复绑定、运行参数和方法选择验收。
  5. 使用真实可执行无硬件流程,验证ai-scanner新任务→原用例→版本冻结→原引擎→步骤/结果闭环;再验暂停/恢复/取消、失败、重跑、晚到事件。
  6. 配置目标QUIC/硬件/MinIO/AI服务后执行设备、媒体及外部AI能力;记录具体未验证项目,不将缺少硬件解释成已通过。

7. 自动提取的原节点、API及完整表清单

下列清单直接读取来源代码与目标结构DDL产生,保留源码路径,供路由/API回归及逐节点比对。

7.1 原组件库动作(53项,另含开始/结束基础节点)

名称 原节点type 原action
开启相机 serviceNode CAMERA_START
获取图片 serviceNode CAMERA_GETRGBIMAGE
关闭相机 serviceNode CAMERA_STOP
开启录像 serviceNode CAMERA_RECORDING_START
结束录像 serviceNode CAMERA_RECORDING_STOP
循环 loop START_LOOP
子流程 subFlow SUB_FLOW
结束循环 stopLoop STOP_LOOP
分支 branch BRANCH
睡眠 sleep sleep
HTTP请求 http HTTP
代码 code CODE
获取当前循环对象 currentLoop GET_CURRENT_OBJECT
获取语料 serviceNode INSPECTION_WAYPOINT_CORPUS
视觉定位执行 visionLocate VISION_LOCATE_TARGET
AGV控制 serviceNode AGV_MOVE_TO_POINT
AGV站点导航 serviceNode AGV_MOVE_TO_STATION
通用指令 deviceUniversal DEVICE_EXECUTE_JSON_COMMAND
动作队列 actionQueue SYSTEM_EXECUTE_ACTION_QUEUE
机械臂 serviceNode ARM_MOVE_TO_POINT
机械臂关节运动 serviceNode ARM_MOVE_TO_J
开启机械臂使能 serviceNode ARM_ENABLE
关闭机械臂使能 serviceNode ARM_DISABLE
开始监听报警事件 serviceNode INSPECTION_ALERT_LISTEN_START
结束监听报警事件 serviceNode INSPECTION_ALERT_LISTEN_STOP
巡检仪表读数识别 recognize INSPECTION_METER_RECOGNIZE
人工巡检判断 serviceNode INSPECTION_MANUAL_REVIEW_CREATE
启动麦克风 serviceNode MICROPHONE_START
停止麦克风 serviceNode MICROPHONE_STOP
播放音频 serviceNode SPEAKER_PLAYAUDIO
声音类型检测 mediaAnalysis AUDIO_EVENT_CLASSIFY
视频智能分析 mediaAnalysis VIDEO_ANALYZE
通用图片分析 imageAnalysis IMAGE_ANALYZE
获取触控坐标 serviceNode TOUCH_COORDINATES
tts语音合成 serviceNode GENERATE_ADVANCED_AUDIO
意图识别 serviceNode INTENT_RECOGNITION
商道智能体 sdAgent AI_AGENT_PLATFORM
tts语音播放 serviceNode AI_TTS
获取当前页面名称 serviceNode GET_CURRENT_PAGE
方案处理 serviceNode VI_SCHEME
唤醒语料 serviceNode VI_CORPUS_WAKE
单次对话语料 serviceNode VI_CORPUS_SINGLE
连续对话语料 serviceNode VI_CORPUS_CONTINUOUS
播放语料 serviceNode VI_PLAY_CORPUS
触控 serviceNode TOUCH
开始说话 serviceNode BIO_HEAD_SPEAK_START
停止说话 serviceNode BIO_HEAD_SPEAK_STOP
表情 serviceNode BIO_HEAD_SPECIAL_EXPRESSION
路径搜索 serviceNode TI_PATH_SEARCH
获取触控二维坐标 serviceNode TI_TOUCH_COORDINATES
AI评估预处理 serviceNode AI_EVALUATION_PRE
AI评估执行 serviceNode AI_EVALUATION_END
闲聊 chat LLM_CHAT

来源:cmvr-iot-common/src/views/flow/config.js。组件的show条件继续遵守原项目配置;原AIMA中隐藏的其他项目专用动作不因复制代码而强制启用。

7.2 原前端请求合同(161个函数)

实际请求统一加目标兼容前缀 /admin-api/cmvr;${base} 在visionCalibration.js中为 /vision/calibration。表中表达式保留原参数占位,不视作可直接请求的字面URL。页面中直接调用的API及后端扩展控制接口还须按上方矩阵验证。

原API文件 函数 方法 原相对URL / 表达式
CMVR-AIMA/src/api/intelligenceTest/car.js addVehicle POST '/aima/vehicle'
CMVR-AIMA/src/api/intelligenceTest/car.js getVehicleList GET '/aima/vehicle/list'
CMVR-AIMA/src/api/intelligenceTest/car.js updateVehicle PUT '/aima/vehicle'
CMVR-AIMA/src/api/intelligenceTest/car.js deleteVehicle DELETE /aima/vehicle/${ids}
CMVR-AIMA/src/api/intelligenceTest/mobilePhone.js addPhone POST '/aima/phone'
CMVR-AIMA/src/api/intelligenceTest/mobilePhone.js getPhoneList GET '/aima/phone/list'
CMVR-AIMA/src/api/intelligenceTest/mobilePhone.js updatePhone PUT '/aima/phone'
CMVR-AIMA/src/api/intelligenceTest/mobilePhone.js deletePhone DELETE /aima/phone/${ids}
CMVR-AIMA/src/api/intelligenceTest/runningTask.js addTaskinstance POST '/aima/taskinstance'
CMVR-AIMA/src/api/intelligenceTest/runningTask.js getTaskinstanceList GET '/aima/taskinstance/list'
CMVR-AIMA/src/api/intelligenceTest/runningTask.js updateTaskinstance PUT '/aima/taskinstance'
CMVR-AIMA/src/api/intelligenceTest/runningTask.js deleteTaskinstance DELETE /aima/taskinstance/${ids}
CMVR-AIMA/src/api/intelligenceTest/runningTask.js startTaskinstance PUT /aima/taskinstance/start/${id}
CMVR-AIMA/src/api/intelligenceTest/runningTask.js rerunTaskinstance POST /aima/taskinstance/rerun/${id}
CMVR-AIMA/src/api/intelligenceTest/runningTask.js pauseTaskinstance PUT /aima/taskinstance/pause/${id}
CMVR-AIMA/src/api/intelligenceTest/runningTask.js stopTaskinstance PUT /aima/taskinstance/stop/${id}
CMVR-AIMA/src/api/intelligenceTest/runningTask.js resumeTaskinstance PUT /aima/taskinstance/resume/${id}
CMVR-AIMA/src/api/intelligenceTest/runningTask.js getTaskLogListApi GET '/aima/testlog/list'
CMVR-AIMA/src/api/intelligenceTest/taskManage.js addTask POST '/aima/task'
CMVR-AIMA/src/api/intelligenceTest/taskManage.js getTaskList GET '/aima/task/list'
CMVR-AIMA/src/api/intelligenceTest/taskManage.js updateTask PUT '/aima/task'
CMVR-AIMA/src/api/intelligenceTest/taskManage.js deleteTask DELETE /aima/task/${ids}
CMVR-AIMA/src/api/intelligenceTest/taskManage.js getTestCaseByTaskId GET /aima/task/testCases/${taskId}
CMVR-AIMA/src/api/intelligenceTest/taskManage.js bindTastCase POST /aima/task/bindTestCases/${taskId}
CMVR-AIMA/src/api/intelligenceTest/taskManage.js copyTask POST /aima/task/copy/${id}
CMVR-AIMA/src/api/intelligenceTest/testCase.js addTestCase POST '/aima/testcase'
CMVR-AIMA/src/api/intelligenceTest/testCase.js getTestCaseList GET '/aima/testcase/list'
CMVR-AIMA/src/api/intelligenceTest/testCase.js updateTestCase PUT '/aima/testcase'
CMVR-AIMA/src/api/intelligenceTest/testCase.js deleteTestCase DELETE /aima/testcase/${ids}
CMVR-AIMA/src/api/intelligenceTest/testCase.js copyTestCase POST /aima/testcase/copy/${id}
cmvr-iot-common/src/api/resource/device.js listResourceDevices GET '/resource/devices', method: 'get', params })
cmvr-iot-common/src/api/resource/device.js getResourceDevice GET /resource/devices/${encodeURIComponent(id)}, method: 'get' })
cmvr-iot-common/src/api/resource/device.js updateResourceDevice PUT /resource/devices/${encodeURIComponent(id)}, method: 'put', data })
cmvr-iot-common/src/api/resource/map.js listResourceMaps GET '/resource/maps', method: 'get', params })
cmvr-iot-common/src/api/resource/map.js listRobotMaps GET /resource/maps/robot/${encodeURIComponent(robotId)}
cmvr-iot-common/src/api/resource/map.js addResourceMap POST '/resource/maps', method: 'post', data })
cmvr-iot-common/src/api/resource/map.js updateResourceMap PUT '/resource/maps', method: 'put', data })
cmvr-iot-common/src/api/resource/map.js deleteResourceMap DELETE /resource/maps/${ids}, method: 'delete' })
cmvr-iot-common/src/api/resource/robot.js listResourceRobots GET '/resource/robots', method: 'get', params })
cmvr-iot-common/src/api/resource/robot.js getResourceRobot GET /resource/robots/${encodeURIComponent(robotId)}, method: 'get' })
cmvr-iot-common/src/api/resource/robot.js listRobotDevices GET /resource/robots/${encodeURIComponent(robotId)}/devices
cmvr-iot-common/src/api/resource/robot.js addRobot POST '/resource/robots', method: 'post', data })
cmvr-iot-common/src/api/resource/robot.js updateRobot PUT '/resource/robots', method: 'put', data })
cmvr-iot-common/src/api/resource/robot.js deleteRobot DELETE /resource/robots/${id}, method: 'delete' })
cmvr-iot-common/src/api/resource/robot.js getRobotDevices GET /resource/robots/id/${id}/devices, method: 'get' })
cmvr-iot-common/src/api/resource/robot.js getRobotDevicesByRobotId GET /resource/robots/${encodeURIComponent(robotId)}/devices
cmvr-iot-common/src/api/resource/robot.js getMapByRobot GET /resource/robots/${encodeURIComponent(robotRef)}/remote-maps
cmvr-iot-common/src/api/resource/robot.js getMapJson GET /resource/robots/${encodeURIComponent(params.robotId)}/download-map
cmvr-iot-common/src/api/resource/robot.js getRobotLocation GET /resource/robots/${encodeURIComponent(robotRef)}/location
cmvr-iot-common/src/api/resource/robot.js getRobotStatus GET /resource/robots/id/${id}, method: 'get' })
cmvr-iot-common/src/api/resource/robot.js moveRobot POST '/api/agv/setVelocity', method: 'post', data })
cmvr-iot-common/src/api/resource/robot.js stopRobot POST '/api/agv/stopVelocityControl', method: 'post', data })
cmvr-iot-common/src/api/resource/terminal.js listResourceTerminals GET '/resource/terminals', method: 'get', params })
cmvr-iot-common/src/api/resource/terminal.js addResourceTerminal POST '/resource/terminals', method: 'post', data })
cmvr-iot-common/src/api/resource/terminal.js updateResourceTerminal PUT '/resource/terminals', method: 'put', data })
cmvr-iot-common/src/api/resource/terminal.js getResourceTerminal GET /resource/terminals/${encodeURIComponent(id)}, method: 'get' })
cmvr-iot-common/src/api/resource/terminal.js deleteResourceTerminals DELETE /resource/terminals/${ids}, method: 'delete' })
cmvr-iot-common/src/api/resource/terminal.js listTerminalRobots GET /resource/terminals/${encodeURIComponent(id)}/robots, method: 'get' })
cmvr-iot-common/src/api/resource/terminal.js updateTerminalRobots PUT /resource/terminals/${encodeURIComponent(id)}/robots, method: 'put', data: robotIds })
cmvr-iot-common/src/api/resource/visionCalibration.js listCalibrationProfiles GET ${base}/profiles, method: 'get', params })
cmvr-iot-common/src/api/resource/visionCalibration.js getCalibrationProfile GET ${base}/profiles/${id}, method: 'get' })
cmvr-iot-common/src/api/resource/visionCalibration.js updateCalibrationCorrection PUT ${base}/profiles/${id}/correction, method: 'put', data })
cmvr-iot-common/src/api/resource/visionCalibration.js activateCalibrationProfile PUT ${base}/profiles/${id}/activate, method: 'put', data: { forced } })
cmvr-iot-common/src/api/resource/visionCalibration.js invalidateCalibrationProfile DELETE ${base}/profiles/${id}, method: 'delete' })
cmvr-iot-common/src/api/resource/visionCalibration.js startHandEyeCalibration POST ${base}/sessions/hand-eye, method: 'post', data })
cmvr-iot-common/src/api/resource/visionCalibration.js startToolCalibration POST ${base}/sessions/tool, method: 'post', data })
cmvr-iot-common/src/api/resource/visionCalibration.js startCalibrationVerification POST ${base}/profiles/${id}/verify, method: 'post' })
cmvr-iot-common/src/api/resource/visionCalibration.js calibrationHeartbeat POST ${base}/sessions/${id}/heartbeat, method: 'post' })
cmvr-iot-common/src/api/resource/visionCalibration.js getCalibrationSession GET ${base}/sessions/${id}, method: 'get' })
cmvr-iot-common/src/api/resource/visionCalibration.js stopCalibrationSession POST ${base}/sessions/${id}/stop, method: 'post' })
cmvr-iot-common/src/api/resource/visionCalibration.js recordToolPivot POST ${base}/sessions/${id}/tool/pivot, method: 'post' })
cmvr-iot-common/src/api/resource/visionCalibration.js recordToolDirection POST ${base}/sessions/${id}/tool/direction, method: 'post' })
cmvr-iot-common/src/api/flow/flow.js flowDeploy POST '/flow/publish'
cmvr-iot-common/src/api/flow/flow.js flowSaveDraft PUT '/flow/draft', method: 'put', data })
cmvr-iot-common/src/api/flow/flow.js flowVersionList GET /flow/versions/${itemId}, method: 'get' })
cmvr-iot-common/src/api/flow/flow.js flowVersionDetail GET /flow/version/${versionId}, method: 'get' })
cmvr-iot-common/src/api/flow/flow.js flowSubFlowOptions GET '/flow/subflows'
cmvr-iot-common/src/api/flow/flow.js flowRestoreDraft POST /flow/version/${versionId}/restore-draft, method: 'post', data })
cmvr-iot-common/src/api/flow/flow.js flowRollbackVersion POST /flow/version/${versionId}/rollback, method: 'post', data })
cmvr-iot-common/src/api/flow/flow.js flowExecute POST '/flow/execute'
cmvr-iot-common/src/api/flow/flow.js flowAction POST '/flow/action'
cmvr-iot-common/src/api/flow/flow.js flowExecuteTrial POST '/flow/executeTrial'
cmvr-iot-common/src/api/flow/flow.js flowView POST '/flow/view'
cmvr-iot-common/src/api/flow/flow.js flowPause POST /flow/pause/${instId}
cmvr-iot-common/src/api/flow/flow.js flowResume POST /flow/resume/${instId}
cmvr-iot-common/src/api/flow/flow.js flowStop POST /flow/stop/${instId}
cmvr-iot-common/src/api/flow/flow.js submitAudioCorrection POST /flow/audio-correction/${encodeURIComponent(nodeInstId)}
cmvr-iot-common/src/api/flow/flow.js getArmStatus GET '/api/arm/getPose'
cmvr-iot-common/src/api/flow/flow.js getAgvStatus GET '/api/agv/getRuntimeState'
cmvr-iot-common/src/api/flow/flow.js getAgvStations GET '/api/agv/listStations'
cmvr-iot-common/src/api/flow/flow.js getArmJointState GET '/api/arm/getJointState'
cmvr-iot-common/src/api/flow/nodeRed.js getNodeRedFlowById GET ${import.meta.env.VITE_NODE_RED_URL}/flow/${id}
cmvr-iot-common/src/api/test/config.js listConfig GET '/test/config/list'
cmvr-iot-common/src/api/test/config.js getConfig GET '/test/config/' + id
cmvr-iot-common/src/api/test/config.js addConfig POST '/test/config'
cmvr-iot-common/src/api/test/config.js copyConfig POST '/test/config/copy/' + id
cmvr-iot-common/src/api/test/config.js updateConfig PUT '/test/config'
cmvr-iot-common/src/api/test/config.js delConfig DELETE '/test/config/' + id
cmvr-iot-common/src/api/test/config.js taskConfig POST '/test/orchestration'
cmvr-iot-common/src/api/test/config.js getTaskConfig GET /test/orchestration
cmvr-iot-common/src/api/test/config.js getTaskParamsById GET /test/param/query/${id}
cmvr-iot-common/src/api/test/config.js taskExecute POST /flow/execute
cmvr-iot-common/src/api/test/detect.js listDetect GET '/test/detect/list'
cmvr-iot-common/src/api/test/detect.js getDetect GET '/test/detect/' + id
cmvr-iot-common/src/api/test/detect.js addDetect POST '/test/detect'
cmvr-iot-common/src/api/test/detect.js copyDetect POST '/test/detect/copy/' + id
cmvr-iot-common/src/api/test/detect.js updateDetect PUT '/test/detect'
cmvr-iot-common/src/api/test/detect.js delDetect DELETE '/test/detect/' + id
cmvr-iot-common/src/api/test/log.js listLog GET '/test/log/list'
cmvr-iot-common/src/api/test/log.js getLog GET '/test/log/' + id
cmvr-iot-common/src/api/test/log.js addLog POST '/test/log'
cmvr-iot-common/src/api/test/log.js updateLog PUT '/test/log'
cmvr-iot-common/src/api/test/log.js delLog DELETE '/test/log/' + id
cmvr-iot-common/src/api/test/log.js listInst GET '/test/inst/list'
cmvr-iot-common/src/api/test/log.js rerunInst POST /test/inst/rerun/${id}
cmvr-iot-common/src/api/test/log.js getInst GET '/test/inst/log/detail'
cmvr-iot-common/src/api/test/log.js getFlowRuntimeLog GET '/test/inst/log/query'
cmvr-iot-common/src/api/test/log.js pauseInst POST /test/inst/pause/${id}, method: 'post' })
cmvr-iot-common/src/api/test/log.js resumeInst POST /test/inst/resume/${id}, method: 'post' })
cmvr-iot-common/src/api/test/log.js stopInst POST /test/inst/stop/${id}, method: 'post' })
cmvr-iot-common/src/api/test/params.js listParams GET '/test/param/list'
cmvr-iot-common/src/api/test/params.js getParams GET '/test/param/' + id
cmvr-iot-common/src/api/test/params.js addParams POST '/test/param'
cmvr-iot-common/src/api/test/params.js updateParams PUT '/test/param'
cmvr-iot-common/src/api/test/params.js delParams DELETE '/test/param/' + id
cmvr-iot-common/src/api/test/params.js getParamSources GET '/test/param/sources'
cmvr-iot-common/src/api/test/params.js getParamTypes GET '/test/param/types'
cmvr-iot-common/src/api/device/arm.js moveJ POST '/api/humanoid/moveJ'
cmvr-iot-common/src/api/device/arm.js status POST '/api/humanoid/status'
cmvr-iot-common/src/api/device/arm.js clearFault GET '/api/arm/clearFault'
cmvr-iot-common/src/api/device/camera.js getRgbStreamUrl GET '/api/edge/camera/rgb-stream-url'
cmvr-iot-common/src/api/device/dexHand.js status GET '/api/dexHand/status'
cmvr-iot-common/src/api/device/dexHand.js setDexHandAngle GET '/api/dexHand/angle'
cmvr-iot-common/src/api/device/microphone.js startMicrophoneApi POST '/api/Microphone/start'
cmvr-iot-common/src/api/device/microphone.js pauseMicrophoneApi POST '/api/Microphone/pause'
cmvr-iot-common/src/api/device/microphone.js resumeMicrophoneApi POST '/api/Microphone/resume'
cmvr-iot-common/src/api/device/microphone.js stopMicrophoneApi POST '/api/Microphone/stop'
cmvr-iot-common/src/api/device/microphone.js playSpeaker POST '/api/Speaker/play'
cmvr-iot-common/src/api/device/speaker.js pause POST '/api/Speaker/pause'
cmvr-iot-common/src/api/device/speaker.js play POST '/api/Speaker/play'
cmvr-iot-common/src/api/device/speaker.js resume POST '/api/Speaker/resume'
cmvr-iot-common/src/api/device/speaker.js status GET '/api/Speaker/status'
cmvr-iot-common/src/api/device/speaker.js stop POST '/api/Speaker/stop'
cmvr-iot-common/src/api/device/speaker.js getVolume GET '/api/Speaker/volume'
cmvr-iot-common/src/api/device/speaker.js setVolume POST '/api/Speaker/volume'
cmvr-iot-common/src/api/device/speaker.js getAll GET '/api/Speaker/getAll'
cmvr-iot-common/src/api/device/system.js getSafetyState GET '/api/system/safetyState'
cmvr-iot-common/src/api/device/system.js restoreOperationalState POST '/api/system/restoreOperationalState'
cmvr-iot-common/src/api/device/system.js recoverSafetyState POST '/api/system/recoverSafetyState'
cmvr-iot-common/src/api/system/file.js listFile GET '/system/file/list'
cmvr-iot-common/src/api/system/file.js getFile GET '/system/file/' + fileId
cmvr-iot-common/src/api/system/file.js addFile POST '/system/file'
cmvr-iot-common/src/api/system/file.js updateFile PUT '/system/file'
cmvr-iot-common/src/api/system/file.js delFile DELETE '/system/file/' + fileId
cmvr-iot-common/src/api/tts.js createTimbre POST '/show/tts/create', method: 'post', headers: { ...serviceHeaders, 'Content-Type': 'multipart/form-data' }, data })
cmvr-iot-common/src/api/tts.js getTts GET '/show/tts/query', method: 'get', headers: serviceHeaders })
cmvr-iot-common/src/api/tts.js createCorpus POST '/show/tts/corpus', method: 'post', headers: serviceHeaders, data })
cmvr-iot-common/src/api/tts.js getSynthesize POST '/show/tts/synthesize', method: 'post', headers: serviceHeaders, responseType: 'blob', data }, config)
cmvr-iot-common/src/api/tts.js createAdvancedCorpus POST '/show/tts/corpus/advanced', method: 'post', headers: serviceHeaders, data })
cmvr-iot-common/src/api/tts.js getAdvancedSynthesize POST '/show/tts/synthesize/advanced', method: 'post', headers: serviceHeaders, responseType: 'blob', data }, config)
cmvr-iot-common/src/api/touch_interaction.js coordinateMarking POST '/show/touch/coordinates'

7.3 目标结构表(48张)

  • ae_evaluation
  • aima_alarm
  • aima_phone
  • aima_task
  • aima_task_instance
  • aima_task_test_case
  • aima_test_case
  • aima_test_log
  • aima_vehicle
  • cmvr_file_info
  • cmvr_group
  • cmvr_veh_oper_config
  • evaluate_indicator
  • inspection_alarm
  • inspection_detection_alert
  • inspection_result
  • inspection_result_media
  • inspection_task
  • inspection_task_instance
  • inspection_task_log
  • inspection_task_waypoint
  • inspection_waypoint
  • iot_device
  • iot_map
  • iot_robot
  • iot_robot_map
  • iot_robot_terminal
  • iot_terminal
  • te_ai_evaluation
  • te_detection_item
  • te_detection_item_version
  • te_node_inst
  • te_task_config_info
  • te_task_inst
  • te_task_inst_flow_version
  • te_task_orchestration
  • te_vision_calibration_profile
  • te_vision_calibration_record
  • ti_project
  • ti_vehicle_config
  • ti_vehicle_function
  • ti_vehicle_ui
  • tts_corpus_category
  • tts_corpus_info
  • tts_synthesize_task
  • vi_corpus
  • vi_project
  • vi_scheme

8. 宿主执行桥独立审阅与修复跟踪

独立审阅范围为 CmvrMethodBindingService、CmvrExecutionBridge、LabExecutionServiceImpl 的CMVR分支、LocalDetectionExecutionListener复用、原生事件拦截器、版本manifest与启动恢复。审阅者仅只读这些代码;以下修复由根实施者完成。

发现 修复与当前核对结果
主租户边界遗漏:原生路由过滤仅保护 /admin-api/cmvr/*,宿主 /lab/* 绑定仍可触及全局原生表,回调却固定tenant1 bind/selected/freeze以及bridge提交、查询、控制、同步统一调用requirePrimaryTenant;目标新增tenant2拒绝用例;已只读确认guard落位
POST绑定曾允许仅有lab:task:query的角色修改方法,并可能触发追加执行 写接口改为仅lab:resource:prepare;已核对注解,不再用查询权限授权写操作
原NODE_STARTED在持久节点日志之前发布,NODE_COMPLETED在logSuccess之前发布;桥读取endTime可能仍为空,循环又可能读到上一迭代 节点按nodeId+itemId+iteration匹配;完成事件缺endTime时用事件接收时刻兜底,避免SUCCEEDED步骤无完成时间;已核对实现
原启动恢复把无上下文任务设STOPPED(4),不会发布TASK_STOPPED,旧桥仅同步0/2导致宿主长期RUNNING/PAUSED synchronize新增4→CANCELLED、3→PAUSED;根新增CmvrExecutionReconciler每30秒补偿active映射与重启状态同步测试;真实重启/API核验由根执行
cancel提交后原生恰好完成:afterCommit的stop可能抛“已结束”,导致已落库取消却返回HTTP失败 stop在原生0/2/4时幂等返回;控制发生竞争异常后重读原生终态,只吸收已终态的预期竞争,非终态异常继续抛出;已核对最新保存代码
原节点paramsOut不保证为JSON,强制parse可能阻断终态回写 兼容解析保留非JSON原文;完整输出继续进入结果文件,避免丢失原输出与终态

事务主链静态核对结果:执行创建时在同一create事务冻结版本;bridge提交采用REQUIRES_NEW,并按task→execution固定顺序获取行锁;原生异步dispatcher在提交事务afterCommit之后才运行,因此mapping会先于节点事件可见;终态sink采用REQUIRES_NEW、相同行锁顺序和终态幂等保护。正式执行替换的是冻结发布版本flow/config;运行参数值类型和大整数ID字符串保留,子流程选定版本也包含在冻结原图中。未发现需新增阻断的事务路径。

根已为主租户、冻结参数、幂等提交、提交前取消、取消竞争、原生4重启同步、完成时间等补充桥测试。审阅者未并行运行Maven;编译、单测运行与真实API闭环以根执行结果为准。目标范围内原UI所有v-hasPermi引用已和静态permission种子核对,无遗漏键。