Commit Graph

51 Commits

Author SHA1 Message Date
lzh
1bdcfa1cc0 fix(ops): 启动时初始化BEACON类型配置缓存,解决SignalLoss定时任务获取配置失败问题
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
2026-01-30 01:25:14 +08:00
lzh
3ec7590e12 fix(ops): 修复派单时未更新工单 assigneeId 的问题
工单派发(PENDING -> DISPATCHED)时,更新工单表的 assigneeId 字段,
确保 BadgeDeviceStatusEventListener 能正确获取执行人设备ID并更新 Redis 缓存。

Co-Authored-By: Claude (MiniMax-M2.1) <noreply@anthropic.com>
2026-01-29 23:04:43 +08:00
lzh
9d2bbabf1c feat(ops): 添加事件发布和设备状态监听器日志便于排查
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
1. OrderEventPublisherImpl 状态变更事件发布日志改为 info 级别
2. BadgeDeviceStatusEventListener 状态变更日志改为 info 级别
3. 优化日志格式,输出 orderType 便于排查事件接收问题

Co-Authored-By: Claude (MiniMax-M2.1) <noreply@anthropic.com>
2026-01-29 22:17:03 +08:00
lzh
20ea25cf55 fix(ops): 修复事件重复发布问题并清理遗留代码
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
1. 移除 OrderStateMachine 中重复的事件发布逻辑
   - OrderStateMachine 不再发布 OrderStateChangedEvent
   - 事件发布统一由 EventPublishHandler 处理

2. 删除 enqueueAndDispatch 遗留方法
   - 该方法已无用,被 DispatchEngine 策略模式替代
   - 删除接口声明、实现类和测试用例

3. 清理无调用的备用接口方法
   - enqueueOrderOnly、dispatchToCleaner、confirmOrder、
     startWorkingOnBeacon、autoCompleteOnSignalLost、
     playVoiceForNewOrder、playVoiceForQueuedOrder、
     playVoiceForNextTask、upgradePriorityToP0、
     calculateActualDuration
   - 保留接口但标记 @Deprecated

问题修复:
- 工单派发时 TTS 语音播报不再重复触发
- 调度逻辑统一走 DispatchEngine 策略模式

Co-Authored-By: Claude (MiniMax-M2.1) <noreply@anthropic.com>
2026-01-29 21:38:50 +08:00
lzh
d8fd0aa389 fix(ops): 修复直接派单场景事件发布问题并统一日志规范
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
1. 修复 QueueSyncHandler 在直接派单场景下提前返回的问题
2. 修复 EventPublishHandler 日志级别便于排查
3. 统一 LogType.eventType 为大写下划线格式

Co-Authored-By: Claude (MiniMax-M2.1) <noreply@anthropic.com>
2026-01-29 19:01:27 +08:00
lzh
569ca2c0da fix(ops): 修复区域设备索引缓存问题并优化查询性能
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
1. 修复 listAvailableBadges() 读穿透 bug
   - 改用 areaDeviceService.getDeviceIdsByArea() 获取设备列表
   - 缓存未命中时自动从数据库重建

2. 优化 N+1 查询问题
   - listBadgesByArea() 和 listAvailableBadges() 使用 batchGetBadgeStatus() 批量查询

3. 简化 BadgeDeviceStatusServiceImpl
   - 移除重复的 AREA_BADGES_KEY_PREFIX 常量
   - 区域索引操作委托给 AreaDeviceService 处理

4. 增强缓存可靠性
   - getDeviceIdsByArea() 支持读穿透缓存
   - 缓存 TTL 从 30 分钟延长到 24 小时

Co-Authored-By: Claude (MiniMax-M2.1) <noreply@anthropic.com>
2026-01-29 18:32:34 +08:00
lzh
afa5837160 fix(ops): 修复区域设备索引初始化查询条件
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
问题:selectListByAreaIdAndRelationType(null, "BADGE") 生成 WHERE area_id = NULL
导致查询结果为空,索引无法初始化

修复:areaId 为 null 时不添加该查询条件,查询所有 BADGE 类型设备

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 00:04:53 +08:00
lzh
d87d4dd914 refactor(ops,iot): 重构区域设备关联模块并添加Redis缓存
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
主要变更:
1. 将 ops_area_device_relation 表所有权移至 Ops 模块
   - 新增 OpsAreaDeviceRelationDO、Mapper、Service、Controller
   - 新增 AreaDeviceApi Feign 接口供其他模块调用
   - ���除 IoT 模块中的旧 DO 和 Mapper

2. 实现 Redis JSON 缓存(IoT 可读)
   - 统一缓存 Key: ops:area:device:{deviceId}
   - 统一缓存 Key: ops:area:{areaId}:type:{relationType}
   - TTL: 30分钟,空值缓存: 1分钟

3. IoT 模块通过 Feign 调用 Ops
   - 优先读 Redis 缓存,未命中时调用 Ops API
   - 缓存由 Ops 模块统一管理

4. 删除 IoT 模块废弃文件
   - OpsAreaDeviceRelationDO.java
   - OpsAreaDeviceRelationMapper.java

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 22:35:41 +08:00
lzh
10eeb774a6 fix(ops): 修复其他id生成问题
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
2026-01-28 18:12:23 +08:00
lzh
280562bc27 fix(ops): 修复工单业务日志id生成问题-去除这个引入
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
2026-01-28 18:01:53 +08:00
lzh
d7c2a0800b fix(ops): 修复工单业务日志id生成问题 2026-01-28 18:01:03 +08:00
lzh
767449dec4 feat(ops): 新增 trigger_data 字段存储触发详情
- OpsOrderDO: 新增 triggerData 字段(JSON 字符串)
- 存储触发时的详细信息:
  - 客流阈值:actualCount, baseValue, threshold, exceededCount
  - 蓝牙信标:rssi, beaconMac
  - 信号丢失:durationMs, timeoutSeconds
- CleanOrderServiceImpl: 序列化 triggerData 到 JSON 存储

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 12:04:19 +08:00
lzh
a8d3fc84d2 refactor(ops): 服务层调整,统一使用设备ID
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
- CleanOrderService: 将所有 cleanerId 参数改为 deviceId
- CleanOrderAutoCreateReqDTO: 新增 triggerData 字段
- EventPublishHandler: 添加 assigneeId/urgentOrderId 到 payload
- OrderQueueService: 修正注释说明 userId 实际为 deviceId
- EventDomain: 新增 AUDIT 域
- 更新测试用例适配接口变更

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 18:23:37 +08:00
lzh
7cf8e5ed2f fix(ops): fix DispatchEngine instantiation error in test config
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
2026-01-24 19:20:43 +08:00
lzh
fc28afd1c9 feat(ops): 补充工单状态变更业务日志
- pauseOrder: 记录工单暂停日志
- resumeOrder: 记录工单恢复日志
- interruptOrder: 记录P0插队打断日志
- cancelOrder: 记录工单取消日志
- completeOrder: 记录手动完成日志

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 17:48:27 +08:00
lzh
a36ed90c3f feat(ops): 扩展调度上下文支持设备ID字段
新增 assigneeDeviceId 字段,用于同时记录人和设备的场景。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 13:47:13 +08:00
lzh
457fc556e2 refactor(ops): 移除保洁工单清理日志相关代码
- 删除 OpsOrderCleanLogDO 实体类
- 删除 OpsOrderCleanLogMapper Mapper接口
- 统一使用新的业务日志框架

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:44:07 +08:00
lzh
5063fc8dd1 refactor(ops): 移除旧的publisher模式
- 删除 BusinessLogPublisher 接口
- 删除 DefaultBusinessLogPublisher 实现
- 改用 recorder 模式替代 publisher 模式

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:43:54 +08:00
lzh
a49994cc57 refactor(ops): 重构业务日志注解和切面
- 更新 BusinessLog 注解以支持新的事件日志模型
- 更新 BusinessLogAspect 切面使用 EventLogRecorder

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:43:39 +08:00
lzh
a82b59ac46 feat(ops): 新增业务日志枚举类
- 新增 EventDomain:事件领域枚举
- 新增 EventLevel:事件级别枚举

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:43:32 +08:00
lzh
6d4c2c60cf refactor(ops): 移除 ops-core 中的 BadgeDeviceStatusService
将 BadgeDeviceStatusService 从 ops-core 模块迁移至 environment 模块:
- 删除 ops-biz/core/badge/BadgeDeviceStatusService.java
- 删除 ops-biz/core/badge/BadgeDeviceStatusServiceImpl.java

该服务属于保洁业务特定逻辑,应放置在 environment-biz 模块中。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 16:16:06 +08:00
lzh
eedef70581 feat(ops): add confirm event DTO and update audit DTO 2026-01-19 14:41:05 +08:00
lzh
a71a29f548 fix(ops): implement missing updateBadgeArea method 2026-01-19 14:41:00 +08:00
lzh
c448daed03 fix(ops): 修复编译错误refactor-order-operations 2026-01-19 13:38:53 +08:00
lzh
568d37a0be feat(ops): refactor-order-operations 2026-01-19 13:32:23 +08:00
lzh
82966dc61b feat(ops): add-iot-clean-order-integration阶段三-业务执行与审计 2026-01-17 17:20:35 +08:00
lzh
683b99be21 fix: 删除同名OpsOrderQueueMapper
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
2026-01-15 16:37:34 +08:00
lzh
4a8c4d744c feat(ops): 增强工单队列服务并新增 RPC 配置 2026-01-15 16:14:32 +08:00
lzh
75a9df9f9f chore: 【ops】异步任务配置 2026-01-09 17:41:37 +08:00
lzh
9dd2dd35f1 chore: 【ops】实体调整 2026-01-09 17:39:14 +08:00
lzh
ea3c7829e9 chore: 【ops】工单业务日志注解 2026-01-09 17:38:29 +08:00
lzh
5974c767d5 chore: 【ops】工单基础操作修改 2026-01-09 17:38:01 +08:00
lzh
23830961c8 chore: 【ops】保洁相关Mapper迁移 2026-01-09 16:50:51 +08:00
lzh
08af90e732 chore: 【ops】工单生命周期管理器重新调整 2026-01-09 16:46:16 +08:00
lzh
8feb778291 chore: 【ops】调度引擎重新调整 2026-01-09 16:45:44 +08:00
lzh
285abe6d48 chore: 【ops】迁移cleaner相关实体到environment模块 2026-01-09 16:44:26 +08:00
lzh
d9b335c6c9 chore: 【ops】派单策略逻辑编写(暂时预留、后期设计接入) 2026-01-08 15:14:08 +08:00
lzh
e4fa971fea chore: 【ops】工单队列管理 2026-01-08 15:12:39 +08:00
lzh
2a4ca53249 chore: 【ops】保洁工单mapper-insertOnDuplicateKeyUpdate方法 2026-01-08 15:06:38 +08:00
lzh
48e1a91fd5 chore: 【ops】工单生命周期操作(暂停、回复、完成、取消) 2026-01-08 15:06:08 +08:00
lzh
5e9dc8b104 chore: 【ops】状态机实现/状态切换事件发布/保洁监听处理事件 2026-01-08 15:05:09 +08:00
lzh
bdb2eb0856 chore: 【ops】删除状态机监听器 2026-01-08 15:00:35 +08:00
lzh
b225df4392 chore: 【ops】SuperBuilder改为Builder 2026-01-08 14:32:30 +08:00
lzh
77b7bfb89d chore: 【ops】工单基础Service 2026-01-06 10:52:33 +08:00
lzh
43a47a465c chore: 【ops】保洁员Dispatch初步搭建 2026-01-06 10:51:44 +08:00
lzh
46926e8127 chore: 【ops】工单排队队列实现 2026-01-06 10:50:20 +08:00
lzh
9ef2730fd0 chore: 【ops】FSM轻量级状态机实现 2026-01-06 10:48:39 +08:00
lzh
35564578b6 chore: 【ops】Mapper新增 2026-01-06 10:46:40 +08:00
lzh
ffe5d8f778 chore: 【ops】实体类新增 2026-01-06 10:46:05 +08:00
lzh
21bd26f220 chore: 去除package-info文件 2026-01-06 10:42:32 +08:00