package com.srs.comprehensive.mapper;

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

import com.srs.comprehensive.domain.CphIam;
import com.srs.comprehensive.domain.CphIdeologyScore;
import com.srs.comprehensive.domain.Vo.CphApply;
import com.srs.comprehensive.domain.Vo.CphIamSearchVo;
import com.srs.comprehensive.domain.Vo.CphRecord;
import com.srs.comprehensive.domain.Vo.CphSearch;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 思想品德Mapper接口
 *
 * @author zhy
 * @date 2023-07-03
 */
@Mapper
public interface CphIamMapper {

    public List<Map<String, Object>> listErrorAddRecord(CphSearch param);

    public List<CphApply> listOwnProcessed(CphSearch param);

    public List<CphApply> listOwnApply(String stuNo);

    public List<CphRecord> getOwnRecord(@Param("stuNo") String stuNo, @Param("year") String year);

    public List<CphIamSearchVo> listIamByStuNoYear(CphSearch param);

    /**
     * 查询思想品德
     * 
     * @param id 思想品德主键
     * @return 思想品德
     */
    public CphIam selectCphIamById(Long id);

    /**
     * 查询思想品德列表
     * 
     * @param cphIam 思想品德
     * @return 思想品德集合
     */
    public List<CphIam> selectCphIamList(CphIam cphIam);

    /**
     * 查询思想品德列表
     *
     * @param cphIam 思想品德
     * @return 思想品德集合
     */
    public List<CphIam> selectCphIamListJoin(CphIam cphIam);


    /**
     * 查询学生思想品德总分
     * @param cphIam
     * @return 思想品德总分
     */
    public List<CphIdeologyScore> selectCphIamSumList(CphIdeologyScore cphIam);

    /**
     * 新增思想品德
     * 
     * @param cphIam 思想品德
     * @return 结果
     */
    public int insertCphIam(CphIam cphIam);

    /**
     * 修改思想品德
     * 
     * @param cphIam 思想品德
     * @return 结果
     */
    public int updateCphIam(CphIam cphIam);

    /**
     * 删除思想品德
     * 
     * @param id 思想品德主键
     * @return 结果
     */
    public int deleteCphIamById(Long id);

    /**
     * 批量删除思想品德
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCphIamByIds(Long[] ids);

    /**
     * 调用存储过程更新学生个人成绩
     * @param in_stu_year_id
     * @param in_stu_no
     */
    public void executeTestIam(@Param("in_stu_year_id")int in_stu_year_id,@Param("in_stu_no") String in_stu_no);
}
