fix:sample/plate 之前的开发

This commit is contained in:
彭帅
2026-05-28 11:56:17 +08:00
parent fc36bc83e3
commit 8b65de36b8
367 changed files with 57752 additions and 947 deletions

View File

@@ -0,0 +1,66 @@
# 01 Core - season 表录入说明
来源:`docs/requirements/01-core-data-entry-requirements.md`
## 录入目标
`season` 记录年度和季节,用于 study 的季节绑定,以及部分 observation 的季节维度统计。
## 前置依赖和下游引用
| 类型 | 内容 |
| --- | --- |
| 表 | `season` |
| 前置依赖 | 无 |
| 下游引用 | `study_season`、部分 `observation` |
## 页面入口
| 页面 | 录入要求 |
| --- | --- |
| Season 列表页 | 支持 year、season 筛选;新增、编辑、查看详情、停用 |
| Season 新增/编辑页 | 简单表单 |
| Season 详情页 | 展示关联 study |
列表页表格字段:`year``season`、关联 study 数。
## 字段录入
| 字段 | 类型 | 控件 | 录入说明 | 校验/来源 |
| --- | --- | --- | --- | --- |
| `id` | varchar(255) | 隐藏/只读 | 季节主键 | 必填、唯一 |
| `auth_user_id` | varchar(255) | 隐藏 | 数据所属用户 | 登录上下文自动写入 |
| `season` | varchar(255) | 文本框/下拉框 | 季节名称,如 Spring、Summer | 必填 |
| `year` | integer | 年份选择器 | 年份 | 必填,四位年份 |
## 校验规则
1. `season` 必填。
2. `year` 必填,使用四位年份。
3. 同一年份内 season 名称不建议重复。
## 接口能力
| 接口 | 用途 |
| --- | --- |
| `GET /seasons` | season 查询 |
| `POST /seasons` | 新增 season |
| `PUT /seasons/{id}` | 编辑 season |
| `GET /selectors/seasons` | season 搜索下拉,参数 `year``keyword` |
## 导入导出
1. 支持通过 Core 导入流程导入 `season`
2. 模板列名使用数据库字段名。
3. 可按 `id` 幂等更新;无 `id` 时新增。
4. 列表页支持导出当前筛选结果,导出文件应包含 ID 和展示名称。
## 删除/停用
`season` 已被 `study_season``observation` 引用时,不允许物理删除。后端需要返回引用对象类型和数量,前端展示后引导用户停用。
## 验收点
1. Season 列表页支持按 year 和 season 筛选。
2. 同一年份内重复季节名称需要提示。
3. Study 新增/编辑页可以多选 season。