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/30 10:33:37
 **/
@RestController
@RequestMapping("/rbj")
public class BjReportController {
    @Resource
    private MsrClassQuestionService msrClassQuestionService;



    /*
     * @Description 全部班级-学科试题得分率对比
     * @Date 2024/12/30 10:35:09
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/qbbj_xkst")
    public ResultVo listQuestionForBjQuestionScoreRate(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2});
        return new ResultVo(0,"获取成功",msrClassQuestionService.listQuestionForBjQuestionScoreRate(params));
    }


    /*
     * @Description 单个班级-学科试题考试内在表现
     * @Date 2024/12/30 11:22:42
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/dgb_stks")
    public ResultVo listQuestionForBjStks(@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.listQuestionForBjStks(params));
    }
}
