package com.ruoyi.contractInfo.service.impl;

import java.util.List;

import com.ruoyi.contractInfo.domain.ComContractInfoExchange;
import com.ruoyi.contractInfo.mapper.ComContractInfoExchangeMapper;
import com.ruoyi.contractInfo.service.IComContractInfoExchangeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 合同信息存储Service业务层处理
 * 
 * @author yanxun
 * @date 2023-08-10
 */
@Service
public class ComContractInfoExchangeServiceImpl implements IComContractInfoExchangeService
{
    @Autowired
    private ComContractInfoExchangeMapper comContractInfoExchangeMapper;

    /**
     * 查询合同信息存储
     * 
     * @param id 合同信息存储主键
     * @return 合同信息存储
     */
    @Override
    public ComContractInfoExchange selectComContractInfoExchangeById(Long id)
    {
        return comContractInfoExchangeMapper.selectComContractInfoExchangeById(id);
    }

    /**
     * 查询合同信息存储列表
     * 
     * @param comContractInfoExchange 合同信息存储
     * @return 合同信息存储
     */
    @Override
    public List<ComContractInfoExchange> selectComContractInfoExchangeList(ComContractInfoExchange comContractInfoExchange)
    {
        return comContractInfoExchangeMapper.selectComContractInfoExchangeList(comContractInfoExchange);
    }

    /**
     * 新增合同信息存储
     * 
     * @param comContractInfoExchange 合同信息存储
     * @return 结果
     */
    @Override
    public int insertComContractInfoExchange(ComContractInfoExchange comContractInfoExchange)
    {
        return comContractInfoExchangeMapper.insertComContractInfoExchange(comContractInfoExchange);
    }

    /**
     * 修改合同信息存储
     * 
     * @param comContractInfoExchange 合同信息存储
     * @return 结果
     */
    @Override
    public int updateComContractInfoExchange(ComContractInfoExchange comContractInfoExchange)
    {
        return comContractInfoExchangeMapper.updateComContractInfoExchange(comContractInfoExchange);
    }

    /**
     * 批量删除合同信息存储
     * 
     * @param ids 需要删除的合同信息存储主键
     * @return 结果
     */
    @Override
    public int deleteComContractInfoExchangeByIds(Long[] ids)
    {
        return comContractInfoExchangeMapper.deleteComContractInfoExchangeByIds(ids);
    }

    /**
     * 删除合同信息存储信息
     * 
     * @param id 合同信息存储主键
     * @return 结果
     */
    @Override
    public int deleteComContractInfoExchangeById(Long id)
    {
        return comContractInfoExchangeMapper.deleteComContractInfoExchangeById(id);
    }

    /**
     * 根据任务号从合同任务查找项目成本的组成部分
     *
     * @param taskno 任务号
     * @param sjly 数据来源
     * @return 结果
     */
    @Override
    public List<ComContractInfoExchange> selectProjectCostFromCOmContractInfoExchangeByTaskNo(String taskno,Integer sjly) {
        return comContractInfoExchangeMapper.selectProjectCostFromCOmContractInfoExchangeByTaskNo(taskno,sjly);
    }
}
