fix(platform): 代码审查整改——反代按域拆分授权、根除探测副作用与死代码清理

- YARP: map-edit/ai-config 全方法、reflection 写方法挂 PlatformScope,
  reflection/selection 单独放行(运营端 3D 高亮),堵住运营账号直达地图编辑/反射调用
- goto-site 探测改用不存在的 car/-1(消除健康检查真实派车风险)并加 60s 缓存
- Config PUT 按 scope 收紧:RCSMonitor 仅可写 ops 节;wizard 写操作与
  simplelite/restart-for-update 限 PlatformScope;/api/health 去除虚假端口表
- 修复 wms 模块菜单裁剪失效(admin-config-location → admin-config-facility)
- vrHost 默认 location.hostname:8223(新增 utils/vrender.ts),远程访问 3D 视口可用
- /status 页改接真实 /api/health* 诊断;uploadAsset 移除矛盾 multipart 头;
  mapsApi.merge 对齐 save 的 409 冲突处理;JWT 验签参数改启动期 DI 一次性配置
- 清理死代码:ProjectionController、DataTablePro、useClipboard、CadToolbarView、
  AppShell 未用导入;lint 脚本替换为 typecheck;日志窗口 List 改 Queue
This commit is contained in:
zhaowei.huang
2026-06-12 23:00:47 +08:00
parent d857cda071
commit 20f98db6da
24 changed files with 266 additions and 320 deletions
@@ -1,45 +0,0 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace MiGu.Server.Controllers;
/// <summary>
/// 投影 API 占位:真实落地时由 YARP 反代到 SimpleLite WebAPI 的 /api/projection/* 路径。
/// 本地 Mock 数据仅用于无 SimpleLite 运行时的开发联调。
///
/// AR-4: 全 class 加 [Authorize] —— 任何登录用户都能读 mock 投影数据;未登录直接 401。
/// </summary>
[ApiController]
[Authorize]
[Route("api/projection")]
public class ProjectionController : ControllerBase
{
[HttpGet("sites")]
public IActionResult Sites() => Ok(new[]
{
new { id = "S001", name = "A 区-入库点", x = 1000, y = 2000 },
new { id = "S002", name = "A 区-出库点", x = 3000, y = 2000 },
new { id = "S003", name = "B 区-缓存区", x = 5000, y = 2000 }
});
[HttpGet("tracks")]
public IActionResult Tracks() => Ok(new[]
{
new { id = "T001", kind = "line", fromSiteId = "S001", toSiteId = "S002" },
new { id = "T002", kind = "line", fromSiteId = "S002", toSiteId = "S003" }
});
[HttpGet("cars")]
public IActionResult Cars() => Ok(new[]
{
new { id = "C01", name = "AGV-001", state = "running", batterySoc = 0.86 },
new { id = "C02", name = "AGV-002", state = "idle", batterySoc = 0.42 }
});
[HttpGet("missions")]
public IActionResult Missions() => Ok(new[]
{
new { id = "M01", name = "A 区送料 #1", status = "running", priority = 50 },
new { id = "M02", name = "A→B 缓存搬运", status = "queued", priority = 60 }
});
}