Files
brapi-java/docs/dev/04-germplasm/07-germplasm_taxon.md
2026-05-28 17:25:32 +08:00

39 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 04 Germplasm / Seed - germplasm_taxon 表录入说明
来源:`docs/architecture/04-germplasm-seed-data-flow.md`
## 录入目标
`germplasm_taxon` 记录外部 taxon 标识和来源,用于把 germplasm 连接到分类数据库或外部生物分类体系。该表由 `TaxonEntity` 映射。
## 上下游关系
| 类型 | 内容 |
| --- | --- |
| 表 | `germplasm_taxon` |
| Java 实体 | `TaxonEntity` |
| 前置依赖 | `germplasm` |
| 下游引用 | `sample.taxon_id_id`、分类展示 |
## 字段录入
| 字段 | 业务意义 | 录入方式 | 校验规则 |
| --- | --- | --- | --- |
| `id` | taxon 记录主键 | 系统生成 | 必填、唯一 |
| `germplasm_id` | 所属 germplasm | Germplasm 选择器/详情页带出 | 必选,必须存在 |
| `source_name` | taxon 来源名称 | 文本/下拉 | 可选,如 NCBI Taxonomy |
| `taxon_id` | taxon 标识 | 用户录入 | 必填 |
## 页面与交互
- 在 Germplasm 详情页 Taxon Tab 内维护。
- Sample 表可引用 taxon 记录。
## 关键校验
1. `germplasm_id` 必须存在。
2. 同一 source 下 taxon_id 不建议重复。
3. 删除 taxon 前检查 sample 引用。
**状态:已完成**(页面:`germplasm/germplasm/[germplasmDbId]` → Taxon TabBrAPI `PUT /germplasm/{id}` taxonIds 整表替换)