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

import java.util.List;

import cn.com.qmth.stmms.biz.distributpaper.model.CaseLibrary;
import cn.com.qmth.stmms.biz.subjectheader.query.CaseLibrarySearchQuery;

public interface CaseLibraryService {

    CaseLibrary save(CaseLibrary caseLibrary);

    CaseLibrary findById(Integer id);

    void deleteById(Integer id);

    void delete(CaseLibrary caseLibrary);

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

    CaseLibrary findByBlockIdAndSecretNo(Integer blockId, Integer secretNo);

    /**
     * 累加领取数量
     * 
     * @param id
     * @return
     */
    public CaseLibrary incrGetCount(Integer id);

    public CaseLibrarySearchQuery findByQuery(CaseLibrarySearchQuery query);

    /**
     * 采样
     * 
     * @param examId
     * @param subjectCode
     * @param blockId
     * @param count
     * @param subjectheaderId
     */
    void example(int examId, String subjectCode, int blockId, int count, int subjectheaderId);

    List<CaseLibrary> findByBlockId(int blockId);
}
