|
|
@@ -6,11 +6,15 @@ import com.google.common.collect.Lists;
|
|
|
import com.ruoyi.common.core.content.VistorContextHolder;
|
|
|
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.core.domain.entity.SysUser;
|
|
|
import com.ruoyi.common.core.page.TableDataInfo;
|
|
|
+import com.ruoyi.common.enums.ExamType;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
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.domain.AEnrollUniversity;
|
|
|
import com.ruoyi.ie.domain.AMarjorPlan;
|
|
|
import com.ruoyi.ie.service.IAEnrollUniversityService;
|
|
|
@@ -51,9 +55,10 @@ public class FrontStudentController extends BaseController {
|
|
|
private final IAMarjorPlanService marjorPlanService;
|
|
|
private final ILearnDirectedKnowledgeService learnDirectedKnowledgeService;
|
|
|
private final StudentService studentService;
|
|
|
+ private final IDzSubjectService dzSubjectService;
|
|
|
|
|
|
public FrontStudentController(IDzControlService dzControlService, IAEnrollUniversityService universityService, ISyMajorService syMajorService, ISysUserService sysUserService,
|
|
|
- ILearnPlanService learnPlanService, ILearnPlanStudyService learnPlanStudyService, IAMarjorPlanService marjorPlanService, ILearnDirectedKnowledgeService learnDirectedKnowledgeService, StudentService studentService) {
|
|
|
+ ILearnPlanService learnPlanService, ILearnPlanStudyService learnPlanStudyService, IAMarjorPlanService marjorPlanService, ILearnDirectedKnowledgeService learnDirectedKnowledgeService, StudentService studentService, IDzSubjectService dzSubjectService) {
|
|
|
this.dzControlService = dzControlService;
|
|
|
this.universityService = universityService;
|
|
|
this.syMajorService = syMajorService;
|
|
|
@@ -63,6 +68,18 @@ public class FrontStudentController extends BaseController {
|
|
|
this.marjorPlanService = marjorPlanService;
|
|
|
this.learnDirectedKnowledgeService = learnDirectedKnowledgeService;
|
|
|
this.studentService = studentService;
|
|
|
+ this.dzSubjectService = dzSubjectService;
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("02 考试科目")
|
|
|
+ @GetMapping(value = "subject")
|
|
|
+ public AjaxResult2<List<DzSubject>> getSubject() {
|
|
|
+ SysUser sysUser = SecurityUtils.getLoginUser().getUser();
|
|
|
+ DzSubject sCond = new DzSubject();
|
|
|
+ sCond.setLocations(sysUser.getLocation());
|
|
|
+ sCond.setExamTypes(sysUser.getExamType().name());
|
|
|
+ List<DzSubject> list = dzSubjectService.selectDzSubjectList(sCond);
|
|
|
+ return AjaxResult2.success(list);
|
|
|
}
|
|
|
|
|
|
@ApiOperation("试卷作业统计")
|
|
|
@@ -120,6 +137,21 @@ public class FrontStudentController extends BaseController {
|
|
|
return CollectionUtils.isNotEmpty(result) ? AjaxResult.success(result.get(0)) : AjaxResult.error("无计划");
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("03 查询学生定向院校")
|
|
|
+ @GetMapping(value = "simulated/info")
|
|
|
+ public AjaxResult getSimulateInfo() {
|
|
|
+ JSONObject result = new JSONObject();
|
|
|
+ SysUser user = SecurityUtils.getLoginUser().getUser();
|
|
|
+ if(ExamType.OHS.name().equals(user.getUserType())) {
|
|
|
+ result.put("subjects", Lists.newArrayList("职业技能", "语数外"));
|
|
|
+ } else {
|
|
|
+ result.put("subjects", Lists.newArrayList("职业技能"));
|
|
|
+ }
|
|
|
+ SysUser sysUser = sysUserService.selectUserById(SecurityUtils.getUserId());
|
|
|
+ result.put("evalCount", sysUser.getEvalCount());
|
|
|
+ return AjaxResult.success(result);
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation("03 查询学生定向院校")
|
|
|
@GetMapping(value = "directed/school")
|
|
|
public AjaxResult getDirectionSchools() {
|