currentStep, $validSteps); } /** * 检查是否已完成清洗流程 */ public function isWashProcessCompleted(): bool { return $this->currentStep === '结束'; } /** * 是否有上一个操作 */ public function hasPreviousAction(): bool { return $this->previousAction !== null; } /** * 转换为数组 */ public function toArray(): array { return [ 'currentStep' => $this->currentStep, 'processType' => $this->processType, 'batchNo' => $this->batchNo, 'actionStartTime' => $this->actionStartTime, 'duration' => $this->duration, 'previousActionId' => $this->previousAction?->action_id, ]; } }