班历功能添加

This commit is contained in:
2026-09-16 17:13:57 +08:00
parent 2e151ea228
commit abf616a8ee
19 changed files with 526 additions and 73 deletions
@@ -1,9 +1,11 @@
package com.roomroot.web.controller.jwgl;
import com.roomroot.jwgl.dto.calendar.ClassCalendarApplyDTO;
import com.roomroot.jwgl.dto.calendar.ClassCalendarBatchSaveDTO;
import com.roomroot.jwgl.dto.calendar.ClassCalendarEventDTO;
import com.roomroot.jwgl.service.ClassEventCalendarService;
import com.roomroot.jwgl.unit.Result;
import com.roomroot.jwgl.vo.calendar.ClassCalendarResyncVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@@ -35,6 +37,24 @@ public class ClassEventCalendarController {
return Result.success();
}
/**
* 批量保存班历时间格(拖选区域一次提交,单事务 upsert;action=clear 恢复默认)
*/
@PostMapping("/batchSave")
public Result<Integer> batchSave(@RequestBody ClassCalendarBatchSaveDTO body) {
int saved = classEventCalendarService.batchSave(body);
return Result.success("已保存 " + saved + " 个时间格", saved);
}
/**
* 重新同步校历:confirm=false 返回缺失格预览,confirm=true 实际补齐(只补缺失,不覆盖人工改动)
*/
@PostMapping("/resync")
public Result<ClassCalendarResyncVO> resync(@RequestParam("xydxqbh") String xydxqbh,
@RequestParam(value = "confirm", defaultValue = "false") boolean confirm) {
return Result.success(classEventCalendarService.resync(xydxqbh, confirm));
}
@PostMapping("/apply")
public Result<Integer> apply(@RequestBody ClassCalendarApplyDTO body) {
return Result.success(classEventCalendarService.apply(
@@ -13,7 +13,7 @@ import java.util.Map;
* 学员队任务表控制器
*/
@RestController
@RequestMapping("/classCalendar")
@RequestMapping({"/classCalendar", "/course-task"})
public class ClassSemesterCalendarController {
@Resource