package com.ssj.service.weixin.zuoyb.service;

import com.ssj.bean.weixin.zyb.domain.ZuoybKnowHowDetails;
import com.ssj.framework.core.common.service.BaseService;
import com.ssj.service.kmt.dto.KnowHowDetailsDTO;
import com.ssj.service.kmt.dto.TestPointDTO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

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

/** 
 * @author  ZhangCaibao 
 * @version 2017年9月26日 下午2:02:37 
 * 类说明 
 */
public interface ZuoybKnowHowDetailsService extends BaseService<ZuoybKnowHowDetails, String>{
     /**
      * 删除知识点
     * @param howId
     * 创建人：ZhangCaibao 
     * 2017年9月26日 下午3:12:52 
     * @void
      */
	 public void deleteByHowId(String howId);
	 
	 public void deleteById(String Id);
	 
	 public  Page<ZuoybKnowHowDetails>  findByPage(Map<String, Object> params, Pageable sp);
	 public Page<Map<String, Object>> getZuoybKnowHowDetails(Map<String, Object> searchParams, Pageable pageable);
	 /**
	  * 
	 * @param libId 默认SSJ
	* @param courseName 科目
	* @param grade  //年级
	* @param banben //版本 1北师大，2人教
	* @param semester //1上学期，2 下学期
	 * @return
	 * 创建人：ZhangCaibao 
	 * 2018年9月28日 上午11:18:38 
	 * @List<ZuoybKnowHowDetails>
	  */
	 public List<ZuoybKnowHowDetails> findlatestHowDetails(String libId,String howId,String courseName,String grade,Integer banben,Integer semester);
	 public List<ZuoybKnowHowDetails> findlatestHowDetails(String libId,String howId,String courseName,String grade,Integer banben,Integer semester,String howDetailsName);
	 /**
	   * 修改排序
	  * @param id
	  * @param num
	  * 创建人：ZhangCaibao 
	  * 2017年9月12日 上午10:15:43 
	  * @void
	   */
	  public void  updateKnowHowDetailNum(String id,Integer num);
	  
	  public  List<ZuoybKnowHowDetails> getNameByHowId(String howDetialsId);

	  public List<Map<String, Object>> getKonwDetail(Map<String, Object> params);
	  public Page<Map<String, Object>> getKonwTBDetail(Map<String, Object> params, Pageable sp);
	  public List<Map<String, Object>> getKonwKdDetail(Map<String, Object> params);
	  
	  public List<ZuoybKnowHowDetails> findByHowId(String howId);
	  
	  public List<ZuoybKnowHowDetails> findByIds(List<String> ids);
	  public List<String> findKnowHowDetailsByIds(List<String> ids);

	/**
	 * 查询应用类知识点
	 * @param ids
	 * @param names
	 * @return
	 */
	  public List<ZuoybKnowHowDetails> findApplyKnowHowDetail (List<String> ids, List<String> names);
	  
	//  public List<ZuoybKnowHowDetails> findByNameAndModule(String name,String module);
	  
	  public List<ZuoybKnowHowDetails> findByHowIdNotNull(String howId,String libId,String courseName,String grade,String semester ,String type);
	  public List<ZuoybKnowHowDetails> findByHowIdNotNull(String howId,String libId,String courseName,String grade,String semester ,String type,int weekNum);
	  /**
	   * 获取下月的知识点
	  * @param libId
	  * @param courseName
	  * @param grade
	  * @param semester
	  * @param type
	  * @param weekNum
	  * @return
	  * 创建人：ZhangCaibao 
	  * 2018年3月13日 下午3:30:22 
	  * @List<ZuoybKnowHowDetails>
	   */
	  public List<ZuoybKnowHowDetails> nextMonthHowDtails(String libId,String courseName,String grade,String semester ,String type,int weekNum);
	  public List<String> nextMonthZuoybHowDtails(String libId,String courseName,String grade,String semester ,String type,int weekNum);
	  /**
	   * 
	  * @param howId  主键ID
	  * @param name 知识点
	  * @return
	  * 创建人：ZhangCaibao 
	  * 2018年1月22日 下午5:16:03 
	  * @String
	   */
	  public ZuoybKnowHowDetails findByHowIdAndName(String howId,String name);
	  
	  public List<ZuoybKnowHowDetails> getZybKnowHowById(List<String> ids);
	  
	  public List<ZuoybKnowHowDetails> findCourseKnowDetailList(String courseKnowId);

	  public List<Object[]> findKnowAndYdslByIds(List<String> ids);

	  List<ZuoybKnowHowDetails> findByNum(int num);

	public List<String> getHowDetailsIds(String libId, String courseName,String grade, String semester, String type, int start, int end);
	public List<Object[]> getHowDetailsIds(String libId, String courseName,String grade, String semester, String type, int start, int end,Integer pageSize,String module);
	public List<Object[]> getMathHowDetailsIds(String libId, String courseName,String grade, String semester, String type, String howName);

	/**
	 * 根据知识点id查询考点
	 */
    List<KnowHowDetailsDTO> findTestPoint(List<String> detailIdList, int versionType, String grade, String subject, int semester);

	/**
	 * 根据知识点id查询考点
	 * @param detailId
	 * @param versionType
	 * @return
	 */
	List<TestPointDTO> findTestPoint(String detailId, Integer versionType, String grade, int semester);
}
