refactor(ops): 巡检接口重构 — 位置校验前移、列表/详情分离、表单聚合

接口变更:
- 删除 POST /verify-location,位置校验改为前端本地蓝牙信标匹配
- 新增 GET /record/get 巡检记录详情(含明细项、照片)
- GET /list-by-area 升级为返回完整巡检表单(区域+检查项+信标配置)
- GET /record/page 返回类型改为 VO,新增区域全路径名称和巡检员姓名
- 提交和表单接口增加 inspector 角色校验

代码质量(Code Review 修复):
- 提取 buildAreaFullName 至 OpsBusAreaMapper 消除两个 Service 的重复
- 新增 buildAreaFullNameMap 批量方法,修复分页场景 N+1 查询
- getRecordDetail 中 adminUserApi 改用 getUserMap + try-catch 降级
- InspectionTemplateServiceImpl 去掉 ObjectMapper 依赖,直接 Map 取值
- RSSI 阈值取最宽松值逻辑添加语义注释
- 巡检错误码从 1-020-003 迁移至 1-020-004,修复与安保模块的码段冲突
- InspectionRecordDetailRespVO.photos 使用 @OssPresignUrl 自动预签名

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
lzh
2026-03-22 15:00:07 +08:00
parent e11d3e1b6e
commit f213510b03
24 changed files with 585 additions and 246 deletions

View File

@@ -29,8 +29,9 @@ public interface ErrorCodeConstants {
ErrorCode DEVICE_RELATION_NOT_FOUND = new ErrorCode(1_020_002_003, "设备关联关系不存在");
ErrorCode IOT_SERVICE_UNAVAILABLE = new ErrorCode(1_020_002_004, "IoT 设备服务不可用,请稍后重试");
// ========== 巡检模块 1-020-003-000 ============
ErrorCode INSPECTION_TEMPLATE_NOT_FOUND = new ErrorCode(1_020_003_000, "巡检模板不存在");
ErrorCode INSPECTION_RECORD_NOT_FOUND = new ErrorCode(1_020_003_001, "巡检记录不存在");
// ========== 巡检模块 1-020-004-000 ============
ErrorCode INSPECTION_TEMPLATE_NOT_FOUND = new ErrorCode(1_020_004_000, "巡检模板不存在");
ErrorCode INSPECTION_RECORD_NOT_FOUND = new ErrorCode(1_020_004_001, "巡检记录不存在");
ErrorCode INSPECTION_AREA_NOT_ACTIVE = new ErrorCode(1_020_004_002, "该区域未启用,无法巡检");
}