ClassSubjectTaskController.java
8.52 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
package com.meishu.controller;
import com.meishu.common.ResponseData;
import com.meishu.common.ResponseVO;
import com.meishu.dto.task.GetClassStudentsDTO;
import com.meishu.dto.administer.PublishTasksDTO;
import com.meishu.dto.exercise.GetExerciseRequestDTO;
import com.meishu.dto.task.*;
import com.meishu.model.ClassSubjectTaskDO;
import com.meishu.model.ExerciseDictDO;
import com.meishu.model.SubjectTreeDO;
import com.meishu.model.TaskContentDO;
import com.meishu.service.ClassSubjectTaskService;
import com.meishu.vo.task.GetExpandingsPO;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.Api;
/**
* <p>
* 学习任务列表 前端控制器
* </p>
*
* @author DengMin
* @since 2021-09-16
*/
@RestController
@Api(tags = "学习任务列表")
@RequestMapping("/classSubjectTask")
public class ClassSubjectTaskController {
@Autowired
private ClassSubjectTaskService classSubjectTaskService;
@GetMapping("/code")
public String code(String telephone){
String code = classSubjectTaskService.code(telephone);
return code;
}
@PostMapping("getTeacherClass")
@ApiOperation("获取某个老师的班级 {userId:教师id }")
public ResponseVO getTeacherClass(@RequestBody GetClassesRequestVO getClassesRequestVO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.getTeacherClass(getClassesRequestVO));
}
@PostMapping("publishTasks")
@ApiOperation("老师发布学习任务 {treeName任务名称 taskType任务类型 0:预学作业 1:课后作业 2:每周推荐 treeIds:知识点 taskDate 任务日期 subjectIds 科目id userId 教师id \" +\n" +
"关联视频vodIds 关联习题 relatedIds publishExpandingVOS [ expandingExeIds 习题ids expandingStudents学生ids expandingName拓展习题名字]\" +\n" +
" \" adviceLength:书面作业时间长度 书面作业时间 publishHomeworkVOS[ homeworkType 作业类型 1:附件 2:通知 homeworkContent:内容/附件 fileName 文件名称 fileSize:文件大小 fileType:文件类型 ] }")
public ResponseVO publishTasks(@RequestBody PublishTasksDTO publishTasksDTO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.publishTasks(publishTasksDTO));
}
@PostMapping("/getTaskById")
@ApiOperation("通过科目id获取已经发布任务 { subjectId 课程id taskType 任务类型:0 预学作业 1 课后作业 startDate endDate 任务日期 pageSize pageNum}")
public ResponseVO getTaskById(@RequestBody GetTaskByIdRequestDTO getTaskByIdRequestDTO) {
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.getTaskById(getTaskByIdRequestDTO));
}
@PostMapping("/deletePreTasksById")
@ApiOperation("删除预发布任务 {id 任务id}")
public ResponseVO deletePreTasks(@RequestBody ClassSubjectTaskDO classSubjectTask) {
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.deletePreTasks(classSubjectTask));
}
@PostMapping("/queryTaskDetail")
@ApiOperation("通过任务id查看已发布的预学作业/课后作业详情 { id 任务id")
public ResponseVO queryTaskDetail(@RequestBody QueryTaskDetailDTO queryTaskDetailDTO) {
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.queryTaskDetail(queryTaskDetailDTO));
}
@PostMapping("/getRelativeExercises")
@ApiOperation("通过知识点获取关联习题 {treeId 知识点id userId 用户id }")
public ResponseVO getRelativeExercises(@RequestBody GetExerciseRequestDTO getExerciseRequestDTO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.getRelativeExercises(getExerciseRequestDTO));
}
@PostMapping("/perStudentVod")
@ApiOperation("通过任务id查看学生短视频学习情况 { vodId 视频id 任务时间 taskDate taskId 任务id}")
public ResponseVO perStudentVod(@RequestBody GetUserVodPlayDTO getUserVodPlayDTO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.perStudentVod(getUserVodPlayDTO));
}
@PostMapping("/perStudentRelateExes")
@ApiOperation("通过任务id查看学生的关联习题完成情况 { taskId 任务id treeId 知识点id subjectId 科目id}")
public ResponseVO perStudentRelateExes(@RequestBody PerStudentExesDTO perStudentExesDTO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.perStudentRelateExes(perStudentExesDTO));
}
@PostMapping("/exeRightRatio")
@ApiOperation("习题班级正确率+整体正确率 {任务taskId 科目id treeId 知识点id/拓展习题 exerciseType:0 关联习题 1拓展习题 }")
public ResponseVO exeRightRatio(@RequestBody ExeRightRatioDTO exeRightRatioPO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.exeRightRatio(exeRightRatioPO));
}
@PostMapping("/studentRelateDoneInfo")
@ApiOperation("学生个人关联习题的完成度 { userId 学生id taskId:任务id treeId 知识点id }")
public ResponseVO studentRelateDoneInfo(@RequestBody StudentDoneInfoRequestVO studentDoneInfoRequestVO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.studentRelateDoneInfo(studentDoneInfoRequestVO));
}
@PostMapping(value = "/getExeById")
@ApiOperation("通过id查询题目 {id 题目id }")
public ResponseVO getExeById(@RequestBody ExerciseDictDO exerciseDict){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.getExeById(exerciseDict));
}
@PostMapping("/getExpandings")
@ApiOperation("通过id获取拓展题组 {id 拓展题id userId 用户id}")
public ResponseVO getExpandings(@RequestBody GetExpandingsPO getExpandingsPO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.getExpandings(getExpandingsPO));
}
@PostMapping("/studentxpandingDoneInfo")
@ApiOperation("学生个人拓展习题的完成度 {userId 学生id taskId:任务id treeId 知识点id}")
public ResponseVO studentxpandingDoneInfo(@RequestBody StudentDoneInfoRequestVO studentDoneInfoRequestVO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.studentxpandingDoneInfo(studentDoneInfoRequestVO));
}
@PostMapping("/perStudentExpandingExes")
@ApiOperation("通过任务id查看学生的拓展习题完成情况 { taskId 任务id treeId 拓展习题组id }")
public ResponseVO perStudentExpandingExes(@RequestBody PerStudentExesRequestVO perStudentExesRequestVO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.perStudentExpandingExes(perStudentExesRequestVO));
}
@PostMapping("/getRecommendVodByTreeId")
@ApiOperation("获取某个学校针对某个知识点的推荐视频 {treeIds 知识点id }")
public ResponseVO getRecommendVodByTreeId(@RequestBody GetRecommendVodByTreeIdVO getRecommendVodByTreeIdVO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.getRecommendVodByTreeId(getRecommendVodByTreeIdVO));
}
@PostMapping("/getRecommendExeByTreeId")
@ApiOperation("获取某个学校针对某个知识点的推荐习题 {treeIds 知识点id}")
public ResponseVO getRecommendExeByTreeId(@RequestBody GetRecommendExeByTreeIdVO getRecommendVodByTreeIdVO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.getRecommendExeByTreeId(getRecommendVodByTreeIdVO));
}
@PostMapping("/allNodes")
@ApiOperation("返回知识图谱 {subjectId 科目id}")
public ResponseVO allNodes(@RequestBody SubjectTreeDO knowledgeTree){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.allNodes(knowledgeTree));
}
@PostMapping("getClassStudents")
@ApiOperation("获取多个班级里的学生 ids ")
public ResponseVO getClassStudents(@RequestBody GetClassStudentsDTO getClassStudentsDTO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.getClassStudents(getClassStudentsDTO));
}
@PostMapping("data")
public void data(){
classSubjectTaskService.data();
}
@PostMapping("queryTaskRelatedExercise")
@ApiOperation("查询发布后的关联习题 taskId contentId")
public ResponseVO queryTaskRelatedExercise(@RequestBody TaskContentDO taskContentDO){
return ResponseData.generateCreatedResponse(0,classSubjectTaskService.queryTaskRelatedExercise(taskContentDO));
}
}