|
|
@@ -0,0 +1,118 @@
|
|
|
+package com.ruoyi.web.controller.learn;
|
|
|
+
|
|
|
+import com.ruoyi.common.core.controller.BaseController;
|
|
|
+import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
+import com.ruoyi.common.core.domain.AjaxResult2;
|
|
|
+import com.ruoyi.common.enums.ExamType;
|
|
|
+import com.ruoyi.dz.domain.DzControl;
|
|
|
+import com.ruoyi.dz.domain.DzSubject;
|
|
|
+import com.ruoyi.dz.service.IDzControlService;
|
|
|
+import com.ruoyi.dz.service.IDzSubjectService;
|
|
|
+import com.ruoyi.ie.service.IAMarjorPlanService;
|
|
|
+import com.ruoyi.learn.domain.TestPaperVO;
|
|
|
+import com.ruoyi.web.service.LearnTeacherService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import io.swagger.annotations.ApiParam;
|
|
|
+import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("/learn/teaching")
|
|
|
+@Api(tags = "后台-学习 - 老师业务")
|
|
|
+public class LearnTeacherController extends BaseController {
|
|
|
+ private final IDzControlService dzControlService;
|
|
|
+ private final IDzSubjectService dzSubjectService;
|
|
|
+ private final LearnTeacherService learnTeacherService;
|
|
|
+ private final IAMarjorPlanService marjorPlanService;
|
|
|
+
|
|
|
+ public LearnTeacherController(IDzControlService dzControlService, IDzSubjectService dzSubjectService, LearnTeacherService learnTeacherService, IAMarjorPlanService marjorPlanService) {
|
|
|
+ this.dzControlService = dzControlService;
|
|
|
+ this.dzSubjectService = dzSubjectService;
|
|
|
+ this.learnTeacherService = learnTeacherService;
|
|
|
+ this.marjorPlanService = marjorPlanService;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ -- 1. 查询考试批次(假设每个老师自已控制)
|
|
|
+ -- 2. 查询班老师班级列表
|
|
|
+ -- 3. 查询定向院校列表
|
|
|
+ -- 5. 查询定向院校专业组
|
|
|
+ -- 6. 查询科目(分是否定向)
|
|
|
+ -- 7. 查询知识点(分是否定向)
|
|
|
+ -- 8. 查询单个定向时知识点树
|
|
|
+ -- 9. 设置题型数量(预置题型要求,或人工指定,不指定时平均分配, 题型是针对院校的)
|
|
|
+ */
|
|
|
+
|
|
|
+ @GetMapping("/classes")
|
|
|
+ @ApiOperation("2. 班级列表")
|
|
|
+ public AjaxResult classes()
|
|
|
+ {
|
|
|
+ return AjaxResult.success(learnTeacherService.getClasses(getUserId()));
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/universities")
|
|
|
+ @ApiOperation("院校列表")
|
|
|
+ public AjaxResult universities()
|
|
|
+ {
|
|
|
+ return AjaxResult.success(learnTeacherService.selectUniversityList(getUserId()));
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/majors")
|
|
|
+ @ApiOperation("专业列表")
|
|
|
+ public AjaxResult majors(@ApiParam("省份") String location, @ApiParam("考生类型") ExamType examType, @RequestParam(required = false) @ApiParam("院校列表") Long universityId)
|
|
|
+ {
|
|
|
+ DzControl control = dzControlService.selectDzControl(location, examType);
|
|
|
+ return AjaxResult.success(learnTeacherService.selectMajorList(universityId, control.getPlanYear()));
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/subjects")
|
|
|
+ @ApiOperation("科目列表")
|
|
|
+ public AjaxResult2<List<DzSubject>> subjects(@RequestParam(required = false) @ApiParam("院校列表") Long universityId)
|
|
|
+ {
|
|
|
+ DzSubject sCond = new DzSubject();
|
|
|
+ List<DzSubject> list = dzSubjectService.selectDzSubjectList(sCond);
|
|
|
+ return AjaxResult2.success(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping("/knowledges")
|
|
|
+ @ApiOperation("知识点列表")
|
|
|
+ public AjaxResult knowledges(@ApiParam("科目ID") Long subjectId, @RequestParam(required = false) @ApiParam("专业计划ID") Long[] majorPlanIds)
|
|
|
+ {
|
|
|
+ return AjaxResult.success(learnTeacherService.getKnowledgeTree(subjectId, majorPlanIds));
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('learn:test_paper:add')")
|
|
|
+ @PostMapping("/build")
|
|
|
+ @ApiOperation("批量组卷")
|
|
|
+ public AjaxResult batchBuild(@RequestBody TestPaperVO.TestPapersBuildReq req)
|
|
|
+ {
|
|
|
+ return toAjax(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('learn:test_paper:query')")
|
|
|
+ @GetMapping("/publish")
|
|
|
+ @ApiOperation("批量发布查询")
|
|
|
+ public AjaxResult batchQuery(@RequestBody TestPaperVO.TestPapersQueryReq req)
|
|
|
+ {
|
|
|
+ return AjaxResult.success(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('learn:test_paper:add')")
|
|
|
+ @PostMapping("/publish/papers")
|
|
|
+ @ApiOperation("批量发布生成")
|
|
|
+ public AjaxResult publishBatch(@RequestBody TestPaperVO.TestPapersPublishReq req)
|
|
|
+ {
|
|
|
+ return toAjax(true);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PreAuthorize("@ss.hasPermi('learn:test_paper:add')")
|
|
|
+ @PostMapping("/publish/paper")
|
|
|
+ @ApiOperation("批量发布生成")
|
|
|
+ public AjaxResult publishSingle(@RequestBody TestPaperVO.TestPaperPublishReq req)
|
|
|
+ {
|
|
|
+ return toAjax(true);
|
|
|
+ }
|
|
|
+}
|