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

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

import cn.com.qmth.stmms.biz.exam.model.SelectiveGroup;
import cn.com.qmth.stmms.common.enums.ScorePolicy;

public interface SelectiveGroupService {

    SelectiveGroup save(SelectiveGroup s);

    void save(List<SelectiveGroup> list);

    SelectiveGroup findOne(int examId, String subjectCode, int mainNumber);

    List<SelectiveGroup> findByExamIdAndSubjectCode(int examId, String code);

    void deleteByExamIdAndSubjectCodeAndSelectiveIndex(int examId, String subjectCode, int selectiveIndex);

    List<SelectiveGroup> findIndexByExamIdAndSubjectCode(int examId, String subjectCode);

    long countByExamIdAndSubjectCode(int examId, String subjectCode);

    Map<Integer, List<SelectiveGroup>> findGroupByExamIdAndSubjectCode(int examId, String subjectCode);

    int findMaxIndexByExamIdAndSubjectCode(int examId, String subjectCode);

    void updateScorePolicy(int examId, String subjectCode, Integer selectiveIndex, ScorePolicy scorePolicy);

    double sumScoreByExamIdAndSubjectCode(int examId, String subjectCode);

}
