isInStorage) { $context->expectedNextStep = VoiceMessage::PLEASE_SWIPE_STORAGE_OUT; return false; } // 如果不是机洗 if ($context->readerType !== MachineWashNode::getName()) { return false; } // TODO return false; } /** * 具体处理逻辑 */ protected function doHandle(ProcessContext $context): ProcessContext { // 设置流程类型为虚拟清洗机 $context->processType = '虚拟清洗机'; // 更新步骤 $context->currentStep = '虚拟清洗机'; // 标记需要数据库操作 $context->needDatabaseOperation = true; $context->dbOperation = DbOperationType::INSERT; $context->needWebSocketNotify = true; // 更新批次 $context->dbOperation = DbOperationType::UPDATE; return $context; } }