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.CmcOutsourceWorkMapper;
import com.ruoyi.oa.domain.CmcOutsourceWork;
import com.ruoyi.oa.service.ICmcOutsourceWorkService;

/**
 * 委外工作Service业务层处理
 * 
 * @author cmc
 * @date 2024-09-19
 */
@Service
public class CmcOutsourceWorkServiceImpl implements ICmcOutsourceWorkService 
{
    @Autowired
    private CmcOutsourceWorkMapper cmcOutsourceWorkMapper;

    /**
     * 查询委外工作
     * 
     * @param workId 委外工作主键
     * @return 委外工作
     */
    @Override
    public CmcOutsourceWork selectCmcOutsourceWorkByWorkId(Integer workId)
    {
        return cmcOutsourceWorkMapper.selectCmcOutsourceWorkByWorkId(workId);
    }

    /**
     * 查询委外工作列表
     * 
     * @param cmcOutsourceWork 委外工作
     * @return 委外工作
     */
    @Override
    public List<CmcOutsourceWork> selectCmcOutsourceWorkList(CmcOutsourceWork cmcOutsourceWork)
    {
        return cmcOutsourceWorkMapper.selectCmcOutsourceWorkList(cmcOutsourceWork);
    }

    /**
     * 新增委外工作
     * 
     * @param cmcOutsourceWork 委外工作
     * @return 结果
     */
    @Override
    public int insertCmcOutsourceWork(CmcOutsourceWork cmcOutsourceWork)
    {
        return cmcOutsourceWorkMapper.insertCmcOutsourceWork(cmcOutsourceWork);
    }

    /**
     * 修改委外工作
     * 
     * @param cmcOutsourceWork 委外工作
     * @return 结果
     */
    @Override
    public int updateCmcOutsourceWork(CmcOutsourceWork cmcOutsourceWork)
    {
        return cmcOutsourceWorkMapper.updateCmcOutsourceWork(cmcOutsourceWork);
    }

    /**
     * 批量删除委外工作
     * 
     * @param outsourceIds 需要删除的委外工作主键
     * @return 结果
     */
    @Override
    public int deleteCmcOutsourceWorkByOutsourceIds(String[] outsourceIds)
    {
        return cmcOutsourceWorkMapper.deleteCmcOutsourceWorkByOutsourceIds(outsourceIds);
    }

    /**
     * 删除委外工作信息
     * 
     * @param workId 委外工作主键
     * @return 结果
     */
    @Override
    public int deleteCmcOutsourceWorkByWorkId(Integer workId)
    {
        return cmcOutsourceWorkMapper.deleteCmcOutsourceWorkByWorkId(workId);
    }
}
