|
@@ -28,6 +28,7 @@ import com.ruoyi.learn.service.ILearnPlanService;
|
|
|
import com.ruoyi.learn.service.ILearnPlanStudyService;
|
|
import com.ruoyi.learn.service.ILearnPlanStudyService;
|
|
|
import com.ruoyi.sy.service.ISyMajorService;
|
|
import com.ruoyi.sy.service.ISyMajorService;
|
|
|
import com.ruoyi.system.service.ISysUserService;
|
|
import com.ruoyi.system.service.ISysUserService;
|
|
|
|
|
+import com.ruoyi.web.service.LearnStatService;
|
|
|
import com.ruoyi.web.service.LearnTeacherService;
|
|
import com.ruoyi.web.service.LearnTeacherService;
|
|
|
import com.ruoyi.web.service.StudentService;
|
|
import com.ruoyi.web.service.StudentService;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@@ -60,9 +61,10 @@ public class FrontStudentController extends BaseController {
|
|
|
private final StudentService studentService;
|
|
private final StudentService studentService;
|
|
|
private final IDzSubjectService dzSubjectService;
|
|
private final IDzSubjectService dzSubjectService;
|
|
|
private final LearnTeacherService learnTeacherService;
|
|
private final LearnTeacherService learnTeacherService;
|
|
|
|
|
+ private final LearnStatService learnStatService;
|
|
|
|
|
|
|
|
public FrontStudentController(IDzControlService dzControlService, IAEnrollUniversityService universityService, ISyMajorService syMajorService, ISysUserService sysUserService,
|
|
public FrontStudentController(IDzControlService dzControlService, IAEnrollUniversityService universityService, ISyMajorService syMajorService, ISysUserService sysUserService,
|
|
|
- ILearnPlanService learnPlanService, ILearnPlanStudyService learnPlanStudyService, IAMarjorPlanService marjorPlanService, ILearnDirectedKnowledgeService learnDirectedKnowledgeService, StudentService studentService, IDzSubjectService dzSubjectService, LearnTeacherService learnTeacherService) {
|
|
|
|
|
|
|
+ ILearnPlanService learnPlanService, ILearnPlanStudyService learnPlanStudyService, IAMarjorPlanService marjorPlanService, ILearnDirectedKnowledgeService learnDirectedKnowledgeService, StudentService studentService, IDzSubjectService dzSubjectService, LearnTeacherService learnTeacherService, LearnStatService learnStatService) {
|
|
|
this.dzControlService = dzControlService;
|
|
this.dzControlService = dzControlService;
|
|
|
this.universityService = universityService;
|
|
this.universityService = universityService;
|
|
|
this.syMajorService = syMajorService;
|
|
this.syMajorService = syMajorService;
|
|
@@ -74,6 +76,7 @@ public class FrontStudentController extends BaseController {
|
|
|
this.studentService = studentService;
|
|
this.studentService = studentService;
|
|
|
this.dzSubjectService = dzSubjectService;
|
|
this.dzSubjectService = dzSubjectService;
|
|
|
this.learnTeacherService = learnTeacherService;
|
|
this.learnTeacherService = learnTeacherService;
|
|
|
|
|
+ this.learnStatService = learnStatService;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("02 全部科目")
|
|
@ApiOperation("02 全部科目")
|
|
@@ -306,8 +309,7 @@ public class FrontStudentController extends BaseController {
|
|
|
@GetMapping("record/knowledge")
|
|
@GetMapping("record/knowledge")
|
|
|
public TableDataInfo getRecordKnowledge()
|
|
public TableDataInfo getRecordKnowledge()
|
|
|
{
|
|
{
|
|
|
- JSONObject data = JSONObject.of("name", "", "directed", true, "rate", 82, "total", 1470);
|
|
|
|
|
- List<JSONObject> list = Lists.newArrayList(data);
|
|
|
|
|
|
|
+ List<JSONObject> list = learnStatService.getRecordKnowledge(SecurityUtils.getUserId());
|
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -345,28 +347,20 @@ public class FrontStudentController extends BaseController {
|
|
|
|
|
|
|
|
@ApiOperation("55 记录-计划刷题")
|
|
@ApiOperation("55 记录-计划刷题")
|
|
|
@GetMapping("record/planStudy")
|
|
@GetMapping("record/planStudy")
|
|
|
- public AjaxResult getRecordPlanStudy(Integer year, Integer monthSeq, Integer weekSeq)
|
|
|
|
|
|
|
+ public AjaxResult getRecordPlanStudy(@ApiParam String reportMonth)
|
|
|
{
|
|
{
|
|
|
- JSONObject result = new JSONObject();
|
|
|
|
|
- result.put("total", 140);
|
|
|
|
|
- result.put("rate", 85);
|
|
|
|
|
- result.put("studyDays", 3);
|
|
|
|
|
- JSONObject data = JSONObject.of("date", "2025.09.03", "study", "90", "rate", "80", "pass", true);
|
|
|
|
|
- List<JSONObject> list = Lists.newArrayList(data);
|
|
|
|
|
- result.put("list", list);
|
|
|
|
|
- return AjaxResult.success(result);
|
|
|
|
|
|
|
+ try {
|
|
|
|
|
+ Date date = DateUtils.parseDate(reportMonth, "yyyy-MM-dd");
|
|
|
|
|
+ return AjaxResult.success(learnStatService.getRecordPlanStudy(SecurityUtils.getUserId(), date));
|
|
|
|
|
+ } catch (ParseException e) {
|
|
|
|
|
+ throw new ValidationException("日期格式错误");
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("56 记录-视频学习")
|
|
@ApiOperation("56 记录-视频学习")
|
|
|
@GetMapping("record/video")
|
|
@GetMapping("record/video")
|
|
|
public AjaxResult getRecordVideo()
|
|
public AjaxResult getRecordVideo()
|
|
|
{
|
|
{
|
|
|
- JSONObject result = new JSONObject();
|
|
|
|
|
- result.put("total", 98);
|
|
|
|
|
- result.put("study", 759);
|
|
|
|
|
- JSONObject data = JSONObject.of("name", "充分条件", "date", "2025.09.11", "study", "02:46");
|
|
|
|
|
- List<JSONObject> list = Lists.newArrayList(data);
|
|
|
|
|
- result.put("list", list);
|
|
|
|
|
- return AjaxResult.success(result);
|
|
|
|
|
|
|
+ return AjaxResult.success(learnStatService.getRecordVideo(SecurityUtils.getUserId()));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|