fix(xg): 操行分修改改为更新待审核记录,录入页保留审核中状态

同一月份再次修改不再因唯一约束失败,刷新后仍能看到待审分数。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
“wuzhen”andCursor committed 2026-11-24 15:24:33 +08:00
1 parent fcb695664b
commit 7f9d3830ad
7 files changed
+189 -58

No files matched your search

@@ -47,6 +47,7 @@
| 接口名称 | 请求方式 | 路径 | 权限字符 | 功能描述 |
| -------- | -------- | ---- | -------- | -------- |
| 批量录入操行分 | POST | /api/xg/conduct-score/batch | xg:conduct:score:batchAdd | 批量保存操行分 |
| 批量提交修改审核 | POST | /api/xg/conduct-score/batch-update | xg:conductScore:batchUpdate | 已录入分数的修改只写审核表,审核通过后才改正式分数 |
| 班主任班级学生 | GET | /api/xg/conduct-score/class-students | xg:conduct:score:classStudents | 获取班主任班级学生列表 |
| 学期平均分统计 | GET | /api/xg/conduct-score/semester-average | xg:conduct:score:semester | 查询学期平均分 |
| 导出学期统计 | GET | /api/xg/conduct-score/export-semester | xg:conduct:score:export | 导出学期统计数据 |
@@ -165,6 +166,18 @@
}
```
### 2.1 批量提交修改审核
#### 接口信息
- **请求方式**: POST
- **接口路径**: `/api/xg/conduct-score/batch-update`
- **权限字符**: `xg:conductScore:batchUpdate`
- **接口描述**: 班主任修改已录入的操行分。正式分数不变,生成或更新待审核记录,管理员审核通过后才写入正式表。
同一学生、同一学年、学期、月份只保留一条未删除审核记录。当月没有审核记录时新增;已经是待审核时覆盖新分数和新备注;已经通过或驳回时,清空原审核人并把该记录重新置为待审核。
班级学生列表会返回 `pendingAuditId`、`pendingScore`、`pendingRemark`。录入页据此在刷新后显示「审核中」,正式分数仍是 `existingScore.score`。
### 3. 班主任班级学生列表
#### 接口信息
@@ -215,6 +228,9 @@
"remark": "表现良好",
"createTime": "2024-09-01 09:00:00"
},
"pendingAuditId": 1234567890123456790,
"pendingScore": 86.00,
"pendingRemark": "更正分数",
"lastScore": 90.00,
"lastMonth": 8
}