63 lines
2.8 KiB
Java
63 lines
2.8 KiB
Java
package com.yunhai.acaclassroom.service;
|
||
|
||
import com.yunhai.acaclassroom.model.ClassroomBatchAddRequest;
|
||
import com.yunhai.acaclassroom.model.ClassroomBatchEditRequest;
|
||
import com.yunhai.acaclassroom.model.ClassroomEditRequest;
|
||
|
||
import java.util.List;
|
||
import java.util.Map;
|
||
|
||
/**
|
||
* 教室管理服务。
|
||
*/
|
||
public interface IClassroomService {
|
||
|
||
/**
|
||
* 教室列表(空间作用域:按楼栋或按校区,可按楼层/类型/状态/关键字过滤,内存分页)。
|
||
*
|
||
* @param buildingId 楼栋 id(与 campusId 至少传其一,楼栋优先)
|
||
* @param campusId 校区 id(buildingId 为空时按校区查全部楼栋的教室)
|
||
* @param floor 楼层(可空)
|
||
* @param typeId 教室类型(可空)
|
||
* @param status open/closed(可空)
|
||
* @param keyword 教室名称/编号模糊(可空)
|
||
* @param grade 年级过滤(绑定班级页 Tab:1=高一 2=高二 3=高三;可空不过滤。
|
||
* 过滤口径=未绑定教室 + 绑定班级为该年级的教室)
|
||
* @param bindStatus 绑定状态过滤 bound/unbound(可空)
|
||
* @param page 页码(1 起)
|
||
* @param count 每页条数
|
||
* @param sortField 排序字段 floor/roomCode/roomName/status/seatCount(可空=默认序:楼层升序+编号升序)
|
||
* @param order asc/desc(可空=asc)
|
||
*/
|
||
Map<String, Object> list(Integer buildingId, Integer campusId, Integer floor, Integer typeId, String status,
|
||
String keyword, Integer grade, String bindStatus, Integer page, Integer count,
|
||
String sortField, String order);
|
||
|
||
/** 楼栋下已有教室的楼层列表(升序,筛选项用)。 */
|
||
List<Integer> floors(Integer buildingId);
|
||
|
||
/** 全校教室扁平列表(楼层筛选树数据源,仅轻量字段)。 */
|
||
List<Map<String, Object>> tree();
|
||
|
||
/** 批量添加教室,返回 {created, skipped, total}。 */
|
||
Map<String, Object> batchAdd(ClassroomBatchAddRequest req);
|
||
|
||
/** 编辑教室(类型/名称/编号/状态/座位数)。 */
|
||
void edit(ClassroomEditRequest req);
|
||
|
||
/** 批量编辑教室(仅状态 / 教室类型,可只改其一),返回 {updated, skipped, total}。 */
|
||
Map<String, Object> batchEdit(ClassroomBatchEditRequest req);
|
||
|
||
/** 批量删除教室。 */
|
||
void delete(List<Integer> ids);
|
||
|
||
/** 教室绑定班级(班级同校且未被其他教室占用),返回 {classId, className}。 */
|
||
Map<String, Object> bindClass(Integer serID, Integer classId);
|
||
|
||
/** 教室解绑班级(未绑定时静默成功)。 */
|
||
void unbindClass(Integer serID);
|
||
|
||
/** 批量解绑(未绑定/不存在的教室计入 skipped),返回 {updated, skipped, total}。 */
|
||
Map<String, Object> batchUnbind(List<Integer> serIDs);
|
||
}
|