1、添加教学场地历;
2、很多表继承了基础类,但是没有添加对应字段导致报错,把继承去掉
This commit is contained in:
+58
@@ -5,6 +5,8 @@ import com.roomroot.jwgl.service.ClassRoomCalendarService;
|
||||
import com.roomroot.jwgl.unit.PageQuery;
|
||||
import com.roomroot.jwgl.unit.PageResult;
|
||||
import com.roomroot.jwgl.unit.Result;
|
||||
import com.roomroot.jwgl.vo.classroom.VenueLessonVO;
|
||||
import com.roomroot.jwgl.vo.classroom.VenueScheduleItemVO;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -86,4 +88,60 @@ public class ClassRoomCalendarController {
|
||||
public Result<List<JXCDL>> listByRq(@RequestParam("rq") String rq) {
|
||||
return Result.success(calendarService.listByRq(rq));
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量保存场地历事件(拖选区域写入,按 教室编号+日期+节次 判重覆盖)
|
||||
*/
|
||||
@PostMapping("/batchSave")
|
||||
public Result<Integer> batchSave(@RequestBody List<JXCDL> list) {
|
||||
int saved = calendarService.batchSave(list);
|
||||
return Result.success("已保存 " + saved + " 个时间格事件", saved);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按 ID 批量删除场地历事件(恢复可排)
|
||||
*/
|
||||
@PostMapping("/batchDelete")
|
||||
public Result<Integer> batchDelete(@RequestBody List<String> ids) {
|
||||
int deleted = calendarService.batchDelete(ids);
|
||||
return Result.success("已删除 " + deleted + " 个时间格事件", deleted);
|
||||
}
|
||||
|
||||
/**
|
||||
* 按教室编号 + 日期范围查询场地历
|
||||
*/
|
||||
@GetMapping("/listByJsbhAndRange")
|
||||
public Result<List<JXCDL>> listByJsbhAndRange(@RequestParam("jsbh") String jsbh,
|
||||
@RequestParam(value = "start", required = false) String start,
|
||||
@RequestParam(value = "end", required = false) String end) {
|
||||
return Result.success(calendarService.listByJsbhAndRange(jsbh, start, end));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询场地在日期范围内已排课次(编辑器蓝格数据源)
|
||||
*/
|
||||
@GetMapping("/lessons")
|
||||
public Result<List<VenueLessonVO>> listVenueLessons(@RequestParam("jsbh") String jsbh,
|
||||
@RequestParam(value = "start", required = false) String start,
|
||||
@RequestParam(value = "end", required = false) String end,
|
||||
@RequestParam(value = "nd", required = false) Integer nd) {
|
||||
return Result.success(calendarService.listVenueLessons(jsbh, start, end, nd));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询指定本场地为专用教室的班次(编辑器顶部横幅数据源)
|
||||
*/
|
||||
@GetMapping("/designatedTeams")
|
||||
public Result<List<String>> listDesignatedTeams(@RequestParam("jsbh") String jsbh) {
|
||||
return Result.success(calendarService.listDesignatedTeams(jsbh));
|
||||
}
|
||||
|
||||
/**
|
||||
* 场地占用总览:某日期+节次全部场地的占用状态
|
||||
*/
|
||||
@GetMapping("/venueSchedule")
|
||||
public Result<List<VenueScheduleItemVO>> venueSchedule(@RequestParam("rq") String rq,
|
||||
@RequestParam("jc") Integer jc) {
|
||||
return Result.success(calendarService.venueSchedule(rq, jc));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user