69 lines
3.5 KiB
Markdown
69 lines
3.5 KiB
Markdown
# 04 Germplasm / Seed - germplasm 表录入说明
|
||
|
||
来源:`docs/architecture/04-germplasm-seed-data-flow.md`
|
||
|
||
## 录入目标
|
||
|
||
`germplasm` 是种质主表,保存 accession、PUI、分类、采集、来源、育种方法和展示名称等身份信息。它不是库存批次;库存批次由 `seed_lot` 表达。
|
||
|
||
## 上下游关系
|
||
|
||
| 类型 | 内容 |
|
||
| --- | --- |
|
||
| 表 | `germplasm` |
|
||
| Java 实体 | `GermplasmEntity` |
|
||
| 前置依赖 | `crop`,可选 `breeding_method` |
|
||
| 下游引用 | `germplasm_attribute_value`、`germplasm_donor`、`germplasm_institute`、`germplasm_origin`、`germplasm_synonym`、`germplasm_taxon`、`pedigree_node`、`cross_parent`、`seed_lot_content_mixture` |
|
||
| API | `/brapi/v2/germplasm` |
|
||
|
||
## 字段录入
|
||
|
||
| 字段 | 业务意义 | 录入方式 | 校验规则 |
|
||
| --- | --- | --- | --- |
|
||
| `id` | germplasm 主键 | 系统生成;导入可指定 | 必填、唯一 |
|
||
| `auth_user_id` | 数据所属用户 | 登录上下文自动写入 | 不允许前端手填 |
|
||
| `germplasm_name` | 种质名称 | 用户录入/导入 | 建议必填 |
|
||
| `default_display_name` | 默认展示名称 | 用户录入/自动生成 | 可选,缺省用 germplasm_name |
|
||
| `germplasmpui` | 种质永久标识 | 用户录入/导入 | 可选,建议唯一 |
|
||
| `accession_number` | accession 编号 | 用户录入/导入 | 可选,建议唯一 |
|
||
| `crop_id` | 所属作物 | Crop 选择器 | 建议必选,若填需存在 |
|
||
| `breeding_method_id` | 育种方法 | BreedingMethod 选择器 | 可选,若填需存在 |
|
||
| `genus` | 属 | 用户录入 | 可选 |
|
||
| `species` | 种 | 用户录入 | 可选 |
|
||
| `species_authority` | 种命名人 | 用户录入 | 可选 |
|
||
| `subtaxa` | 亚种/变种 | 用户录入 | 可选 |
|
||
| `subtaxa_authority` | 亚种命名人 | 用户录入 | 可选 |
|
||
| `country_of_origin_code` | 来源国家代码 | 国家选择器 | 可选 |
|
||
| `collection` | collection | 用户录入 | 可选 |
|
||
| `acquisition_date` | 获取日期 | 日期选择器 | 可选 |
|
||
| `acquisition_source_code` | 获取来源编码 | 枚举选择 | 可选 |
|
||
| `biological_status_of_accession_code` | 生物状态编码 | 枚举选择 | 可选 |
|
||
| `mls_status` | MLS 状态 | 枚举选择 | 可选 |
|
||
| `germplasm_preprocessing` | 种质预处理说明 | 文本 | 可选 |
|
||
| `seed_source` | 种子来源描述字段 | 文本 | 可选,不等于 seed_lot |
|
||
| `seed_source_description` | 种子来源补充说明 | 多行文本 | 可选 |
|
||
| `documentationurl` | 文档链接 | URL 输入 | 可选,URL 格式校验 |
|
||
|
||
## 附属信息
|
||
|
||
| 附属表 | 内容 |
|
||
| --- | --- |
|
||
| `germplasm_donor` | donor accession、donor institute |
|
||
| `germplasm_institute` | host、donor、breeding、collecting、redundant 等机构 |
|
||
| `germplasm_origin` | 来源坐标和坐标不确定性 |
|
||
| `germplasm_synonym` | 别名及别名类型 |
|
||
| `germplasm_taxon` | taxon 来源和值 |
|
||
| `germplasm_entity_type_of_germplasm_storage_code` | storage type code 列表 |
|
||
|
||
## 页面与交互
|
||
|
||
- Germplasm 列表页支持按 crop、germplasmName、accessionNumber、PUI、synonym 查询。
|
||
- 详情页以 Tab 展示 attributes、donors、institutes、origin、synonyms、taxon、pedigree、seed lots、cross parent 记录。
|
||
- 从 Study/ObservationUnit 或 SeedLot 进入时应能回到 germplasm 详情。
|
||
|
||
## 关键校验
|
||
|
||
1. `germplasm_name` 建议必填,`accession_number` 和 `germplasmpui` 建议唯一。
|
||
2. 删除 germplasm 前必须检查属性值、seed lot 组成、cross parent、pedigree、sample/taxon 等引用。
|
||
3. 不要用 `seed_source` 表达库存;库存必须走 `seed_lot`。
|