ClassesDictController.java
4.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package com.meishu.controller;
import com.meishu.common.ResponseData;
import com.meishu.common.ResponseVO;
import com.meishu.dto.classes.*;
import com.meishu.dto.exercise.ExeLatexExpressDTO;
import com.meishu.service.ClassesDictService;
import com.meishu.util.LatexUtils;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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.RestController;
import io.swagger.annotations.Api;
/**
* <p>
* 学校班级字典表 前端控制器
* </p>
*
* @author Tuyp
* @since 2021-08-11
*/
@RestController
@Api(tags = "学校班级字典表")
@RequestMapping("/classesDict")
public class ClassesDictController {
@Autowired
private ClassesDictService classesDictService;
@PostMapping("getClasses")
@ApiOperation("获取行政班级 {className grade session status} ")
public ResponseVO getClasses(@RequestBody GetClassesDTO getClassesDTO) {
return ResponseData.generateCreatedResponse(0, classesDictService.getClasses(getClassesDTO));
}
@PostMapping("addClass")
@ApiOperation("添加班级 {classes grade session subjects [] upgradeDate}")
public ResponseVO addClass(@RequestBody AddClassDTO addClassDTO){
return ResponseData.generateCreatedResponse(0,classesDictService.addClass(addClassDTO));
}
@PostMapping("updateClass")
@ApiOperation("更新班级 {id grade classes session subject[] upgradeDate}")
public ResponseVO updateClass(@RequestBody AddClassDTO addClassDTO){
return ResponseData.generateCreatedResponse(0,classesDictService.updateClass(addClassDTO));
}
@PostMapping("addSubjectTeacherMapping")
@ApiOperation("将某老师配置到某班级的科目下 {addSubjectTeacherMappingDTOS[subjectId 科目id teacherIds[]:老师id ]classId: 班级id }")
public ResponseVO addSubjectTeacherMapping(@RequestBody AddSubjectTeacherDTO addSubjectTeacherDTO){
return ResponseData.generateCreatedResponse(0,classesDictService.addSubjectTeacherMapping(addSubjectTeacherDTO));
}
@PostMapping("getClassStudents")
@ApiOperation("获取某班级下的学生 {pageSize pageNum classId :班级id userName 学生 }")
public ResponseVO getClassStudents(@RequestBody GetClassStudentsDTO getClassStudentsDTO){
return ResponseData.generateCreatedResponse(0,classesDictService.getClassStudents(getClassStudentsDTO));
}
@PostMapping("queryNoClassStudents")
@ApiOperation("获取没有班级的学生列表 {pageSize pageNum userName }")
public ResponseVO queryNoClassStudents(@RequestBody QueryNoClassStudentsDTO queryNoClassStudentsDTO){
return ResponseData.generateCreatedResponse(0,classesDictService.queryNoClassStudents(queryNoClassStudentsDTO));
}
@PostMapping("batchAddStudentToClass")
@ApiOperation("批量添加学生到某班级里 ids[] 多个学生id classId 班级id")
public ResponseVO batchAddStudentToClass(@RequestBody BatchAddStudentToClassDTO batchAddStudentToClassDTO){
return ResponseData.generateCreatedResponse(0,classesDictService.batchAddStudentToClass(batchAddStudentToClassDTO));
}
@PostMapping("batchDeleteStudent")
@ApiOperation("批量移除班级 ids[] 多个学生 classId 班级id")
public ResponseVO batchDeleteStudent(@RequestBody BatchAddStudentToClassDTO batchAddStudentToClassDTO){
return ResponseData.generateCreatedResponse(0,classesDictService.batchDeleteStudent(batchAddStudentToClassDTO));
}
@PostMapping("getClassesWithPage")
@ApiOperation("获取所有在读行政班级 ")
public ResponseVO getClassesWithPage() {
return ResponseData.generateCreatedResponse(0, classesDictService.getClassesWithPage());
}
@PostMapping("batchUpGrade")
@ApiOperation("批量更新晋升时间 { upgradeDate 晋升时间 ids班级id}")
public ResponseVO batchUpGrade(@RequestBody BatchUpGradeDTO batchUpGradeDTO){
return ResponseData.generateCreatedResponse(0,classesDictService.batchUpGrade(batchUpGradeDTO));
}
}