|
|
@@ -4,13 +4,17 @@ import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
+import com.ruoyi.common.core.domain.R;
|
|
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
+import com.ruoyi.dz.domain.DzTeacher;
|
|
|
import com.ruoyi.dz.service.IDzControlService;
|
|
|
import com.ruoyi.dz.service.IDzSubjectService;
|
|
|
+import com.ruoyi.dz.service.IDzTeacherService;
|
|
|
import com.ruoyi.learn.domain.LearnTest;
|
|
|
import com.ruoyi.learn.service.ILearnTestService;
|
|
|
+import com.ruoyi.web.domain.TestRecordCond;
|
|
|
import com.ruoyi.web.service.LearnStatService;
|
|
|
import com.ruoyi.web.service.LearnTeacherService;
|
|
|
import com.ruoyi.web.service.StudentService;
|
|
|
@@ -31,14 +35,16 @@ public class FrontTeacherController extends BaseController {
|
|
|
private final LearnTeacherService learnTeacherService;
|
|
|
private final StudentService studentService;
|
|
|
private final LearnStatService learnStatService;
|
|
|
+ private final IDzTeacherService dzTeacherService;
|
|
|
|
|
|
- public FrontTeacherController(IDzControlService dzControlService, IDzSubjectService dzSubjectService, ILearnTestService learnTestService, LearnTeacherService learnTeacherService, StudentService studentService, LearnStatService learnStatService) {
|
|
|
+ public FrontTeacherController(IDzControlService dzControlService, IDzSubjectService dzSubjectService, ILearnTestService learnTestService, LearnTeacherService learnTeacherService, StudentService studentService, LearnStatService learnStatService, IDzTeacherService dzTeacherService) {
|
|
|
this.dzControlService = dzControlService;
|
|
|
this.dzSubjectService = dzSubjectService;
|
|
|
this.learnTestService = learnTestService;
|
|
|
this.learnTeacherService = learnTeacherService;
|
|
|
this.studentService = studentService;
|
|
|
this.learnStatService = learnStatService;
|
|
|
+ this.dzTeacherService = dzTeacherService;
|
|
|
}
|
|
|
|
|
|
@ApiOperation("10 查询班级列表")
|
|
|
@@ -85,28 +91,29 @@ public class FrontTeacherController extends BaseController {
|
|
|
return AjaxResult.success(studentService.getSimulateStat(examineeId));
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("记录-测试卷")
|
|
|
+ @GetMapping("record/test/cond")
|
|
|
+ public R<TestRecordCond> getRecordTestCond()
|
|
|
+ {
|
|
|
+ DzTeacher dzTeacher = dzTeacherService.selectDzTeacherByTeacherId(SecurityUtils.getLoginUser().getUser().getUserTypeId());
|
|
|
+ TestRecordCond cond = JSONObject.parseObject(dzTeacher.getBuildInfo(), TestRecordCond.class);
|
|
|
+ return R.ok(null != cond ? cond : new TestRecordCond());
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation("记录-测试卷")
|
|
|
@GetMapping("record/test")
|
|
|
- public AjaxResult getRecordTest(Integer batch)
|
|
|
+ public AjaxResult getRecordTest(TestRecordCond cond)
|
|
|
{
|
|
|
- JSONObject result = new JSONObject();
|
|
|
- result.put("total", 140);
|
|
|
- result.put("done", 85);
|
|
|
- result.put("undone", 3);
|
|
|
- result.put("unsent", 3);
|
|
|
- JSONObject data = JSONObject.of("name", "2501", "data", "242");
|
|
|
- List<JSONObject> list = Lists.newArrayList(data);
|
|
|
- result.put("list", list);
|
|
|
- return AjaxResult.success(result);
|
|
|
- }
|
|
|
-
|
|
|
- @ApiOperation("记录-测试卷班级")
|
|
|
- @GetMapping("record/test/{classId}")
|
|
|
- public AjaxResult getRecordTestDetail(@ApiParam("班级id") @PathVariable("classId") Integer classId)
|
|
|
+ cond.setTeacherId(SecurityUtils.getLoginUser().getUser().getUserTypeId());
|
|
|
+ return AjaxResult.success(learnStatService.getTestRecord(cond));
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("记录-测试卷详情")
|
|
|
+ @GetMapping("record/test/detail")
|
|
|
+ public AjaxResult getRecordTestDetail(TestRecordCond cond)
|
|
|
{
|
|
|
- JSONObject data = JSONObject.of("seq", "1", "name", "XM", "total", "658", "study", 20, "rate", 39);
|
|
|
- List<JSONObject> list = Lists.newArrayList(data);
|
|
|
- return AjaxResult.success(list);
|
|
|
+ cond.setTeacherId(SecurityUtils.getLoginUser().getUser().getUserTypeId());
|
|
|
+ return AjaxResult.success(learnStatService.getTestStudentRecord(cond));
|
|
|
}
|
|
|
|
|
|
@ApiOperation("记录-计划刷题 有班级显示学生")
|