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.CmcProcureApprovalMapper;
import com.ruoyi.oa.domain.CmcProcureApproval;
import com.ruoyi.oa.service.ICmcProcureApprovalService;

/**
 * 采购审批Service业务层处理
 * 
 * @author cmc
 * @date 2024-09-18
 */
@Service
public class CmcProcureApprovalServiceImpl implements ICmcProcureApprovalService
{
    @Autowired
    private CmcProcureApprovalMapper cmcProcureApprovalMapper;

    /**
     * 查询采购审批
     * 
     * @param procureApplyId 采购审批主键
     * @return 采购审批
     */
    @Override
    public CmcProcureApproval selectCmcProcureApprovalByProcureApplyId(String procureApplyId)
    {
        return cmcProcureApprovalMapper.selectCmcProcureApprovalByProcureApplyId(procureApplyId);
    }

    /**
     * 查询采购审批列表
     * 
     * @param cmcProcureApproval 采购审批
     * @return 采购审批
     */
    @Override
    public List<CmcProcureApproval> selectCmcProcureApprovalList(CmcProcureApproval cmcProcureApproval)
    {
        return cmcProcureApprovalMapper.selectCmcProcureApprovalList(cmcProcureApproval);
    }

    /**
     * 新增采购审批
     * 
     * @param cmcProcureApproval 采购审批
     * @return 结果
     */
    @Override
    public int insertCmcProcureApproval(CmcProcureApproval cmcProcureApproval)
    {
        return cmcProcureApprovalMapper.insertCmcProcureApproval(cmcProcureApproval);
    }

    /**
     * 修改采购审批
     * 
     * @param cmcProcureApproval 采购审批
     * @return 结果
     */
    @Override
    public int updateCmcProcureApproval(CmcProcureApproval cmcProcureApproval)
    {
        return cmcProcureApprovalMapper.updateCmcProcureApproval(cmcProcureApproval);
    }

    /**
     * 批量删除采购审批
     * 
     * @param procureApplyIds 需要删除的采购审批主键
     * @return 结果
     */
    @Override
    public int deleteCmcProcureApprovalByProcureApplyIds(String[] procureApplyIds)
    {
        return cmcProcureApprovalMapper.deleteCmcProcureApprovalByProcureApplyIds(procureApplyIds);
    }

    /**
     * 删除采购审批信息
     * 
     * @param procureApplyId 采购审批主键
     * @return 结果
     */
    @Override
    public int deleteCmcProcureApprovalByProcureApplyId(String procureApplyId)
    {
        return cmcProcureApprovalMapper.deleteCmcProcureApprovalByProcureApplyId(procureApplyId);
    }
}
