getStorage()->isInStorage) { return CanHandleResult::cannotHandle(VoiceMessage::PLEASE_SWIPE_STORAGE_OUT); } if (!$this->isMatchReaderType($context)) { if ($context->getCurrentStep() === FinalRinseNode::getName()) { if (!$context->isSuccess()) Logger::debug("[DryNode] 刷卡错误,当前步骤是终末漂洗,但是刷的读卡器类型不是终末漂洗,对用户进行语音提示刷终末漂洗读卡器"); return CanHandleResult::cannotHandle(VoiceMessage::PLEASE_SWIPE_DRY); } return CanHandleResult::cannotHandle(); } // 上一个步骤必须是终末漂洗 if (!$this->isRequiredNode($context->getCurrentStep(), [FinalRinseNode::getName()])) { return CanHandleResult::cannotHandle(VoiceMessage::PLEASE_SWIPE_DISINFECT); } return CanHandleResult::canHandle(); } /** * 具体处理逻辑 */ protected function doHandle(ProcessContext $context): ProcessContext { return $context->createModifyBuilder() ->setCurrentStep('干燥') ->setNeedDatabaseOperation() ->setDbOperation(DbOperationType::INSERT) ->setNeedWebSocketNotify() ->build(); } }