fix(process): 修复自定义配置 required 不生效

This commit is contained in:
zimoyin
2026-03-11 15:04:11 +08:00
parent f2ff4ae123
commit 8e617d06bc
11 changed files with 49 additions and 17 deletions
+2 -2
View File
@@ -60,14 +60,14 @@ class StorageNode extends AbstractProcessNode
if ($isInStorage) {
// 内镜已在库中,执行出库
$validSteps = ['内镜放入', '结束'];
if (!in_array($context->getCurrentStep(), $validSteps)) {
if (!$this->isRequiredNode($context->getCurrentStep(), $validSteps)) {
Logger::debug('[StorageNode] 当前步骤 {} 不符合出库条件', [$context->getCurrentStep()]);
return CanHandleResult::cannotHandle();
}
} else {
// 内镜不在库中,执行入库
$validSteps = ['', '结束', '内镜取出', '测漏正常', '测漏异常'];
if (!in_array($context->getCurrentStep(), $validSteps)) {
if (!$this->isRequiredNode($context->getCurrentStep(), $validSteps)) {
Logger::debug('[StorageNode] 当前步骤 {} 不符合入库条件', [$context->getCurrentStep()]);
return CanHandleResult::cannotHandle();
}