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 17:00:47
 **/
@RestController
@RequestMapping("/rmtzl")
public class MtzlReportController {
    @Resource
    private MsrClassQuestionService msrClassQuestionService;


    /*
     * @Description 命题分析-试题分析指标明细表
     * @Date 2024/12/30 17:01:56
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/mtfx_stfx")
    public ResultVo listMtzlMtfxQuestions(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2});
        return new ResultVo(0,"获取成功",msrClassQuestionService.listMtzlStfxQuestions(params));
    }

    /*
     * @Description 命题分析-试题难度、区分度分布结构表 (缺少区分度诊断)
     * @Date 2024/12/31 10:08:19
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/mtfx_nd")
    public ResultVo listMtzlStndAndQfd(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2});
        return new ResultVo(0,"获取成功",msrClassQuestionService.listMtzlStndAndQfd(params));
    }

    /*
     * @Description 试题分析-客观题/主观题
     * @Date 2024/12/31 14:30:35
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/stfx_st")
    public ResultVo listMtzlStfxAllSt(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2});
        return new ResultVo(0,"获取成功",msrClassQuestionService.listMtzlStfxAllSt(params));
    }

    /*
     * @Description 试题分析-单个试题分析
     * @Date 2024/12/31 15:12:55
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/stfx_onest")
    public ResultVo listMtzlStfxOneQue(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2, params.getMptqid(),"试题id",1});
        return new ResultVo(0,"获取成功",msrClassQuestionService.listMtzlStfxOneQue(params));
    }

    /*
     * @Description 试题结构与组块分析
     * @Date 2024/12/31 16:01:04
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/stjg")
    public ResultVo listMtzlStjgAndZk(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2, params.getMptqid(),"试题id",1,params.getQtype(),"类型",1});
        return new ResultVo(0,"获取成功",msrClassQuestionService.listMtzlStjgAndZk(params));
    }

}
