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.CmcPerformanceMapper;
import com.ruoyi.oa.domain.CmcPerformance;
import com.ruoyi.oa.service.ICmcPerformanceService;

/**
 * 绩效审批Service业务层处理
 *
 * @author cmc
 * @date 2024-09-23
 */
@Service
public class CmcPerformanceServiceImpl implements ICmcPerformanceService
{
    @Autowired
    private CmcPerformanceMapper cmcPerformanceMapper;

    /**
     * 查询绩效审批
     *
     * @param performanceId 绩效审批主键
     * @return 绩效审批
     */
    @Override
    public CmcPerformance selectCmcPerformanceByPerformanceId(String performanceId)
    {
        return cmcPerformanceMapper.selectCmcPerformanceByPerformanceId(performanceId);
    }

    /**
     * 查询绩效审批列表
     *
     * @param cmcPerformance 绩效审批
     * @return 绩效审批
     */
    @Override
    public List<CmcPerformance> selectCmcPerformanceList(CmcPerformance cmcPerformance)
    {
        return cmcPerformanceMapper.selectCmcPerformanceList(cmcPerformance);
    }

    /**
     * 新增绩效审批
     *
     * @param cmcPerformance 绩效审批
     * @return 结果
     */
    @Override
    public int insertCmcPerformance(CmcPerformance cmcPerformance)
    {
        return cmcPerformanceMapper.insertCmcPerformance(cmcPerformance);
    }

    /**
     * 修改绩效审批
     *
     * @param cmcPerformance 绩效审批
     * @return 结果
     */
    @Override
    public int updateCmcPerformance(CmcPerformance cmcPerformance)
    {
        return cmcPerformanceMapper.updateCmcPerformance(cmcPerformance);
    }

    /**
     * 批量删除绩效审批
     *
     * @param performanceIds 需要删除的绩效审批主键
     * @return 结果
     */
    @Override
    public int deleteCmcPerformanceByPerformanceIds(String[] performanceIds)
    {
        return cmcPerformanceMapper.deleteCmcPerformanceByPerformanceIds(performanceIds);
    }

    /**
     * 删除绩效审批信息
     *
     * @param performanceId 绩效审批主键
     * @return 结果
     */
    @Override
    public int deleteCmcPerformanceByPerformanceId(String performanceId)
    {
        return cmcPerformanceMapper.deleteCmcPerformanceByPerformanceId(performanceId);
    }
}