From d31eae990f98c0c290943ba8322318409f7325da Mon Sep 17 00:00:00 2001 From: zimoyin <2556608754@qq.com> Date: Mon, 9 Mar 2026 00:21:02 +0800 Subject: [PATCH] =?UTF-8?q?todo(flow):=20=E6=96=B0=E5=A2=9E=E8=99=9A?= =?UTF-8?q?=E6=8B=9F=E6=B8=85=E6=B4=97=E6=9C=BA=E8=8A=82=E7=82=B9=E6=94=AF?= =?UTF-8?q?=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/config/Config.php | 8 ++++++++ app/flow/nodes/VirtualWashMachineNode.php | 20 +++----------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/app/config/Config.php b/app/config/Config.php index a43662e..2aae9d2 100644 --- a/app/config/Config.php +++ b/app/config/Config.php @@ -100,6 +100,13 @@ class Config get => $this->openCardRecordReaders; } + /** + * 是否开启虚拟清洗机解析 + */ + public bool $enableVirtualCleanerParser { + get => $this->enableVirtualCleanerParser; + } + private function __construct() { $this->database = new DatabaseConfig(); @@ -128,6 +135,7 @@ class Config $this->openCardRecordCacheTime = self::getIntEnv('OPEN_CARD_RECORD_CACHE_TIME', 60); $this->openCardRecordReaders = self::getStringArrayEnv('OPEN_CARD_RECORD_READERS', []); $this->storageSingleReader = self::getBoolEnv('STORAGE_SINGLE_READER', false); + $this->enableVirtualCleanerParser = self::getBoolEnv('ENABLE_VIRTUAL_CLEANER_PARSER', false); } /** diff --git a/app/flow/nodes/VirtualWashMachineNode.php b/app/flow/nodes/VirtualWashMachineNode.php index 1cd40ae..e70aa7e 100644 --- a/app/flow/nodes/VirtualWashMachineNode.php +++ b/app/flow/nodes/VirtualWashMachineNode.php @@ -2,6 +2,7 @@ namespace app\flow\nodes; +use app\config\Config; use app\flow\DbOperationType; use app\flow\ProcessContext; use app\flow\VoiceMessage; @@ -44,29 +45,14 @@ class VirtualWashMachineNode extends AbstractProcessNode return false; } - // TODO - return false; + return Config::getInstance()->enableVirtualCleanerParser; } /** - * 具体处理逻辑 + * TODO 具体处理逻辑 */ 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; } }