package ink.wgink.module.examine.service.paper;

import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.module.examine.pojo.dtos.paper.PaperDTO;
import ink.wgink.module.examine.pojo.vos.paper.PaperVO;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: IPaperService
 * @Description: 试卷
 * @Author: WenG
 * @Date: 2020-09-11 11:50
 * @Version: 1.0
 **/
public interface IPaperService {

    /**
     * 新增试卷
     *
     * @param paperVO
     * @return
     * @throws Exception
     */
    void save(PaperVO paperVO) throws Exception;

    /**
     * 新增试卷
     *
     * @param paperVO
     * @return paperId
     * @throws Exception
     */
    String saveReturnId(PaperVO paperVO) throws Exception;

    /**
     * 删除试卷
     *
     * @param paperIds 试卷ID列表
     * @throws RemoveException
     */
    void remove(List<String> paperIds);

    /**
     * 删除试卷
     *
     * @param paperIds
     */
    void delete(List<String> paperIds);

    /**
     * 修改试卷
     *
     * @param paperId
     * @param paperVO
     * @return
     * @throws Exception
     */
    void update(String paperId, PaperVO paperVO) throws Exception;

    /**
     * 试卷详情(通过ID)
     *
     * @param paperId
     * @return
     * @throws SearchException
     */
    PaperDTO getById(String paperId);

    /**
     * 试卷列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<PaperDTO> list(Map<String, Object> params);

    /**
     * 试卷分页列表
     *
     * @param page
     * @return
     * @throws SearchException
     */
    SuccessResultList<List<PaperDTO>> listPage(ListPage page);

    /**
     * 试卷统计
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer count(Map<String, Object> params);

}