package com.xhkjedu.smarking.controller.report;

import com.xhkjedu.smarking.service.report.report.MsrClassQuestionService;
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/24 17:36:06
 **/
@RestController
@RequestMapping("/rxk")
public class XkReportController {
    @Resource
    private MsrClassQuestionService msrClassQuestionService;

    /*
     * @Description 各班学科试题分析-得分率,得分率差异对比
     * @Date 2024/12/27 15:42:52
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/xkst_dfl")
    public ResultVo listQuestionForXhXhstDfl(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2,params.getClassids(),"班级id",2});
        return new ResultVo(0,"获取成功",msrClassQuestionService.listQuestionForXhXhstDfl(params));
    }

    /*
     * @Description 各班学科试题分析-区分度，得分率差
     * @Date 2024/12/30 10:13:10
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/xkst_qfd")
    public ResultVo listQuestionForXhXhstQfd(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2,params.getClassid(),"班级id",1});
        return new ResultVo(0,"获取成功",msrClassQuestionService.listQuestionForXhXhstQfd(params));
    }

    /*
     * @Description 各班学科试题分析-难度分组表现差异
     * @Date 2024/12/30 10:24:14
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/xkst_Nd")
    public ResultVo listQuestionForXhXhstNdGroup(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2});
        return new ResultVo(0,"获取成功",msrClassQuestionService.listQuestionForXhXhstNdGroup(params));
    }
}
