feat(dorm): 一年级宿舍分配到班级由人文学院代理操作

复用请假代理学院配置,班级树对人文学院合并全校一年级、对他院隐藏一年级;分配/回收增加本学院床位与一年级代理写校验,不改班级真实归属。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
“wuzhen”andCursor committed 2026-10-12 16:51:42 +08:00
1 parent 103a53f6f3
commit 04d12bbce1
10 files changed
+597 -189

No files matched your search

@@ -0,0 +1,31 @@
# 一年级宿舍「分配到班级」代理学院说明
## 业务规则
- 一年级班级的宿舍「分配到班级」由**人文学院**操作,即使班级真实归属其他学院。
- **不修改**班级/学生真实 `college_id`。
- 一年级床位须先在「分配到学院」分给人文学院,人文学院才能看到楼/房/床。
- 其他学院在「分配到班级」中**看不到也不可操作**一年级班级(防双头)。
- 一年级判定:`enrollment_year`,每年 **9 月 1 日**切届(与请假一致)。
- 配置键(复用请假):`xg.studentLeave.freshmanProxyCollegeId`
## 实现要点
| 能力 | 说明 |
|------|------|
| 班级树 | `getCurrentUserStudentTree`:代理院=本院∪全校一年级;其它院=本院−一年级 |
| 写校验 | `batchAllocateBedsToClass` / `batchRecallClassAllocation`:床位须属操作人学院;班级权限按一年级代理规则 |
| 公共逻辑 | `FreshmanCollegeProxyHelper` / `FreshmanCollegeProxySupport` |
## 运营注意
1. 系统参数中确认人文学院 `dept_id` 已配置。
2. 一年级床位在 `xsssfpejxy` 分给人文学院。
3. 切届后:树自动切回本学院;若床位 `college_id` 仍挂人文,需另行移交(本期未自动迁移)。
## 相关代码
- `backend/ruoyi-modules/ruoyi-xg/.../helper/FreshmanCollegeProxyHelper.java`
- `backend/ruoyi-modules/ruoyi-xg/.../service/impl/XgStudentMsgServiceImpl.java`
- `backend/ruoyi-modules/ruoyi-xg/.../service/impl/XgDormBedStudentServiceImpl.java`
- `web/src/views/xg/xgss/ejxyfp/`(前端仍调原 API,无强制改动)