Files
brapi-java/docs/dev/04-germplasm/10-crossing_project.md
2026-05-28 11:56:17 +08:00

39 lines
1.4 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 - crossing_project 表录入说明
来源:`docs/architecture/04-germplasm-seed-data-flow.md`
## 录入目标
`crossing_project` 表示杂交项目,是 cross、planned cross、cross parent 和 pedigree node 的上游组织维度,通常挂在 Core 的 `program` 下。
## 上下游关系
| 类型 | 内容 |
| --- | --- |
| 表 | `crossing_project` |
| Java 实体 | `CrossingProjectEntity` |
| 前置依赖 | `program` |
| 下游引用 | `cross_entity``cross_parent``pedigree_node` |
| API | `/brapi/v2/crossingprojects` |
## 字段录入
| 字段 | 业务意义 | 录入方式 | 校验规则 |
| --- | --- | --- | --- |
| `id` | crossing project 主键 | 系统生成;导入可指定 | 必填、唯一 |
| `auth_user_id` | 数据所属用户 | 登录上下文自动写入 | 不允许前端手填 |
| `name` | 杂交项目名称 | 用户录入 | 必填,建议同一 program 下唯一 |
| `description` | 项目说明 | 多行文本 | 可选 |
| `program_id` | 所属 program | Program 选择器 | 必选,必须存在 |
## 页面与交互
- 列表页支持按 program、keyword 查询。
- 详情页展示 crosses、planned crosses、potential parents、pedigree nodes。
## 关键校验
1. `program_id` 必须存在。
2. 删除 crossing_project 前检查 cross、cross_parent、pedigree_node 引用。
3. 如果 program 有 crop创建 cross 时亲本 germplasm 建议与 program crop 一致。