所有需求实现完成
This commit is contained in:
@@ -47,6 +47,34 @@ cd backend && source .venv/bin/activate && PYTHONPATH=src python scripts/clean_d
|
||||
|
||||
---
|
||||
|
||||
## migrate_add_statistics_type.py:为 projects 表增加统计类型列
|
||||
|
||||
为已有 `projects` 表添加 `statistics_type` 列(若不存在)。
|
||||
|
||||
```bash
|
||||
cd backend && PYTHONPATH=src python scripts/migrate_add_statistics_type.py
|
||||
```
|
||||
|
||||
**migrate_statistics_type_repair.py**:将已有数据中的「检修、技改、抢修」统一改为「检修-技改-抢修」(一次性执行)。
|
||||
|
||||
```bash
|
||||
cd backend && PYTHONPATH=src python scripts/migrate_statistics_type_repair.py
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## fill_statistics_type_from_xls.py:按「统计」表填充统计类型
|
||||
|
||||
根据 `docs/example.xls` 的「统计」表,为已有项目填充 `statistics_type`(基建工程、业扩项目、户表、客户工程、营销项目、检修-技改-抢修、其他)。导入数据后建议执行一次。
|
||||
|
||||
```bash
|
||||
cd backend && PYTHONPATH=src python scripts/fill_statistics_type_from_xls.py
|
||||
# 或指定 xls 路径
|
||||
PYTHONPATH=src python scripts/fill_statistics_type_from_xls.py /path/to/example.xls
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## import_xls.py:导入 example.xls 到 projects 表
|
||||
|
||||
将 `docs/example.xls` 中的项目数据导入 ocean 数据库的 `projects` 表。
|
||||
|
||||
Reference in New Issue
Block a user