package com.ruoyi.oa.service.impl;

import com.ruoyi.oa.domain.CmcContractSubContract;
import com.ruoyi.oa.mapper.CmcContractSubContractMapper;
import com.ruoyi.oa.service.ICmcContractSubContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * cmc承接分包合同Service业务层处理
 * 
 * @author cmc
 * @date 2024-06-19
 */
@Service
public class CmcContractSubContractServiceImpl implements ICmcContractSubContractService 
{
    @Autowired
    private CmcContractSubContractMapper cmcContractSubContractMapper;

    /**
     * 查询cmc承接分包合同
     * 
     * @param contractId cmc承接分包合同主键
     * @return cmc承接分包合同
     */
    @Override
    public CmcContractSubContract selectCmcContractSubContractByContractId(String contractId)
    {
        return cmcContractSubContractMapper.selectCmcContractSubContractByContractId(contractId);
    }

    /**
     * 查询cmc承接分包合同列表
     * 
     * @param cmcContractSubContract cmc承接分包合同
     * @return cmc承接分包合同
     */
    @Override
    public List<CmcContractSubContract> selectCmcContractSubContractList(CmcContractSubContract cmcContractSubContract)
    {
        return cmcContractSubContractMapper.selectCmcContractSubContractList(cmcContractSubContract);
    }

    /**
     * 新增cmc承接分包合同
     * 
     * @param cmcContractSubContract cmc承接分包合同
     * @return 结果
     */
    @Override
    public int insertCmcContractSubContract(CmcContractSubContract cmcContractSubContract)
    {
        return cmcContractSubContractMapper.insertCmcContractSubContract(cmcContractSubContract);
    }

    /**
     * 修改cmc承接分包合同
     * 
     * @param cmcContractSubContract cmc承接分包合同
     * @return 结果
     */
    @Override
    public int updateCmcContractSubContract(CmcContractSubContract cmcContractSubContract)
    {
        return cmcContractSubContractMapper.updateCmcContractSubContract(cmcContractSubContract);
    }

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

    /**
     * 删除cmc承接分包合同信息
     * 
     * @param contractId cmc承接分包合同主键
     * @return 结果
     */
    @Override
    public int deleteCmcContractSubContractByContractId(String[] contractId)
    {
        return cmcContractSubContractMapper.deleteCmcContractSubContractByContractId(contractId);
    }
}
