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

import cn.com.qmth.stmms.biz.exam.model.Exam;
import cn.com.qmth.stmms.biz.exam.model.ExamSubject;
import cn.com.qmth.stmms.biz.exam.service.query.ExamSubjectSearchQuery;
import cn.com.qmth.stmms.biz.mark.model.PictureConfigItem;

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

public interface ExamSubjectService {

    ExamSubject save(ExamSubject subject);

    ExamSubject find(int examId, String code);

    List<ExamSubject> list(int examId);

    List<ExamSubject> list(int examId, Set<String> codes);

    void delete(ExamSubject markSubject);

    long count(int examId);

    ExamSubjectSearchQuery findByQuery(ExamSubjectSearchQuery query);

    long countByQuery(ExamSubjectSearchQuery query);

    void deleteByExamId(int examId);

    List<ExamSubject> list(int examId, int uploadCountGt);

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

    List<String> listLevel(int examId);

    List<String> listCategory(int examId);

    void updateUploadCount(Integer examId, String subjectCode, int count);

    void updateTotalScore(int examId);

    void updateScore(int examId, String code, boolean objective, double score);

    void updateSliceConfig(Integer examId, String subjectCode, List<PictureConfigItem> configList);

    void updateTrialCount(int examId, String subjectCode, int trialCount);

    int findMaxInspectRound(int examId, Set<String> subjectCodes);

    void nextInspectRound(int examId, String subjectCode);

    void updateSelective(int examId, String subjectCode, boolean selective);

    String enableExport(Exam exam, String subjectCode);

    List<Double> distinctTotalScore(int examId);

	void resetInspect(int examId, String subjectCode);

}
