1、正课与学期关系关联;
2、天假删除保护; 3、教学任务计划增加了「结束发布」。已发布或库里的「已发布」都可以结束;结束后写入结束时间,任务书和班次课程任务只读 4、班次学期操作内容调整修改;
This commit is contained in:
+43
@@ -0,0 +1,43 @@
|
||||
package com.roomroot.web.controller.jwgl;
|
||||
|
||||
import com.roomroot.jwgl.dto.calendar.ClassCalendarApplyDTO;
|
||||
import com.roomroot.jwgl.dto.calendar.ClassCalendarEventDTO;
|
||||
import com.roomroot.jwgl.service.ClassEventCalendarService;
|
||||
import com.roomroot.jwgl.unit.Result;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import jakarta.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 班历(假期表)。与课程任务接口 /classCalendar 分开。
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/class-calendar")
|
||||
public class ClassEventCalendarController {
|
||||
|
||||
@Resource
|
||||
private ClassEventCalendarService classEventCalendarService;
|
||||
|
||||
@GetMapping("/list")
|
||||
public Result<List<ClassCalendarEventDTO>> list(@RequestParam("xydxqbh") String xydxqbh) {
|
||||
return Result.success(classEventCalendarService.listOrInherit(xydxqbh));
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
public Result<Void> update(@RequestBody ClassCalendarEventDTO event) {
|
||||
classEventCalendarService.update(event);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/apply")
|
||||
public Result<Integer> apply(@RequestBody ClassCalendarApplyDTO body) {
|
||||
return Result.success(classEventCalendarService.apply(
|
||||
body.getSourceXydxqbh(), body.getTargetBhList(), body.getEventBhList()));
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -344,8 +344,9 @@ public class ElectiveController {
|
||||
public Result<SemesterInitVO> semesterInit(
|
||||
@RequestParam("xydbh") String xydbh,
|
||||
@RequestParam(required = false) String presetKxrq,
|
||||
@RequestParam(required = false) String presetJsrq) {
|
||||
return Result.success(electiveService.getSemesterInit(xydbh, presetKxrq, presetJsrq));
|
||||
@RequestParam(required = false) String presetJsrq,
|
||||
@RequestParam(required = false) Integer xqdc) {
|
||||
return Result.success(electiveService.getSemesterInit(xydbh, presetKxrq, presetJsrq, xqdc));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+9
@@ -545,6 +545,15 @@ public class JYSController {
|
||||
return Result.success("已发布,同步教研室任务书 " + count + " 份", count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束发布。结束后任务书和课程任务只读。
|
||||
*/
|
||||
@PostMapping("/task/endPublish")
|
||||
public Result<Void> endPublishTask(@RequestParam("bh") String bh) {
|
||||
teachingTaskManageService.endPublish(bh);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 教研室任务书列表。
|
||||
*/
|
||||
|
||||
+78
@@ -401,6 +401,84 @@ public class StudentRecordsController {
|
||||
return Result.success(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 未毕业、且该年度学期尚未建立班次学期信息的班次。
|
||||
*/
|
||||
@GetMapping("/semester/creatableClasses")
|
||||
public Result<List<XYDB>> creatableClasses(@RequestParam("nd") Integer nd,
|
||||
@RequestParam("xqdc") Integer xqdc) {
|
||||
return Result.success(classSemesterService.listCreatableClasses(nd, xqdc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 按学校学期带出开学/结束日期。
|
||||
*/
|
||||
@GetMapping("/semester/presetDates")
|
||||
public Result<Map<String, String>> presetDates(@RequestParam("nd") Integer nd,
|
||||
@RequestParam("xqdc") Integer xqdc) {
|
||||
return Result.success(classSemesterService.presetDates(nd, xqdc));
|
||||
}
|
||||
|
||||
/**
|
||||
* 为符合条件的全部班次创建班次学期,返回实际创建数。
|
||||
*/
|
||||
@PostMapping("/semester/batchCreate")
|
||||
public Result<Integer> batchCreate(@RequestBody Map<String, Object> params) {
|
||||
Integer nd = asInt(params.get("nd"));
|
||||
Integer xqdc = asInt(params.get("xqdc"));
|
||||
String kxrq = asText(params.get("kxrq"));
|
||||
String jsrq = asText(params.get("jsrq"));
|
||||
int count = classSemesterService.batchCreateEligible(
|
||||
nd,
|
||||
xqdc,
|
||||
kxrq == null ? null : java.time.LocalDate.parse(kxrq),
|
||||
jsrq == null ? null : java.time.LocalDate.parse(jsrq));
|
||||
return Result.success(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 学期级预设合班,只改预设编班号。
|
||||
*/
|
||||
@PostMapping("/semester/batchWaveMerge")
|
||||
public Result<Integer> batchWaveMerge(@RequestBody Map<String, Object> params) {
|
||||
return Result.success(classSemesterService.batchWaveMerge(asBhList(params)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 学期级预设拆班,所选班次各自独立成波。
|
||||
*/
|
||||
@PostMapping("/semester/batchWaveSplit")
|
||||
public Result<Integer> batchWaveSplit(@RequestBody Map<String, Object> params) {
|
||||
return Result.success(classSemesterService.batchWaveSplit(asBhList(params)));
|
||||
}
|
||||
|
||||
private Integer asInt(Object value) {
|
||||
if (value == null || "".equals(value)) {
|
||||
return null;
|
||||
}
|
||||
if (value instanceof Number) {
|
||||
return ((Number) value).intValue();
|
||||
}
|
||||
return Integer.valueOf(String.valueOf(value));
|
||||
}
|
||||
|
||||
private String asText(Object value) {
|
||||
if (value == null) {
|
||||
return null;
|
||||
}
|
||||
String text = String.valueOf(value).trim();
|
||||
return text.isEmpty() ? null : text;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private List<String> asBhList(Map<String, Object> params) {
|
||||
Object raw = params.get("bhList");
|
||||
if (!(raw instanceof List)) {
|
||||
return List.of();
|
||||
}
|
||||
return (List<String>) raw;
|
||||
}
|
||||
|
||||
// ======================== 课程成绩查询 ========================
|
||||
|
||||
/**
|
||||
|
||||
+43
@@ -159,4 +159,47 @@ public class StudentTeamTaskController {
|
||||
List<String> newBhList = studentTeamTaskService.copy(bhList, newXydbh);
|
||||
return Result.success(newBhList);
|
||||
}
|
||||
|
||||
@PostMapping("/batchAutoGenerate")
|
||||
public Result<Integer> batchAutoGenerate(@RequestBody List<String> xydxqbhList) {
|
||||
return Result.success(studentTeamTaskService.batchAutoGenerate(xydxqbhList));
|
||||
}
|
||||
|
||||
@GetMapping("/planCourses")
|
||||
public Result<List<com.roomroot.jwgl.vo.PlanCourseVO>> planCourses(
|
||||
@RequestParam("xydxqbh") String xydxqbh,
|
||||
@RequestParam(value = "otherOnly", defaultValue = "true") boolean otherOnly) {
|
||||
return Result.success(studentTeamTaskService.listPlanCourses(xydxqbh, otherOnly));
|
||||
}
|
||||
|
||||
@PostMapping("/addFromLibrary")
|
||||
public Result<Void> addFromLibrary(@RequestParam("xydxqbh") String xydxqbh,
|
||||
@RequestParam("kbh") String kbh) {
|
||||
studentTeamTaskService.addFromLibrary(xydxqbh, kbh);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/addFromPlan")
|
||||
public Result<Void> addFromPlan(@RequestParam("xydxqbh") String xydxqbh,
|
||||
@RequestParam("planBh") String planBh) {
|
||||
studentTeamTaskService.addFromPlan(xydxqbh, planBh);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
@PostMapping("/syncFromPlan")
|
||||
public Result<Integer> syncFromPlan(@RequestBody List<String> bhList) {
|
||||
return Result.success(studentTeamTaskService.syncFromPlan(bhList));
|
||||
}
|
||||
|
||||
@PostMapping("/batchDelete")
|
||||
public Result<Integer> batchDelete(@RequestBody List<String> bhList) {
|
||||
return Result.success(studentTeamTaskService.batchDeleteGuarded(bhList));
|
||||
}
|
||||
|
||||
@PostMapping("/paste")
|
||||
public Result<Integer> paste(@RequestBody Map<String, Object> params) {
|
||||
List<String> bhList = (List<String>) params.get("bhList");
|
||||
String targetXydxqbh = (String) params.get("targetXydxqbh");
|
||||
return Result.success(studentTeamTaskService.pasteToSemester(bhList, targetXydxqbh));
|
||||
}
|
||||
}
|
||||
+9
@@ -92,4 +92,13 @@ public class TeachingTaskController {
|
||||
int count = teachingTaskService.batchPublish(bh);
|
||||
return Result.success(count);
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束发布。结束后教研室不能再改任务书和课程任务。
|
||||
*/
|
||||
@PostMapping("/endPublish")
|
||||
public Result<Void> endPublish(@RequestParam("bh") String bh) {
|
||||
teachingTaskService.endPublish(bh);
|
||||
return Result.success();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user