todo(flow): 新增虚拟清洗机节点支持
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user