package com.srs.comprehensive.mapper;

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

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.srs.comprehensive.domain.CphAuditDetails;
import com.srs.comprehensive.domain.Dto.CphExport;
import com.srs.comprehensive.domain.SrsCqScore;
import com.srs.comprehensive.domain.SrsMajors;
import com.srs.comprehensive.domain.Vo.*;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;

/**
 * 学生综合素质评分表Mapper接口
 *
 * @author srs
 * @date 2023-06-29
 */
@Mapper
public interface SrsCqScoreMapper extends BaseMapper<SrsCqScore>
{

    public List<DataScreen> countScoreDis(Long stuYearId);
    public List<DataScreen> rankDis(CphSearch search);

    public List<DataScreen> countScoreDetailDis(Long stuYearId);

    /**
     * 查询学生综合素质评分表
     *
     * @param id 学生综合素质评分表主键
     * @return 学生综合素质评分表
     */
    public SrsCqScore selectSrsCqScoreById(Long id);

    public List<CphTotalScoreInfo> listCphScore(CphSearch search);

    List<Integer> cphTotalScoreClassIdInfo(String stuNo);

    public List<CphTotalScoreInfo> listCphScore30(CphSearch search);

    public List<Map<String,Object>> exportScore(CphExport param);

    public List<CphStuScoreType> listOwnFive(String stuNo);

    public List<CphAuditDetails> getcphiamByOne(String stuNo);

    public List<CphCollegeLook> listOwnCollegeScore(CphSearch param);

    public List<CphCollegeLook> listOwnCollegeStu(CphSearch param);
    public List<CphCollegeLook> listOwnCollegeAudit(CphSearch param);

    public List<SrsMajors> listOwnMajor(Long id);

    public List<SrsMajors> listOwnClass(CphSearch param);

    public List<SrsCqScore> getStuData(String stuNo);


    /**
     * 查询学生综合素质评分表列表
     * @param cphSearch
     * @return 学生综合素质评分表集合
     */

    public List<SrsCqScore> selectSrsCqScoreList(CphSearch cphSearch);

    /**
     * 查询综合汇总
     * @param id 学年id
     * @return
     */
    @MapKey("stu_no")// 使用"id"列作为Map的键

    public List<Map<String,Object>> getComprehensiveSummary(@Param("id") int id);
    /**
     * 生成综合素质总成绩
     * @param id 学年id
     * @return
     */

    public List<CphOwnScore> getOwn(String stuNo);

    public List<CphOwnScore> getOwn2(String stuNo);

    public void generateComprehensiveSummary(@Param("id") int id);


    public List<SrsCqScore> selectAll(int id);

    /**
     * 新增学生综合素质评分表
     *
     * @param srsCqScore 学生综合素质评分表
     * @return 结果
     */


    public int insertSrsCqScore(SrsCqScore srsCqScore);

    /**
     * 修改学生综合素质评分表
     *
     * @param srsCqScore 学生综合素质评分表
     * @return 结果
     */
    public int updateSrsCqScore(SrsCqScore srsCqScore);

    /**
     * 删除学生综合素质评分表
     *
     * @param id 学生综合素质评分表主键
     * @return 结果
     */
    public int deleteSrsCqScoreById(Long id);

    /**
     * 批量删除学生综合素质评分表
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSrsCqScoreByIds(Long[] ids);

    List<Map<String, Object>> getScoreDistribution(Map<String, Object> params);

    List<SrsCeScoreClassDeptGradeMajorsStudentStuYear> selectPerson(Map<String, Object> params);


    int batchUpdateCqScore(List<SrsCqScore> cqScores);

    int batchInsertCqScore(List<SrsCqScore> cqScores);

    public List<CphTotalScoreInfo> listCphScore55(CphSearch search);

    List<CphTotalScoreInfo> classData(CphSearch cphSearch2);
}
