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.CmcBudgetOtherMapper;
import com.ruoyi.oa.domain.CmcBudgetOther;
import com.ruoyi.oa.service.ICmcBudgetOtherService;

/**
 * cmc预算外开支Service业务层处理
 * 
 * @author cmc
 * @date 2025-05-09
 */
@Service
public class CmcBudgetOtherServiceImpl implements ICmcBudgetOtherService 
{
    @Autowired
    private CmcBudgetOtherMapper cmcBudgetOtherMapper;

    /**
     * 查询cmc预算外开支
     * 
     * @param expenseId cmc预算外开支主键
     * @return cmc预算外开支
     */
    @Override
    public CmcBudgetOther selectCmcBudgetOtherByExpenseId(Long expenseId)
    {
        return cmcBudgetOtherMapper.selectCmcBudgetOtherByExpenseId(expenseId);
    }

    /**
     * 查询cmc预算外开支列表
     * 
     * @param cmcBudgetOther cmc预算外开支
     * @return cmc预算外开支
     */
    @Override
    public List<CmcBudgetOther> selectCmcBudgetOtherList(CmcBudgetOther cmcBudgetOther)
    {
        return cmcBudgetOtherMapper.selectCmcBudgetOtherList(cmcBudgetOther);
    }

    /**
     * 新增cmc预算外开支
     * 
     * @param cmcBudgetOther cmc预算外开支
     * @return 结果
     */
    @Override
    public int insertCmcBudgetOther(CmcBudgetOther cmcBudgetOther)
    {
        return cmcBudgetOtherMapper.insertCmcBudgetOther(cmcBudgetOther);
    }

    /**
     * 修改cmc预算外开支
     * 
     * @param cmcBudgetOther cmc预算外开支
     * @return 结果
     */
    @Override
    public int updateCmcBudgetOther(CmcBudgetOther cmcBudgetOther)
    {
        return cmcBudgetOtherMapper.updateCmcBudgetOther(cmcBudgetOther);
    }

    /**
     * 批量删除cmc预算外开支
     * 
     * @param budgetId 需要删除的cmc预算外开支主键
     * @return 结果
     */
    @Override
    public int deleteCmcBudgetOtherByExpenseIds(String[] budgetId)
    {
        return cmcBudgetOtherMapper.deleteCmcBudgetOtherByExpenseIds(budgetId);
    }

    /**
     * 删除cmc预算外开支信息
     * 
     * @param expenseId cmc预算外开支主键
     * @return 结果
     */
    @Override
    public int deleteCmcBudgetOtherByExpenseId(Long expenseId)
    {
        return cmcBudgetOtherMapper.deleteCmcBudgetOtherByExpenseId(expenseId);
    }
}
