CLI 命令完整列表


数据导入

import_sales_plan

导入销售计划

python -m certflow.cli import_sales_plan -f <文件路径> [--sheet <工作表>] [--dry-run]

参数

说明

必填

-f, --file

Excel文件路径

--sheet

工作表名称

--header-row

表头行号

--dry-run

预览模式


import_certs

导入合格证

python -m certflow.cli import_certs -f <文件路径> [--dry-run]

打印管理


auto_number

自动编号

python -m certflow.cli auto_number --rule-id <规则ID> [--ids <ID列表>]

数据管理

db_backup

备份数据库

python -m certflow.cli db_backup [--output <输出路径>]

db_sync

同步数据库

python -m certflow.cli db_sync --source <源数据库> [--target <目标数据库>]

clean_duplicates

清理重复数据

python -m certflow.cli clean_duplicates [--dry-run] [--table <表名>]

check_consistency

一致性检查

python -m certflow.cli check_consistency

数据导出

export_excel

导出Excel

python -m certflow.cli export_excel -o <输出路径> [--format xlsx]

export_access

导出Access

python -m certflow.cli export_access -o <输出路径>

查询统计

quick_query

快速查询

python -m certflow.cli quick_query [--customer <客户名>] [--model <型号>] [--status <状态>]

stats

统计信息

python -m certflow.cli stats --type <daily|monthly|yearly> [--month <月份>]

数据维护

batch_update

批量更新

python -m certflow.cli batch_update -f <更新文件.csv> [--dry-run]

mark_shipped

标记已发货

python -m certflow.cli mark_shipped --ids <ID列表>

copy_cert_info

复制证书信息

python -m certflow.cli copy_cert_info --from <源ID> --to <目标ID>

服务

serve

启动服务

python -m certflow.cli serve --host <主机> --port <端口>

watch

文件监控

python -m certflow.cli watch --dir <目录路径>

错误码

代码

说明

0

成功

1

通用错误

2

配置错误

3

数据库错误

4

文件错误

5

打印错误

6

参数错误