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

import java.util.List;
import java.util.Set;

import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
import cn.com.qmth.stmms.biz.exam.service.query.ExamSubjectSearchQuery;
import cn.com.qmth.stmms.common.enums.ExamSubjectStatus;
import cn.com.qmth.stmms.common.enums.LibraryStatus;

public interface ExamSubjectService {

    ExamSubject save(ExamSubject subject);

    ExamSubject find(int examId, String code);

    List<ExamSubject> list(int examId);

    List<ExamSubject> list(int examId, ExamSubjectStatus status);

    List<ExamSubject> list(int examId, Set<ExamSubjectStatus> statusSet);

    void delete(ExamSubject markSubject);

    List<ExamSubject> list(Set<ExamSubjectStatus> statusSet);

    long count(int examId);

    long count(int examId, Set<ExamSubjectStatus> statusSet);

    long count(int examId, ExamSubjectStatus status);

    ExamSubjectSearchQuery findByQuery(ExamSubjectSearchQuery query);

    long countByQuery(ExamSubjectSearchQuery query);

    void changeStatus(int examId, ExamSubjectStatus status);

    void deleteByExamId(int examId);

    void updateLibraryCount(int examId, String code, int libraryCount);

    void updateTotalScore(int examId);

    long sumLibraryCount(int examId, int libraryCountGt, double subjectiveScoreGt);

    void updateMarkedCount(int examId, String code, int markedCount);

    List<ExamSubject> list(int examId, int libraryCountGt, double subjectiveScoreGt);

    List<ExamSubject> list(int examId, ExamSubjectStatus status, int libraryCountGt, double subjectiveScoreGt);

    List<ExamSubject> list(int examId, ExamSubjectStatus status, int libraryCountGt, int leftCountGt,
            double subjectiveScoreGt);

    List<String> listLevel(int examId);

    List<String> listCategory(int examId);

    void updateLibraryCount(int examId);

    void updateMarkedCount(int examId);

    void updateLeftCount(int examId);

    List<ExamSubject> findExamSubjectByMarkerId(int examId,int markerId ,LibraryStatus status);

}
