package com.ruoyi.postCheck.service;

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

import com.ruoyi.postCheck.domain.PostAssessmentRating;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.postCheck.domain.PostCheckedProblem;


/**
 * 考核评比Service接口
 *
 * @author csg
 * @date 2023-12-21
 */
public interface IPostAssessmentRatingService extends IService<PostAssessmentRating> {
    /**
     * 查询考核评比
     *
     * @param id 考核评比主键
     * @return 考核评比
     */
    public PostAssessmentRating selectPostAssessmentRatingById(Long id);


    /**
     * 查询考核评比列表
     *
     * @param postAssessmentRating 考核评比
     * @return 考核评比集合
     */
    public List<PostAssessmentRating> selectPostAssessmentRatingList(PostAssessmentRating postAssessmentRating);

    /**
     * 统计职能部门的考核评比：计算岗检得分 + 计算互评得分
     *
     * @param beginTime 开始时间：年的第一天
     * @param endTime   结束时间：年的最后一天
     * @return 考核评比集合
     */
    public List<PostAssessmentRating> statisticsPostAssessmentRatingZN(String beginTime, String endTime);


    /**
     * 统计职能部门的考核评比：计算岗检得分 + 计算互评得分
     * @param beginTime 开始时间：年的第一天
     *  @param endTime 结束时间：年的最后一天
     * @return 考核评比集合
     */
    public List<PostAssessmentRating> statisticsPostAssessmentRatingSC(String beginTime, String endTime);


    /**
     * 新增考核评比
     *
     * @param postAssessmentRating 考核评比
     * @return 结果
     */
    public int insertPostAssessmentRating(PostAssessmentRating postAssessmentRating);

    /**
     * 修改考核评比
     *
     * @param postAssessmentRating 考核评比
     * @return 结果
     */
    public int updatePostAssessmentRating(PostAssessmentRating postAssessmentRating);

    /**
     * 批量删除考核评比
     *
     * @param ids 需要删除的考核评比主键集合
     * @return 结果
     */
    public int deletePostAssessmentRatingByIds(Long[] ids);

    /**
     * 删除考核评比信息
     *
     * @param id 考核评比主键
     * @return 结果
     */
    public int deletePostAssessmentRatingById(Long id);

    List<PostCheckedProblem> getProblemByDeptId(Long id);

    Map<String, Object> assessmentstatistics(Integer type, String year);

    List<Map<String, Object>> assessmentstatisticsV2(Integer type, String year);
}
