package com.qmth.themis.business.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qmth.themis.business.bean.backend.ReexamListDoneBean;
import com.qmth.themis.business.bean.backend.ReexamListNotDoneBean;
import com.qmth.themis.business.bean.backend.ReexamListRequestBean;
import com.qmth.themis.business.dao.TEExamReexamMapper;
import com.qmth.themis.business.entity.TEExamReexam;
import com.qmth.themis.business.service.TEExamReexamService;
import org.springframework.stereotype.Service;

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

/**
 * @Description: 考生重考处理 服务实现类
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2020/6/25
 */
@Service
public class TEExamReexamServiceImpl extends ServiceImpl<TEExamReexamMapper, TEExamReexam> implements TEExamReexamService {

    @Resource
    TEExamReexamMapper teExamReexamMapper;

    /**
     * 重考申请列表
     *
     * @param iPage
     * @param examId
     * @param examActivityId
     * @param roomCode
     * @param courseCode
     * @param name
     * @param identity
     * @param userId
     * @return
     */
    @Override
    public IPage<ReexamListRequestBean> reexamPageRequestList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Long userId) {
        return teExamReexamMapper.reexamPageRequestList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, userId);
    }

    /**
     * 重考待审列表
     *
     * @param iPage
     * @param examId
     * @param examActivityId
     * @param roomCode
     * @param courseCode
     * @param name
     * @param identity
     * @param reason
     * @param reasonStartTime
     * @param reasonEndTime
     * @param applyName
     * @param userId
     * @return
     */
    @Override
    public IPage<ReexamListNotDoneBean> reexamPageNotDoneList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, String reason, Long reasonStartTime, Long reasonEndTime, String applyName, Long userId) {
        return teExamReexamMapper.reexamPageNotDoneList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, reason, reasonStartTime, reasonEndTime, applyName, userId);
    }

    /**
     * 重考待审提醒
     *
     * @param examId
     * @param userId
     * @return
     */
    @Override
    public Integer reexamPageNotDoneCount(Long examId, Long userId) {
        return teExamReexamMapper.reexamPageNotDoneCount(examId, userId);
    }

    /**
     * 重考已审列表
     *
     * @param iPage
     * @param examId
     * @param examActivityId
     * @param roomCode
     * @param courseCode
     * @param name
     * @param identity
     * @param auditingStatus
     * @param reasonStartTime
     * @param reasonEndTime
     * @param applyName
     * @param userId
     * @return
     */
    @Override
    public IPage<ReexamListDoneBean> reexamPageDoneList(IPage<Map> iPage, Long examId, Long examActivityId, String roomCode, String courseCode, String name, String identity, Integer auditingStatus, Long reasonStartTime, Long reasonEndTime, String applyName, Long userId) {
        return teExamReexamMapper.reexamPageDoneList(iPage, examId, examActivityId, roomCode, courseCode, name, identity, auditingStatus, reasonStartTime, reasonEndTime, applyName, userId);
    }
}
