getStorage()->isInStorage) { return CanHandleResult::no(VoiceMessage::PLEASE_SWIPE_STORAGE_OUT); } if (!$this->isMatchReaderType($context)) { if ($context->getCurrentStep() === RinseNode::getName()) { return CanHandleResult::no(VoiceMessage::PLEASE_SWIPE_DISINFECT); } return CanHandleResult::no(); } // 上一个步骤必须是漂洗 或者 晨洗 if (!$this->isRequiredNode($context->getCurrentStep(), [RinseNode::getName(), MorningWashNode::getName()])) { return CanHandleResult::no(); } return CanHandleResult::yes(); } /** * 具体处理逻辑 */ protected function doHandle(ProcessContext $context): ProcessContext { return $context->builder() ->withCurrentStep('消毒') ->needDatabaseOperation() ->dbOperation(DbOperationType::INSERT) ->needWebSocketNotify() ->build(); } }