package com.ssj.service.sys.homework.service;

import com.ssj.bean.kmt.kmt.domain.KmtHomeworkWrongQuestion;
import com.ssj.bean.sys.homework.domain.HomeworkHowDetail;
import com.ssj.framework.core.common.service.BaseService;
import com.ssj.service.conch.parents.v2.dto.KnowHowDetailDTO;

import java.util.Date;
import java.util.List;

public interface HomeworkHowDetailsService extends BaseService<HomeworkHowDetail, String> {

    /**
     * new一个HomeworkHowDetail对象，用于作业批改
     */
    HomeworkHowDetail createHomeworkHowDetail(Date now, String homeworkId, String detailId, Integer knowledgeVersion);

    /**
     * new一个HomeworkHowDetail对象，用于作业批改
     */
    HomeworkHowDetail createHomeworkHowDetail(Date now, KmtHomeworkWrongQuestion kmtHomeworkWrongQuestion, String knowledgeId);

    /**
     * 根据作业图片的id列表删除错题知识点记录
     */
    void deleteByHomeworkPictureIdIn(List<String> homeworkPictureIdList);


    /**
     * 删除作业图片的错题知识点
     * @param homeworkPictureId
     */
    void deleteByHomeworkPictureId (String homeworkPictureId);

    /**
     * 删除作业图片的错题知识点
     * @param homeworkPictureId
     */
    void deleteExerciseByHomeworkPictureId (String homeworkPictureId);

    /**
     * 错题本作业删除
     *
     * @param homeworkId
     */
    void deleteWrongQuesByHomeworkId(String homeworkId);

    /**
     * 删除错题本错题
     * @param knowHowDetailDTOList 知识点id
     * @param homeworkId 作业id
     */
    void deleteWrongBookQuestion(List<KnowHowDetailDTO> knowHowDetailDTOList, String homeworkId);

    /**
     * 查询作业图片手动勾选的知识点
     * @param homeworkPictureId
     * @return
     */
    List<HomeworkHowDetail> findHowDetailsByHomeworkPictureId (String homeworkPictureId);

    /**
     * 根据作业id查询
     * @param homeworkId 作业id
     */
    List<HomeworkHowDetail> findAllByHomeworkId(String homeworkId);
}
