getStorage()->isInStorage) { return CanHandleResult::no(VoiceMessage::PLEASE_SWIPE_STORAGE_OUT); } if (!$this->isMatchReaderType($context)) { if ($context->getCurrentStep() === DisinfectNode::getName()) { if (!$context->isSuccess()) Logger::debug("[FinalRinseNode] 刷卡错误,当前步骤是消毒,但是刷的读卡器类型不是消毒,对用户进行语音提示刷消毒读卡器"); return CanHandleResult::no(VoiceMessage::PLEASE_SWIPE_FINAL_RINSE); } return CanHandleResult::no(); } // 上一个步骤必须是消毒或机洗 if ($this->isRequiredNode($context->getCurrentStep(), ['消毒', '机洗'])) { return CanHandleResult::yes(); } return CanHandleResult::no(); } /** * 具体处理逻辑 */ protected function doHandle(ProcessContext $context): ProcessContext { return $context->builder() ->withCurrentStep('终末漂洗') ->needDatabaseOperation() ->dbOperation(DbOperationType::INSERT) ->needWebSocketNotify() ->build(); } }