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.CmcProjectSubContractMapper;
import com.ruoyi.oa.domain.CmcProjectSubContract;
import com.ruoyi.oa.service.ICmcProjectSubContractService;

/**
 * cmc项目分包合同Service业务层处理
 * 
 * @author cmc
 * @date 2024-06-19
 */
@Service
public class CmcProjectSubContractServiceImpl implements ICmcProjectSubContractService 
{
    @Autowired
    private CmcProjectSubContractMapper cmcProjectSubContractMapper;

    /**
     * 查询cmc项目分包合同
     * 
     * @param projectId cmc项目分包合同主键
     * @return cmc项目分包合同
     */
    @Override
    public CmcProjectSubContract selectCmcProjectSubContractByProjectId(String projectId)
    {
        return cmcProjectSubContractMapper.selectCmcProjectSubContractByProjectId(projectId);
    }

    /**
     * 查询cmc项目分包合同列表
     * 
     * @param cmcProjectSubContract cmc项目分包合同
     * @return cmc项目分包合同
     */
    @Override
    public List<CmcProjectSubContract> selectCmcProjectSubContractList(CmcProjectSubContract cmcProjectSubContract)
    {
        return cmcProjectSubContractMapper.selectCmcProjectSubContractList(cmcProjectSubContract);
    }

    /**
     * 新增cmc项目分包合同
     * 
     * @param cmcProjectSubContract cmc项目分包合同
     * @return 结果
     */
    @Override
    public int insertCmcProjectSubContract(CmcProjectSubContract cmcProjectSubContract)
    {
        return cmcProjectSubContractMapper.insertCmcProjectSubContract(cmcProjectSubContract);
    }

    /**
     * 修改cmc项目分包合同
     * 
     * @param cmcProjectSubContract cmc项目分包合同
     * @return 结果
     */
    @Override
    public int updateCmcProjectSubContract(CmcProjectSubContract cmcProjectSubContract)
    {
        return cmcProjectSubContractMapper.updateCmcProjectSubContract(cmcProjectSubContract);
    }

    /**
     * 批量删除cmc项目分包合同
     * 
     * @param subContractIds 需要删除的cmc项目分包合同主键
     * @return 结果
     */
    @Override
    public int deleteCmcProjectSubContractBySubContractIds(String[] subContractIds)
    {
        return cmcProjectSubContractMapper.deleteCmcProjectSubContractBySubContractIds(subContractIds);
    }

    /**
     * 删除cmc项目分包合同信息
     * 
     * @param projectId cmc项目分包合同主键
     * @return 结果
     */
    @Override
    public int deleteCmcProjectSubContractByProjectId(String projectId)
    {
        return cmcProjectSubContractMapper.deleteCmcProjectSubContractByProjectId(projectId);
    }
}
