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

42 lines
1.5 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_donor 表录入说明
来源:`docs/architecture/04-germplasm-seed-data-flow.md`
## 录入目标
`germplasm_donor` 记录某个 germplasm 的 donor accession 和 donor institute 信息,是 germplasm 的附属明细。
## 上下游关系
| 类型 | 内容 |
| --- | --- |
| 表 | `germplasm_donor` |
| Java 实体 | `DonorEntity` |
| 前置依赖 | `germplasm` |
| 下游引用 | MCPD 展示、来源追踪 |
## 字段录入
| 字段 | 业务意义 | 录入方式 | 校验规则 |
| --- | --- | --- | --- |
| `id` | donor 记录主键 | 系统生成;导入可指定 | 必填、唯一 |
| `auth_user_id` | 数据所属用户 | 登录上下文自动写入 | 不允许前端手填 |
| `germplasm_id` | 所属 germplasm | Germplasm 选择器/详情页带出 | 必选,必须存在 |
| `donor_accession_number` | donor accession 编号 | 用户录入 | 可选 |
| `donor_institute_code` | donor 机构代码 | 用户录入/选择 | 可选 |
| `donor_institute_name` | donor 机构名称 | 用户录入/选择 | 可选 |
| `germplasmpui` | donor germplasm PUI | 用户录入 | 可选 |
## 页面与交互
- 在 Germplasm 详情页 Donor Tab 内维护。
- 支持一条 germplasm 维护多个 donor 记录。
## 关键校验
1. `germplasm_id` 必须存在。
2. 同一 germplasm 下 donor accession + institute code 不建议重复。
3. 删除 donor 记录不应删除 germplasm 主数据。
**状态:已完成**(页面:`germplasm/germplasm/[germplasmDbId]` → Donor TabBrAPI `PUT /germplasm/{id}` donors 整表替换)