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

41 lines
1.6 KiB
Markdown
Raw Permalink 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 - seed_lot_content_mixture 表录入说明
来源:`docs/architecture/04-germplasm-seed-data-flow.md`
## 录入目标
`seed_lot_content_mixture` 表示 seed lot 的组成明细。它可以把 seed lot 连接到 germplasm也可以连接到 cross_entity适合表达混合批次或杂交产生的批次。
## 上下游关系
| 类型 | 内容 |
| --- | --- |
| 表 | `seed_lot_content_mixture` |
| Java 实体 | `SeedLotContentMixtureEntity` |
| 前置依赖 | `seed_lot`、可选 `germplasm`、可选 `cross_entity` |
| 下游引用 | Seed lot 组成展示 |
## 字段录入
| 字段 | 业务意义 | 录入方式 | 校验规则 |
| --- | --- | --- | --- |
| `id` | 组成明细主键 | 系统生成 | 必填、唯一 |
| `seed_lot_id` | 所属 seed lot | SeedLot 选择器/详情页带出 | 必选,必须存在 |
| `germplasm_id` | 组成 germplasm | Germplasm 选择器 | 与 cross_id 至少填一个 |
| `cross_id` | 组成来源 cross | Cross 选择器 | 与 germplasm_id 至少填一个 |
| `mixture_percentage` | 组成比例 | 数字输入 | 0-100 |
## 页面与交互
- 在 SeedLot 详情页 Content Mixture Tab 内维护。
- 支持多个组成明细,合计比例可展示为进度或校验提示。
## 关键校验
1. `seed_lot_id` 必须存在。
2. `germplasm_id``cross_id` 至少填写一个。
3. 同一 seed lot 下 mixture_percentage 合计建议为 100。
4. 删除组成明细不应删除 seed lot、germplasm 或 cross 主数据。
**状态:已完成**(页面:`germplasm/seed-lot/[seedLotDbId]` → Content Mixture Tab占比合计进度条 + 100% 校验BrAPI `PUT /seedlots/{id}` contentMixture