package com.xhkjedu.smarking.controller.report;

import com.xhkjedu.smarking.service.report.report.MsrSubjectPointService;
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/31 16:45:17
 **/
@RestController
@RequestMapping("/rxksy")
public class XksyReportController {
    @Resource
    private MsrSubjectPointService msrSubjectPointService;

    /*
     * @Description 标定知识点-试题知识点
     * @Date 2025/1/2 16:34:45
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/zsd")
    public ResultVo listXksyQuestionPoints(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2});
        return new ResultVo(0,"获取成功",msrSubjectPointService.listXksyQuestionPoints(params));
    }

    /*
     * @Description 知识点整体分析
     * @Date 2024/12/31 16:46:51
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/zsd_zt")
    public ResultVo listXksyPointZt(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2,params.getPointlevel(),"知识点层级",1});
        return new ResultVo(0,"获取成功",msrSubjectPointService.listXksyPointZt(params));
    }

    /*
     * @Description 单个知识点分析-所有知识点
     * @Date 2025/1/2 9:18:13
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/zsd_one_all")
    public ResultVo listXksyPointOneForPoints(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2});
        return new ResultVo(0,"获取成功",msrSubjectPointService.listXksyPointOneForPoints(params));
    }

    /*
     * @Description 单个知识点分析-详细分析
     * @Date 2025/1/2 15:36:20
     * @Author WN
     * @Param [params]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/zsd_one_xq")
    public ResultVo listXksyPointOneForPointDetail(@RequestBody ExamReportParams params){
        N_Utils.validation(new Object[]{params.getExamid(),"考试id",1,params.getSubjectid(),"科目id",2, params.getPointlevel(),"知识点级别",1,params.getPointid(),"知识点id",1});
        return new ResultVo(0,"获取成功",msrSubjectPointService.listXksyPointOneForPointDetail(params));
    }
}
