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.CmcCarApprovalMapper;
import com.ruoyi.oa.domain.CmcCarApproval;
import com.ruoyi.oa.service.ICmcCarApprovalService;

/**
 * cmc用车审批Service业务层处理
 * 
 * @author cmc
 * @date 2024-02-23
 */
@Service
public class CmcCarApprovalServiceImpl implements ICmcCarApprovalService 
{
    @Autowired
    private CmcCarApprovalMapper cmcCarApprovalMapper;

    /**
     * 查询cmc用车审批
     * 
     * @param carApplyId cmc用车审批主键
     * @return cmc用车审批
     */
    @Override
    public CmcCarApproval selectCmcCarApprovalByCarApplyId(String carApplyId)
    {
        return cmcCarApprovalMapper.selectCmcCarApprovalByCarApplyId(carApplyId);
    }

    /**
     * 查询cmc用车审批列表
     * 
     * @param cmcCarApproval cmc用车审批
     * @return cmc用车审批
     */
    @Override
    public List<CmcCarApproval> selectCmcCarApprovalList(CmcCarApproval cmcCarApproval)
    {
        return cmcCarApprovalMapper.selectCmcCarApprovalList(cmcCarApproval);
    }

    /**
     * 新增cmc用车审批
     * 
     * @param cmcCarApproval cmc用车审批
     * @return 结果
     */
    @Override
    public int insertCmcCarApproval(CmcCarApproval cmcCarApproval)
    {
        return cmcCarApprovalMapper.insertCmcCarApproval(cmcCarApproval);
    }

    /**
     * 修改cmc用车审批
     * 
     * @param cmcCarApproval cmc用车审批
     * @return 结果
     */
    @Override
    public int updateCmcCarApproval(CmcCarApproval cmcCarApproval)
    {
        return cmcCarApprovalMapper.updateCmcCarApproval(cmcCarApproval);
    }

    /**
     * 批量删除cmc用车审批
     * 
     * @param carApplyIds 需要删除的cmc用车审批主键
     * @return 结果
     */
    @Override
    public int deleteCmcCarApprovalByCarApplyIds(String[] carApplyIds)
    {
        return cmcCarApprovalMapper.deleteCmcCarApprovalByCarApplyIds(carApplyIds);
    }

    /**
     * 删除cmc用车审批信息
     * 
     * @param carApplyId cmc用车审批主键
     * @return 结果
     */
    @Override
    public int deleteCmcCarApprovalByCarApplyId(String carApplyId)
    {
        return cmcCarApprovalMapper.deleteCmcCarApprovalByCarApplyId(carApplyId);
    }
}
