fix:sample/plate 之前的开发

This commit is contained in:
彭帅
2026-05-28 11:56:17 +08:00
parent fc36bc83e3
commit 8b65de36b8
367 changed files with 57752 additions and 947 deletions

View File

@@ -0,0 +1,48 @@
# 03 Genotyping - plate 表录入说明
来源:`docs/architecture/03-genotyping-data-flow.md`
## 录入目标
`plate` 表示样本板,是批量送检和测序前的样本组织单元。一个 plate 可以包含多个 `sample`,也可以关联 vendor submission。
## 上下游关系
| 类型 | 内容 |
| --- | --- |
| 表 | `plate` |
| Java 实体 | `PlateEntity` |
| 前置依赖 | `program``trial``study`,可选 `plate_submission` |
| 下游引用 | `sample` |
| API | `/brapi/v2/plates` |
## 字段录入
| 字段 | 业务意义 | 录入方式 | 校验规则 |
| --- | --- | --- | --- |
| `id` | plate 主键 | 系统生成;导入时可指定 | 必填、唯一 |
| `auth_user_id` | 数据所属用户 | 登录上下文自动写入 | 不允许前端手填 |
| `plate_name` | 样本板名称 | 用户录入 | 建议必填,同一 study 下建议唯一 |
| `plate_barcode` | 样本板条码 | 扫码/手填 | 建议唯一 |
| `client_plate_db_id` | 客户侧 plate ID | 用户录入/导入 | 可选 |
| `client_plate_barcode` | 客户侧 plate 条码 | 用户录入/导入 | 可选 |
| `plate_format` | plate 规格,如 96/384 孔板 | 枚举选择 | 可选;与样本孔位校验联动 |
| `sample_type` | plate 中样本类型 | 枚举选择 | 可选 |
| `sample_submission_format` | 提交给 vendor 的样本板格式 | 枚举选择 | 可选 |
| `status_time_stamp` | 状态时间 | 系统写入或导入 | 可选 |
| `program_id` | 所属项目 | 项目选择器 | 可选;若填需存在 |
| `trial_id` | 所属 trial | Trial 选择器 | 可选;若填需存在 |
| `study_id` | 所属 study | Study 选择器 | 可选;若填需存在 |
| `submission_id` | vendor plate submission | Vendor submission 选择器 | 可选 |
## 页面与交互
- Plate 列表页支持按 program、trial、study、barcode、plateName 查询。
- 详情页展示 plate 基本信息和下属 sample 列表。
- 新增 sample 时如果从 plate 详情进入,默认带出 `plate_id`
## 关键校验
1. 如果录入 `program_id/trial_id/study_id`,需要校验 Core 上下文一致性。
2. 如果使用 `plate_format`,样本 `plate_row/plate_column/well` 不能超出规格。
3. 已有关联 `sample` 的 plate 删除前必须提示,通常只允许停用或先迁移样本。