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.CmcContractInvoiceMapper;
import com.ruoyi.oa.domain.CmcContractInvoice;
import com.ruoyi.oa.service.ICmcContractInvoiceService;

/**
 * 合同开票Service业务层处理
 * 
 * @author cmc
 * @date 2025-07-23
 */
@Service
public class CmcContractInvoiceServiceImpl implements ICmcContractInvoiceService 
{
    @Autowired
    private CmcContractInvoiceMapper cmcContractInvoiceMapper;

    /**
     * 查询合同开票
     * 
     * @param invoiceId 合同开票主键
     * @return 合同开票
     */
    @Override
    public CmcContractInvoice selectCmcContractInvoiceByInvoiceId(Integer invoiceId)
    {
        return cmcContractInvoiceMapper.selectCmcContractInvoiceByInvoiceId(invoiceId);
    }

    /**
     * 查询合同开票列表
     * 
     * @param cmcContractInvoice 合同开票
     * @return 合同开票
     */
    @Override
    public List<CmcContractInvoice> selectCmcContractInvoiceList(CmcContractInvoice cmcContractInvoice)
    {
        return cmcContractInvoiceMapper.selectCmcContractInvoiceList(cmcContractInvoice);
    }

    /**
     * 新增合同开票
     * 
     * @param cmcContractInvoice 合同开票
     * @return 结果
     */
    @Override
    public int insertCmcContractInvoice(CmcContractInvoice cmcContractInvoice)
    {
        return cmcContractInvoiceMapper.insertCmcContractInvoice(cmcContractInvoice);
    }

    /**
     * 修改合同开票
     * 
     * @param cmcContractInvoice 合同开票
     * @return 结果
     */
    @Override
    public int updateCmcContractInvoice(CmcContractInvoice cmcContractInvoice)
    {
        return cmcContractInvoiceMapper.updateCmcContractInvoice(cmcContractInvoice);
    }

    /**
     * 删除合同开票信息
     *
     * @param contractId 合同开票主键
     * @return 结果
     */
    @Override
    public int deleteCmcContractInvoiceByContractId(String contractId)
    {
        return cmcContractInvoiceMapper.deleteCmcContractInvoiceByContractId(contractId);
    }

    /**
     * 批量删除合同开票
     *
     * @param contractIds 需要删除的合同开票主键集合
     * @return 结果
     */
    @Override
    public int deleteCmcContractInvoiceByContractIds(String[] contractIds)
    {
        return cmcContractInvoiceMapper.deleteCmcContractInvoiceByContractIds(contractIds);
    }
}
