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

41 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_institute 表录入说明
来源:`docs/architecture/04-germplasm-seed-data-flow.md`
## 录入目标
`germplasm_institute` 记录 germplasm 相关机构,包括 host、donor、breeding、collecting、redundant 等类型。
## 上下游关系
| 类型 | 内容 |
| --- | --- |
| 表 | `germplasm_institute` |
| Java 实体 | `GermplasmInstituteEntity` |
| 前置依赖 | `germplasm` |
| 下游引用 | Germplasm MCPD、机构筛选 |
## 字段录入
| 字段 | 业务意义 | 录入方式 | 校验规则 |
| --- | --- | --- | --- |
| `id` | 机构记录主键 | 系统生成 | 必填、唯一 |
| `germplasm_id` | 所属 germplasm | Germplasm 选择器/详情页带出 | 必选,必须存在 |
| `institute_type` | 机构类型 | 枚举选择 | HOST、DONOR、BREEDING、COLLECTING、REDUNDANT |
| `institute_code` | 机构代码 | 用户录入 | 可选 |
| `institute_name` | 机构名称 | 用户录入 | 建议必填 |
| `institute_address` | 机构地址 | 多行文本 | 可选 |
## 页面与交互
- 在 Germplasm 详情页 Institute Tab 内维护。
- 可把 HOST institute 作为 germplasm 主信息摘要展示。
## 关键校验
1. `germplasm_id` 必须存在。
2. 同一 germplasm 下同类型、同 code 的机构不建议重复。
3. 删除 institute 记录不应删除 germplasm 主数据。
**状态:已完成**(页面:`germplasm/germplasm/[germplasmDbId]` → Institute Tab扩展接口 `/brapi/v2/germplasm/{id}/institutes` CRUD