diff --git a/AGENTS.md b/AGENTS.md index 9b67e63..410b111 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,10 @@ # AM FreeScan 开发约定 -- 2026-11-12 用户确认正式环境已按早先包独立安装、尚未录入业务;安排最后一次源端全量同步后,正式环境作为唯一业务数据源。此次不备份目标业务数据,使用新空数据卷/目录导入并保留旧卷;最终包等用户确认暂停操作后再生成。后续正式环境仅通过公网Git main和deploy/windows11/update.ps1更新代码及批准的增量结构,不重复导入开发数据,不覆盖现场私有配置或删除数据卷。公网仓库为https://p20001.svc.cmvr-iot.icu/SmartBench/am-freescan.git。 +- 2026-11-13 用户要求仅启动开发前后端且不再连接现场扫描仪、QUIC、旋转底座、机械臂或AGV,不能操作正式环境。dev环境默认导入.local/dev-isolated.yaml,直连设备地址、密钥和绑定为空,QUIC关闭;本机开发后端使用.local/start-backend-dev.ps1加载仅本进程生效的网络隔离,只允许本机及开发MySQL/Redis。原scanner-private.yaml、正式配置、证书和已交付数据包保留。不得为了启动开发环境而恢复现场配置或解除网络隔离;无用户新授权不提交/推送。 + +- 2026-11-13 用户确认正式环境已经完整同步,最终全量迁移阶段结束,正式环境是唯一业务数据源。今后不再导出或导入开发端全量数据,不重跑 Init、Bootstrap、sync-full.ps1,不覆盖正式业务、现场私有配置、证书或数据卷。开发端保持与现场控制隔离,原源后端不因修改代码自动恢复启动。公网仓库为https://p20001.svc.cmvr-iot.icu/SmartBench/am-freescan.git,main分支。 +- 2026-11-13 用户要求每次发布都由其当次明确指示。默认只在本地修改、验证和整理发布说明;没有用户当次“发布”或“提交并推送”等明确指令,不自动提交发布代码、推送Git或触发正式环境更新/重启。历史上的发布授权不能当作以后每次发布的授权;授权推送代码也不等于授权直接操作正式设备或重启正式服务。 +- 每次获准发布前,复核 deploy/windows11/update.ps1 对该版本的拉取、Windows前后端构建、增量迁移、停止/启动及健康检查兼容性;新依赖、新配置、菜单/字典或表结构修改必须提供可执行的升级路径,不能只修改开发数据库。保持目标私有YAML中的扫描仪/旋转底座地址、Bearer及QUIC设置。发布后给出提交号、改动摘要、验证结果和正式AI执行命令;正式AI须在用户通知更新且现场空闲后,通过脚本更新并核对 deployment.json,不手工替换JAR冒充完成。完整约定见 deploy/windows11/PRODUCTION-RELEASE.md。 - 2026-11-12 用户要求实时预览正常收帧时不逐帧查询扫描服务状态,也不由前端持续轮询SDK状态;首次连接与断流恢复时重新查询并核对设备会话/工程。收帧期间保留平台本地执行、录入记录和设备绑定校验;预览连接不下发停止、断开或重连设备命令。 diff --git a/am-backend/yudao-module-cmvr/src/main/java/com/cmvr/test/model/vo/TeFlowPublishVO.java b/am-backend/yudao-module-cmvr/src/main/java/com/cmvr/test/model/vo/TeFlowPublishVO.java index 9737710..cd7c267 100644 --- a/am-backend/yudao-module-cmvr/src/main/java/com/cmvr/test/model/vo/TeFlowPublishVO.java +++ b/am-backend/yudao-module-cmvr/src/main/java/com/cmvr/test/model/vo/TeFlowPublishVO.java @@ -17,4 +17,7 @@ public class TeFlowPublishVO { @ApiModelProperty("发布说明") private String publishNote; + + @ApiModelProperty("强制发布:仅按保存规则校验草稿,跳过发布专项校验") + private Boolean force; } diff --git a/am-backend/yudao-module-cmvr/src/main/java/com/cmvr/test/service/impl/TeDetectionItemVersionServiceImpl.java b/am-backend/yudao-module-cmvr/src/main/java/com/cmvr/test/service/impl/TeDetectionItemVersionServiceImpl.java index 6fcb069..c6c3a55 100644 --- a/am-backend/yudao-module-cmvr/src/main/java/com/cmvr/test/service/impl/TeDetectionItemVersionServiceImpl.java +++ b/am-backend/yudao-module-cmvr/src/main/java/com/cmvr/test/service/impl/TeDetectionItemVersionServiceImpl.java @@ -38,7 +38,16 @@ public class TeDetectionItemVersionServiceImpl if (StrUtil.isBlank(item.getFlowData())) { throw new GlobalException("请先保存工作流草稿"); } - subFlowDefinitionService.validateForPublish(item, item.getFlowData()); + boolean force = Boolean.TRUE.equals(request.getForce()); + if (force) { + // Match the draft-save structural requirement; execution validation remains unchanged. + JSONObject flow = JSON.parseObject(item.getFlowData()); + if (flow == null || flow.getJSONArray("nodes") == null) { + throw new GlobalException("流程图中未找到任何节点,请先保存有效草稿"); + } + } else { + subFlowDefinitionService.validateForPublish(item, item.getFlowData()); + } String hash = contentHash(item.getFlowData(), item.getConfig()); TeDetectionItemVersion current = StrUtil.isBlank(item.getPublishedVersionId()) ? null : baseMapper.selectById(item.getPublishedVersionId()); @@ -47,7 +56,8 @@ public class TeDetectionItemVersionServiceImpl } TeDetectionItemVersion version = createVersion(item, nextVersionNo(item.getId()), - item.getFlowData(), item.getConfig(), hash, null, request.getPublishNote(), operator); + item.getFlowData(), item.getConfig(), hash, null, + force ? "[强制发布] " + StrUtil.nullToEmpty(request.getPublishNote()) : request.getPublishNote(), operator); baseMapper.insert(version); pointToVersion(item.getId(), version, hash, operator); return version; diff --git a/am-backend/yudao-server/src/main/resources/application-dev.yaml b/am-backend/yudao-server/src/main/resources/application-dev.yaml index 14ebdd4..3ed4ca4 100644 --- a/am-backend/yudao-server/src/main/resources/application-dev.yaml +++ b/am-backend/yudao-server/src/main/resources/application-dev.yaml @@ -3,7 +3,7 @@ server: port: 48090 spring: config: - import: ${cmvr.scanner.config-location:optional:file:./.local/scanner-private.yaml} + import: ${cmvr.scanner.config-location:optional:file:./.local/dev-isolated.yaml} application: name: am-freescan autoconfigure: @@ -34,6 +34,21 @@ spring: cache: redis: key-prefix: 'am-freescan:' +cmvr: + # Development is disconnected from onsite devices after production cutover. + scanner: + host: "" + port: 18888 + api-key: "" + robot-id: "" + device-id: "" + rotary-base: + host: "" + port: 50052 + robot-id: "" + device-id: "" + quic: + enabled: false lab: integration: mock-enabled: false diff --git a/am-web/src/cmvr/common/views/flow/index.vue b/am-web/src/cmvr/common/views/flow/index.vue index cf5c43c..3011b25 100644 --- a/am-web/src/cmvr/common/views/flow/index.vue +++ b/am-web/src/cmvr/common/views/flow/index.vue @@ -29,7 +29,7 @@ 试运行 @@ -47,7 +47,7 @@
保存 @@ -61,10 +61,11 @@ > 发布 - 发布 - + 发布 + 更多