package com.xhkjedu.smarking.controller.report;

import com.xhkjedu.smarking.model.report.reportother.MsrAnalyze;
import com.xhkjedu.smarking.service.report.reportother.MsrExamService;
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 auto
 * @Date 2024-12-09
 */
@RestController
@RequestMapping("/msrExam")
public class MsrExamController {
    @Resource
    private MsrExamService msrExamService;

    /**
     * @Description 生成报告
     * @Date 2024/12/9 15:43
     * @Author YWX
     * @Param [exam]
     * @Return com.xhkjedu.vo.ResultVo
     **/
    @PostMapping("/scbg")
    public ResultVo generateExamReport(@RequestBody MsrAnalyze exam) {
        Integer examid = exam.getExamid();
        N_Utils.validation(new Object[]{examid, "考试id", 1});
        msrExamService.generateExamReport(examid,exam.getCreateid());
        return new ResultVo(0, "生成成功");
    }
}
