package com.xhkjedu.smarking.controller.report;

import com.xhkjedu.smarking.service.report.report.MsrStudentService;
import com.xhkjedu.smarking.vo.report.reportother.ExamReportParams;
import com.xhkjedu.utils.N_Utils;
import com.xhkjedu.vo.ResultVo;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Description：学生报告
 * @Author: WN
 * @Date: 2024/12/30 16:10:55
 **/
@RestController
@RequestMapping("/rxs")
public class XsReportController {
    @Resource
    private MsrStudentService msrStudentService;



    /*
     * @Description 学生各学科试题分析
     * @Date 2024/12/30 16:12:23
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/stfx")
    public ResultVo listQuestionForBjQuestionScoreRate(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2,params.getStudentid(),"学生id",1});
        return new ResultVo(0,"获取成功",msrStudentService.listStuSubjectQuestions(params));
    }

    /*
     * @Description 学生各学科知识点分析
     * @Date 2024/12/30 16:25:27
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/zsdfx")
    public ResultVo listStuPoints(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2,params.getStudentid(),"学生id",1});
        return new ResultVo(0,"获取成功",msrStudentService.listStuPoints(params));
    }
}
