import( (string) $this->argument('path'), $this->option('sheet') ?: null, max(1, (int) $this->option('company')), (bool) $this->option('dry-run'), ); } catch (Throwable $exception) { $this->error('顾家报价单未导入,原有数据未改变。' . $exception->getMessage()); return self::FAILURE; } $statuses = []; foreach ($result['status_counts'] as $status => $count) { $statuses[] = [$status, number_format($count)]; } $this->table(['项目', '值'], [ ['模式', $result['dry_run'] ? '仅校验' : '正式导入'], ['报价记录', number_format($result['rows'])], ['唯一物料', number_format($result['material_count'])], ['文件 SHA-256', $result['file_sha256']], ]); if ($statuses !== []) { $this->table(['状态', '记录数'], $statuses); } $this->info($result['dry_run'] ? '顾家报价单校验完成。' : '顾家报价单已导入共享镜像。'); return self::SUCCESS; } }