package cn.com.qmth.stmms.biz.distributpaper.service;

import java.util.List;

import cn.com.qmth.stmms.biz.distributpaper.model.TryLibrary;
import cn.com.qmth.stmms.biz.distributpaper.query.TryLibrarySearchQuery;
import cn.com.qmth.stmms.common.enums.LibraryStatus;

public interface TryLibraryService {

    TryLibrary save(TryLibrary tryLibrary);

    TryLibrary findById(Integer id);

    void deleteById(Integer id);

    void delete(TryLibrary tryLibrary);

    List<TryLibrary> findByExamIdAndBlockId(Integer examId, Integer blockId);

    List<TryLibrary> findByBlockIdAndSecretNo(Integer blockId, Integer secretNo);

    /**
     * 查询打回试卷
     * 
     * @param examId
     * @param blockId
     * @param getter
     * @param status
     * @return
     */
    List<TryLibrary> findByExamIdAndBlockIdAndGetterAndStatus(int examId, int blockId, int getter, LibraryStatus status);

    List<TryLibrary> findByExamIdAndBlockIdAndStatus(int examId, int blockId, LibraryStatus status);

    TryLibrarySearchQuery findByQuery(final TryLibrarySearchQuery query);

    List<TryLibrary> randomCheck(int examId, String subjectCode);

    List<TryLibrary> findByExamIdAndSubjectCodeAndBlockIdAndSecretNoAndStatus(int examId, String subjectCode, int blockId, int secretNo, LibraryStatus status);

}
