package jnpf.cultivate.controller.web.exam;

import jnpf.base.ActionResult;
import jnpf.cultivate.service.FtbCultivateExamService;
import jnpf.model.cultivate.req.exam.WebQueryExamReadOverReq;
import jnpf.model.cultivate.resp.WebReadOverExamAndPaperDetailVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * web考试批阅模块
 *
 * @author xuguilin
 */
@RestController
@RequestMapping("/examReadOver")
public class FtbCultivateExamReadOverController {
    /**
     * 考试服务
     */
    @Resource
    private FtbCultivateExamService examService;


    /**
     * 批阅查询历史试卷列表
     *
     * @param req
     * @return
     */
    @GetMapping("/historyPaperList")
    public ActionResult<List<WebReadOverExamAndPaperDetailVo>> historyPaperList(WebQueryExamReadOverReq req) {
        return ActionResult.success("成功", examService.historyPaperList(req));
    }


    /**
     * 批阅查询历史试卷未考试的角标
     *
     * @param req
     * @return
     */
    @GetMapping("/waitNumberForBatch")
    public ActionResult<Map<String,Integer>> waitNumberForBatch(WebQueryExamReadOverReq req) {
        return ActionResult.success("成功", examService.waitNumberForBatch(req));
    }


}
