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.CmcProcurePlanMapper;
import com.ruoyi.oa.domain.CmcProcurePlan;
import com.ruoyi.oa.service.ICmcProcurePlanService;

/**
 * 采购计划Service业务层处理
 * 
 * @author cmc
 * @date 2024-09-18
 */
@Service
public class CmcProcurePlanServiceImpl implements ICmcProcurePlanService
{
    @Autowired
    private CmcProcurePlanMapper cmcProcurePlanMapper;

    /**
     * 查询采购计划
     * 
     * @param procurePlanId 采购计划主键
     * @return 采购计划
     */
    @Override
    public CmcProcurePlan selectCmcProcurePlanByProcurePlanId(Integer procurePlanId)
    {
        return cmcProcurePlanMapper.selectCmcProcurePlanByProcurePlanId(procurePlanId);
    }

    /**
     * 查询采购计划列表
     * 
     * @param cmcProcurePlan 采购计划
     * @return 采购计划
     */
    @Override
    public List<CmcProcurePlan> selectCmcProcurePlanList(CmcProcurePlan cmcProcurePlan)
    {
        return cmcProcurePlanMapper.selectCmcProcurePlanList(cmcProcurePlan);
    }

    /**
     * 新增采购计划
     * 
     * @param cmcProcurePlan 采购计划
     * @return 结果
     */
    @Override
    public int insertCmcProcurePlan(CmcProcurePlan cmcProcurePlan)
    {
        return cmcProcurePlanMapper.insertCmcProcurePlan(cmcProcurePlan);
    }

    /**
     * 修改采购计划
     * 
     * @param cmcProcurePlan 采购计划
     * @return 结果
     */
    @Override
    public int updateCmcProcurePlan(CmcProcurePlan cmcProcurePlan)
    {
        return cmcProcurePlanMapper.updateCmcProcurePlan(cmcProcurePlan);
    }

    /**
     * 批量删除采购计划
     * 
     * @param procureApplyId 需要删除的采购计划主键
     * @return 结果
     */
    @Override
    public int deleteCmcProcurePlanByProcureApplyIds(String[] procureApplyId)
    {
        return cmcProcurePlanMapper.deleteCmcProcurePlanByProcureApplyIds(procureApplyId);
    }

    /**
     * 删除采购计划信息
     * 
     * @param procurePlanId 采购计划主键
     * @return 结果
     */
    @Override
    public int deleteCmcProcurePlanByProcurePlanId(Integer procurePlanId)
    {
        return cmcProcurePlanMapper.deleteCmcProcurePlanByProcurePlanId(procurePlanId);
    }
}
