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

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.qmth.stmms.biz.distributpaper.dao.FormallyHistoryDao;
import cn.com.qmth.stmms.biz.distributpaper.dao.FormallyLibraryDao;
import cn.com.qmth.stmms.biz.distributpaper.service.ProgressService;
import cn.com.qmth.stmms.common.enums.LibraryStatus;

@Service
public class ProgressServiceImpl implements ProgressService {

    @Autowired
    private FormallyHistoryDao formallyHistoryDao;

    @Autowired
    private FormallyLibraryDao formallyLibraryDao;

    @Override
    public Long formallyHistoryCount(Integer examId, String subjectCode, Integer blockId) {
        /*
         * return
         * formallyHistoryDao.getCountByExamIdAndSchoolIdAndSubjectIdAndBlockId
         * (examId, schoolId, subjectId, blockId);
         */
        return null;
    }

    @Override
    public Long formallyLibraryCount(Integer examId, String subjectCode, Integer blockId) {

        return formallyLibraryDao.getCountByExamIdAndSubjectCodeAndBlockId(examId, subjectCode, blockId);
    }

    @Override
    public long formallyLibraryMarkedCount(Integer examId, String subjectCode, Integer blockId, LibraryStatus status) {
        return formallyLibraryDao.getCountByExamIdAndSubjectCodeAndBlockIdAndStatus(examId, subjectCode, blockId, status);
    }

}
