package com.ruoyi.oa.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.oa.mapper.CmcPerformanceStaffMapper;
import com.ruoyi.oa.domain.CmcPerformanceStaff;
import com.ruoyi.oa.service.ICmcPerformanceStaffService;

/**
 * cmc员工绩效Service业务层处理
 * 
 * @author cmc
 * @date 2025-06-04
 */
@Service
public class CmcPerformanceStaffServiceImpl implements ICmcPerformanceStaffService 
{
    @Autowired
    private CmcPerformanceStaffMapper cmcPerformanceStaffMapper;

    /**
     * 查询cmc员工绩效
     * 
     * @param performanceStaffId cmc员工绩效主键
     * @return cmc员工绩效
     */
    @Override
    public CmcPerformanceStaff selectCmcPerformanceStaffByPerformanceStaffId(Long performanceStaffId)
    {
        return cmcPerformanceStaffMapper.selectCmcPerformanceStaffByPerformanceStaffId(performanceStaffId);
    }

    /**
     * 查询cmc员工绩效列表
     * 
     * @param cmcPerformanceStaff cmc员工绩效
     * @return cmc员工绩效
     */
    @Override
    public List<CmcPerformanceStaff> selectCmcPerformanceStaffList(CmcPerformanceStaff cmcPerformanceStaff)
    {
        return cmcPerformanceStaffMapper.selectCmcPerformanceStaffList(cmcPerformanceStaff);
    }

    /**
     * 查询cmc员工月度绩效列表
     *
     * @param performanceId 绩效审批id
     * @param deptId 部门id
     * @return cmc员工绩效集合
     */
    @Override
    public List<CmcPerformanceStaff> selectMonthPerformanceList(String performanceId, String deptId)
    {
        return cmcPerformanceStaffMapper.selectMonthPerformanceList(performanceId, deptId);
    }

    /**
     * 新增cmc员工绩效
     * 
     * @param cmcPerformanceStaff cmc员工绩效
     * @return 结果
     */
    @Override
    public int insertCmcPerformanceStaff(CmcPerformanceStaff cmcPerformanceStaff)
    {
        return cmcPerformanceStaffMapper.insertCmcPerformanceStaff(cmcPerformanceStaff);
    }

    /**
     * 修改cmc员工绩效
     * 
     * @param cmcPerformanceStaff cmc员工绩效
     * @return 结果
     */
    @Override
    public int updateCmcPerformanceStaff(CmcPerformanceStaff cmcPerformanceStaff)
    {
        return cmcPerformanceStaffMapper.updateCmcPerformanceStaff(cmcPerformanceStaff);
    }

    /**
     * 批量删除cmc员工绩效
     * 
     * @param performanceId 需要删除的cmc绩效审批id集合
     * @return 结果
     */
    @Override
    public int deleteCmcPerformanceStaffByPerformanceId(String[] performanceId)
    {
        return cmcPerformanceStaffMapper.deleteCmcPerformanceStaffByPerformanceId(performanceId);
    }

    /**
     * 删除cmc员工绩效信息
     * 
     * @param performanceStaffId cmc员工绩效主键
     * @return 结果
     */
    @Override
    public int deleteCmcPerformanceStaffByPerformanceStaffId(Long performanceStaffId)
    {
        return cmcPerformanceStaffMapper.deleteCmcPerformanceStaffByPerformanceStaffId(performanceStaffId);
    }
}
