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

新增 VoiceTemplate.ORDER_CANCELLED 常量,handleCancelled 在自动调度
下一个任务之前先通过 TTS 队列播报取消通知,与完成流程保持一致。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
lzh
2026-02-14 12:49:07 +08:00
parent abaa737d23
commit 1a245f01ce
2 changed files with 11 additions and 1 deletions

View File

@@ -123,6 +123,13 @@ public class CleanNotificationConstants {
*/ */
public static final String ORDER_COMPLETED = "太棒啦,工单已完成"; public static final String ORDER_COMPLETED = "太棒啦,工单已完成";
// ==================== 工单取消播报 ====================
/**
* 工单取消播报
*/
public static final String ORDER_CANCELLED = "当前工单已取消";
// ==================== 待办增加播报 ==================== // ==================== 待办增加播报 ====================
/** /**

View File

@@ -404,7 +404,10 @@ public class CleanOrderEventListener {
updateExt.setCompletedTime(LocalDateTime.now()); updateExt.setCompletedTime(LocalDateTime.now());
cleanExtMapper.insertOnDuplicateKeyUpdate(updateExt); cleanExtMapper.insertOnDuplicateKeyUpdate(updateExt);
// 2. 业务日志由 OrderLifecycleManagerImpl.cancelOrder() 统一记录,此处不重复 // 2. 语音播报通知保洁员工单已取消
if (deviceId != null) {
playVoice(deviceId, CleanNotificationConstants.VoiceTemplate.ORDER_CANCELLED, orderId);
}
// 3. 自动调度下一个等待任务(如果有 assignee // 3. 自动调度下一个等待任务(如果有 assignee
if (deviceId != null) { if (deviceId != null) {