package com.srs.teacher.service.impl;

import java.util.List;

import com.srs.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.srs.teacher.mapper.SysTeacherKpiFillingRewardsKpiMapper;
import com.srs.teacher.domain.SysTeacherKpiFillingRewardsKpi;
import com.srs.teacher.service.ISysTeacherKpiFillingRewardsKpiService;

/**
 * 业绩考核-个人填报-超工作量奖励绩效Service业务层处理
 *
 * @author chc
 * @date 2024-06-12
 */
@Service
public class SysTeacherKpiFillingRewardsKpiServiceImpl extends ServiceImpl<SysTeacherKpiFillingRewardsKpiMapper,SysTeacherKpiFillingRewardsKpi> implements ISysTeacherKpiFillingRewardsKpiService {
    @Autowired
    private SysTeacherKpiFillingRewardsKpiMapper sysTeacherKpiFillingRewardsKpiMapper;

    /**
     * 查询业绩考核-个人填报-超工作量奖励绩效
     *
     * @param id 业绩考核-个人填报-超工作量奖励绩效主键
     * @return 业绩考核-个人填报-超工作量奖励绩效
     */
    @Override
    public SysTeacherKpiFillingRewardsKpi selectSysTeacherKpiFillingRewardsKpiById(Long id) {
        return sysTeacherKpiFillingRewardsKpiMapper.selectSysTeacherKpiFillingRewardsKpiById(id);
    }

    /**
     * 查询业绩考核-个人填报-超工作量奖励绩效列表
     *
     * @param sysTeacherKpiFillingRewardsKpi 业绩考核-个人填报-超工作量奖励绩效
     * @return 业绩考核-个人填报-超工作量奖励绩效
     */
    @Override
    public List<SysTeacherKpiFillingRewardsKpi> selectSysTeacherKpiFillingRewardsKpiList(SysTeacherKpiFillingRewardsKpi sysTeacherKpiFillingRewardsKpi) {
        sysTeacherKpiFillingRewardsKpi.setFdyName(SecurityUtils.getLoginUser().getUser().getNickName());
        return sysTeacherKpiFillingRewardsKpiMapper.selectSysTeacherKpiFillingRewardsKpiList(sysTeacherKpiFillingRewardsKpi);
    }

    /**
     * 查根据辅导员名称、年份 月份 查询
     *
     * @param fdyName 辅导员名称
     * @return 业绩考核-个人填报-超工作量奖励绩效集合
     */
    @Override
    public List<SysTeacherKpiFillingRewardsKpi> selectSysTeacherKpiFillingRewardsKpiByFdyName(String fdyName, String fillingYear, String fillingMonth, String classType) {
        return sysTeacherKpiFillingRewardsKpiMapper.selectSysTeacherKpiFillingRewardsKpiByFdyName(fdyName, fillingYear, fillingMonth, classType);
    }

    /**
     * 新增业绩考核-个人填报-超工作量奖励绩效
     *
     * @param sysTeacherKpiFillingRewardsKpi 业绩考核-个人填报-超工作量奖励绩效
     * @return 结果
     */
    @Override
    public int insertSysTeacherKpiFillingRewardsKpi(SysTeacherKpiFillingRewardsKpi sysTeacherKpiFillingRewardsKpi) {
            return sysTeacherKpiFillingRewardsKpiMapper.insertSysTeacherKpiFillingRewardsKpi(sysTeacherKpiFillingRewardsKpi);
    }

    /**
     * 修改业绩考核-个人填报-超工作量奖励绩效
     *
     * @param sysTeacherKpiFillingRewardsKpi 业绩考核-个人填报-超工作量奖励绩效
     * @return 结果
     */
    @Override
    public int updateSysTeacherKpiFillingRewardsKpi(SysTeacherKpiFillingRewardsKpi sysTeacherKpiFillingRewardsKpi) {
        return sysTeacherKpiFillingRewardsKpiMapper.updateSysTeacherKpiFillingRewardsKpi(sysTeacherKpiFillingRewardsKpi);
    }

    /**
     * 批量删除业绩考核-个人填报-超工作量奖励绩效
     *
     * @param ids 需要删除的业绩考核-个人填报-超工作量奖励绩效主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherKpiFillingRewardsKpiByIds(Long[] ids) {
        return sysTeacherKpiFillingRewardsKpiMapper.deleteSysTeacherKpiFillingRewardsKpiByIds(ids);
    }

    /**
     * 删除业绩考核-个人填报-超工作量奖励绩效信息
     *
     * @param id 业绩考核-个人填报-超工作量奖励绩效主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherKpiFillingRewardsKpiById(Long id) {
        return sysTeacherKpiFillingRewardsKpiMapper.deleteSysTeacherKpiFillingRewardsKpiById(id);
    }
}
