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.SysTeacherKpiFillingStuEmergencyMapper;
import com.srs.teacher.domain.SysTeacherKpiFillingStuEmergency;
import com.srs.teacher.service.ISysTeacherKpiFillingStuEmergencyService;

/**
 * 业绩考核-个人填报-处理学生突发事件Service业务层处理
 *
 * @author chc
 * @date 2024-06-12
 */
@Service
public class SysTeacherKpiFillingStuEmergencyServiceImpl extends ServiceImpl<SysTeacherKpiFillingStuEmergencyMapper,SysTeacherKpiFillingStuEmergency> implements ISysTeacherKpiFillingStuEmergencyService {
    @Autowired
    private SysTeacherKpiFillingStuEmergencyMapper sysTeacherKpiFillingStuEmergencyMapper;

    /**
     * 查询业绩考核-个人填报-处理学生突发事件
     *
     * @param id 业绩考核-个人填报-处理学生突发事件主键
     * @return 业绩考核-个人填报-处理学生突发事件
     */
    @Override
    public SysTeacherKpiFillingStuEmergency selectSysTeacherKpiFillingStuEmergencyById(Long id) {
        return sysTeacherKpiFillingStuEmergencyMapper.selectSysTeacherKpiFillingStuEmergencyById(id);
    }

    /**
     * 查询业绩考核-个人填报-处理学生突发事件列表
     *
     * @param sysTeacherKpiFillingStuEmergency 业绩考核-个人填报-处理学生突发事件
     * @return 业绩考核-个人填报-处理学生突发事件
     */
    @Override
    public List<SysTeacherKpiFillingStuEmergency> selectSysTeacherKpiFillingStuEmergencyList(SysTeacherKpiFillingStuEmergency sysTeacherKpiFillingStuEmergency) {
        sysTeacherKpiFillingStuEmergency.setFdyName(SecurityUtils.getLoginUser().getUser().getNickName());
        return sysTeacherKpiFillingStuEmergencyMapper.selectSysTeacherKpiFillingStuEmergencyList(sysTeacherKpiFillingStuEmergency);
    }

    /**
     * 查根据辅导员名称、年份 月份 查询
     *
     * @param fdyName 辅导员名称
     * @return 业绩考核-个人填报-处理学生突发事件集合
     */
    @Override
    public List<SysTeacherKpiFillingStuEmergency> selectSysTeacherKpiFillingStuEmergencyByFdyName(String fdyName, String fillingYear, String fillingMonth, String classType) {
        return sysTeacherKpiFillingStuEmergencyMapper.selectSysTeacherKpiFillingStuEmergencyByFdyName(fdyName, fillingYear, fillingMonth, classType);
    }

    /**
     * 新增业绩考核-个人填报-处理学生突发事件
     *
     * @param sysTeacherKpiFillingStuEmergency 业绩考核-个人填报-处理学生突发事件
     * @return 结果
     */
    @Override
    public int insertSysTeacherKpiFillingStuEmergency(SysTeacherKpiFillingStuEmergency sysTeacherKpiFillingStuEmergency) {
            return sysTeacherKpiFillingStuEmergencyMapper.insertSysTeacherKpiFillingStuEmergency(sysTeacherKpiFillingStuEmergency);
    }

    /**
     * 修改业绩考核-个人填报-处理学生突发事件
     *
     * @param sysTeacherKpiFillingStuEmergency 业绩考核-个人填报-处理学生突发事件
     * @return 结果
     */
    @Override
    public int updateSysTeacherKpiFillingStuEmergency(SysTeacherKpiFillingStuEmergency sysTeacherKpiFillingStuEmergency) {
        return sysTeacherKpiFillingStuEmergencyMapper.updateSysTeacherKpiFillingStuEmergency(sysTeacherKpiFillingStuEmergency);
    }

    /**
     * 批量删除业绩考核-个人填报-处理学生突发事件
     *
     * @param ids 需要删除的业绩考核-个人填报-处理学生突发事件主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherKpiFillingStuEmergencyByIds(Long[] ids) {
        return sysTeacherKpiFillingStuEmergencyMapper.deleteSysTeacherKpiFillingStuEmergencyByIds(ids);
    }

    /**
     * 删除业绩考核-个人填报-处理学生突发事件信息
     *
     * @param id 业绩考核-个人填报-处理学生突发事件主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherKpiFillingStuEmergencyById(Long id) {
        return sysTeacherKpiFillingStuEmergencyMapper.deleteSysTeacherKpiFillingStuEmergencyById(id);
    }
}
