diff --git a/unilabos/devices/workstation/README.md b/unilabos/devices/workstation/README.md index f96ed7f..1c38f40 100644 --- a/unilabos/devices/workstation/README.md +++ b/unilabos/devices/workstation/README.md @@ -1,9 +1,5 @@ # 工作站抽象基类物料系统架构说明 -## 设计理念 - -基于用户需求"请你帮我系统思考一下,工作站抽象基类的物料系统基类该如何构建",我们最终确定了一个**PyLabRobot Deck为中心**的简化架构。 - ### 核心原则 1. **PyLabRobot为物料管理核心**:使用PyLabRobot的Deck系统作为物料管理的基础,利用其成熟的Resource体系 diff --git a/unilabos/devices/workstation/bioyond_studio/bioyond_cell/20260108_multi_batch1.xlsx b/unilabos/devices/workstation/bioyond_studio/bioyond_cell/20260108_multi_batch1.xlsx deleted file mode 100644 index 3bd3439..0000000 Binary files a/unilabos/devices/workstation/bioyond_studio/bioyond_cell/20260108_multi_batch1.xlsx and /dev/null differ diff --git a/unilabos/devices/workstation/bioyond_studio/bioyond_cell/20260108_multi_batch2.xlsx b/unilabos/devices/workstation/bioyond_studio/bioyond_cell/20260108_multi_batch2.xlsx deleted file mode 100644 index 9ed74ec..0000000 Binary files a/unilabos/devices/workstation/bioyond_studio/bioyond_cell/20260108_multi_batch2.xlsx and /dev/null differ diff --git a/unilabos/devices/workstation/bioyond_studio/bioyond_cell/outbound_template.xlsx b/unilabos/devices/workstation/bioyond_studio/bioyond_cell/outbound_template.xlsx new file mode 100644 index 0000000..f2c42f2 Binary files /dev/null and b/unilabos/devices/workstation/bioyond_studio/bioyond_cell/outbound_template.xlsx differ diff --git a/unilabos/devices/workstation/bioyond_studio/bioyond_cell/smiles&molweight.py b/unilabos/devices/workstation/bioyond_studio/bioyond_cell/smiles&molweight.py deleted file mode 100644 index 195e87a..0000000 --- a/unilabos/devices/workstation/bioyond_studio/bioyond_cell/smiles&molweight.py +++ /dev/null @@ -1,12 +0,0 @@ -import pubchempy as pcp - -cas = "21324-40-3" # 示例 -comps = pcp.get_compounds(cas, namespace="name") -if not comps: - raise ValueError("No hit") - -c = comps[0] - -print("Canonical SMILES:", c.canonical_smiles) -print("Isomeric SMILES:", c.isomeric_smiles) -print("MW:", c.molecular_weight) diff --git a/unilabos/devices/workstation/bioyond_studio/bioyond_cell/solid_materials.csv b/unilabos/devices/workstation/bioyond_studio/bioyond_cell/solid_materials.csv deleted file mode 100644 index 8db9a5c..0000000 --- a/unilabos/devices/workstation/bioyond_studio/bioyond_cell/solid_materials.csv +++ /dev/null @@ -1,7 +0,0 @@ -material_name -LiPF6 -LiDFOB -DTD -LiFSI -LiPO2F2 - diff --git a/unilabos/devices/workstation/bioyond_studio/bioyond_cell/批量出库模板使用说明.md b/unilabos/devices/workstation/bioyond_studio/bioyond_cell/批量出库模板使用说明.md new file mode 100644 index 0000000..5d11c7b --- /dev/null +++ b/unilabos/devices/workstation/bioyond_studio/bioyond_cell/批量出库模板使用说明.md @@ -0,0 +1,157 @@ +# 批量出库 Excel 模板使用说明 + +**文件**: `outbound_template.xlsx` +**用途**: 配合 `auto_batch_outbound_from_xlsx()` 方法进行批量出库操作 +**API 端点**: `/api/lims/storage/auto-batch-out-bound` + +--- + +## 📋 Excel 列说明 + +| 列名 | 说明 | 示例 | 必填 | +|------|------|------|------| +| `locationId` | **库位 ID(UUID)** | `3a19da43-57b5-294f-d663-154a1cc32270` | ✅ 是 | +| `warehouseId` | **仓库 ID 或名称** | `配液站内试剂仓库` | ✅ 是 | +| `quantity` | **出库数量** | `1.0`, `2.0` | ✅ 是 | +| `x` | **X 坐标(库位横向位置)** | `1`, `2`, `3` | ✅ 是 | +| `y` | **Y 坐标(库位纵向位置)** | `1`, `2`, `3` | ✅ 是 | +| `z` | **Z 坐标(库位层数/高度)** | `1`, `2`, `3` | ✅ 是 | +| `备注说明` | 可选备注信息 | `配液站内试剂仓库-A01` | ❌ 否 | + +### 📐 坐标说明 + +**x, y, z** 是库位在仓库内的**三维坐标**: + +``` +仓库(例如 WH4) +├── Z=1(第1层/加样头面) +│ ├── X=1, Y=1(位置 A) +│ ├── X=2, Y=1(位置 B) +│ ├── X=3, Y=1(位置 C) +│ └── ... +│ +└── Z=2(第2层/原液瓶面) + ├── X=1, Y=1(位置 A) + ├── X=2, Y=1(位置 B) + └── ... +``` + +- **warehouseId**: 指定哪个仓库(WH3, WH4, 配液站等) +- **x, y, z**: 在该仓库内的三维坐标 +- **locationId**: 该坐标位置的唯一 UUID + +### 🎯 起点与终点 + +**重要说明**:批量出库模板**只规定了出库的"起点"**(从哪里取物料),**没有指定"终点"**(放到哪里)。 + +``` +出库流程: +起点(Excel 指定) → ?终点(LIMS/工作流决定) + ↓ +locationId, x, y, z → 由 LIMS 系统或当前工作流自动分配 +``` + +**终点由以下方式确定:** +- **LIMS 系统自动分配**:根据当前任务自动规划目标位置 +- **工作流预定义**:在创建出库任务时已绑定目标位置 +- **暂存区**:默认放到出库暂存区,等待下一步操作 + +💡 **对比**:上料操作(`auto_feeding4to3`)则有 `targetWH` 参数可以指定目标仓库 + +--- + +## 🔍 如何获取 UUID? + +### 方法 1:从配置文件获取 + +参考 `yibin_electrolyte_config.json` 中的 `warehouse_mapping`: + +```json +{ + "warehouse_mapping": { + "配液站内试剂仓库": { + "site_uuids": { + "A01": "3a19da43-57b5-294f-d663-154a1cc32270", + "B01": "3a19da43-57b5-7394-5f49-54efe2c9bef2", + "C01": "3a19da43-57b5-5e75-552f-8dbd0ad1075f" + } + }, + "手动堆栈": { + "site_uuids": { + "A01": "3a19deae-2c7a-36f5-5e41-02c5b66feaea", + "A02": "3a19deae-2c7a-dc6d-c41e-ef285d946cfe" + } + } + } +} +``` + +### 方法 2:通过 API 查询 + +```python +material_info = hardware_interface.material_id_query(workflow_id) +locations = material_info.get("locations", []) +``` + +--- + +## 📝 填写示例 + +### 示例 1:从配液站内试剂仓库出库 + +| locationId | warehouseId | quantity | x | y | z | 备注说明 | +|------------|-------------|----------|---|---|---|----------| +| `3a19da43-57b5-294f-d663-154a1cc32270` | 配液站内试剂仓库 | 1 | 1 | 1 | 1 | A01 位置 | +| `3a19da43-57b5-7394-5f49-54efe2c9bef2` | 配液站内试剂仓库 | 2 | 2 | 1 | 1 | B01 位置 | + +### 示例 2:从手动堆栈出库 + +| locationId | warehouseId | quantity | x | y | z | 备注说明 | +|------------|-------------|----------|---|---|---|----------| +| `3a19deae-2c7a-36f5-5e41-02c5b66feaea` | 手动堆栈 | 1 | 1 | 1 | 1 | A01 | +| `3a19deae-2c7a-dc6d-c41e-ef285d946cfe` | 手动堆栈 | 1 | 1 | 2 | 1 | A02 | + +--- + +## 💻 使用方法 + +```python +from bioyond_cell_workstation import BioyondCellWorkstation + +# 初始化工作站 +workstation = BioyondCellWorkstation(config=config, deck=deck) + +# 调用批量出库方法 +result = workstation.auto_batch_outbound_from_xlsx( + xlsx_path="outbound_template.xlsx" +) +``` + +--- + +## ⚠️ 注意事项 + +1. **locationId 必须是有效的 UUID**,不能使用库位名称 +2. **x, y, z 坐标必须与 locationId 对应**,表示该库位在仓库内的位置 +3. **quantity 必须是数字**,可以是整数或浮点数 +4. Excel 文件必须包含表头行 +5. 空行会被自动跳过 +6. 确保 UUID 与实际库位对应,否则 API 会报错 + +--- + +## 📚 相关文件 + +- **配置文件**: `yibin_electrolyte_config.json` +- **Python 代码**: `bioyond_cell_workstation.py` (L630-695) +- **生成脚本**: `create_outbound_template.py` +- **上料模板**: `material_template.xlsx` + +--- + +## 🔄 重新生成模板 + +```bash +conda activate newunilab +python create_outbound_template.py +``` diff --git a/unilabos/devices/workstation/coin_cell_assembly/coin_cell_assembly_20260112.xlsx b/unilabos/devices/workstation/coin_cell_assembly/coin_cell_assembly_20260112.xlsx deleted file mode 100644 index d9131f1..0000000 Binary files a/unilabos/devices/workstation/coin_cell_assembly/coin_cell_assembly_20260112.xlsx and /dev/null differ