package com.ruoyi.oa.service.impl;

import com.ruoyi.oa.domain.CmcProjectWorkload;
import com.ruoyi.oa.mapper.CmcProjectWorkloadMapper;
import com.ruoyi.oa.service.ICmcProjectWorkloadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * cmc项目内容Service业务层处理
 * 
 * @author cmc
 * @date 2024-02-28
 */
@Service
public class CmcProjectWorkloadServiceImpl implements ICmcProjectWorkloadService
{
    @Autowired
    private CmcProjectWorkloadMapper cmcProjectWorkloadMapper;

    /**
     * 查询cmc项目内容
     * 
     * @param projectId cmc项目id
     * @return cmc项目内容集合
     */
    @Override
    public List<CmcProjectWorkload> selectCmcProjectWorkloadListByProjectId(String projectId)
    {
        return cmcProjectWorkloadMapper.selectCmcProjectWorkloadListByProjectId(projectId);
    }

    /**
     * 查询cmc项目内容列表
     * 
     * @param cmcProjectWorkload cmc项目内容
     * @return cmc项目内容
     */
    @Override
    public List<CmcProjectWorkload> selectCmcProjectWorkloadList(CmcProjectWorkload cmcProjectWorkload)
    {
        return cmcProjectWorkloadMapper.selectCmcProjectWorkloadList(cmcProjectWorkload);
    }

    /**
     * 新增cmc项目内容
     * 
     * @param cmcProjectWorkload cmc项目内容
     * @return 结果
     */
    @Override
    public int insertCmcProjectWorkload(CmcProjectWorkload cmcProjectWorkload)
    {
        return cmcProjectWorkloadMapper.insertCmcProjectWorkload(cmcProjectWorkload);
    }

    /**
     * 修改cmc项目内容
     * 
     * @param cmcProjectWorkload cmc项目内容
     * @return 结果
     */
    @Override
    public int updateCmcProjectWorkload(CmcProjectWorkload cmcProjectWorkload)
    {
        return cmcProjectWorkloadMapper.updateCmcProjectWorkload(cmcProjectWorkload);
    }

    /**
     * 批量删除cmc项目内容
     * 
     * @param workIds 需要删除的cmc项目内容主键
     * @return 结果
     */
    @Override
    public int deleteCmcProjectWorkloadByProjectIds(String[] workIds)
    {
        return cmcProjectWorkloadMapper.deleteCmcProjectWorkloadByProjectIds(workIds);
    }

    /**
     * 删除cmc项目内容信息
     * 
     * @param projectId cmc项目内容主键
     * @return 结果
     */
    @Override
    public int deleteCmcProjectWorkloadByProjectId(String projectId)
    {
        return cmcProjectWorkloadMapper.deleteCmcProjectWorkloadByProjectId(projectId);
    }
}
